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