996
|
1
|
|
2 #line 3 "lexer.c"
|
|
3
|
|
4 #define YY_INT_ALIGNED short int
|
|
5
|
|
6 /* A lexical scanner generated by flex */
|
|
7
|
|
8 #define FLEX_SCANNER
|
|
9 #define YY_FLEX_MAJOR_VERSION 2
|
|
10 #define YY_FLEX_MINOR_VERSION 5
|
|
11 #define YY_FLEX_SUBMINOR_VERSION 35
|
|
12 #if YY_FLEX_SUBMINOR_VERSION > 0
|
|
13 #define FLEX_BETA
|
|
14 #endif
|
|
15
|
|
16 /* First, we deal with platform-specific or compiler-specific issues. */
|
|
17
|
|
18 /* begin standard C headers. */
|
|
19 #include <stdio.h>
|
|
20 #include <string.h>
|
|
21 #include <errno.h>
|
|
22 #include <stdlib.h>
|
|
23
|
|
24 /* end standard C headers. */
|
|
25
|
|
26 /* flex integer type definitions */
|
|
27
|
|
28 #ifndef FLEXINT_H
|
|
29 #define FLEXINT_H
|
|
30
|
|
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
|
32
|
|
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
34
|
|
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
|
36 * if you want the limit (max/min) macros for int types.
|
|
37 */
|
|
38 #ifndef __STDC_LIMIT_MACROS
|
|
39 #define __STDC_LIMIT_MACROS 1
|
|
40 #endif
|
|
41
|
|
42 #include <inttypes.h>
|
|
43 typedef int8_t flex_int8_t;
|
|
44 typedef uint8_t flex_uint8_t;
|
|
45 typedef int16_t flex_int16_t;
|
|
46 typedef uint16_t flex_uint16_t;
|
|
47 typedef int32_t flex_int32_t;
|
|
48 typedef uint32_t flex_uint32_t;
|
|
49 #else
|
|
50 typedef signed char flex_int8_t;
|
|
51 typedef short int flex_int16_t;
|
|
52 typedef int flex_int32_t;
|
|
53 typedef unsigned char flex_uint8_t;
|
|
54 typedef unsigned short int flex_uint16_t;
|
|
55 typedef unsigned int flex_uint32_t;
|
|
56
|
|
57 /* Limits of integral types. */
|
|
58 #ifndef INT8_MIN
|
|
59 #define INT8_MIN (-128)
|
|
60 #endif
|
|
61 #ifndef INT16_MIN
|
|
62 #define INT16_MIN (-32767-1)
|
|
63 #endif
|
|
64 #ifndef INT32_MIN
|
|
65 #define INT32_MIN (-2147483647-1)
|
|
66 #endif
|
|
67 #ifndef INT8_MAX
|
|
68 #define INT8_MAX (127)
|
|
69 #endif
|
|
70 #ifndef INT16_MAX
|
|
71 #define INT16_MAX (32767)
|
|
72 #endif
|
|
73 #ifndef INT32_MAX
|
|
74 #define INT32_MAX (2147483647)
|
|
75 #endif
|
|
76 #ifndef UINT8_MAX
|
|
77 #define UINT8_MAX (255U)
|
|
78 #endif
|
|
79 #ifndef UINT16_MAX
|
|
80 #define UINT16_MAX (65535U)
|
|
81 #endif
|
|
82 #ifndef UINT32_MAX
|
|
83 #define UINT32_MAX (4294967295U)
|
|
84 #endif
|
|
85
|
|
86 #endif /* ! C99 */
|
|
87
|
|
88 #endif /* ! FLEXINT_H */
|
|
89
|
|
90 #ifdef __cplusplus
|
|
91
|
|
92 /* The "const" storage-class-modifier is valid. */
|
|
93 #define YY_USE_CONST
|
|
94
|
|
95 #else /* ! __cplusplus */
|
|
96
|
|
97 /* C99 requires __STDC__ to be defined as 1. */
|
|
98 #if defined (__STDC__)
|
|
99
|
|
100 #define YY_USE_CONST
|
|
101
|
|
102 #endif /* defined (__STDC__) */
|
|
103 #endif /* ! __cplusplus */
|
|
104
|
|
105 #ifdef YY_USE_CONST
|
|
106 #define yyconst const
|
|
107 #else
|
|
108 #define yyconst
|
|
109 #endif
|
|
110
|
|
111 /* Returned upon end-of-file. */
|
|
112 #define YY_NULL 0
|
|
113
|
|
114 /* Promotes a possibly negative, possibly signed char to an unsigned
|
|
115 * integer for use as an array index. If the signed char is negative,
|
|
116 * we want to instead treat it as an 8-bit unsigned char, hence the
|
|
117 * double cast.
|
|
118 */
|
|
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
|
120
|
|
121 /* Enter a start condition. This macro really ought to take a parameter,
|
|
122 * but we do it the disgusting crufty way forced on us by the ()-less
|
|
123 * definition of BEGIN.
|
|
124 */
|
|
125 #define BEGIN (yy_start) = 1 + 2 *
|
|
126
|
|
127 /* Translate the current start state into a value that can be later handed
|
|
128 * to BEGIN to return to the state. The YYSTATE alias is for lex
|
|
129 * compatibility.
|
|
130 */
|
|
131 #define YY_START (((yy_start) - 1) / 2)
|
|
132 #define YYSTATE YY_START
|
|
133
|
|
134 /* Action number for EOF rule of a given start state. */
|
|
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
|
136
|
|
137 /* Special action meaning "start processing a new file". */
|
|
138 #define YY_NEW_FILE yyrestart(yyin )
|
|
139
|
|
140 #define YY_END_OF_BUFFER_CHAR 0
|
|
141
|
|
142 /* Size of default input buffer. */
|
|
143 #ifndef YY_BUF_SIZE
|
|
144 #define YY_BUF_SIZE 16384
|
|
145 #endif
|
|
146
|
|
147 /* The state buf must be large enough to hold one state per character in the main buffer.
|
|
148 */
|
|
149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
|
|
150
|
|
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
|
152 #define YY_TYPEDEF_YY_BUFFER_STATE
|
|
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|
154 #endif
|
|
155
|
|
156 extern int yyleng;
|
|
157
|
|
158 extern FILE *yyin, *yyout;
|
|
159
|
|
160 #define EOB_ACT_CONTINUE_SCAN 0
|
|
161 #define EOB_ACT_END_OF_FILE 1
|
|
162 #define EOB_ACT_LAST_MATCH 2
|
|
163
|
|
164 #define YY_LESS_LINENO(n)
|
|
165
|
|
166 /* Return all but the first "n" matched characters back to the input stream. */
|
|
167 #define yyless(n) \
|
|
168 do \
|
|
169 { \
|
|
170 /* Undo effects of setting up yytext. */ \
|
|
171 int yyless_macro_arg = (n); \
|
|
172 YY_LESS_LINENO(yyless_macro_arg);\
|
|
173 *yy_cp = (yy_hold_char); \
|
|
174 YY_RESTORE_YY_MORE_OFFSET \
|
|
175 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
|
|
176 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
|
177 } \
|
|
178 while ( 0 )
|
|
179
|
|
180 #define unput(c) yyunput( c, (yytext_ptr) )
|
|
181
|
|
182 #ifndef YY_TYPEDEF_YY_SIZE_T
|
|
183 #define YY_TYPEDEF_YY_SIZE_T
|
|
184 typedef size_t yy_size_t;
|
|
185 #endif
|
|
186
|
|
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
|
|
188 #define YY_STRUCT_YY_BUFFER_STATE
|
|
189 struct yy_buffer_state
|
|
190 {
|
|
191 FILE *yy_input_file;
|
|
192
|
|
193 char *yy_ch_buf; /* input buffer */
|
|
194 char *yy_buf_pos; /* current position in input buffer */
|
|
195
|
|
196 /* Size of input buffer in bytes, not including room for EOB
|
|
197 * characters.
|
|
198 */
|
|
199 yy_size_t yy_buf_size;
|
|
200
|
|
201 /* Number of characters read into yy_ch_buf, not including EOB
|
|
202 * characters.
|
|
203 */
|
|
204 int yy_n_chars;
|
|
205
|
|
206 /* Whether we "own" the buffer - i.e., we know we created it,
|
|
207 * and can realloc() it to grow it, and should free() it to
|
|
208 * delete it.
|
|
209 */
|
|
210 int yy_is_our_buffer;
|
|
211
|
|
212 /* Whether this is an "interactive" input source; if so, and
|
|
213 * if we're using stdio for input, then we want to use getc()
|
|
214 * instead of fread(), to make sure we stop fetching input after
|
|
215 * each newline.
|
|
216 */
|
|
217 int yy_is_interactive;
|
|
218
|
|
219 /* Whether we're considered to be at the beginning of a line.
|
|
220 * If so, '^' rules will be active on the next match, otherwise
|
|
221 * not.
|
|
222 */
|
|
223 int yy_at_bol;
|
|
224
|
|
225 int yy_bs_lineno; /**< The line count. */
|
|
226 int yy_bs_column; /**< The column count. */
|
|
227
|
|
228 /* Whether to try to fill the input buffer when we reach the
|
|
229 * end of it.
|
|
230 */
|
|
231 int yy_fill_buffer;
|
|
232
|
|
233 int yy_buffer_status;
|
|
234
|
|
235 #define YY_BUFFER_NEW 0
|
|
236 #define YY_BUFFER_NORMAL 1
|
|
237 /* When an EOF's been seen but there's still some text to process
|
|
238 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
|
239 * shouldn't try reading from the input source any more. We might
|
|
240 * still have a bunch of tokens to match, though, because of
|
|
241 * possible backing-up.
|
|
242 *
|
|
243 * When we actually see the EOF, we change the status to "new"
|
|
244 * (via yyrestart()), so that the user can continue scanning by
|
|
245 * just pointing yyin at a new input file.
|
|
246 */
|
|
247 #define YY_BUFFER_EOF_PENDING 2
|
|
248
|
|
249 };
|
|
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
|
251
|
|
252 /* Stack of input buffers. */
|
|
253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
|
|
254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
|
|
255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
|
256
|
|
257 /* We provide macros for accessing buffer states in case in the
|
|
258 * future we want to put the buffer states in a more general
|
|
259 * "scanner state".
|
|
260 *
|
|
261 * Returns the top of the stack, or NULL.
|
|
262 */
|
|
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
|
|
264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
|
|
265 : NULL)
|
|
266
|
|
267 /* Same as previous macro, but useful when we know that the buffer stack is not
|
|
268 * NULL or when we need an lvalue. For internal use only.
|
|
269 */
|
|
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
|
|
271
|
|
272 /* yy_hold_char holds the character lost when yytext is formed. */
|
|
273 static char yy_hold_char;
|
|
274 static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
275 int yyleng;
|
|
276
|
|
277 /* Points to current character in buffer. */
|
|
278 static char *yy_c_buf_p = (char *) 0;
|
|
279 static int yy_init = 0; /* whether we need to initialize */
|
|
280 static int yy_start = 0; /* start state number */
|
|
281
|
|
282 /* Flag which is used to allow yywrap()'s to do buffer switches
|
|
283 * instead of setting up a fresh yyin. A bit of a hack ...
|
|
284 */
|
|
285 static int yy_did_buffer_switch_on_eof;
|
|
286
|
|
287 void yyrestart (FILE *input_file );
|
|
288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
|
|
289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
|
|
290 void yy_delete_buffer (YY_BUFFER_STATE b );
|
|
291 void yy_flush_buffer (YY_BUFFER_STATE b );
|
|
292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
|
|
293 void yypop_buffer_state (void );
|
|
294
|
|
295 static void yyensure_buffer_stack (void );
|
|
296 static void yy_load_buffer_state (void );
|
|
297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
|
|
298
|
|
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
|
|
300
|
|
301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
|
|
302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
|
|
303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
|
|
304
|
|
305 void *yyalloc (yy_size_t );
|
|
306 void *yyrealloc (void *,yy_size_t );
|
|
307 void yyfree (void * );
|
|
308
|
|
309 #define yy_new_buffer yy_create_buffer
|
|
310
|
|
311 #define yy_set_interactive(is_interactive) \
|
|
312 { \
|
|
313 if ( ! YY_CURRENT_BUFFER ){ \
|
|
314 yyensure_buffer_stack (); \
|
|
315 YY_CURRENT_BUFFER_LVALUE = \
|
|
316 yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
|
317 } \
|
|
318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
|
319 }
|
|
320
|
|
321 #define yy_set_bol(at_bol) \
|
|
322 { \
|
|
323 if ( ! YY_CURRENT_BUFFER ){\
|
|
324 yyensure_buffer_stack (); \
|
|
325 YY_CURRENT_BUFFER_LVALUE = \
|
|
326 yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
|
327 } \
|
|
328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
|
329 }
|
|
330
|
|
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
|
|
332
|
|
333 /* Begin user sect3 */
|
|
334
|
|
335 typedef unsigned char YY_CHAR;
|
|
336
|
|
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
|
338
|
|
339 typedef int yy_state_type;
|
|
340
|
|
341 extern int yylineno;
|
|
342
|
|
343 int yylineno = 1;
|
|
344
|
|
345 extern char *yytext;
|
|
346 #define yytext_ptr yytext
|
|
347
|
|
348 static yy_state_type yy_get_previous_state (void );
|
|
349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
|
|
350 static int yy_get_next_buffer (void );
|
|
351 static void yy_fatal_error (yyconst char msg[] );
|
|
352
|
|
353 /* Done after the current pattern has been matched and before the
|
|
354 * corresponding action - sets up yytext.
|
|
355 */
|
|
356 #define YY_DO_BEFORE_ACTION \
|
|
357 (yytext_ptr) = yy_bp; \
|
|
358 yyleng = (size_t) (yy_cp - yy_bp); \
|
|
359 (yy_hold_char) = *yy_cp; \
|
|
360 *yy_cp = '\0'; \
|
|
361 (yy_c_buf_p) = yy_cp;
|
|
362
|
|
363 #define YY_NUM_RULES 168
|
|
364 #define YY_END_OF_BUFFER 169
|
|
365 /* This struct is not used in this scanner,
|
|
366 but its presence is necessary. */
|
|
367 struct yy_trans_info
|
|
368 {
|
|
369 flex_int32_t yy_verify;
|
|
370 flex_int32_t yy_nxt;
|
|
371 };
|
|
372 static yyconst flex_int16_t yy_accept[646] =
|
|
373 { 0,
|
|
374 164, 164, 169, 167, 164, 164, 49, 7, 11, 167,
|
|
375 37, 48, 167, 163, 5, 3, 35, 1, 1, 4,
|
|
376 6, 167, 43, 46, 165, 165, 165, 165, 165, 165,
|
|
377 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
|
378 165, 165, 38, 165, 36, 45, 2, 167, 44, 34,
|
|
379 12, 13, 14, 39, 64, 65, 8, 40, 167, 167,
|
|
380 167, 0, 164, 0, 70, 0, 0, 1, 1, 47,
|
|
381 74, 0, 0, 0, 0, 73, 0, 0, 0, 0,
|
|
382 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
383 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
384
|
|
385 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
386 0, 0, 0, 0, 15, 16, 17, 0, 0, 0,
|
|
387 0, 0, 70, 0, 50, 0, 0, 0, 0, 0,
|
|
388 0, 0, 0, 0, 0, 0, 0, 52, 0, 0,
|
|
389 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
390 0, 0, 0, 0, 62, 0, 63, 61, 0, 121,
|
|
391 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
392 0, 0, 0, 71, 0, 0, 0, 0, 0, 31,
|
|
393 32, 33, 18, 19, 20, 21, 22, 23, 24, 25,
|
|
394 26, 27, 28, 29, 30, 42, 166, 0, 0, 0,
|
|
395
|
|
396 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
397 0, 0, 0, 0, 139, 0, 0, 0, 0, 0,
|
|
398 0, 0, 0, 0, 0, 0, 0, 0, 136, 66,
|
|
399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
400 0, 0, 0, 0, 0, 0, 0, 0, 41, 0,
|
|
401 0, 9, 10, 0, 0, 0, 68, 0, 0, 0,
|
|
402 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
403 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
404 0, 0, 0, 0, 0, 0, 57, 0, 0, 0,
|
|
405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
406
|
|
407 0, 0, 0, 0, 0, 0, 0, 0, 86, 0,
|
|
408 0, 145, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
409 0, 0, 0, 0, 0, 0, 0, 0, 0, 158,
|
|
410 0, 135, 0, 0, 0, 85, 78, 142, 0, 149,
|
|
411 0, 0, 0, 0, 94, 0, 0, 89, 69, 0,
|
|
412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
413 54, 53, 0, 0, 0, 0, 0, 0, 150, 0,
|
|
414 0, 82, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
415 0, 0, 102, 0, 0, 0, 0, 0, 0, 0,
|
|
416 0, 0, 0, 120, 0, 159, 0, 0, 0, 0,
|
|
417
|
|
418 0, 0, 0, 0, 0, 0, 0, 153, 0, 0,
|
|
419 154, 0, 0, 0, 0, 0, 147, 58, 0, 0,
|
|
420 0, 0, 138, 122, 0, 0, 0, 0, 0, 67,
|
|
421 0, 110, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
422 0, 0, 0, 0, 146, 114, 0, 0, 0, 0,
|
|
423 0, 0, 0, 77, 0, 0, 132, 0, 0, 0,
|
|
424 118, 0, 0, 0, 0, 0, 0, 0, 160, 161,
|
|
425 0, 0, 0, 0, 87, 0, 0, 0, 96, 91,
|
|
426 111, 109, 0, 0, 0, 126, 0, 0, 0, 55,
|
|
427 0, 0, 0, 81, 152, 0, 0, 98, 84, 90,
|
|
428
|
|
429 0, 0, 0, 88, 144, 0, 0, 0, 0, 0,
|
|
430 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
431 117, 0, 140, 0, 0, 0, 0, 0, 156, 0,
|
|
432 0, 125, 141, 0, 0, 0, 151, 0, 97, 0,
|
|
433 0, 0, 0, 0, 0, 0, 0, 105, 0, 106,
|
|
434 0, 0, 0, 0, 0, 0, 0, 116, 104, 0,
|
|
435 133, 131, 79, 0, 0, 0, 0, 134, 119, 0,
|
|
436 157, 0, 0, 127, 0, 0, 0, 0, 80, 155,
|
|
437 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
|
|
438 0, 0, 0, 92, 115, 113, 0, 103, 0, 0,
|
|
439
|
|
440 75, 76, 0, 130, 162, 143, 0, 0, 0, 93,
|
|
441 59, 0, 0, 0, 124, 128, 0, 137, 0, 0,
|
|
442 108, 100, 148, 0, 0, 0, 123, 0, 0, 0,
|
|
443 0, 0, 56, 83, 0, 0, 129, 95, 60, 99,
|
|
444 0, 107, 0, 72, 0
|
|
445 } ;
|
|
446
|
|
447 static yyconst flex_int32_t yy_ec[256] =
|
|
448 { 0,
|
|
449 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
452 1, 2, 1, 4, 5, 6, 7, 8, 9, 10,
|
|
453 11, 1, 12, 13, 14, 15, 16, 17, 17, 18,
|
|
454 18, 18, 18, 17, 17, 17, 17, 19, 20, 21,
|
|
455 1, 1, 22, 23, 24, 25, 26, 27, 28, 29,
|
|
456 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
|
457 40, 41, 42, 43, 44, 45, 46, 47, 48, 33,
|
|
458 1, 49, 1, 50, 51, 1, 1, 1, 52, 1,
|
|
459
|
|
460 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
462 1, 1, 1, 53, 1, 54, 1, 55, 1, 56,
|
|
463 1, 1, 1, 1, 1, 57, 1, 1, 1, 1,
|
|
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 58,
|
|
466 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
|
|
467 69, 70, 1, 1, 1, 1, 1, 71, 72, 1,
|
|
468 1, 1, 1, 73, 1, 1, 1, 1, 74, 75,
|
|
469 76, 1, 1, 77, 1, 1, 1, 1, 1, 1,
|
|
470
|
|
471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
473 1, 1, 1, 78, 1, 79, 1, 1, 1, 1,
|
|
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
476 1, 1, 1, 1, 1
|
|
477 } ;
|
|
478
|
|
479 static yyconst flex_int32_t yy_meta[80] =
|
|
480 { 0,
|
|
481 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
|
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
486 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
488 1, 1, 1, 1, 1, 1, 1, 1, 1
|
|
489 } ;
|
|
490
|
|
491 static yyconst flex_int16_t yy_base[647] =
|
|
492 { 0,
|
|
493 0, 0, 967, 916, 78, 80, 915, 914, 913, 82,
|
|
494 912, 911, 84, 910, 909, 908, 907, 86, 88, 906,
|
|
495 905, 79, 904, 903, 83, 44, 71, 87, 67, 102,
|
|
496 103, 902, 112, 118, 123, 122, 70, 113, 72, 111,
|
|
497 131, 128, 901, 135, 900, 899, 898, 897, 896, 895,
|
|
498 894, 893, 892, 891, 890, 889, 888, 887, 127, 121,
|
|
499 108, 905, 94, 180, 188, 190, 193, 197, 199, 968,
|
|
500 968, 893, 889, 909, 900, 968, 896, 87, 902, 138,
|
|
501 887, 968, 884, 901, 885, 887, 879, 210, 899, 885,
|
|
502 877, 892, 889, 880, 869, 880, 880, 871, 866, 166,
|
|
503
|
|
504 886, 874, 195, 872, 871, 194, 867, 883, 881, 857,
|
|
505 873, 871, 870, 870, 968, 968, 968, 153, 824, 185,
|
|
506 844, 0, 254, 256, 968, 855, 869, 864, 867, 868,
|
|
507 232, 202, 869, 855, 852, 848, 861, 968, 858, 851,
|
|
508 858, 259, 854, 860, 846, 840, 843, 852, 838, 850,
|
|
509 838, 851, 843, 831, 968, 830, 968, 968, 844, 834,
|
|
510 844, 845, 821, 830, 839, 827, 201, 827, 835, 818,
|
|
511 820, 828, 817, 968, 263, 844, 822, 813, 216, 968,
|
|
512 968, 968, 968, 968, 968, 968, 968, 968, 968, 968,
|
|
513 968, 968, 968, 968, 968, 968, 968, 246, 818, 817,
|
|
514
|
|
515 816, 808, 273, 814, 822, 821, 816, 806, 803, 818,
|
|
516 816, 811, 240, 814, 968, 236, 813, 814, 809, 796,
|
|
517 796, 245, 792, 248, 803, 806, 796, 800, 288, 968,
|
|
518 799, 802, 787, 796, 800, 290, 791, 788, 783, 781,
|
|
519 786, 785, 788, 794, 787, 294, 787, 779, 968, 266,
|
|
520 271, 968, 968, 783, 777, 272, 968, 785, 777, 303,
|
|
521 770, 780, 271, 782, 782, 307, 283, 779, 765, 769,
|
|
522 777, 775, 759, 310, 762, 776, 765, 321, 760, 293,
|
|
523 770, 768, 759, 767, 765, 755, 324, 759, 751, 327,
|
|
524 748, 751, 750, 743, 757, 748, 759, 331, 745, 737,
|
|
525
|
|
526 752, 752, 750, 734, 751, 303, 747, 746, 741, 748,
|
|
527 741, 968, 733, 334, 732, 731, 739, 729, 724, 301,
|
|
528 740, 725, 338, 734, 718, 732, 731, 341, 715, 345,
|
|
529 312, 316, 733, 712, 711, 968, 711, 968, 726, 968,
|
|
530 356, 721, 727, 709, 968, 712, 704, 968, 968, 703,
|
|
531 358, 716, 362, 707, 709, 701, 707, 703, 710, 709,
|
|
532 368, 372, 714, 701, 706, 692, 693, 689, 968, 708,
|
|
533 703, 968, 693, 684, 331, 691, 695, 374, 696, 376,
|
|
534 688, 694, 691, 346, 695, 693, 693, 691, 345, 682,
|
|
535 382, 676, 675, 320, 674, 390, 686, 392, 388, 683,
|
|
536
|
|
537 675, 684, 682, 668, 673, 671, 674, 968, 677, 678,
|
|
538 968, 673, 666, 665, 401, 653, 968, 968, 671, 656,
|
|
539 665, 660, 407, 968, 410, 671, 413, 656, 656, 968,
|
|
540 415, 968, 664, 655, 273, 649, 659, 391, 661, 659,
|
|
541 656, 648, 418, 654, 968, 968, 422, 646, 655, 653,
|
|
542 636, 428, 635, 968, 651, 645, 431, 638, 637, 637,
|
|
543 968, 645, 435, 441, 645, 630, 444, 446, 968, 968,
|
|
544 626, 448, 641, 644, 968, 630, 642, 631, 968, 968,
|
|
545 968, 968, 640, 635, 636, 463, 465, 620, 634, 968,
|
|
546 632, 467, 614, 620, 968, 628, 428, 623, 968, 968,
|
|
547
|
|
548 617, 609, 472, 968, 968, 628, 474, 614, 620, 605,
|
|
549 968, 612, 476, 619, 610, 601, 607, 478, 480, 607,
|
|
550 968, 612, 968, 482, 484, 597, 596, 505, 968, 603,
|
|
551 487, 507, 968, 385, 608, 610, 968, 594, 598, 610,
|
|
552 510, 512, 594, 603, 586, 586, 600, 968, 589, 968,
|
|
553 586, 585, 591, 580, 489, 557, 558, 968, 968, 548,
|
|
554 968, 516, 968, 542, 535, 522, 525, 968, 968, 530,
|
|
555 968, 528, 525, 968, 535, 532, 519, 516, 968, 968,
|
|
556 503, 469, 450, 549, 551, 435, 394, 396, 968, 384,
|
|
557 387, 377, 366, 968, 968, 968, 282, 968, 553, 555,
|
|
558
|
|
559 968, 968, 568, 968, 968, 968, 557, 578, 257, 968,
|
|
560 574, 244, 235, 580, 968, 968, 235, 968, 205, 183,
|
|
561 968, 968, 968, 585, 597, 602, 968, 148, 590, 141,
|
|
562 123, 88, 968, 968, 91, 607, 968, 968, 968, 968,
|
|
563 604, 968, 609, 968, 968, 97
|
|
564 } ;
|
|
565
|
|
566 static yyconst flex_int16_t yy_def[647] =
|
|
567 { 0,
|
|
568 645, 1, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
569 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
570 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
571 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
572 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
573 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
574 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
575 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
576 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
577 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
578
|
|
579 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
580 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
581 645, 646, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
582 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
583 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
584 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
585 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
586 645, 645, 645, 645, 645, 646, 645, 645, 646, 645,
|
|
587 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
588 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
589
|
|
590 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
591 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
592 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
593 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
594 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
595 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
596 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
597 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
598 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
599 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
600
|
|
601 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
602 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
603 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
604 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
605 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
606 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
607 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
608 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
609 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
610 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
611
|
|
612 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
613 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
614 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
615 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
616 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
617 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
618 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
619 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
620 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
621 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
622
|
|
623 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
624 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
625 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
626 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
627 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
628 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
629 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
630 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
631 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
632 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
633
|
|
634 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
635 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
636 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
637 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
638 645, 645, 645, 645, 0, 645
|
|
639 } ;
|
|
640
|
|
641 static yyconst flex_int16_t yy_nxt[1048] =
|
|
642 { 0,
|
|
643 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
|
644 4, 14, 15, 4, 16, 17, 18, 19, 20, 21,
|
|
645 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
646 32, 33, 32, 32, 34, 35, 36, 37, 38, 39,
|
|
647 40, 41, 42, 32, 43, 44, 32, 32, 45, 46,
|
|
648 47, 48, 49, 50, 4, 4, 4, 4, 4, 51,
|
|
649 52, 53, 54, 4, 4, 4, 4, 55, 4, 56,
|
|
650 4, 4, 4, 57, 58, 4, 59, 60, 61, 63,
|
|
651 63, 63, 63, 64, 64, 66, 66, 68, 68, 69,
|
|
652 69, 76, 71, 62, 77, 63, 63, 197, 65, 65,
|
|
653
|
|
654 67, 67, 68, 68, 68, 68, 101, 72, 78, 73,
|
|
655 70, 79, 74, 83, 80, 105, 62, 75, 81, 62,
|
|
656 62, 62, 131, 132, 82, 84, 642, 62, 62, 641,
|
|
657 98, 62, 62, 62, 87, 62, 62, 62, 106, 85,
|
|
658 88, 90, 86, 89, 102, 93, 95, 103, 91, 99,
|
|
659 96, 62, 62, 104, 92, 94, 107, 62, 640, 100,
|
|
660 62, 62, 62, 120, 121, 112, 97, 62, 110, 134,
|
|
661 62, 62, 62, 108, 109, 113, 62, 62, 639, 135,
|
|
662 62, 64, 64, 638, 62, 118, 115, 116, 117, 123,
|
|
663 123, 66, 66, 119, 124, 124, 65, 65, 68, 68,
|
|
664
|
|
665 69, 69, 157, 125, 123, 123, 67, 67, 158, 124,
|
|
666 124, 142, 142, 68, 68, 68, 68, 165, 161, 166,
|
|
667 167, 70, 162, 180, 181, 168, 635, 206, 238, 169,
|
|
668 207, 252, 239, 143, 144, 170, 171, 274, 274, 208,
|
|
669 634, 145, 183, 184, 185, 186, 187, 188, 189, 190,
|
|
670 191, 192, 193, 194, 195, 123, 123, 124, 124, 203,
|
|
671 142, 142, 633, 204, 246, 246, 125, 205, 253, 254,
|
|
672 123, 123, 124, 124, 260, 260, 271, 255, 632, 275,
|
|
673 272, 281, 143, 144, 284, 282, 247, 631, 285, 290,
|
|
674 290, 298, 298, 312, 248, 246, 246, 313, 314, 318,
|
|
675
|
|
676 628, 261, 315, 319, 260, 260, 324, 325, 328, 328,
|
|
677 330, 274, 274, 496, 331, 497, 291, 247, 623, 292,
|
|
678 345, 299, 341, 341, 346, 353, 353, 300, 290, 290,
|
|
679 372, 261, 298, 298, 373, 380, 380, 387, 329, 391,
|
|
680 391, 388, 328, 328, 342, 343, 398, 398, 400, 401,
|
|
681 354, 460, 402, 275, 399, 291, 403, 341, 341, 415,
|
|
682 415, 461, 355, 353, 353, 381, 392, 439, 300, 425,
|
|
683 425, 440, 329, 427, 427, 443, 443, 380, 380, 342,
|
|
684 343, 455, 449, 391, 391, 416, 450, 456, 354, 467,
|
|
685 467, 463, 463, 398, 398, 622, 426, 444, 428, 464,
|
|
686
|
|
687 355, 399, 415, 415, 468, 468, 621, 381, 487, 487,
|
|
688 392, 425, 425, 620, 427, 427, 492, 492, 500, 443,
|
|
689 443, 577, 501, 507, 507, 578, 465, 619, 416, 513,
|
|
690 513, 618, 518, 518, 617, 488, 463, 463, 426, 428,
|
|
691 519, 444, 524, 524, 464, 467, 467, 528, 528, 531,
|
|
692 531, 549, 493, 508, 514, 550, 529, 525, 525, 551,
|
|
693 468, 468, 528, 528, 541, 541, 487, 487, 492, 492,
|
|
694 616, 532, 542, 555, 555, 507, 507, 513, 513, 518,
|
|
695 518, 566, 566, 524, 524, 570, 570, 519, 531, 531,
|
|
696 555, 555, 613, 488, 571, 612, 567, 567, 525, 525,
|
|
697
|
|
698 570, 570, 514, 556, 493, 508, 528, 528, 575, 575,
|
|
699 532, 541, 541, 584, 584, 529, 576, 599, 599, 542,
|
|
700 556, 528, 528, 566, 566, 600, 603, 603, 585, 585,
|
|
701 611, 570, 570, 607, 607, 604, 575, 575, 567, 567,
|
|
702 571, 603, 603, 610, 576, 609, 570, 570, 608, 608,
|
|
703 584, 584, 614, 614, 599, 599, 624, 624, 607, 607,
|
|
704 606, 615, 600, 605, 602, 585, 585, 614, 614, 603,
|
|
705 603, 625, 625, 608, 608, 629, 629, 601, 604, 626,
|
|
706 626, 614, 614, 598, 603, 603, 624, 624, 627, 597,
|
|
707 615, 629, 629, 596, 626, 626, 614, 614, 636, 636,
|
|
708
|
|
709 630, 625, 625, 626, 626, 643, 643, 637, 636, 636,
|
|
710 643, 643, 627, 636, 636, 595, 630, 637, 626, 626,
|
|
711 594, 593, 592, 636, 636, 591, 590, 644, 589, 588,
|
|
712 587, 586, 644, 583, 582, 581, 580, 579, 574, 573,
|
|
713 572, 569, 568, 565, 564, 563, 562, 561, 560, 559,
|
|
714 558, 557, 554, 553, 552, 548, 547, 546, 545, 544,
|
|
715 543, 540, 539, 538, 537, 536, 535, 534, 533, 530,
|
|
716 527, 526, 523, 522, 521, 520, 517, 516, 515, 512,
|
|
717 511, 510, 509, 506, 505, 504, 503, 502, 499, 498,
|
|
718 495, 494, 491, 490, 489, 486, 485, 484, 483, 482,
|
|
719
|
|
720 481, 480, 479, 478, 477, 476, 475, 474, 473, 472,
|
|
721 471, 470, 469, 466, 462, 459, 458, 457, 454, 453,
|
|
722 452, 451, 448, 447, 446, 445, 442, 441, 438, 437,
|
|
723 436, 435, 434, 433, 432, 431, 430, 429, 424, 423,
|
|
724 422, 421, 420, 419, 418, 417, 414, 413, 412, 411,
|
|
725 410, 409, 408, 407, 406, 405, 404, 397, 396, 395,
|
|
726 394, 393, 390, 389, 386, 385, 384, 383, 382, 379,
|
|
727 378, 377, 376, 375, 374, 371, 370, 369, 368, 367,
|
|
728 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
|
|
729 356, 352, 351, 350, 349, 348, 347, 344, 340, 339,
|
|
730
|
|
731 338, 337, 336, 335, 334, 333, 332, 327, 326, 323,
|
|
732 322, 321, 320, 317, 316, 311, 310, 309, 308, 307,
|
|
733 306, 305, 304, 303, 302, 301, 297, 296, 295, 294,
|
|
734 293, 289, 288, 287, 286, 283, 280, 279, 278, 277,
|
|
735 276, 273, 270, 269, 268, 267, 266, 265, 264, 263,
|
|
736 262, 259, 258, 257, 256, 251, 250, 249, 245, 244,
|
|
737 243, 242, 241, 240, 237, 236, 235, 234, 233, 232,
|
|
738 231, 230, 229, 228, 227, 226, 225, 224, 223, 222,
|
|
739 221, 220, 219, 218, 217, 216, 215, 214, 213, 212,
|
|
740 211, 210, 209, 202, 201, 200, 199, 198, 196, 182,
|
|
741
|
|
742 179, 178, 177, 176, 175, 174, 173, 172, 164, 163,
|
|
743 160, 159, 156, 155, 154, 153, 152, 151, 150, 149,
|
|
744 148, 147, 146, 141, 140, 139, 138, 137, 136, 133,
|
|
745 130, 129, 128, 127, 126, 122, 62, 62, 62, 62,
|
|
746 62, 62, 62, 62, 62, 62, 114, 62, 62, 62,
|
|
747 111, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
|
748 62, 62, 62, 62, 62, 62, 645, 3, 645, 645,
|
|
749 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
750 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
751 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
752
|
|
753 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
754 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
755 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
756 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
757 645, 645, 645, 645, 645, 645, 645
|
|
758 } ;
|
|
759
|
|
760 static yyconst flex_int16_t yy_chk[1048] =
|
|
761 { 0,
|
|
762 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
763 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
764 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
765 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
766 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
767 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
768 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
769 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
|
|
770 5, 6, 6, 10, 10, 13, 13, 18, 18, 19,
|
|
771 19, 26, 22, 26, 27, 63, 63, 646, 10, 10,
|
|
772
|
|
773 13, 13, 18, 18, 19, 19, 37, 25, 27, 25,
|
|
774 19, 27, 25, 29, 28, 39, 29, 25, 28, 37,
|
|
775 27, 39, 78, 78, 28, 30, 635, 5, 22, 632,
|
|
776 36, 10, 25, 13, 31, 18, 28, 19, 40, 30,
|
|
777 31, 33, 30, 31, 38, 34, 35, 38, 33, 36,
|
|
778 35, 30, 31, 38, 33, 34, 41, 61, 631, 36,
|
|
779 40, 33, 38, 61, 61, 44, 35, 34, 42, 80,
|
|
780 60, 36, 35, 41, 41, 44, 59, 42, 630, 80,
|
|
781 41, 64, 64, 628, 44, 60, 59, 59, 59, 65,
|
|
782 65, 66, 66, 60, 67, 67, 64, 64, 68, 68,
|
|
783
|
|
784 69, 69, 100, 67, 65, 65, 66, 66, 100, 67,
|
|
785 67, 88, 88, 68, 68, 69, 69, 106, 103, 106,
|
|
786 106, 69, 103, 118, 118, 106, 620, 132, 167, 106,
|
|
787 132, 179, 167, 88, 88, 106, 106, 216, 216, 132,
|
|
788 619, 88, 120, 120, 120, 120, 120, 120, 120, 120,
|
|
789 120, 120, 120, 120, 120, 123, 123, 124, 124, 131,
|
|
790 142, 142, 617, 131, 175, 175, 124, 131, 179, 198,
|
|
791 123, 123, 124, 124, 203, 203, 213, 198, 613, 216,
|
|
792 213, 222, 142, 142, 224, 222, 175, 612, 224, 229,
|
|
793 229, 236, 236, 250, 175, 246, 246, 250, 251, 256,
|
|
794
|
|
795 609, 203, 251, 256, 260, 260, 263, 263, 266, 266,
|
|
796 267, 274, 274, 435, 267, 435, 229, 246, 597, 229,
|
|
797 280, 236, 278, 278, 280, 287, 287, 236, 290, 290,
|
|
798 306, 260, 298, 298, 306, 314, 314, 320, 266, 323,
|
|
799 323, 320, 328, 328, 278, 278, 330, 330, 331, 331,
|
|
800 287, 394, 332, 274, 330, 290, 332, 341, 341, 351,
|
|
801 351, 394, 287, 353, 353, 314, 323, 375, 298, 361,
|
|
802 361, 375, 328, 362, 362, 378, 378, 380, 380, 341,
|
|
803 341, 389, 384, 391, 391, 351, 384, 389, 353, 399,
|
|
804 399, 396, 396, 398, 398, 593, 361, 378, 362, 396,
|
|
805
|
|
806 353, 398, 415, 415, 399, 399, 592, 380, 423, 423,
|
|
807 391, 425, 425, 591, 427, 427, 431, 431, 438, 443,
|
|
808 443, 534, 438, 447, 447, 534, 396, 590, 415, 452,
|
|
809 452, 588, 457, 457, 587, 423, 463, 463, 425, 427,
|
|
810 457, 443, 464, 464, 463, 467, 467, 468, 468, 472,
|
|
811 472, 497, 431, 447, 452, 497, 468, 464, 464, 497,
|
|
812 467, 467, 468, 468, 486, 486, 487, 487, 492, 492,
|
|
813 586, 472, 486, 503, 503, 507, 507, 513, 513, 518,
|
|
814 518, 519, 519, 524, 524, 525, 525, 518, 531, 531,
|
|
815 555, 555, 583, 487, 525, 582, 519, 519, 524, 524,
|
|
816
|
|
817 525, 525, 513, 503, 492, 507, 528, 528, 532, 532,
|
|
818 531, 541, 541, 542, 542, 528, 532, 562, 562, 541,
|
|
819 555, 528, 528, 566, 566, 562, 567, 567, 542, 542,
|
|
820 581, 570, 570, 576, 576, 567, 575, 575, 566, 566,
|
|
821 570, 567, 567, 578, 575, 577, 570, 570, 576, 576,
|
|
822 584, 584, 585, 585, 599, 599, 600, 600, 607, 607,
|
|
823 573, 585, 599, 572, 565, 584, 584, 585, 585, 603,
|
|
824 603, 600, 600, 607, 607, 611, 611, 564, 603, 608,
|
|
825 608, 614, 614, 560, 603, 603, 624, 624, 608, 557,
|
|
826 614, 629, 629, 556, 608, 608, 614, 614, 625, 625,
|
|
827
|
|
828 611, 624, 624, 626, 626, 641, 641, 625, 636, 636,
|
|
829 643, 643, 626, 625, 625, 554, 629, 636, 626, 626,
|
|
830 553, 552, 551, 636, 636, 549, 547, 641, 546, 545,
|
|
831 544, 543, 643, 540, 539, 538, 536, 535, 530, 527,
|
|
832 526, 522, 520, 517, 516, 515, 514, 512, 510, 509,
|
|
833 508, 506, 502, 501, 498, 496, 494, 493, 491, 489,
|
|
834 488, 485, 484, 483, 478, 477, 476, 474, 473, 471,
|
|
835 466, 465, 462, 460, 459, 458, 456, 455, 453, 451,
|
|
836 450, 449, 448, 444, 442, 441, 440, 439, 437, 436,
|
|
837 434, 433, 429, 428, 426, 422, 421, 420, 419, 416,
|
|
838
|
|
839 414, 413, 412, 410, 409, 407, 406, 405, 404, 403,
|
|
840 402, 401, 400, 397, 395, 393, 392, 390, 388, 387,
|
|
841 386, 385, 383, 382, 381, 379, 377, 376, 374, 373,
|
|
842 371, 370, 368, 367, 366, 365, 364, 363, 360, 359,
|
|
843 358, 357, 356, 355, 354, 352, 350, 347, 346, 344,
|
|
844 343, 342, 339, 337, 335, 334, 333, 329, 327, 326,
|
|
845 325, 324, 322, 321, 319, 318, 317, 316, 315, 313,
|
|
846 311, 310, 309, 308, 307, 305, 304, 303, 302, 301,
|
|
847 300, 299, 297, 296, 295, 294, 293, 292, 291, 289,
|
|
848 288, 286, 285, 284, 283, 282, 281, 279, 277, 276,
|
|
849
|
|
850 275, 273, 272, 271, 270, 269, 268, 265, 264, 262,
|
|
851 261, 259, 258, 255, 254, 248, 247, 245, 244, 243,
|
|
852 242, 241, 240, 239, 238, 237, 235, 234, 233, 232,
|
|
853 231, 228, 227, 226, 225, 223, 221, 220, 219, 218,
|
|
854 217, 214, 212, 211, 210, 209, 208, 207, 206, 205,
|
|
855 204, 202, 201, 200, 199, 178, 177, 176, 173, 172,
|
|
856 171, 170, 169, 168, 166, 165, 164, 163, 162, 161,
|
|
857 160, 159, 156, 154, 153, 152, 151, 150, 149, 148,
|
|
858 147, 146, 145, 144, 143, 141, 140, 139, 137, 136,
|
|
859 135, 134, 133, 130, 129, 128, 127, 126, 121, 119,
|
|
860
|
|
861 114, 113, 112, 111, 110, 109, 108, 107, 105, 104,
|
|
862 102, 101, 99, 98, 97, 96, 95, 94, 93, 92,
|
|
863 91, 90, 89, 87, 86, 85, 84, 83, 81, 79,
|
|
864 77, 75, 74, 73, 72, 62, 58, 57, 56, 55,
|
|
865 54, 53, 52, 51, 50, 49, 48, 47, 46, 45,
|
|
866 43, 32, 24, 23, 21, 20, 17, 16, 15, 14,
|
|
867 12, 11, 9, 8, 7, 4, 3, 645, 645, 645,
|
|
868 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
869 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
870 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
871
|
|
872 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
873 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
874 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
875 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
|
876 645, 645, 645, 645, 645, 645, 645
|
|
877 } ;
|
|
878
|
|
879 static yy_state_type yy_last_accepting_state;
|
|
880 static char *yy_last_accepting_cpos;
|
|
881
|
|
882 extern int yy_flex_debug;
|
|
883 int yy_flex_debug = 0;
|
|
884
|
|
885 /* The intent behind this definition is that it'll catch
|
|
886 * any uses of REJECT which flex missed.
|
|
887 */
|
|
888 #define REJECT reject_used_but_not_detected
|
|
889 #define yymore() yymore_used_but_not_detected
|
|
890 #define YY_MORE_ADJ 0
|
|
891 #define YY_RESTORE_YY_MORE_OFFSET
|
|
892 char *yytext;
|
|
893 #line 1 "lexer.l"
|
|
894 #line 5 "lexer.l"
|
|
895 /* the directives above are for Solaris lex, and will be ignored by
|
|
896 * flex */
|
|
897
|
|
898 /*
|
|
899 * NAME
|
|
900 * lexer.l -- source for the C-INTERCAL lexical analyzer.
|
|
901 *
|
|
902 LICENSE TERMS
|
|
903 Copyright (C) 1996 Eric S. Raymond
|
|
904
|
|
905 This program is free software; you can redistribute it and/or modify
|
|
906 it under the terms of the GNU General Public License as published by
|
|
907 the Free Software Foundation; either version 2 of the License, or
|
|
908 (at your option) any later version.
|
|
909
|
|
910 This program is distributed in the hope that it will be useful,
|
|
911 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
912 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
913 GNU General Public License for more details.
|
|
914
|
|
915 You should have received a copy of the GNU General Public License
|
|
916 along with this program; if not, write to the Free Software
|
|
917 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
918 */
|
|
919 #include "config.h"
|
|
920 #include <stdio.h>
|
|
921 #include <stdlib.h>
|
|
922 #include <ctype.h>
|
|
923 #include <string.h>
|
|
924 #include "ick.h"
|
|
925 #include "parser.h"
|
|
926 #include "ick_lose.h"
|
|
927
|
|
928 /*#undef wchar_t*/
|
|
929 /*#define wchar_t unsigned char*/
|
|
930
|
|
931 #ifndef yywrap
|
|
932 static int yywrap(void)
|
|
933 {
|
|
934 return 1;
|
|
935 }
|
|
936 #endif /* yywrap */
|
|
937
|
|
938 int iyylineno = 1;
|
|
939
|
|
940 #ifdef MAIN
|
|
941 YYSTYPE yylval;
|
|
942 #endif /* MAIN */
|
|
943
|
|
944 char **textlines = NULL;
|
|
945 int textlinecount = 0;
|
|
946 int politesse = 0;
|
|
947 int stbeginline = 0;
|
|
948
|
|
949 /* AIS: Sort out a grammar near-ambiguity */
|
|
950 unsigned long sparkearsstack[SENESTMAX] = {0};
|
|
951 int sparkearslev = 0;
|
|
952
|
|
953 /* AIS: Some symbols are ambiguous between C-INTERCAL and CLC-INTERCAL:
|
|
954 Symbol C-INTERCAL CLC-INTERCAL
|
|
955 NOSPOT _ @
|
|
956 WHIRL @ ?
|
|
957 XOR ? yen, or bookworm (bookworm's also C-INTERCAL legal)
|
|
958 By default, the C-INTERCAL meanings are used; the extern variable clclex
|
|
959 causes CLC-INTERCAL interpretations to be put on the ambiguous symbols.
|
|
960 Otherwise, mixing syntaxes freely is allowed. */
|
|
961 extern int clclex;
|
|
962
|
|
963 #ifdef FLEX_SCANNER
|
|
964 static char linebuf[YY_BUF_SIZE];
|
|
965 #else /* FLEX_SCANNER */
|
|
966 static char linebuf[YYLMAX];
|
|
967 #endif /* FLEX_SCANNER */
|
|
968
|
|
969 static char *lineptr = linebuf;
|
|
970
|
|
971 ick_bool re_send_token = ick_FALSE;
|
|
972
|
|
973 int lexer(void);
|
|
974 static int myatoi(const char *text);
|
|
975 void yyerror(const char *errtype);
|
|
976
|
|
977 #define SETLINENO \
|
|
978 {if (stbeginline == 0) stbeginline = iyylineno;\
|
|
979 else if (stbeginline < 0) stbeginline = 0;}
|
|
980
|
|
981 /* AIS: Keep track of the spark/ears situation */
|
|
982 #define STACKSPARKEARS(a) \
|
|
983 if (sparkearslev+1>=SENESTMAX*32) ick_lose(IE281, iyylineno, (char*) NULL); \
|
|
984 sparkearslev++; sparkearsstack[sparkearslev/32]<<=1; \
|
|
985 sparkearsstack[sparkearslev/32]+=a
|
|
986 #define CLEARSPARKEARSTACK {int i=SENESTMAX; \
|
|
987 while(i--) sparkearsstack[i] = 0;} \
|
|
988 sparkearslev = 0
|
|
989
|
|
990 /*
|
|
991 * The spectacular ugliness of INTERCAL syntax requires that the lexical
|
|
992 * analyzer have two levels. One, embedded in the getc() function, handles
|
|
993 * logical-line continuation and the ! abbrev, and stashes each logical
|
|
994 * line away in a buffer accessible to the code generator (this is necessary
|
|
995 * for the * construct to be interpreted correctly). The upper level is
|
|
996 * generated by lex(1) and does normal tokenizing.
|
|
997 */
|
|
998
|
|
999 #undef getc
|
|
1000 int getc(FILE *fp)
|
|
1001 {
|
|
1002 extern FILE* yyin;
|
|
1003
|
|
1004 static ick_bool bangflag = ick_FALSE;
|
|
1005 static ick_bool backflag = ick_FALSE;
|
|
1006
|
|
1007 static ick_bool eolflag = ick_FALSE;
|
|
1008
|
|
1009 if ((size_t)(lineptr - linebuf) > sizeof linebuf)
|
|
1010 ick_lose(IE666, iyylineno, (char *)NULL);
|
|
1011
|
|
1012 if (bangflag)
|
|
1013 {
|
|
1014 bangflag = ick_FALSE;
|
|
1015 /* *lineptr++ = '!'; */
|
|
1016 return('.');
|
|
1017 }
|
|
1018 else if (backflag) /* converting ctrl-H (backspace) to two chars "^H" */
|
|
1019 {
|
|
1020 backflag = ick_FALSE;
|
|
1021 /* *lineptr++ = '\b'; */
|
|
1022 return('H');
|
|
1023 }
|
|
1024 else
|
|
1025 {
|
|
1026 int c;
|
|
1027 char c_char;
|
|
1028 /*fprintf(stderr,"about to fgetc(\045p)",(void*)fp);*/
|
|
1029
|
|
1030 c_char=0; /* AIS */
|
|
1031 (void)fread(&c_char,1,1,fp);
|
|
1032 /* AIS: ignore the first \r in a row to deal with DOS newlines. The
|
|
1033 second in a row is definitely an error, though, and will be caught
|
|
1034 later on. */
|
|
1035 if(c_char=='\r') (void)fread(&c_char,1,1,fp);
|
|
1036 c = c_char;
|
|
1037
|
|
1038 if(feof(fp)) c=EOF;
|
|
1039 if(!eolflag && c == EOF) c = '\n';
|
|
1040
|
|
1041 /*fprintf(stderr,"getc input a character: %c\n",c);*/
|
|
1042
|
|
1043 if (feof(yyin))
|
|
1044 {
|
|
1045 *lineptr = '\0';
|
|
1046 if(eolflag) return(EOF);
|
|
1047 if(c=='\0' || c==EOF) c='\n';
|
|
1048 }
|
|
1049
|
|
1050 eolflag = ick_FALSE;
|
|
1051
|
|
1052 if (c == '!')
|
|
1053 {
|
|
1054 *lineptr++ = '!';
|
|
1055 bangflag = ick_TRUE;
|
|
1056 return(c = '\'');
|
|
1057 }
|
|
1058 else if (c == '\b') /* convert ctrl-H (backspace) to
|
|
1059 two chars "^" and "H" so lex can take it */
|
|
1060 {
|
|
1061 *lineptr++ = '\b';
|
|
1062 backflag = ick_TRUE;
|
|
1063 return(c = '^');
|
|
1064 }
|
|
1065 else if (c == '\n')
|
|
1066 {
|
|
1067 *lineptr = '\0';
|
|
1068 lineptr = linebuf;
|
|
1069 if (iyylineno >= textlinecount)
|
|
1070 {
|
|
1071 textlinecount += ALLOC_CHUNK;
|
|
1072 if (textlines)
|
|
1073 textlines = realloc(textlines,
|
|
1074 textlinecount * sizeof(char*));
|
|
1075 else
|
|
1076 textlines = malloc(textlinecount * sizeof(char*));
|
|
1077 if (!textlines)
|
|
1078 ick_lose(IE666, iyylineno, (char *)NULL);
|
|
1079 }
|
|
1080 textlines[iyylineno] = malloc(1 + strlen(linebuf));
|
|
1081 if (!textlines[iyylineno])
|
|
1082 ick_lose(IE666, iyylineno, (char *)NULL);
|
|
1083 strcpy(textlines[iyylineno], linebuf);
|
|
1084 iyylineno++;
|
|
1085 eolflag=ick_TRUE;
|
|
1086 return('\n');
|
|
1087 }
|
|
1088 else
|
|
1089 {
|
|
1090 return(*lineptr++ = c);
|
|
1091 }
|
|
1092 }
|
|
1093 }
|
|
1094
|
|
1095 /* replace YY_INPUT so that it uses our getc function. */
|
|
1096 #undef YY_INPUT
|
|
1097 #define YY_INPUT(buf,result,max_size) \
|
|
1098 { \
|
|
1099 int c = getc(yyin); \
|
|
1100 if (c == EOF) { \
|
|
1101 if (ferror(yyin)) \
|
|
1102 YY_FATAL_ERROR("input in flex scanner failed"); \
|
|
1103 result = YY_NULL; \
|
|
1104 } else { \
|
|
1105 buf[0] = c; \
|
|
1106 result = 1; \
|
|
1107 } \
|
|
1108 }
|
|
1109
|
|
1110 #line 1111 "lexer.c"
|
|
1111
|
|
1112 #define INITIAL 0
|
|
1113
|
|
1114 #ifndef YY_NO_UNISTD_H
|
|
1115 /* Special case for "unistd.h", since it is non-ANSI. We include it way
|
|
1116 * down here because we want the user's section 1 to have been scanned first.
|
|
1117 * The user has a chance to override it with an option.
|
|
1118 */
|
|
1119 #include <unistd.h>
|
|
1120 #endif
|
|
1121
|
|
1122 #ifndef YY_EXTRA_TYPE
|
|
1123 #define YY_EXTRA_TYPE void *
|
|
1124 #endif
|
|
1125
|
|
1126 static int yy_init_globals (void );
|
|
1127
|
|
1128 /* Accessor methods to globals.
|
|
1129 These are made visible to non-reentrant scanners for convenience. */
|
|
1130
|
|
1131 int yylex_destroy (void );
|
|
1132
|
|
1133 int yyget_debug (void );
|
|
1134
|
|
1135 void yyset_debug (int debug_flag );
|
|
1136
|
|
1137 YY_EXTRA_TYPE yyget_extra (void );
|
|
1138
|
|
1139 void yyset_extra (YY_EXTRA_TYPE user_defined );
|
|
1140
|
|
1141 FILE *yyget_in (void );
|
|
1142
|
|
1143 void yyset_in (FILE * in_str );
|
|
1144
|
|
1145 FILE *yyget_out (void );
|
|
1146
|
|
1147 void yyset_out (FILE * out_str );
|
|
1148
|
|
1149 int yyget_leng (void );
|
|
1150
|
|
1151 char *yyget_text (void );
|
|
1152
|
|
1153 int yyget_lineno (void );
|
|
1154
|
|
1155 void yyset_lineno (int line_number );
|
|
1156
|
|
1157 /* Macros after this point can all be overridden by user definitions in
|
|
1158 * section 1.
|
|
1159 */
|
|
1160
|
|
1161 #ifndef YY_SKIP_YYWRAP
|
|
1162 #ifdef __cplusplus
|
|
1163 extern "C" int yywrap (void );
|
|
1164 #else
|
|
1165 extern int yywrap (void );
|
|
1166 #endif
|
|
1167 #endif
|
|
1168
|
|
1169 static void yyunput (int c,char *buf_ptr );
|
|
1170
|
|
1171 #ifndef yytext_ptr
|
|
1172 static void yy_flex_strncpy (char *,yyconst char *,int );
|
|
1173 #endif
|
|
1174
|
|
1175 #ifdef YY_NEED_STRLEN
|
|
1176 static int yy_flex_strlen (yyconst char * );
|
|
1177 #endif
|
|
1178
|
|
1179 #ifndef YY_NO_INPUT
|
|
1180
|
|
1181 #ifdef __cplusplus
|
|
1182 static int yyinput (void );
|
|
1183 #else
|
|
1184 static int input (void );
|
|
1185 #endif
|
|
1186
|
|
1187 #endif
|
|
1188
|
|
1189 /* Amount of stuff to slurp up with each read. */
|
|
1190 #ifndef YY_READ_BUF_SIZE
|
|
1191 #define YY_READ_BUF_SIZE 8192
|
|
1192 #endif
|
|
1193
|
|
1194 /* Copy whatever the last rule matched to the standard output. */
|
|
1195 #ifndef ECHO
|
|
1196 /* This used to be an fputs(), but since the string might contain NUL's,
|
|
1197 * we now use fwrite().
|
|
1198 */
|
|
1199 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
|
1200 #endif
|
|
1201
|
|
1202 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
|
1203 * is returned in "result".
|
|
1204 */
|
|
1205 #ifndef YY_INPUT
|
|
1206 #define YY_INPUT(buf,result,max_size) \
|
|
1207 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
|
1208 { \
|
|
1209 int c = '*'; \
|
|
1210 size_t n; \
|
|
1211 for ( n = 0; n < max_size && \
|
|
1212 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
|
1213 buf[n] = (char) c; \
|
|
1214 if ( c == '\n' ) \
|
|
1215 buf[n++] = (char) c; \
|
|
1216 if ( c == EOF && ferror( yyin ) ) \
|
|
1217 YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
1218 result = n; \
|
|
1219 } \
|
|
1220 else \
|
|
1221 { \
|
|
1222 errno=0; \
|
|
1223 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
|
|
1224 { \
|
|
1225 if( errno != EINTR) \
|
|
1226 { \
|
|
1227 YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
1228 break; \
|
|
1229 } \
|
|
1230 errno=0; \
|
|
1231 clearerr(yyin); \
|
|
1232 } \
|
|
1233 }\
|
|
1234 \
|
|
1235
|
|
1236 #endif
|
|
1237
|
|
1238 /* No semi-colon after return; correct usage is to write "yyterminate();" -
|
|
1239 * we don't want an extra ';' after the "return" because that will cause
|
|
1240 * some compilers to complain about unreachable statements.
|
|
1241 */
|
|
1242 #ifndef yyterminate
|
|
1243 #define yyterminate() return YY_NULL
|
|
1244 #endif
|
|
1245
|
|
1246 /* Number of entries by which start-condition stack grows. */
|
|
1247 #ifndef YY_START_STACK_INCR
|
|
1248 #define YY_START_STACK_INCR 25
|
|
1249 #endif
|
|
1250
|
|
1251 /* Report a fatal error. */
|
|
1252 #ifndef YY_FATAL_ERROR
|
|
1253 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
|
1254 #endif
|
|
1255
|
|
1256 /* end tables serialization structures and prototypes */
|
|
1257
|
|
1258 /* Default declaration of generated scanner - a define so the user can
|
|
1259 * easily add parameters.
|
|
1260 */
|
|
1261 #ifndef YY_DECL
|
|
1262 #define YY_DECL_IS_OURS 1
|
|
1263
|
|
1264 extern int yylex (void);
|
|
1265
|
|
1266 #define YY_DECL int yylex (void)
|
|
1267 #endif /* !YY_DECL */
|
|
1268
|
|
1269 /* Code executed at the beginning of each rule, after yytext and yyleng
|
|
1270 * have been set up.
|
|
1271 */
|
|
1272 #ifndef YY_USER_ACTION
|
|
1273 #define YY_USER_ACTION
|
|
1274 #endif
|
|
1275
|
|
1276 /* Code executed at the end of each rule. */
|
|
1277 #ifndef YY_BREAK
|
|
1278 #define YY_BREAK break;
|
|
1279 #endif
|
|
1280
|
|
1281 #define YY_RULE_SETUP \
|
|
1282 YY_USER_ACTION
|
|
1283
|
|
1284 /** The main scanner function which does all the work.
|
|
1285 */
|
|
1286 YY_DECL
|
|
1287 {
|
|
1288 register yy_state_type yy_current_state;
|
|
1289 register char *yy_cp, *yy_bp;
|
|
1290 register int yy_act;
|
|
1291
|
|
1292 #line 226 "lexer.l"
|
|
1293
|
|
1294
|
|
1295 #line 1296 "lexer.c"
|
|
1296
|
|
1297 if ( !(yy_init) )
|
|
1298 {
|
|
1299 (yy_init) = 1;
|
|
1300
|
|
1301 #ifdef YY_USER_INIT
|
|
1302 YY_USER_INIT;
|
|
1303 #endif
|
|
1304
|
|
1305 if ( ! (yy_start) )
|
|
1306 (yy_start) = 1; /* first start state */
|
|
1307
|
|
1308 if ( ! yyin )
|
|
1309 yyin = stdin;
|
|
1310
|
|
1311 if ( ! yyout )
|
|
1312 yyout = stdout;
|
|
1313
|
|
1314 if ( ! YY_CURRENT_BUFFER ) {
|
|
1315 yyensure_buffer_stack ();
|
|
1316 YY_CURRENT_BUFFER_LVALUE =
|
|
1317 yy_create_buffer(yyin,YY_BUF_SIZE );
|
|
1318 }
|
|
1319
|
|
1320 yy_load_buffer_state( );
|
|
1321 }
|
|
1322
|
|
1323 while ( 1 ) /* loops until end-of-file is reached */
|
|
1324 {
|
|
1325 yy_cp = (yy_c_buf_p);
|
|
1326
|
|
1327 /* Support of yytext. */
|
|
1328 *yy_cp = (yy_hold_char);
|
|
1329
|
|
1330 /* yy_bp points to the position in yy_ch_buf of the start of
|
|
1331 * the current run.
|
|
1332 */
|
|
1333 yy_bp = yy_cp;
|
|
1334
|
|
1335 yy_current_state = (yy_start);
|
|
1336 yy_match:
|
|
1337 do
|
|
1338 {
|
|
1339 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
|
1340 if ( yy_accept[yy_current_state] )
|
|
1341 {
|
|
1342 (yy_last_accepting_state) = yy_current_state;
|
|
1343 (yy_last_accepting_cpos) = yy_cp;
|
|
1344 }
|
|
1345 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
1346 {
|
|
1347 yy_current_state = (int) yy_def[yy_current_state];
|
|
1348 if ( yy_current_state >= 646 )
|
|
1349 yy_c = yy_meta[(unsigned int) yy_c];
|
|
1350 }
|
|
1351 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
1352 ++yy_cp;
|
|
1353 }
|
|
1354 while ( yy_base[yy_current_state] != 968 );
|
|
1355
|
|
1356 yy_find_action:
|
|
1357 yy_act = yy_accept[yy_current_state];
|
|
1358 if ( yy_act == 0 )
|
|
1359 { /* have to back up */
|
|
1360 yy_cp = (yy_last_accepting_cpos);
|
|
1361 yy_current_state = (yy_last_accepting_state);
|
|
1362 yy_act = yy_accept[yy_current_state];
|
|
1363 }
|
|
1364
|
|
1365 YY_DO_BEFORE_ACTION;
|
|
1366
|
|
1367 do_action: /* This label is used only to access EOF actions. */
|
|
1368
|
|
1369 switch ( yy_act )
|
|
1370 { /* beginning of action switch */
|
|
1371 case 0: /* must back up */
|
|
1372 /* undo the effects of YY_DO_BEFORE_ACTION */
|
|
1373 *yy_cp = (yy_hold_char);
|
|
1374 yy_cp = (yy_last_accepting_cpos);
|
|
1375 yy_current_state = (yy_last_accepting_state);
|
|
1376 goto yy_find_action;
|
|
1377
|
|
1378 case 1:
|
|
1379 /* rule 1 can match eol */
|
|
1380 YY_RULE_SETUP
|
|
1381 #line 228 "lexer.l"
|
|
1382 {yylval.numval = myatoi(yytext); return(NUMBER);}
|
|
1383 YY_BREAK
|
|
1384 case 2:
|
|
1385 YY_RULE_SETUP
|
|
1386 #line 229 "lexer.l"
|
|
1387 {return(NOSPOT);}
|
|
1388 YY_BREAK
|
|
1389 case 3:
|
|
1390 YY_RULE_SETUP
|
|
1391 #line 230 "lexer.l"
|
|
1392 {return(ick_ONESPOT);}
|
|
1393 YY_BREAK
|
|
1394 case 4:
|
|
1395 YY_RULE_SETUP
|
|
1396 #line 231 "lexer.l"
|
|
1397 {return(ick_TWOSPOT);}
|
|
1398 YY_BREAK
|
|
1399 case 5:
|
|
1400 YY_RULE_SETUP
|
|
1401 #line 232 "lexer.l"
|
|
1402 {return(ick_TAIL);}
|
|
1403 YY_BREAK
|
|
1404 case 6:
|
|
1405 YY_RULE_SETUP
|
|
1406 #line 233 "lexer.l"
|
|
1407 {return(ick_HYBRID);}
|
|
1408 YY_BREAK
|
|
1409 case 7:
|
|
1410 YY_RULE_SETUP
|
|
1411 #line 234 "lexer.l"
|
|
1412 {return(MESH);}
|
|
1413 YY_BREAK
|
|
1414 case 8:
|
|
1415 #line 237 "lexer.l"
|
|
1416 case 9:
|
|
1417 #line 238 "lexer.l"
|
|
1418 case 10:
|
|
1419 YY_RULE_SETUP
|
|
1420 #line 238 "lexer.l"
|
|
1421 {return(MINGLE); /* AIS: CLC-INTERCAL ick_mingle symbols.
|
|
1422 The \xBD is ISO-8859-1 for cent. */}
|
|
1423 YY_BREAK
|
|
1424 case 11:
|
|
1425 #line 241 "lexer.l"
|
|
1426 case 12:
|
|
1427 #line 242 "lexer.l"
|
|
1428 case 13:
|
|
1429 #line 243 "lexer.l"
|
|
1430 case 14:
|
|
1431 #line 244 "lexer.l"
|
|
1432 case 15:
|
|
1433 #line 245 "lexer.l"
|
|
1434 case 16:
|
|
1435 #line 246 "lexer.l"
|
|
1436 case 17:
|
|
1437 #line 247 "lexer.l"
|
|
1438 case 18:
|
|
1439 #line 248 "lexer.l"
|
|
1440 case 19:
|
|
1441 #line 249 "lexer.l"
|
|
1442 case 20:
|
|
1443 #line 250 "lexer.l"
|
|
1444 case 21:
|
|
1445 #line 251 "lexer.l"
|
|
1446 case 22:
|
|
1447 #line 252 "lexer.l"
|
|
1448 case 23:
|
|
1449 #line 253 "lexer.l"
|
|
1450 case 24:
|
|
1451 #line 254 "lexer.l"
|
|
1452 case 25:
|
|
1453 #line 255 "lexer.l"
|
|
1454 case 26:
|
|
1455 #line 256 "lexer.l"
|
|
1456 case 27:
|
|
1457 #line 257 "lexer.l"
|
|
1458 case 28:
|
|
1459 #line 258 "lexer.l"
|
|
1460 case 29:
|
|
1461 #line 259 "lexer.l"
|
|
1462 case 30:
|
|
1463 #line 260 "lexer.l"
|
|
1464 case 31:
|
|
1465 #line 261 "lexer.l"
|
|
1466 case 32:
|
|
1467 #line 262 "lexer.l"
|
|
1468 case 33:
|
|
1469 YY_RULE_SETUP
|
|
1470 #line 262 "lexer.l"
|
|
1471 {return(MINGLE);}
|
|
1472 YY_BREAK
|
|
1473 case 34:
|
|
1474 YY_RULE_SETUP
|
|
1475 #line 264 "lexer.l"
|
|
1476 {return(SELECT);}
|
|
1477 YY_BREAK
|
|
1478 case 35:
|
|
1479 YY_RULE_SETUP
|
|
1480 #line 266 "lexer.l"
|
|
1481 {return(SLAT); /* AIS: Operand overloading */}
|
|
1482 YY_BREAK
|
|
1483 case 36:
|
|
1484 YY_RULE_SETUP
|
|
1485 #line 267 "lexer.l"
|
|
1486 {return(BACKSLAT); /* ditto */}
|
|
1487 YY_BREAK
|
|
1488 case 37:
|
|
1489 YY_RULE_SETUP
|
|
1490 #line 269 "lexer.l"
|
|
1491 {yylval.numval = AND; return(UNARY);}
|
|
1492 YY_BREAK
|
|
1493 case 38:
|
|
1494 YY_RULE_SETUP
|
|
1495 #line 270 "lexer.l"
|
|
1496 {yylval.numval = OR; return(UNARY);}
|
|
1497 YY_BREAK
|
|
1498 case 39:
|
|
1499 #line 272 "lexer.l"
|
|
1500 case 40:
|
|
1501 #line 273 "lexer.l"
|
|
1502 case 41:
|
|
1503 #line 274 "lexer.l"
|
|
1504 case 42:
|
|
1505 YY_RULE_SETUP
|
|
1506 #line 274 "lexer.l"
|
|
1507 {yylval.numval = XOR; return(UNARY);
|
|
1508 /* AIS: CLC-INTERCAL uses \xBE, ISO-8859-1 for yen;
|
|
1509 for some reason, \xA5 is what was detected by the compiler
|
|
1510 during my tests, so that's here too */}
|
|
1511 YY_BREAK
|
|
1512 case 43:
|
|
1513 YY_RULE_SETUP
|
|
1514 #line 278 "lexer.l"
|
|
1515 {if(clclex) yylval.numval = WHIRL;
|
|
1516 else yylval.numval = XOR; return(UNARY);
|
|
1517 /* AIS: ? is a unary operator in both C-INTERCAL and
|
|
1518 CLC-INTERCAL, but with different meanings. */}
|
|
1519 YY_BREAK
|
|
1520 case 44:
|
|
1521 #line 283 "lexer.l"
|
|
1522 case 45:
|
|
1523 YY_RULE_SETUP
|
|
1524 #line 283 "lexer.l"
|
|
1525 {yylval.numval = FIN; return(UNARY); /* AIS: | is CLC */}
|
|
1526 YY_BREAK
|
|
1527 case 46:
|
|
1528 YY_RULE_SETUP
|
|
1529 #line 284 "lexer.l"
|
|
1530 {if(clclex) return(NOSPOT); /* AIS: a C/CLC ambiguity */
|
|
1531 else {yylval.numval = WHIRL; return(UNARY);}}
|
|
1532 YY_BREAK
|
|
1533 case 47:
|
|
1534 /* rule 47 can match eol */
|
|
1535 YY_RULE_SETUP
|
|
1536 #line 286 "lexer.l"
|
|
1537 {yylval.numval = WHIRL + myatoi(yytext) - 1; return(UNARY);}
|
|
1538 YY_BREAK
|
|
1539 case 48:
|
|
1540 YY_RULE_SETUP
|
|
1541 #line 288 "lexer.l"
|
|
1542 {char temp = sparkearsstack[sparkearslev/32]&1;
|
|
1543 STACKSPARKEARS(0); /* AIS: I added all mentions of
|
|
1544 STACKSPARKEARS, OPEN\(SPARK\|EARS\),
|
|
1545 CLOSE\(SPARK\|EARS\),
|
|
1546 and CLEARSPARKEARSTACK */
|
|
1547 return(temp?OPENSPARK:CLOSESPARK);}
|
|
1548 YY_BREAK
|
|
1549 case 49:
|
|
1550 YY_RULE_SETUP
|
|
1551 #line 294 "lexer.l"
|
|
1552 {char temp = sparkearsstack[sparkearslev/32]&1;
|
|
1553 STACKSPARKEARS(1);
|
|
1554 return(temp?CLOSEEARS:OPENEARS);}
|
|
1555 YY_BREAK
|
|
1556 case 50:
|
|
1557 /* rule 50 can match eol */
|
|
1558 YY_RULE_SETUP
|
|
1559 #line 298 "lexer.l"
|
|
1560 {SETLINENO; yylval.numval = myatoi(yytext); return(LABEL);}
|
|
1561 YY_BREAK
|
|
1562 case 51:
|
|
1563 YY_RULE_SETUP
|
|
1564 #line 300 "lexer.l"
|
|
1565 {SETLINENO; CLEARSPARKEARSTACK; return(DO);}
|
|
1566 YY_BREAK
|
|
1567 case 52:
|
|
1568 YY_RULE_SETUP
|
|
1569 #line 301 "lexer.l"
|
|
1570 {SETLINENO; CLEARSPARKEARSTACK; return(DO);}
|
|
1571 YY_BREAK
|
|
1572 case 53:
|
|
1573 YY_RULE_SETUP
|
|
1574 #line 302 "lexer.l"
|
|
1575 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
|
|
1576 YY_BREAK
|
|
1577 case 54:
|
|
1578 YY_RULE_SETUP
|
|
1579 #line 303 "lexer.l"
|
|
1580 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
|
|
1581 YY_BREAK
|
|
1582 case 55:
|
|
1583 /* rule 55 can match eol */
|
|
1584 YY_RULE_SETUP
|
|
1585 #line 304 "lexer.l"
|
|
1586 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
|
|
1587 YY_BREAK
|
|
1588 case 56:
|
|
1589 /* rule 56 can match eol */
|
|
1590 YY_RULE_SETUP
|
|
1591 #line 305 "lexer.l"
|
|
1592 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(DO);}
|
|
1593 YY_BREAK
|
|
1594 case 57:
|
|
1595 YY_RULE_SETUP
|
|
1596 #line 306 "lexer.l"
|
|
1597 {SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
|
|
1598 YY_BREAK
|
|
1599 case 58:
|
|
1600 /* rule 58 can match eol */
|
|
1601 YY_RULE_SETUP
|
|
1602 #line 307 "lexer.l"
|
|
1603 {SETLINENO; CLEARSPARKEARSTACK; return(MAYBE);}
|
|
1604 YY_BREAK
|
|
1605 case 59:
|
|
1606 /* rule 59 can match eol */
|
|
1607 YY_RULE_SETUP
|
|
1608 #line 308 "lexer.l"
|
|
1609 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(MAYBE);}
|
|
1610 YY_BREAK
|
|
1611 case 60:
|
|
1612 /* rule 60 can match eol */
|
|
1613 YY_RULE_SETUP
|
|
1614 #line 309 "lexer.l"
|
|
1615 {SETLINENO; CLEARSPARKEARSTACK; politesse++; return(MAYBE);
|
|
1616 /* AIS: I added all the MAYBE cases. It seems that MAYBE
|
|
1617 has no simple Latin synonym. */}
|
|
1618 YY_BREAK
|
|
1619 case 61:
|
|
1620 YY_RULE_SETUP
|
|
1621 #line 313 "lexer.l"
|
|
1622 {return(NOT);}
|
|
1623 YY_BREAK
|
|
1624 case 62:
|
|
1625 YY_RULE_SETUP
|
|
1626 #line 314 "lexer.l"
|
|
1627 {return(NOT);}
|
|
1628 YY_BREAK
|
|
1629 case 63:
|
|
1630 YY_RULE_SETUP
|
|
1631 #line 315 "lexer.l"
|
|
1632 {return(NOT);}
|
|
1633 YY_BREAK
|
|
1634 case 64:
|
|
1635 YY_RULE_SETUP
|
|
1636 #line 316 "lexer.l"
|
|
1637 {return(NOT); /* AIS: CLC-INTERCAL again, this time it's
|
|
1638 ISO-8859-1 for the logical NOT symbol... */}
|
|
1639 YY_BREAK
|
|
1640 case 65:
|
|
1641 YY_RULE_SETUP
|
|
1642 #line 318 "lexer.l"
|
|
1643 {return(NOT); /* ... but my computer translates it to \xAC */}
|
|
1644 YY_BREAK
|
|
1645 case 66:
|
|
1646 YY_RULE_SETUP
|
|
1647 #line 320 "lexer.l"
|
|
1648 {return(ONCE);}
|
|
1649 YY_BREAK
|
|
1650 case 67:
|
|
1651 YY_RULE_SETUP
|
|
1652 #line 321 "lexer.l"
|
|
1653 {return(ONCE);}
|
|
1654 YY_BREAK
|
|
1655 case 68:
|
|
1656 YY_RULE_SETUP
|
|
1657 #line 322 "lexer.l"
|
|
1658 {return(AGAIN);}
|
|
1659 YY_BREAK
|
|
1660 case 69:
|
|
1661 YY_RULE_SETUP
|
|
1662 #line 323 "lexer.l"
|
|
1663 {return(AGAIN);}
|
|
1664 YY_BREAK
|
|
1665 case 70:
|
|
1666 /* rule 70 can match eol */
|
|
1667 YY_RULE_SETUP
|
|
1668 #line 325 "lexer.l"
|
|
1669 {yylval.numval = myatoi(yytext);
|
|
1670 if (yylval.numval && yylval.numval < 100)
|
|
1671 return(OHOHSEVEN);
|
|
1672 else
|
|
1673 ick_lose(IE017, iyylineno, (char *)NULL);}
|
|
1674 YY_BREAK
|
|
1675 case 71:
|
|
1676 YY_RULE_SETUP
|
|
1677 #line 330 "lexer.l"
|
|
1678 {return(SUB);}
|
|
1679 YY_BREAK
|
|
1680 case 72:
|
|
1681 /* rule 72 can match eol */
|
|
1682 #line 332 "lexer.l"
|
|
1683 case 73:
|
|
1684 /* rule 73 can match eol */
|
|
1685 YY_RULE_SETUP
|
|
1686 #line 332 "lexer.l"
|
|
1687 {return(BY);}
|
|
1688 YY_BREAK
|
|
1689 case 74:
|
|
1690 YY_RULE_SETUP
|
|
1691 #line 334 "lexer.l"
|
|
1692 {return(GETS);}
|
|
1693 YY_BREAK
|
|
1694 case 75:
|
|
1695 #line 336 "lexer.l"
|
|
1696 case 76:
|
|
1697 YY_RULE_SETUP
|
|
1698 #line 336 "lexer.l"
|
|
1699 {yylval.numval = GETS; return(GERUND);}
|
|
1700 YY_BREAK
|
|
1701 case 77:
|
|
1702 #line 339 "lexer.l"
|
|
1703 case 78:
|
|
1704 YY_RULE_SETUP
|
|
1705 #line 339 "lexer.l"
|
|
1706 {return(FORGET);}
|
|
1707 YY_BREAK
|
|
1708 case 79:
|
|
1709 #line 341 "lexer.l"
|
|
1710 case 80:
|
|
1711 YY_RULE_SETUP
|
|
1712 #line 341 "lexer.l"
|
|
1713 {yylval.numval = FORGET; return(GERUND);}
|
|
1714 YY_BREAK
|
|
1715 case 81:
|
|
1716 #line 343 "lexer.l"
|
|
1717 case 82:
|
|
1718 YY_RULE_SETUP
|
|
1719 #line 343 "lexer.l"
|
|
1720 {return(RESUME);}
|
|
1721 YY_BREAK
|
|
1722 case 83:
|
|
1723 #line 345 "lexer.l"
|
|
1724 case 84:
|
|
1725 YY_RULE_SETUP
|
|
1726 #line 345 "lexer.l"
|
|
1727 {yylval.numval = RESUME; return(GERUND);}
|
|
1728 YY_BREAK
|
|
1729 case 85:
|
|
1730 #line 347 "lexer.l"
|
|
1731 case 86:
|
|
1732 YY_RULE_SETUP
|
|
1733 #line 347 "lexer.l"
|
|
1734 {return(STASH);}
|
|
1735 YY_BREAK
|
|
1736 case 87:
|
|
1737 #line 349 "lexer.l"
|
|
1738 case 88:
|
|
1739 YY_RULE_SETUP
|
|
1740 #line 349 "lexer.l"
|
|
1741 {yylval.numval = STASH; return(GERUND);}
|
|
1742 YY_BREAK
|
|
1743 case 89:
|
|
1744 #line 351 "lexer.l"
|
|
1745 case 90:
|
|
1746 YY_RULE_SETUP
|
|
1747 #line 351 "lexer.l"
|
|
1748 {return(RETRIEVE);}
|
|
1749 YY_BREAK
|
|
1750 case 91:
|
|
1751 #line 353 "lexer.l"
|
|
1752 case 92:
|
|
1753 YY_RULE_SETUP
|
|
1754 #line 353 "lexer.l"
|
|
1755 {yylval.numval = RETRIEVE; return(GERUND);}
|
|
1756 YY_BREAK
|
|
1757 case 93:
|
|
1758 #line 355 "lexer.l"
|
|
1759 case 94:
|
|
1760 YY_RULE_SETUP
|
|
1761 #line 355 "lexer.l"
|
|
1762 {return(IGNORE);}
|
|
1763 YY_BREAK
|
|
1764 case 95:
|
|
1765 #line 357 "lexer.l"
|
|
1766 case 96:
|
|
1767 YY_RULE_SETUP
|
|
1768 #line 357 "lexer.l"
|
|
1769 {yylval.numval = IGNORE; return(GERUND);}
|
|
1770 YY_BREAK
|
|
1771 case 97:
|
|
1772 #line 359 "lexer.l"
|
|
1773 case 98:
|
|
1774 YY_RULE_SETUP
|
|
1775 #line 359 "lexer.l"
|
|
1776 {return(REMEMBER);}
|
|
1777 YY_BREAK
|
|
1778 case 99:
|
|
1779 #line 361 "lexer.l"
|
|
1780 case 100:
|
|
1781 YY_RULE_SETUP
|
|
1782 #line 361 "lexer.l"
|
|
1783 {yylval.numval = REMEMBER; return(GERUND);}
|
|
1784 YY_BREAK
|
|
1785 case 101:
|
|
1786 #line 363 "lexer.l"
|
|
1787 case 102:
|
|
1788 YY_RULE_SETUP
|
|
1789 #line 363 "lexer.l"
|
|
1790 {return(ABSTAIN);}
|
|
1791 YY_BREAK
|
|
1792 case 103:
|
|
1793 #line 365 "lexer.l"
|
|
1794 case 104:
|
|
1795 YY_RULE_SETUP
|
|
1796 #line 365 "lexer.l"
|
|
1797 {yylval.numval = ABSTAIN; return(GERUND);}
|
|
1798 YY_BREAK
|
|
1799 case 105:
|
|
1800 #line 367 "lexer.l"
|
|
1801 case 106:
|
|
1802 YY_RULE_SETUP
|
|
1803 #line 367 "lexer.l"
|
|
1804 {return(REINSTATE);}
|
|
1805 YY_BREAK
|
|
1806 case 107:
|
|
1807 #line 369 "lexer.l"
|
|
1808 case 108:
|
|
1809 YY_RULE_SETUP
|
|
1810 #line 369 "lexer.l"
|
|
1811 {yylval.numval = REINSTATE; return(GERUND);}
|
|
1812 YY_BREAK
|
|
1813 case 109:
|
|
1814 /* rule 109 can match eol */
|
|
1815 #line 371 "lexer.l"
|
|
1816 case 110:
|
|
1817 /* rule 110 can match eol */
|
|
1818 YY_RULE_SETUP
|
|
1819 #line 371 "lexer.l"
|
|
1820 {return(READ_OUT);}
|
|
1821 YY_BREAK
|
|
1822 case 111:
|
|
1823 #line 373 "lexer.l"
|
|
1824 case 112:
|
|
1825 /* rule 112 can match eol */
|
|
1826 YY_RULE_SETUP
|
|
1827 #line 373 "lexer.l"
|
|
1828 {yylval.numval = READ_OUT; return(GERUND);}
|
|
1829 YY_BREAK
|
|
1830 case 113:
|
|
1831 /* rule 113 can match eol */
|
|
1832 #line 375 "lexer.l"
|
|
1833 case 114:
|
|
1834 /* rule 114 can match eol */
|
|
1835 YY_RULE_SETUP
|
|
1836 #line 375 "lexer.l"
|
|
1837 {return(WRITE_IN);}
|
|
1838 YY_BREAK
|
|
1839 case 115:
|
|
1840 #line 377 "lexer.l"
|
|
1841 case 116:
|
|
1842 /* rule 116 can match eol */
|
|
1843 YY_RULE_SETUP
|
|
1844 #line 377 "lexer.l"
|
|
1845 {yylval.numval = WRITE_IN; return(GERUND);}
|
|
1846 YY_BREAK
|
|
1847 case 117:
|
|
1848 #line 379 "lexer.l"
|
|
1849 case 118:
|
|
1850 #line 380 "lexer.l"
|
|
1851 case 119:
|
|
1852 #line 381 "lexer.l"
|
|
1853 case 120:
|
|
1854 YY_RULE_SETUP
|
|
1855 #line 381 "lexer.l"
|
|
1856 {yylval.numval = UNKNOWN; return(GERUND);
|
|
1857 /* AIS: An idea stolen from CLC-INTERCAL.
|
|
1858 The Latin means literally 'remind' or 'mention'. */}
|
|
1859 YY_BREAK
|
|
1860 case 121:
|
|
1861 YY_RULE_SETUP
|
|
1862 #line 384 "lexer.l"
|
|
1863 {/* By AIS. I can't find a Latin translation for this. */
|
|
1864 return(PIN);}
|
|
1865 YY_BREAK
|
|
1866 case 122:
|
|
1867 YY_RULE_SETUP
|
|
1868 #line 386 "lexer.l"
|
|
1869 {/* By AIS */ yylval.numval = PIN; return(GERUND);}
|
|
1870 YY_BREAK
|
|
1871 case 123:
|
|
1872 /* rule 123 can match eol */
|
|
1873 #line 388 "lexer.l"
|
|
1874 case 124:
|
|
1875 /* rule 124 can match eol */
|
|
1876 YY_RULE_SETUP
|
|
1877 #line 388 "lexer.l"
|
|
1878 {/* AIS */ yylval.numval = myatoi(yytext);
|
|
1879 return(NEXTFROMLABEL);}
|
|
1880 YY_BREAK
|
|
1881 case 125:
|
|
1882 /* rule 125 can match eol */
|
|
1883 #line 391 "lexer.l"
|
|
1884 case 126:
|
|
1885 /* rule 126 can match eol */
|
|
1886 YY_RULE_SETUP
|
|
1887 #line 391 "lexer.l"
|
|
1888 {/* AIS: 'next' is not a verb, so the Latin is invented */
|
|
1889 return(NEXTFROMEXPR);}
|
|
1890 YY_BREAK
|
|
1891 case 127:
|
|
1892 #line 394 "lexer.l"
|
|
1893 case 128:
|
|
1894 /* rule 128 can match eol */
|
|
1895 YY_RULE_SETUP
|
|
1896 #line 394 "lexer.l"
|
|
1897 {/* AIS */ yylval.numval = NEXTFROMLABEL; return(GERUND);}
|
|
1898 YY_BREAK
|
|
1899 case 129:
|
|
1900 /* rule 129 can match eol */
|
|
1901 #line 396 "lexer.l"
|
|
1902 case 130:
|
|
1903 /* rule 130 can match eol */
|
|
1904 YY_RULE_SETUP
|
|
1905 #line 396 "lexer.l"
|
|
1906 {/* AIS */ yylval.numval = myatoi(yytext);
|
|
1907 return(COME_FROM);}
|
|
1908 YY_BREAK
|
|
1909 case 131:
|
|
1910 /* rule 131 can match eol */
|
|
1911 #line 399 "lexer.l"
|
|
1912 case 132:
|
|
1913 /* rule 132 can match eol */
|
|
1914 YY_RULE_SETUP
|
|
1915 #line 399 "lexer.l"
|
|
1916 {/* AIS */ return(COMPUCOME);}
|
|
1917 YY_BREAK
|
|
1918 case 133:
|
|
1919 #line 401 "lexer.l"
|
|
1920 case 134:
|
|
1921 /* rule 134 can match eol */
|
|
1922 YY_RULE_SETUP
|
|
1923 #line 401 "lexer.l"
|
|
1924 {yylval.numval = COME_FROM; return(GERUND);}
|
|
1925 YY_BREAK
|
|
1926 case 135:
|
|
1927 #line 403 "lexer.l"
|
|
1928 case 136:
|
|
1929 YY_RULE_SETUP
|
|
1930 #line 403 "lexer.l"
|
|
1931 {stbeginline = 0; return(NEXT);}
|
|
1932 YY_BREAK
|
|
1933 case 137:
|
|
1934 #line 405 "lexer.l"
|
|
1935 case 138:
|
|
1936 YY_RULE_SETUP
|
|
1937 #line 405 "lexer.l"
|
|
1938 {yylval.numval = NEXT; return(GERUND);}
|
|
1939 YY_BREAK
|
|
1940 case 139:
|
|
1941 YY_RULE_SETUP
|
|
1942 #line 406 "lexer.l"
|
|
1943 {return(FROM); /* AIS: Latin is 'A', which confuses the rest
|
|
1944 of the parser */}
|
|
1945 YY_BREAK
|
|
1946 case 140:
|
|
1947 #line 409 "lexer.l"
|
|
1948 case 141:
|
|
1949 #line 410 "lexer.l"
|
|
1950 case 142:
|
|
1951 /* rule 142 can match eol */
|
|
1952 YY_RULE_SETUP
|
|
1953 #line 410 "lexer.l"
|
|
1954 {return(GIVE_UP);}
|
|
1955 YY_BREAK
|
|
1956 case 143:
|
|
1957 /* rule 143 can match eol */
|
|
1958 #line 412 "lexer.l"
|
|
1959 case 144:
|
|
1960 /* rule 144 can match eol */
|
|
1961 YY_RULE_SETUP
|
|
1962 #line 412 "lexer.l"
|
|
1963 {return(TRY_AGAIN);}
|
|
1964 YY_BREAK
|
|
1965 case 145:
|
|
1966 YY_RULE_SETUP
|
|
1967 #line 413 "lexer.l"
|
|
1968 {return(WHILE); /* AIS. Latin for this is needed. */}
|
|
1969 YY_BREAK
|
|
1970 case 146:
|
|
1971 #line 415 "lexer.l"
|
|
1972 case 147:
|
|
1973 YY_RULE_SETUP
|
|
1974 #line 415 "lexer.l"
|
|
1975 {yylval.numval = WHILE; return(GERUND);}
|
|
1976 YY_BREAK
|
|
1977 case 148:
|
|
1978 /* rule 148 can match eol */
|
|
1979 YY_RULE_SETUP
|
|
1980 #line 416 "lexer.l"
|
|
1981 {yylval.numval = TRY_AGAIN; return(GERUND);}
|
|
1982 YY_BREAK
|
|
1983 case 149:
|
|
1984 /* rule 149 can match eol */
|
|
1985 #line 418 "lexer.l"
|
|
1986 case 150:
|
|
1987 /* rule 150 can match eol */
|
|
1988 YY_RULE_SETUP
|
|
1989 #line 418 "lexer.l"
|
|
1990 {return(GO_BACK);}
|
|
1991 YY_BREAK
|
|
1992 case 151:
|
|
1993 /* rule 151 can match eol */
|
|
1994 #line 420 "lexer.l"
|
|
1995 case 152:
|
|
1996 /* rule 152 can match eol */
|
|
1997 YY_RULE_SETUP
|
|
1998 #line 420 "lexer.l"
|
|
1999 {yylval.numval = GO_BACK; return(GERUND);}
|
|
2000 YY_BREAK
|
|
2001 case 153:
|
|
2002 /* rule 153 can match eol */
|
|
2003 #line 422 "lexer.l"
|
|
2004 case 154:
|
|
2005 /* rule 154 can match eol */
|
|
2006 YY_RULE_SETUP
|
|
2007 #line 422 "lexer.l"
|
|
2008 {return(GO_AHEAD);}
|
|
2009 YY_BREAK
|
|
2010 case 155:
|
|
2011 /* rule 155 can match eol */
|
|
2012 YY_RULE_SETUP
|
|
2013 #line 423 "lexer.l"
|
|
2014 {yylval.numval = GO_AHEAD; return(GERUND);
|
|
2015 /* AIS: I'm having a few deponent troubles with the Latin, so
|
|
2016 there are no Latin gerunds around here. Besides, the Latin
|
|
2017 'gerunds' look somewhat like gerundives to me, but that's
|
|
2018 purely based on memory so I may be wrong. */}
|
|
2019 YY_BREAK
|
|
2020 case 156:
|
|
2021 /* rule 156 can match eol */
|
|
2022 #line 429 "lexer.l"
|
|
2023 case 157:
|
|
2024 /* rule 157 can match eol */
|
|
2025 YY_RULE_SETUP
|
|
2026 #line 429 "lexer.l"
|
|
2027 {yylval.numval = myatoi(yytext); return(CREATE);}
|
|
2028 YY_BREAK
|
|
2029 case 158:
|
|
2030 #line 431 "lexer.l"
|
|
2031 case 159:
|
|
2032 YY_RULE_SETUP
|
|
2033 #line 431 "lexer.l"
|
|
2034 {return(COMPUCREATE);}
|
|
2035 YY_BREAK
|
|
2036 case 160:
|
|
2037 #line 433 "lexer.l"
|
|
2038 case 161:
|
|
2039 #line 434 "lexer.l"
|
|
2040 case 162:
|
|
2041 YY_RULE_SETUP
|
|
2042 #line 434 "lexer.l"
|
|
2043 {yylval.numval = CREATE; return(GERUND);}
|
|
2044 YY_BREAK
|
|
2045 case 163:
|
|
2046 YY_RULE_SETUP
|
|
2047 #line 436 "lexer.l"
|
|
2048 {return(INTERSECTION);}
|
|
2049 YY_BREAK
|
|
2050 case 164:
|
|
2051 /* rule 164 can match eol */
|
|
2052 YY_RULE_SETUP
|
|
2053 #line 438 "lexer.l"
|
|
2054 ;
|
|
2055 YY_BREAK
|
|
2056 case 165:
|
|
2057 YY_RULE_SETUP
|
|
2058 #line 439 "lexer.l"
|
|
2059 {/* AIS */ yylval.numval = *yytext; return(UNKNOWNID);}
|
|
2060 YY_BREAK
|
|
2061 case 166:
|
|
2062 YY_RULE_SETUP
|
|
2063 #line 440 "lexer.l"
|
|
2064 {/* AIS */ yylval.numval = yytext[0]*256 + yytext[3];
|
|
2065 if(yytext[0] > yytext[3])
|
|
2066 yylval.numval = yytext[0] + yytext[3]*256;
|
|
2067 return(BADCHAR);}
|
|
2068 YY_BREAK
|
|
2069 case 167:
|
|
2070 YY_RULE_SETUP
|
|
2071 #line 444 "lexer.l"
|
|
2072 {yylval.numval = yytext[0]; /* AIS: The line below for debug */
|
|
2073 if(yydebug) fprintf(stdout, "yylex: bad char %#x\n",(unsigned char)yytext[0]);
|
|
2074 return(BADCHAR);}
|
|
2075 YY_BREAK
|
|
2076 case 168:
|
|
2077 YY_RULE_SETUP
|
|
2078 #line 449 "lexer.l"
|
|
2079 ECHO;
|
|
2080 YY_BREAK
|
|
2081 #line 2082 "lexer.c"
|
|
2082 case YY_STATE_EOF(INITIAL):
|
|
2083 yyterminate();
|
|
2084
|
|
2085 case YY_END_OF_BUFFER:
|
|
2086 {
|
|
2087 /* Amount of text matched not including the EOB char. */
|
|
2088 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
|
|
2089
|
|
2090 /* Undo the effects of YY_DO_BEFORE_ACTION. */
|
|
2091 *yy_cp = (yy_hold_char);
|
|
2092 YY_RESTORE_YY_MORE_OFFSET
|
|
2093
|
|
2094 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
|
2095 {
|
|
2096 /* We're scanning a new file or input source. It's
|
|
2097 * possible that this happened because the user
|
|
2098 * just pointed yyin at a new source and called
|
|
2099 * yylex(). If so, then we have to assure
|
|
2100 * consistency between YY_CURRENT_BUFFER and our
|
|
2101 * globals. Here is the right place to do so, because
|
|
2102 * this is the first action (other than possibly a
|
|
2103 * back-up) that will match for the new input source.
|
|
2104 */
|
|
2105 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
2106 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
|
|
2107 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
|
2108 }
|
|
2109
|
|
2110 /* Note that here we test for yy_c_buf_p "<=" to the position
|
|
2111 * of the first EOB in the buffer, since yy_c_buf_p will
|
|
2112 * already have been incremented past the NUL character
|
|
2113 * (since all states make transitions on EOB to the
|
|
2114 * end-of-buffer state). Contrast this with the test
|
|
2115 * in input().
|
|
2116 */
|
|
2117 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
2118 { /* This was really a NUL. */
|
|
2119 yy_state_type yy_next_state;
|
|
2120
|
|
2121 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
|
|
2122
|
|
2123 yy_current_state = yy_get_previous_state( );
|
|
2124
|
|
2125 /* Okay, we're now positioned to make the NUL
|
|
2126 * transition. We couldn't have
|
|
2127 * yy_get_previous_state() go ahead and do it
|
|
2128 * for us because it doesn't know how to deal
|
|
2129 * with the possibility of jamming (and we don't
|
|
2130 * want to build jamming into it because then it
|
|
2131 * will run more slowly).
|
|
2132 */
|
|
2133
|
|
2134 yy_next_state = yy_try_NUL_trans( yy_current_state );
|
|
2135
|
|
2136 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
2137
|
|
2138 if ( yy_next_state )
|
|
2139 {
|
|
2140 /* Consume the NUL. */
|
|
2141 yy_cp = ++(yy_c_buf_p);
|
|
2142 yy_current_state = yy_next_state;
|
|
2143 goto yy_match;
|
|
2144 }
|
|
2145
|
|
2146 else
|
|
2147 {
|
|
2148 yy_cp = (yy_c_buf_p);
|
|
2149 goto yy_find_action;
|
|
2150 }
|
|
2151 }
|
|
2152
|
|
2153 else switch ( yy_get_next_buffer( ) )
|
|
2154 {
|
|
2155 case EOB_ACT_END_OF_FILE:
|
|
2156 {
|
|
2157 (yy_did_buffer_switch_on_eof) = 0;
|
|
2158
|
|
2159 if ( yywrap( ) )
|
|
2160 {
|
|
2161 /* Note: because we've taken care in
|
|
2162 * yy_get_next_buffer() to have set up
|
|
2163 * yytext, we can now set up
|
|
2164 * yy_c_buf_p so that if some total
|
|
2165 * hoser (like flex itself) wants to
|
|
2166 * call the scanner after we return the
|
|
2167 * YY_NULL, it'll still work - another
|
|
2168 * YY_NULL will get returned.
|
|
2169 */
|
|
2170 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
|
|
2171
|
|
2172 yy_act = YY_STATE_EOF(YY_START);
|
|
2173 goto do_action;
|
|
2174 }
|
|
2175
|
|
2176 else
|
|
2177 {
|
|
2178 if ( ! (yy_did_buffer_switch_on_eof) )
|
|
2179 YY_NEW_FILE;
|
|
2180 }
|
|
2181 break;
|
|
2182 }
|
|
2183
|
|
2184 case EOB_ACT_CONTINUE_SCAN:
|
|
2185 (yy_c_buf_p) =
|
|
2186 (yytext_ptr) + yy_amount_of_matched_text;
|
|
2187
|
|
2188 yy_current_state = yy_get_previous_state( );
|
|
2189
|
|
2190 yy_cp = (yy_c_buf_p);
|
|
2191 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
2192 goto yy_match;
|
|
2193
|
|
2194 case EOB_ACT_LAST_MATCH:
|
|
2195 (yy_c_buf_p) =
|
|
2196 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
|
|
2197
|
|
2198 yy_current_state = yy_get_previous_state( );
|
|
2199
|
|
2200 yy_cp = (yy_c_buf_p);
|
|
2201 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
2202 goto yy_find_action;
|
|
2203 }
|
|
2204 break;
|
|
2205 }
|
|
2206
|
|
2207 default:
|
|
2208 YY_FATAL_ERROR(
|
|
2209 "fatal flex scanner internal error--no action found" );
|
|
2210 } /* end of action switch */
|
|
2211 } /* end of scanning one token */
|
|
2212 } /* end of yylex */
|
|
2213
|
|
2214 /* yy_get_next_buffer - try to read in a new buffer
|
|
2215 *
|
|
2216 * Returns a code representing an action:
|
|
2217 * EOB_ACT_LAST_MATCH -
|
|
2218 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
|
2219 * EOB_ACT_END_OF_FILE - end of file
|
|
2220 */
|
|
2221 static int yy_get_next_buffer (void)
|
|
2222 {
|
|
2223 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
|
2224 register char *source = (yytext_ptr);
|
|
2225 register int number_to_move, i;
|
|
2226 int ret_val;
|
|
2227
|
|
2228 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
|
2229 YY_FATAL_ERROR(
|
|
2230 "fatal flex scanner internal error--end of buffer missed" );
|
|
2231
|
|
2232 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
|
2233 { /* Don't try to fill the buffer, so this is an EOF. */
|
|
2234 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
|
|
2235 {
|
|
2236 /* We matched a single character, the EOB, so
|
|
2237 * treat this as a final EOF.
|
|
2238 */
|
|
2239 return EOB_ACT_END_OF_FILE;
|
|
2240 }
|
|
2241
|
|
2242 else
|
|
2243 {
|
|
2244 /* We matched some text prior to the EOB, first
|
|
2245 * process it.
|
|
2246 */
|
|
2247 return EOB_ACT_LAST_MATCH;
|
|
2248 }
|
|
2249 }
|
|
2250
|
|
2251 /* Try to read more data. */
|
|
2252
|
|
2253 /* First move last chars to start of buffer. */
|
|
2254 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
|
2255
|
|
2256 for ( i = 0; i < number_to_move; ++i )
|
|
2257 *(dest++) = *(source++);
|
|
2258
|
|
2259 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
|
2260 /* don't do the read, it's not guaranteed to return an EOF,
|
|
2261 * just force an EOF
|
|
2262 */
|
|
2263 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
|
2264
|
|
2265 else
|
|
2266 {
|
|
2267 int num_to_read =
|
|
2268 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
|
2269
|
|
2270 while ( num_to_read <= 0 )
|
|
2271 { /* Not enough room in the buffer - grow it. */
|
|
2272
|
|
2273 /* just a shorter name for the current buffer */
|
|
2274 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
|
2275
|
|
2276 int yy_c_buf_p_offset =
|
|
2277 (int) ((yy_c_buf_p) - b->yy_ch_buf);
|
|
2278
|
|
2279 if ( b->yy_is_our_buffer )
|
|
2280 {
|
|
2281 int new_size = b->yy_buf_size * 2;
|
|
2282
|
|
2283 if ( new_size <= 0 )
|
|
2284 b->yy_buf_size += b->yy_buf_size / 8;
|
|
2285 else
|
|
2286 b->yy_buf_size *= 2;
|
|
2287
|
|
2288 b->yy_ch_buf = (char *)
|
|
2289 /* Include room in for 2 EOB chars. */
|
|
2290 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
|
2291 }
|
|
2292 else
|
|
2293 /* Can't grow it, we don't own it. */
|
|
2294 b->yy_ch_buf = 0;
|
|
2295
|
|
2296 if ( ! b->yy_ch_buf )
|
|
2297 YY_FATAL_ERROR(
|
|
2298 "fatal error - scanner input buffer overflow" );
|
|
2299
|
|
2300 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
|
2301
|
|
2302 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
|
2303 number_to_move - 1;
|
|
2304
|
|
2305 }
|
|
2306
|
|
2307 if ( num_to_read > YY_READ_BUF_SIZE )
|
|
2308 num_to_read = YY_READ_BUF_SIZE;
|
|
2309
|
|
2310 /* Read in more data. */
|
|
2311 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
|
2312 (yy_n_chars), (size_t) num_to_read );
|
|
2313
|
|
2314 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
2315 }
|
|
2316
|
|
2317 if ( (yy_n_chars) == 0 )
|
|
2318 {
|
|
2319 if ( number_to_move == YY_MORE_ADJ )
|
|
2320 {
|
|
2321 ret_val = EOB_ACT_END_OF_FILE;
|
|
2322 yyrestart(yyin );
|
|
2323 }
|
|
2324
|
|
2325 else
|
|
2326 {
|
|
2327 ret_val = EOB_ACT_LAST_MATCH;
|
|
2328 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
|
2329 YY_BUFFER_EOF_PENDING;
|
|
2330 }
|
|
2331 }
|
|
2332
|
|
2333 else
|
|
2334 ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
2335
|
|
2336 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
2337 /* Extend the array by 50%, plus the number we really need. */
|
|
2338 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
2339 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
|
2340 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
2341 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
|
2342 }
|
|
2343
|
|
2344 (yy_n_chars) += number_to_move;
|
|
2345 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
|
2346 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
|
2347
|
|
2348 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
|
2349
|
|
2350 return ret_val;
|
|
2351 }
|
|
2352
|
|
2353 /* yy_get_previous_state - get the state just before the EOB char was reached */
|
|
2354
|
|
2355 static yy_state_type yy_get_previous_state (void)
|
|
2356 {
|
|
2357 register yy_state_type yy_current_state;
|
|
2358 register char *yy_cp;
|
|
2359
|
|
2360 yy_current_state = (yy_start);
|
|
2361
|
|
2362 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
|
2363 {
|
|
2364 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
|
2365 if ( yy_accept[yy_current_state] )
|
|
2366 {
|
|
2367 (yy_last_accepting_state) = yy_current_state;
|
|
2368 (yy_last_accepting_cpos) = yy_cp;
|
|
2369 }
|
|
2370 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
2371 {
|
|
2372 yy_current_state = (int) yy_def[yy_current_state];
|
|
2373 if ( yy_current_state >= 646 )
|
|
2374 yy_c = yy_meta[(unsigned int) yy_c];
|
|
2375 }
|
|
2376 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
2377 }
|
|
2378
|
|
2379 return yy_current_state;
|
|
2380 }
|
|
2381
|
|
2382 /* yy_try_NUL_trans - try to make a transition on the NUL character
|
|
2383 *
|
|
2384 * synopsis
|
|
2385 * next_state = yy_try_NUL_trans( current_state );
|
|
2386 */
|
|
2387 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
|
|
2388 {
|
|
2389 register int yy_is_jam;
|
|
2390 register char *yy_cp = (yy_c_buf_p);
|
|
2391
|
|
2392 register YY_CHAR yy_c = 1;
|
|
2393 if ( yy_accept[yy_current_state] )
|
|
2394 {
|
|
2395 (yy_last_accepting_state) = yy_current_state;
|
|
2396 (yy_last_accepting_cpos) = yy_cp;
|
|
2397 }
|
|
2398 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
2399 {
|
|
2400 yy_current_state = (int) yy_def[yy_current_state];
|
|
2401 if ( yy_current_state >= 646 )
|
|
2402 yy_c = yy_meta[(unsigned int) yy_c];
|
|
2403 }
|
|
2404 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
2405 yy_is_jam = (yy_current_state == 645);
|
|
2406
|
|
2407 return yy_is_jam ? 0 : yy_current_state;
|
|
2408 }
|
|
2409
|
|
2410 static void yyunput (int c, register char * yy_bp )
|
|
2411 {
|
|
2412 register char *yy_cp;
|
|
2413
|
|
2414 yy_cp = (yy_c_buf_p);
|
|
2415
|
|
2416 /* undo effects of setting up yytext */
|
|
2417 *yy_cp = (yy_hold_char);
|
|
2418
|
|
2419 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
2420 { /* need to shift things up to make room */
|
|
2421 /* +2 for EOB chars. */
|
|
2422 register int number_to_move = (yy_n_chars) + 2;
|
|
2423 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
|
2424 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
|
2425 register char *source =
|
|
2426 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
|
2427
|
|
2428 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
2429 *--dest = *--source;
|
|
2430
|
|
2431 yy_cp += (int) (dest - source);
|
|
2432 yy_bp += (int) (dest - source);
|
|
2433 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
|
|
2434 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
|
|
2435
|
|
2436 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
2437 YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
|
2438 }
|
|
2439
|
|
2440 *--yy_cp = (char) c;
|
|
2441
|
|
2442 (yytext_ptr) = yy_bp;
|
|
2443 (yy_hold_char) = *yy_cp;
|
|
2444 (yy_c_buf_p) = yy_cp;
|
|
2445 }
|
|
2446
|
|
2447 #ifndef YY_NO_INPUT
|
|
2448 #ifdef __cplusplus
|
|
2449 static int yyinput (void)
|
|
2450 #else
|
|
2451 static int input (void)
|
|
2452 #endif
|
|
2453
|
|
2454 {
|
|
2455 int c;
|
|
2456
|
|
2457 *(yy_c_buf_p) = (yy_hold_char);
|
|
2458
|
|
2459 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
|
|
2460 {
|
|
2461 /* yy_c_buf_p now points to the character we want to return.
|
|
2462 * If this occurs *before* the EOB characters, then it's a
|
|
2463 * valid NUL; if not, then we've hit the end of the buffer.
|
|
2464 */
|
|
2465 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
2466 /* This was really a NUL. */
|
|
2467 *(yy_c_buf_p) = '\0';
|
|
2468
|
|
2469 else
|
|
2470 { /* need more input */
|
|
2471 int offset = (yy_c_buf_p) - (yytext_ptr);
|
|
2472 ++(yy_c_buf_p);
|
|
2473
|
|
2474 switch ( yy_get_next_buffer( ) )
|
|
2475 {
|
|
2476 case EOB_ACT_LAST_MATCH:
|
|
2477 /* This happens because yy_g_n_b()
|
|
2478 * sees that we've accumulated a
|
|
2479 * token and flags that we need to
|
|
2480 * try matching the token before
|
|
2481 * proceeding. But for input(),
|
|
2482 * there's no matching to consider.
|
|
2483 * So convert the EOB_ACT_LAST_MATCH
|
|
2484 * to EOB_ACT_END_OF_FILE.
|
|
2485 */
|
|
2486
|
|
2487 /* Reset buffer status. */
|
|
2488 yyrestart(yyin );
|
|
2489
|
|
2490 /*FALLTHROUGH*/
|
|
2491
|
|
2492 case EOB_ACT_END_OF_FILE:
|
|
2493 {
|
|
2494 if ( yywrap( ) )
|
|
2495 return EOF;
|
|
2496
|
|
2497 if ( ! (yy_did_buffer_switch_on_eof) )
|
|
2498 YY_NEW_FILE;
|
|
2499 #ifdef __cplusplus
|
|
2500 return yyinput();
|
|
2501 #else
|
|
2502 return input();
|
|
2503 #endif
|
|
2504 }
|
|
2505
|
|
2506 case EOB_ACT_CONTINUE_SCAN:
|
|
2507 (yy_c_buf_p) = (yytext_ptr) + offset;
|
|
2508 break;
|
|
2509 }
|
|
2510 }
|
|
2511 }
|
|
2512
|
|
2513 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
|
|
2514 *(yy_c_buf_p) = '\0'; /* preserve yytext */
|
|
2515 (yy_hold_char) = *++(yy_c_buf_p);
|
|
2516
|
|
2517 return c;
|
|
2518 }
|
|
2519 #endif /* ifndef YY_NO_INPUT */
|
|
2520
|
|
2521 /** Immediately switch to a different input stream.
|
|
2522 * @param input_file A readable stream.
|
|
2523 *
|
|
2524 * @note This function does not reset the start condition to @c INITIAL .
|
|
2525 */
|
|
2526 void yyrestart (FILE * input_file )
|
|
2527 {
|
|
2528
|
|
2529 if ( ! YY_CURRENT_BUFFER ){
|
|
2530 yyensure_buffer_stack ();
|
|
2531 YY_CURRENT_BUFFER_LVALUE =
|
|
2532 yy_create_buffer(yyin,YY_BUF_SIZE );
|
|
2533 }
|
|
2534
|
|
2535 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
|
|
2536 yy_load_buffer_state( );
|
|
2537 }
|
|
2538
|
|
2539 /** Switch to a different input buffer.
|
|
2540 * @param new_buffer The new input buffer.
|
|
2541 *
|
|
2542 */
|
|
2543 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
|
|
2544 {
|
|
2545
|
|
2546 /* TODO. We should be able to replace this entire function body
|
|
2547 * with
|
|
2548 * yypop_buffer_state();
|
|
2549 * yypush_buffer_state(new_buffer);
|
|
2550 */
|
|
2551 yyensure_buffer_stack ();
|
|
2552 if ( YY_CURRENT_BUFFER == new_buffer )
|
|
2553 return;
|
|
2554
|
|
2555 if ( YY_CURRENT_BUFFER )
|
|
2556 {
|
|
2557 /* Flush out information for old buffer. */
|
|
2558 *(yy_c_buf_p) = (yy_hold_char);
|
|
2559 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
2560 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
2561 }
|
|
2562
|
|
2563 YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
2564 yy_load_buffer_state( );
|
|
2565
|
|
2566 /* We don't actually know whether we did this switch during
|
|
2567 * EOF (yywrap()) processing, but the only time this flag
|
|
2568 * is looked at is after yywrap() is called, so it's safe
|
|
2569 * to go ahead and always set it.
|
|
2570 */
|
|
2571 (yy_did_buffer_switch_on_eof) = 1;
|
|
2572 }
|
|
2573
|
|
2574 static void yy_load_buffer_state (void)
|
|
2575 {
|
|
2576 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
2577 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
|
|
2578 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
|
|
2579 (yy_hold_char) = *(yy_c_buf_p);
|
|
2580 }
|
|
2581
|
|
2582 /** Allocate and initialize an input buffer state.
|
|
2583 * @param file A readable stream.
|
|
2584 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
|
2585 *
|
|
2586 * @return the allocated buffer state.
|
|
2587 */
|
|
2588 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
|
|
2589 {
|
|
2590 YY_BUFFER_STATE b;
|
|
2591
|
|
2592 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
|
2593 if ( ! b )
|
|
2594 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
2595
|
|
2596 b->yy_buf_size = size;
|
|
2597
|
|
2598 /* yy_ch_buf has to be 2 characters longer than the size given because
|
|
2599 * we need to put in 2 end-of-buffer characters.
|
|
2600 */
|
|
2601 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
|
|
2602 if ( ! b->yy_ch_buf )
|
|
2603 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
2604
|
|
2605 b->yy_is_our_buffer = 1;
|
|
2606
|
|
2607 yy_init_buffer(b,file );
|
|
2608
|
|
2609 return b;
|
|
2610 }
|
|
2611
|
|
2612 /** Destroy the buffer.
|
|
2613 * @param b a buffer created with yy_create_buffer()
|
|
2614 *
|
|
2615 */
|
|
2616 void yy_delete_buffer (YY_BUFFER_STATE b )
|
|
2617 {
|
|
2618
|
|
2619 if ( ! b )
|
|
2620 return;
|
|
2621
|
|
2622 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
|
2623 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
|
2624
|
|
2625 if ( b->yy_is_our_buffer )
|
|
2626 yyfree((void *) b->yy_ch_buf );
|
|
2627
|
|
2628 yyfree((void *) b );
|
|
2629 }
|
|
2630
|
|
2631 #ifndef __cplusplus
|
|
2632 extern int isatty (int );
|
|
2633 #endif /* __cplusplus */
|
|
2634
|
|
2635 /* Initializes or reinitializes a buffer.
|
|
2636 * This function is sometimes called more than once on the same buffer,
|
|
2637 * such as during a yyrestart() or at EOF.
|
|
2638 */
|
|
2639 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
|
2640
|
|
2641 {
|
|
2642 int oerrno = errno;
|
|
2643
|
|
2644 yy_flush_buffer(b );
|
|
2645
|
|
2646 b->yy_input_file = file;
|
|
2647 b->yy_fill_buffer = 1;
|
|
2648
|
|
2649 /* If b is the current buffer, then yy_init_buffer was _probably_
|
|
2650 * called from yyrestart() or through yy_get_next_buffer.
|
|
2651 * In that case, we don't want to reset the lineno or column.
|
|
2652 */
|
|
2653 if (b != YY_CURRENT_BUFFER){
|
|
2654 b->yy_bs_lineno = 1;
|
|
2655 b->yy_bs_column = 0;
|
|
2656 }
|
|
2657
|
|
2658 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
2659
|
|
2660 errno = oerrno;
|
|
2661 }
|
|
2662
|
|
2663 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
|
2664 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
|
2665 *
|
|
2666 */
|
|
2667 void yy_flush_buffer (YY_BUFFER_STATE b )
|
|
2668 {
|
|
2669 if ( ! b )
|
|
2670 return;
|
|
2671
|
|
2672 b->yy_n_chars = 0;
|
|
2673
|
|
2674 /* We always need two end-of-buffer characters. The first causes
|
|
2675 * a transition to the end-of-buffer state. The second causes
|
|
2676 * a jam in that state.
|
|
2677 */
|
|
2678 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
|
2679 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
|
2680
|
|
2681 b->yy_buf_pos = &b->yy_ch_buf[0];
|
|
2682
|
|
2683 b->yy_at_bol = 1;
|
|
2684 b->yy_buffer_status = YY_BUFFER_NEW;
|
|
2685
|
|
2686 if ( b == YY_CURRENT_BUFFER )
|
|
2687 yy_load_buffer_state( );
|
|
2688 }
|
|
2689
|
|
2690 /** Pushes the new state onto the stack. The new state becomes
|
|
2691 * the current state. This function will allocate the stack
|
|
2692 * if necessary.
|
|
2693 * @param new_buffer The new state.
|
|
2694 *
|
|
2695 */
|
|
2696 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
|
2697 {
|
|
2698 if (new_buffer == NULL)
|
|
2699 return;
|
|
2700
|
|
2701 yyensure_buffer_stack();
|
|
2702
|
|
2703 /* This block is copied from yy_switch_to_buffer. */
|
|
2704 if ( YY_CURRENT_BUFFER )
|
|
2705 {
|
|
2706 /* Flush out information for old buffer. */
|
|
2707 *(yy_c_buf_p) = (yy_hold_char);
|
|
2708 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
2709 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
2710 }
|
|
2711
|
|
2712 /* Only push if top exists. Otherwise, replace top. */
|
|
2713 if (YY_CURRENT_BUFFER)
|
|
2714 (yy_buffer_stack_top)++;
|
|
2715 YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
2716
|
|
2717 /* copied from yy_switch_to_buffer. */
|
|
2718 yy_load_buffer_state( );
|
|
2719 (yy_did_buffer_switch_on_eof) = 1;
|
|
2720 }
|
|
2721
|
|
2722 /** Removes and deletes the top of the stack, if present.
|
|
2723 * The next element becomes the new top.
|
|
2724 *
|
|
2725 */
|
|
2726 void yypop_buffer_state (void)
|
|
2727 {
|
|
2728 if (!YY_CURRENT_BUFFER)
|
|
2729 return;
|
|
2730
|
|
2731 yy_delete_buffer(YY_CURRENT_BUFFER );
|
|
2732 YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
2733 if ((yy_buffer_stack_top) > 0)
|
|
2734 --(yy_buffer_stack_top);
|
|
2735
|
|
2736 if (YY_CURRENT_BUFFER) {
|
|
2737 yy_load_buffer_state( );
|
|
2738 (yy_did_buffer_switch_on_eof) = 1;
|
|
2739 }
|
|
2740 }
|
|
2741
|
|
2742 /* Allocates the stack if it does not exist.
|
|
2743 * Guarantees space for at least one push.
|
|
2744 */
|
|
2745 static void yyensure_buffer_stack (void)
|
|
2746 {
|
|
2747 int num_to_alloc;
|
|
2748
|
|
2749 if (!(yy_buffer_stack)) {
|
|
2750
|
|
2751 /* First allocation is just for 2 elements, since we don't know if this
|
|
2752 * scanner will even need a stack. We use 2 instead of 1 to avoid an
|
|
2753 * immediate realloc on the next call.
|
|
2754 */
|
|
2755 num_to_alloc = 1;
|
|
2756 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
|
2757 (num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
2758 );
|
|
2759 if ( ! (yy_buffer_stack) )
|
|
2760 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
2761
|
|
2762 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
|
2763
|
|
2764 (yy_buffer_stack_max) = num_to_alloc;
|
|
2765 (yy_buffer_stack_top) = 0;
|
|
2766 return;
|
|
2767 }
|
|
2768
|
|
2769 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
|
2770
|
|
2771 /* Increase the buffer to prepare for a possible push. */
|
|
2772 int grow_size = 8 /* arbitrary grow size */;
|
|
2773
|
|
2774 num_to_alloc = (yy_buffer_stack_max) + grow_size;
|
|
2775 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
|
|
2776 ((yy_buffer_stack),
|
|
2777 num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
2778 );
|
|
2779 if ( ! (yy_buffer_stack) )
|
|
2780 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
2781
|
|
2782 /* zero only the new slots.*/
|
|
2783 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
|
2784 (yy_buffer_stack_max) = num_to_alloc;
|
|
2785 }
|
|
2786 }
|
|
2787
|
|
2788 /** Setup the input buffer state to scan directly from a user-specified character buffer.
|
|
2789 * @param base the character buffer
|
|
2790 * @param size the size in bytes of the character buffer
|
|
2791 *
|
|
2792 * @return the newly allocated buffer state object.
|
|
2793 */
|
|
2794 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|
2795 {
|
|
2796 YY_BUFFER_STATE b;
|
|
2797
|
|
2798 if ( size < 2 ||
|
|
2799 base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
|
2800 base[size-1] != YY_END_OF_BUFFER_CHAR )
|
|
2801 /* They forgot to leave room for the EOB's. */
|
|
2802 return 0;
|
|
2803
|
|
2804 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
|
2805 if ( ! b )
|
|
2806 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
|
2807
|
|
2808 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
|
2809 b->yy_buf_pos = b->yy_ch_buf = base;
|
|
2810 b->yy_is_our_buffer = 0;
|
|
2811 b->yy_input_file = 0;
|
|
2812 b->yy_n_chars = b->yy_buf_size;
|
|
2813 b->yy_is_interactive = 0;
|
|
2814 b->yy_at_bol = 1;
|
|
2815 b->yy_fill_buffer = 0;
|
|
2816 b->yy_buffer_status = YY_BUFFER_NEW;
|
|
2817
|
|
2818 yy_switch_to_buffer(b );
|
|
2819
|
|
2820 return b;
|
|
2821 }
|
|
2822
|
|
2823 /** Setup the input buffer state to scan a string. The next call to yylex() will
|
|
2824 * scan from a @e copy of @a str.
|
|
2825 * @param yystr a NUL-terminated string to scan
|
|
2826 *
|
|
2827 * @return the newly allocated buffer state object.
|
|
2828 * @note If you want to scan bytes that may contain NUL values, then use
|
|
2829 * yy_scan_bytes() instead.
|
|
2830 */
|
|
2831 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
|
|
2832 {
|
|
2833
|
|
2834 return yy_scan_bytes(yystr,strlen(yystr) );
|
|
2835 }
|
|
2836
|
|
2837 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
|
2838 * scan from a @e copy of @a bytes.
|
|
2839 * @param bytes the byte buffer to scan
|
|
2840 * @param len the number of bytes in the buffer pointed to by @a bytes.
|
|
2841 *
|
|
2842 * @return the newly allocated buffer state object.
|
|
2843 */
|
|
2844 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
|
|
2845 {
|
|
2846 YY_BUFFER_STATE b;
|
|
2847 char *buf;
|
|
2848 yy_size_t n;
|
|
2849 int i;
|
|
2850
|
|
2851 /* Get memory for full buffer, including space for trailing EOB's. */
|
|
2852 n = _yybytes_len + 2;
|
|
2853 buf = (char *) yyalloc(n );
|
|
2854 if ( ! buf )
|
|
2855 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
|
2856
|
|
2857 for ( i = 0; i < _yybytes_len; ++i )
|
|
2858 buf[i] = yybytes[i];
|
|
2859
|
|
2860 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
|
2861
|
|
2862 b = yy_scan_buffer(buf,n );
|
|
2863 if ( ! b )
|
|
2864 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
|
2865
|
|
2866 /* It's okay to grow etc. this buffer, and we should throw it
|
|
2867 * away when we're done.
|
|
2868 */
|
|
2869 b->yy_is_our_buffer = 1;
|
|
2870
|
|
2871 return b;
|
|
2872 }
|
|
2873
|
|
2874 #ifndef YY_EXIT_FAILURE
|
|
2875 #define YY_EXIT_FAILURE 2
|
|
2876 #endif
|
|
2877
|
|
2878 static void yy_fatal_error (yyconst char* msg )
|
|
2879 {
|
|
2880 (void) fprintf( stderr, "%s\n", msg );
|
|
2881 exit( YY_EXIT_FAILURE );
|
|
2882 }
|
|
2883
|
|
2884 /* Redefine yyless() so it works in section 3 code. */
|
|
2885
|
|
2886 #undef yyless
|
|
2887 #define yyless(n) \
|
|
2888 do \
|
|
2889 { \
|
|
2890 /* Undo effects of setting up yytext. */ \
|
|
2891 int yyless_macro_arg = (n); \
|
|
2892 YY_LESS_LINENO(yyless_macro_arg);\
|
|
2893 yytext[yyleng] = (yy_hold_char); \
|
|
2894 (yy_c_buf_p) = yytext + yyless_macro_arg; \
|
|
2895 (yy_hold_char) = *(yy_c_buf_p); \
|
|
2896 *(yy_c_buf_p) = '\0'; \
|
|
2897 yyleng = yyless_macro_arg; \
|
|
2898 } \
|
|
2899 while ( 0 )
|
|
2900
|
|
2901 /* Accessor methods (get/set functions) to struct members. */
|
|
2902
|
|
2903 /** Get the current line number.
|
|
2904 *
|
|
2905 */
|
|
2906 int yyget_lineno (void)
|
|
2907 {
|
|
2908
|
|
2909 return yylineno;
|
|
2910 }
|
|
2911
|
|
2912 /** Get the input stream.
|
|
2913 *
|
|
2914 */
|
|
2915 FILE *yyget_in (void)
|
|
2916 {
|
|
2917 return yyin;
|
|
2918 }
|
|
2919
|
|
2920 /** Get the output stream.
|
|
2921 *
|
|
2922 */
|
|
2923 FILE *yyget_out (void)
|
|
2924 {
|
|
2925 return yyout;
|
|
2926 }
|
|
2927
|
|
2928 /** Get the length of the current token.
|
|
2929 *
|
|
2930 */
|
|
2931 int yyget_leng (void)
|
|
2932 {
|
|
2933 return yyleng;
|
|
2934 }
|
|
2935
|
|
2936 /** Get the current token.
|
|
2937 *
|
|
2938 */
|
|
2939
|
|
2940 char *yyget_text (void)
|
|
2941 {
|
|
2942 return yytext;
|
|
2943 }
|
|
2944
|
|
2945 /** Set the current line number.
|
|
2946 * @param line_number
|
|
2947 *
|
|
2948 */
|
|
2949 void yyset_lineno (int line_number )
|
|
2950 {
|
|
2951
|
|
2952 yylineno = line_number;
|
|
2953 }
|
|
2954
|
|
2955 /** Set the input stream. This does not discard the current
|
|
2956 * input buffer.
|
|
2957 * @param in_str A readable stream.
|
|
2958 *
|
|
2959 * @see yy_switch_to_buffer
|
|
2960 */
|
|
2961 void yyset_in (FILE * in_str )
|
|
2962 {
|
|
2963 yyin = in_str ;
|
|
2964 }
|
|
2965
|
|
2966 void yyset_out (FILE * out_str )
|
|
2967 {
|
|
2968 yyout = out_str ;
|
|
2969 }
|
|
2970
|
|
2971 int yyget_debug (void)
|
|
2972 {
|
|
2973 return yy_flex_debug;
|
|
2974 }
|
|
2975
|
|
2976 void yyset_debug (int bdebug )
|
|
2977 {
|
|
2978 yy_flex_debug = bdebug ;
|
|
2979 }
|
|
2980
|
|
2981 static int yy_init_globals (void)
|
|
2982 {
|
|
2983 /* Initialization is the same as for the non-reentrant scanner.
|
|
2984 * This function is called from yylex_destroy(), so don't allocate here.
|
|
2985 */
|
|
2986
|
|
2987 (yy_buffer_stack) = 0;
|
|
2988 (yy_buffer_stack_top) = 0;
|
|
2989 (yy_buffer_stack_max) = 0;
|
|
2990 (yy_c_buf_p) = (char *) 0;
|
|
2991 (yy_init) = 0;
|
|
2992 (yy_start) = 0;
|
|
2993
|
|
2994 /* Defined in main.c */
|
|
2995 #ifdef YY_STDINIT
|
|
2996 yyin = stdin;
|
|
2997 yyout = stdout;
|
|
2998 #else
|
|
2999 yyin = (FILE *) 0;
|
|
3000 yyout = (FILE *) 0;
|
|
3001 #endif
|
|
3002
|
|
3003 /* For future reference: Set errno on error, since we are called by
|
|
3004 * yylex_init()
|
|
3005 */
|
|
3006 return 0;
|
|
3007 }
|
|
3008
|
|
3009 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
|
3010 int yylex_destroy (void)
|
|
3011 {
|
|
3012
|
|
3013 /* Pop the buffer stack, destroying each element. */
|
|
3014 while(YY_CURRENT_BUFFER){
|
|
3015 yy_delete_buffer(YY_CURRENT_BUFFER );
|
|
3016 YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
3017 yypop_buffer_state();
|
|
3018 }
|
|
3019
|
|
3020 /* Destroy the stack itself. */
|
|
3021 yyfree((yy_buffer_stack) );
|
|
3022 (yy_buffer_stack) = NULL;
|
|
3023
|
|
3024 /* Reset the globals. This is important in a non-reentrant scanner so the next time
|
|
3025 * yylex() is called, initialization will occur. */
|
|
3026 yy_init_globals( );
|
|
3027
|
|
3028 return 0;
|
|
3029 }
|
|
3030
|
|
3031 /*
|
|
3032 * Internal utility routines.
|
|
3033 */
|
|
3034
|
|
3035 #ifndef yytext_ptr
|
|
3036 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
|
3037 {
|
|
3038 register int i;
|
|
3039 for ( i = 0; i < n; ++i )
|
|
3040 s1[i] = s2[i];
|
|
3041 }
|
|
3042 #endif
|
|
3043
|
|
3044 #ifdef YY_NEED_STRLEN
|
|
3045 static int yy_flex_strlen (yyconst char * s )
|
|
3046 {
|
|
3047 register int n;
|
|
3048 for ( n = 0; s[n]; ++n )
|
|
3049 ;
|
|
3050
|
|
3051 return n;
|
|
3052 }
|
|
3053 #endif
|
|
3054
|
|
3055 void *yyalloc (yy_size_t size )
|
|
3056 {
|
|
3057 return (void *) malloc( size );
|
|
3058 }
|
|
3059
|
|
3060 void *yyrealloc (void * ptr, yy_size_t size )
|
|
3061 {
|
|
3062 /* The cast to (char *) in the following accommodates both
|
|
3063 * implementations that use char* generic pointers, and those
|
|
3064 * that use void* generic pointers. It works with the latter
|
|
3065 * because both ANSI C and C++ allow castless assignment from
|
|
3066 * any pointer type to void*, and deal with argument conversions
|
|
3067 * as though doing an assignment.
|
|
3068 */
|
|
3069 return (void *) realloc( (char *) ptr, size );
|
|
3070 }
|
|
3071
|
|
3072 void yyfree (void * ptr )
|
|
3073 {
|
|
3074 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
|
|
3075 }
|
|
3076
|
|
3077 #define YYTABLES_NAME "yytables"
|
|
3078
|
|
3079 #line 449 "lexer.l"
|
|
3080
|
|
3081
|
|
3082
|
|
3083 int lexer(void)
|
|
3084 {
|
|
3085 static int tok = BADCHAR;
|
|
3086
|
|
3087 if (re_send_token)
|
|
3088 re_send_token = ick_FALSE;
|
|
3089 else
|
|
3090 {
|
|
3091 tok = yylex();
|
|
3092 #ifdef YYDEBUG
|
|
3093 if (yydebug)
|
|
3094 (void) fprintf(stdout, "yylex: returning token %d\n", tok);
|
|
3095 #endif /* YYDEBUG */
|
|
3096 }
|
|
3097
|
|
3098 #ifdef YYDEBUG
|
|
3099 if (yydebug)
|
|
3100 (void) fprintf(stdout, "lexer: returning token %d\n", tok);
|
|
3101 #endif /* YYDEBUG */
|
|
3102 return(tok);
|
|
3103 }
|
|
3104
|
|
3105 static int myatoi(const char *text) /* AIS */
|
|
3106 {
|
|
3107 #define MAXTEXT 100
|
|
3108 static char buf[MAXTEXT];
|
|
3109 static char thinbuf[MAXTEXT];
|
|
3110 char* bp;
|
|
3111 char* tp;
|
|
3112 register int i;
|
|
3113
|
|
3114 for(buf[i = 0] = '\0';*text && i < MAXTEXT;text++) {
|
|
3115 if(isdigit(*text)) {
|
|
3116 buf[i++] = *text;
|
|
3117 }
|
|
3118 }
|
|
3119 buf[i] = '\0';
|
|
3120 bp=buf; tp=thinbuf;
|
|
3121 while(((*tp++=*bp++))); /* thinbuf code added by an AIS
|
|
3122 in case we want to work with wchar_t;
|
|
3123 the extra brackets tell GCC that this is
|
|
3124 intended and not a mistaken assignment */
|
|
3125 return atoi(thinbuf);
|
|
3126 }
|
|
3127
|
|
3128 void yyerror(const char *errtype)
|
|
3129 {
|
|
3130 #ifdef MAIN
|
|
3131 (void) printf("lextest: lexer error: %s.\n", errtype);
|
|
3132 #else /* MAIN */
|
|
3133 (void) errtype;
|
|
3134 #endif /* MAIN */
|
|
3135 }
|
|
3136
|
|
3137 #ifdef MAIN
|
|
3138 int ick_main(void)
|
|
3139 {
|
|
3140 int t;
|
|
3141
|
|
3142 while ((t = yylex()) > 0)
|
|
3143 {
|
|
3144 (void) printf("%03d %09d\n", t, yylval.numval);
|
|
3145 yylval.numval = 0;
|
|
3146 }
|
|
3147 return 0;
|
|
3148 }
|
|
3149 #endif /* MAIN */
|
|
3150
|