4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 33
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
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
;
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
;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
87 #endif /* ! FLEXINT_H */
91 /* The "const" storage-class-modifier is valid. */
94 #else /* ! __cplusplus */
100 #endif /* __STDC__ */
101 #endif /* ! __cplusplus */
104 #define yyconst const
109 /* Returned upon end-of-file. */
112 /* Promotes a possibly negative, possibly signed char to an unsigned
113 * integer for use as an array index. If the signed char is negative,
114 * we want to instead treat it as an 8-bit unsigned char, hence the
117 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119 /* Enter a start condition. This macro really ought to take a parameter,
120 * but we do it the disgusting crufty way forced on us by the ()-less
121 * definition of BEGIN.
123 #define BEGIN (yy_start) = 1 + 2 *
125 /* Translate the current start state into a value that can be later handed
126 * to BEGIN to return to the state. The YYSTATE alias is for lex
129 #define YY_START (((yy_start) - 1) / 2)
130 #define YYSTATE YY_START
132 /* Action number for EOF rule of a given start state. */
133 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135 /* Special action meaning "start processing a new file". */
136 #define YY_NEW_FILE yyrestart(yyin )
138 #define YY_END_OF_BUFFER_CHAR 0
140 /* Size of default input buffer. */
142 #define YY_BUF_SIZE 16384
145 /* The state buf must be large enough to hold one state per character in the main buffer.
147 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
150 #define YY_TYPEDEF_YY_BUFFER_STATE
151 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
156 extern FILE *yyin
, *yyout
;
158 #define EOB_ACT_CONTINUE_SCAN 0
159 #define EOB_ACT_END_OF_FILE 1
160 #define EOB_ACT_LAST_MATCH 2
162 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
163 * access to the local variable yy_act. Since yyless() is a macro, it would break
164 * existing scanners that call yyless() from OUTSIDE yylex.
165 * One obvious solution it to make yy_act a global. I tried that, and saw
166 * a 5% performance hit in a non-yylineno scanner, because yy_act is
167 * normally declared as a register variable-- so it is not worth it.
169 #define YY_LESS_LINENO(n) \
172 for ( yyl = n; yyl < yyleng; ++yyl )\
173 if ( yytext[yyl] == '\n' )\
177 /* Return all but the first "n" matched characters back to the input stream. */
181 /* Undo effects of setting up yytext. */ \
182 int yyless_macro_arg = (n); \
183 YY_LESS_LINENO(yyless_macro_arg);\
184 *yy_cp = (yy_hold_char); \
185 YY_RESTORE_YY_MORE_OFFSET \
186 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
187 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
191 #define unput(c) yyunput( c, (yytext_ptr) )
193 /* The following is because we cannot portably get our hands on size_t
194 * (without autoconf's help, which isn't available because we want
195 * flex-generated scanners to compile on their own).
198 #ifndef YY_TYPEDEF_YY_SIZE_T
199 #define YY_TYPEDEF_YY_SIZE_T
200 typedef unsigned int yy_size_t
;
203 #ifndef YY_STRUCT_YY_BUFFER_STATE
204 #define YY_STRUCT_YY_BUFFER_STATE
205 struct yy_buffer_state
209 char *yy_ch_buf
; /* input buffer */
210 char *yy_buf_pos
; /* current position in input buffer */
212 /* Size of input buffer in bytes, not including room for EOB
215 yy_size_t yy_buf_size
;
217 /* Number of characters read into yy_ch_buf, not including EOB
222 /* Whether we "own" the buffer - i.e., we know we created it,
223 * and can realloc() it to grow it, and should free() it to
226 int yy_is_our_buffer
;
228 /* Whether this is an "interactive" input source; if so, and
229 * if we're using stdio for input, then we want to use getc()
230 * instead of fread(), to make sure we stop fetching input after
233 int yy_is_interactive
;
235 /* Whether we're considered to be at the beginning of a line.
236 * If so, '^' rules will be active on the next match, otherwise
241 int yy_bs_lineno
; /**< The line count. */
242 int yy_bs_column
; /**< The column count. */
244 /* Whether to try to fill the input buffer when we reach the
249 int yy_buffer_status
;
251 #define YY_BUFFER_NEW 0
252 #define YY_BUFFER_NORMAL 1
253 /* When an EOF's been seen but there's still some text to process
254 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
255 * shouldn't try reading from the input source any more. We might
256 * still have a bunch of tokens to match, though, because of
257 * possible backing-up.
259 * When we actually see the EOF, we change the status to "new"
260 * (via yyrestart()), so that the user can continue scanning by
261 * just pointing yyin at a new input file.
263 #define YY_BUFFER_EOF_PENDING 2
266 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
268 /* Stack of input buffers. */
269 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
270 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
271 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
273 /* We provide macros for accessing buffer states in case in the
274 * future we want to put the buffer states in a more general
277 * Returns the top of the stack, or NULL.
279 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
280 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
283 /* Same as previous macro, but useful when we know that the buffer stack is not
284 * NULL or when we need an lvalue. For internal use only.
286 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
288 /* yy_hold_char holds the character lost when yytext is formed. */
289 static char yy_hold_char
;
290 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
293 /* Points to current character in buffer. */
294 static char *yy_c_buf_p
= (char *) 0;
295 static int yy_init
= 0; /* whether we need to initialize */
296 static int yy_start
= 0; /* start state number */
298 /* Flag which is used to allow yywrap()'s to do buffer switches
299 * instead of setting up a fresh yyin. A bit of a hack ...
301 static int yy_did_buffer_switch_on_eof
;
303 void yyrestart (FILE *input_file
);
304 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
);
305 YY_BUFFER_STATE
yy_create_buffer (FILE *file
,int size
);
306 void yy_delete_buffer (YY_BUFFER_STATE b
);
307 void yy_flush_buffer (YY_BUFFER_STATE b
);
308 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
);
309 void yypop_buffer_state (void );
311 static void yyensure_buffer_stack (void );
312 static void yy_load_buffer_state (void );
313 static void yy_init_buffer (YY_BUFFER_STATE b
,FILE *file
);
315 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
317 YY_BUFFER_STATE
yy_scan_buffer (char *base
,yy_size_t size
);
318 YY_BUFFER_STATE
yy_scan_string (yyconst
char *yy_str
);
319 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char *bytes
,int len
);
321 void *yyalloc (yy_size_t
);
322 void *yyrealloc (void *,yy_size_t
);
323 void yyfree (void * );
325 #define yy_new_buffer yy_create_buffer
327 #define yy_set_interactive(is_interactive) \
329 if ( ! YY_CURRENT_BUFFER ){ \
330 yyensure_buffer_stack (); \
331 YY_CURRENT_BUFFER_LVALUE = \
332 yy_create_buffer(yyin,YY_BUF_SIZE ); \
334 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
337 #define yy_set_bol(at_bol) \
339 if ( ! YY_CURRENT_BUFFER ){\
340 yyensure_buffer_stack (); \
341 YY_CURRENT_BUFFER_LVALUE = \
342 yy_create_buffer(yyin,YY_BUF_SIZE ); \
344 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
347 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
349 /* Begin user sect3 */
351 typedef unsigned char YY_CHAR
;
353 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
355 typedef int yy_state_type
;
362 #define yytext_ptr yytext
364 static yy_state_type
yy_get_previous_state (void );
365 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
366 static int yy_get_next_buffer (void );
367 static void yy_fatal_error (yyconst
char msg
[] );
369 /* Done after the current pattern has been matched and before the
370 * corresponding action - sets up yytext.
372 #define YY_DO_BEFORE_ACTION \
373 (yytext_ptr) = yy_bp; \
374 yyleng = (size_t) (yy_cp - yy_bp); \
375 (yy_hold_char) = *yy_cp; \
377 (yy_c_buf_p) = yy_cp;
379 #define YY_NUM_RULES 41
380 #define YY_END_OF_BUFFER 42
381 /* This struct is not used in this scanner,
382 but its presence is necessary. */
385 flex_int32_t yy_verify
;
388 static yyconst flex_int16_t yy_accept
[157] =
390 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
391 42, 36, 38, 37, 10, 1, 36, 36, 31, 2,
392 37, 34, 36, 36, 35, 35, 37, 36, 35, 9,
393 8, 9, 4, 3, 36, 10, 0, 0, 0, 0,
394 0, 0, 0, 0, 0, 0, 31, 31, 32, 34,
395 36, 0, 39, 35, 35, 0, 36, 0, 11, 35,
396 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,
397 0, 0, 27, 0, 0, 31, 31, 31, 31, 0,
398 0, 0, 0, 0, 6, 0, 0, 0, 0, 21,
399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 23, 0, 21,
402 0, 0, 0, 0, 0, 28, 29, 0, 0, 0,
403 0, 0, 0, 0, 0, 0, 22, 24, 19, 0,
404 0, 17, 0, 30, 25, 0, 0, 18, 0, 0,
405 0, 15, 22, 20, 0, 16, 26, 0, 0, 33,
409 static yyconst flex_int32_t yy_ec
[256] =
411 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
412 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
415 1, 12, 1, 4, 1, 1, 1, 13, 13, 13,
416 13, 13, 13, 13, 13, 13, 13, 1, 14, 1,
417 15, 16, 17, 1, 20, 20, 21, 22, 23, 24,
418 20, 20, 25, 20, 20, 26, 20, 27, 20, 20,
419 20, 20, 28, 20, 29, 20, 20, 20, 20, 20,
420 1, 18, 1, 1, 19, 1, 20, 20, 21, 22,
422 23, 24, 20, 20, 25, 20, 20, 26, 20, 27,
423 20, 20, 20, 20, 28, 20, 29, 20, 20, 20,
424 20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 static yyconst flex_int32_t yy_meta
[30] =
443 1, 2, 3, 4, 5, 6, 4, 1, 1, 6,
444 4, 1, 7, 4, 4, 1, 1, 1, 7, 8,
445 8, 8, 8, 8, 8, 8, 8, 8, 8
448 static yyconst flex_int16_t yy_base
[168] =
450 0, 0, 0, 0, 221, 27, 30, 32, 43, 44,
451 223, 0, 384, 384, 0, 384, 53, 81, 26, 384,
452 384, 206, 204, 54, 110, 0, 215, 139, 156, 384,
453 214, 58, 384, 384, 0, 0, 184, 195, 11, 7,
454 189, 212, 192, 18, 38, 185, 58, 240, 384, 384,
455 64, 68, 384, 0, 0, 206, 250, 207, 384, 0,
456 203, 82, 86, 181, 49, 182, 90, 182, 180, 177,
457 65, 178, 45, 178, 176, 268, 277, 286, 295, 95,
458 170, 191, 190, 97, 384, 169, 169, 169, 166, 0,
459 167, 166, 161, 151, 148, 148, 148, 145, 145, 145,
461 140, 142, 143, 158, 157, 134, 96, 384, 136, 0,
462 130, 130, 121, 125, 119, 384, 384, 121, 120, 120,
463 112, 101, 98, 116, 111, 92, 0, 384, 384, 90,
464 91, 384, 86, 384, 384, 84, 83, 384, 65, 0,
465 0, 384, 0, 384, 58, 384, 384, 57, 57, 384,
466 384, 384, 384, 29, 384, 384, 305, 313, 320, 327,
467 327, 335, 343, 351, 359, 367, 375
470 static yyconst flex_int16_t yy_def
[168] =
472 156, 1, 1, 1, 1, 1, 157, 157, 157, 157,
473 156, 158, 156, 156, 159, 156, 158, 158, 160, 156,
474 156, 156, 158, 158, 156, 161, 156, 162, 162, 156,
475 156, 156, 156, 156, 158, 159, 156, 156, 156, 156,
476 156, 156, 156, 156, 156, 156, 160, 163, 156, 156,
477 158, 156, 156, 25, 161, 156, 162, 162, 156, 29,
478 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
479 156, 156, 156, 156, 156, 163, 163, 163, 163, 156,
480 156, 156, 156, 156, 156, 156, 156, 156, 156, 164,
481 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
483 156, 156, 156, 156, 156, 156, 156, 156, 156, 164,
484 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
485 156, 156, 156, 156, 156, 156, 165, 156, 156, 156,
486 156, 156, 156, 156, 156, 156, 156, 156, 156, 166,
487 167, 156, 165, 156, 156, 156, 156, 156, 156, 156,
488 156, 156, 156, 156, 156, 0, 156, 156, 156, 156,
489 156, 156, 156, 156, 156, 156, 156
492 static yyconst flex_int16_t yy_nxt
[414] =
494 12, 13, 14, 13, 13, 15, 16, 17, 18, 19,
495 20, 12, 12, 21, 22, 12, 23, 24, 25, 26,
496 26, 26, 26, 26, 26, 26, 26, 26, 26, 27,
497 67, 48, 31, 68, 31, 49, 65, 66, 28, 32,
498 33, 32, 33, 71, 72, 31, 31, 29, 29, 34,
499 34, 155, 32, 32, 37, 52, 53, 37, 52, 62,
500 63, 73, 62, 48, 74, 80, 99, 49, 80, 52,
501 53, 100, 52, 87, 38, 39, 88, 40, 154, 153,
502 152, 41, 42, 62, 63, 42, 62, 84, 81, 96,
503 84, 90, 97, 149, 90, 85, 80, 127, 84, 80,
505 127, 84, 43, 44, 148, 45, 85, 147, 146, 46,
506 35, 91, 145, 144, 142, 141, 92, 35, 35, 81,
507 140, 35, 54, 139, 138, 35, 35, 35, 54, 55,
508 55, 55, 55, 55, 55, 55, 55, 55, 55, 57,
509 137, 59, 136, 135, 134, 133, 57, 57, 132, 131,
510 57, 57, 130, 129, 57, 57, 57, 57, 59, 128,
511 126, 125, 124, 123, 122, 121, 120, 119, 60, 118,
512 117, 116, 115, 114, 60, 60, 60, 60, 60, 60,
513 60, 60, 60, 60, 60, 37, 113, 112, 37, 111,
514 109, 108, 107, 106, 105, 104, 103, 102, 101, 98,
516 95, 94, 93, 89, 86, 38, 39, 83, 40, 59,
517 82, 75, 41, 42, 70, 69, 42, 64, 61, 56,
518 51, 50, 156, 27, 156, 156, 156, 156, 156, 156,
519 156, 156, 156, 43, 44, 156, 45, 156, 156, 156,
520 46, 77, 47, 156, 77, 78, 156, 156, 156, 79,
521 57, 156, 59, 156, 156, 156, 156, 57, 57, 156,
522 156, 57, 57, 156, 156, 57, 57, 57, 57, 77,
523 47, 156, 77, 78, 156, 156, 156, 79, 77, 47,
524 156, 77, 78, 156, 156, 156, 79, 77, 47, 156,
525 77, 78, 156, 156, 156, 79, 77, 47, 156, 77,
527 78, 156, 156, 156, 79, 30, 30, 30, 30, 30,
528 30, 30, 30, 35, 156, 156, 156, 156, 156, 35,
529 36, 36, 156, 36, 36, 36, 36, 36, 47, 47,
530 156, 47, 47, 55, 55, 58, 58, 58, 58, 58,
531 58, 58, 58, 76, 76, 76, 76, 76, 76, 76,
532 76, 110, 110, 156, 110, 110, 110, 110, 110, 143,
533 143, 156, 143, 143, 143, 143, 143, 150, 150, 150,
534 150, 156, 150, 150, 150, 151, 156, 156, 151, 156,
535 151, 151, 151, 11, 156, 156, 156, 156, 156, 156,
536 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
538 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
542 static yyconst flex_int16_t yy_chk
[414] =
544 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
545 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
546 1, 1, 1, 1, 1, 1, 1, 1, 1, 6,
547 40, 19, 7, 40, 8, 19, 39, 39, 6, 7,
548 7, 8, 8, 44, 44, 9, 10, 6, 6, 9,
549 10, 154, 9, 10, 17, 24, 24, 17, 24, 32,
550 32, 45, 32, 47, 45, 51, 73, 47, 51, 52,
551 52, 73, 52, 65, 17, 17, 65, 17, 149, 148,
552 145, 17, 18, 62, 62, 18, 62, 63, 51, 71,
553 63, 67, 71, 139, 67, 63, 80, 107, 84, 80,
555 107, 84, 18, 18, 137, 18, 84, 136, 133, 18,
556 25, 67, 131, 130, 126, 125, 67, 25, 25, 80,
557 124, 25, 25, 123, 122, 25, 25, 25, 25, 25,
558 25, 25, 25, 25, 25, 25, 25, 25, 25, 28,
559 121, 28, 120, 119, 118, 115, 28, 28, 114, 113,
560 28, 28, 112, 111, 28, 28, 28, 28, 29, 109,
561 106, 105, 104, 103, 102, 101, 100, 99, 29, 98,
562 97, 96, 95, 94, 29, 29, 29, 29, 29, 29,
563 29, 29, 29, 29, 29, 37, 93, 92, 37, 91,
564 89, 88, 87, 86, 83, 82, 81, 75, 74, 72,
566 70, 69, 68, 66, 64, 37, 37, 61, 37, 58,
567 56, 46, 37, 42, 43, 41, 42, 38, 31, 27,
568 23, 22, 11, 5, 0, 0, 0, 0, 0, 0,
569 0, 0, 0, 42, 42, 0, 42, 0, 0, 0,
570 42, 48, 48, 0, 48, 48, 0, 0, 0, 48,
571 57, 0, 57, 0, 0, 0, 0, 57, 57, 0,
572 0, 57, 57, 0, 0, 57, 57, 57, 57, 76,
573 76, 0, 76, 76, 0, 0, 0, 76, 77, 77,
574 0, 77, 77, 0, 0, 0, 77, 78, 78, 0,
575 78, 78, 0, 0, 0, 78, 79, 79, 0, 79,
577 79, 0, 0, 0, 79, 157, 157, 157, 157, 157,
578 157, 157, 157, 158, 0, 0, 0, 0, 0, 158,
579 159, 159, 0, 159, 159, 159, 159, 159, 160, 160,
580 0, 160, 160, 161, 161, 162, 162, 162, 162, 162,
581 162, 162, 162, 163, 163, 163, 163, 163, 163, 163,
582 163, 164, 164, 0, 164, 164, 164, 164, 164, 165,
583 165, 0, 165, 165, 165, 165, 165, 166, 166, 166,
584 166, 0, 166, 166, 166, 167, 0, 0, 167, 0,
585 167, 167, 167, 156, 156, 156, 156, 156, 156, 156,
586 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
588 156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
592 /* Table of booleans, true if rule could match eol. */
593 static yyconst flex_int32_t yy_rule_can_match_eol
[42] =
595 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
596 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1,
599 static yy_state_type yy_last_accepting_state
;
600 static char *yy_last_accepting_cpos
;
602 extern int yy_flex_debug
;
603 int yy_flex_debug
= 0;
605 /* The intent behind this definition is that it'll catch
606 * any uses of REJECT which flex missed.
608 #define REJECT reject_used_but_not_detected
609 #define yymore() yymore_used_but_not_detected
610 #define YY_MORE_ADJ 0
611 #define YY_RESTORE_YY_MORE_OFFSET
616 * Copyright (C) 2000-2006 Erik Edelmann <Erik.Edelmann@iki.fi>
618 * This program is free software; you can redistribute it
619 * and/or modify it under the terms of the GNU General Public
620 * License version 2 as published by the Free Software
623 * This program is distributed in the hope that it will be
624 * useful, but WITHOUT ANY WARRANTY; without even the implied
625 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
626 * PURPOSE. See the GNU General Public License for more
629 * You should have received a copy of the GNU General Public
630 * License along with this program; if not, write to the Free
631 * Software Foundation, Inc., 59 Temple Place, Suite 330,
632 * Boston, MA 02111-1307 USA
640 #include "errormesg.h"
641 #include "find_dep.h"
645 void yy_push_state(int new_state
);
647 void pop_filestack();
650 static YY_BUFFER_STATE include_stack
[INCLUDE_RECURSION_LIMIT
];
651 static int line_num_stack
[INCLUDE_RECURSION_LIMIT
];
652 static int incl_buff
= 0;
654 static char string_buf
[MAX_STRING_LEN
];
655 static char *string_buf_ptr
;
657 static int old_startcond
;
659 static int last_returned
;
661 #define RETURN(n) last_returned = n; return n;
674 #ifndef YY_NO_UNISTD_H
675 /* Special case for "unistd.h", since it is non-ANSI. We include it way
676 * down here because we want the user's section 1 to have been scanned first.
677 * The user has a chance to override it with an option.
682 #ifndef YY_EXTRA_TYPE
683 #define YY_EXTRA_TYPE void *
686 static int yy_init_globals (void );
688 /* Macros after this point can all be overridden by user definitions in
692 #ifndef YY_SKIP_YYWRAP
694 extern "C" int yywrap (void );
696 extern int yywrap (void );
700 static void yyunput (int c
,char *buf_ptr
);
703 static void yy_flex_strncpy (char *,yyconst
char *,int );
706 #ifdef YY_NEED_STRLEN
707 static int yy_flex_strlen (yyconst
char * );
713 static int yyinput (void );
715 static int input (void );
720 /* Amount of stuff to slurp up with each read. */
721 #ifndef YY_READ_BUF_SIZE
722 #define YY_READ_BUF_SIZE 8192
725 /* Copy whatever the last rule matched to the standard output. */
727 /* This used to be an fputs(), but since the string might contain NUL's,
728 * we now use fwrite().
730 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
733 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
734 * is returned in "result".
737 #define YY_INPUT(buf,result,max_size) \
738 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
742 for ( n = 0; n < max_size && \
743 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
746 buf[n++] = (char) c; \
747 if ( c == EOF && ferror( yyin ) ) \
748 YY_FATAL_ERROR( "input in flex scanner failed" ); \
754 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
756 if( errno != EINTR) \
758 YY_FATAL_ERROR( "input in flex scanner failed" ); \
769 /* No semi-colon after return; correct usage is to write "yyterminate();" -
770 * we don't want an extra ';' after the "return" because that will cause
771 * some compilers to complain about unreachable statements.
774 #define yyterminate() return YY_NULL
777 /* Number of entries by which start-condition stack grows. */
778 #ifndef YY_START_STACK_INCR
779 #define YY_START_STACK_INCR 25
782 /* Report a fatal error. */
783 #ifndef YY_FATAL_ERROR
784 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
787 /* end tables serialization structures and prototypes */
789 /* Default declaration of generated scanner - a define so the user can
790 * easily add parameters.
793 #define YY_DECL_IS_OURS 1
795 extern int yylex (void);
797 #define YY_DECL int yylex (void)
798 #endif /* !YY_DECL */
800 /* Code executed at the beginning of each rule, after yytext and yyleng
803 #ifndef YY_USER_ACTION
804 #define YY_USER_ACTION
807 /* Code executed at the end of each rule. */
809 #define YY_BREAK break;
812 #define YY_RULE_SETUP \
814 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
815 (yytext[yyleng - 1] == '\n'); \
818 /** The main scanner function which does all the work.
822 register yy_state_type yy_current_state
;
823 register char *yy_cp
, *yy_bp
;
841 (yy_start
) = 1; /* first start state */
849 if ( ! YY_CURRENT_BUFFER
) {
850 yyensure_buffer_stack ();
851 YY_CURRENT_BUFFER_LVALUE
=
852 yy_create_buffer(yyin
,YY_BUF_SIZE
);
855 yy_load_buffer_state( );
858 while ( 1 ) /* loops until end-of-file is reached */
860 yy_cp
= (yy_c_buf_p
);
862 /* Support of yytext. */
863 *yy_cp
= (yy_hold_char
);
865 /* yy_bp points to the position in yy_ch_buf of the start of
870 yy_current_state
= (yy_start
);
871 yy_current_state
+= YY_AT_BOL();
875 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
876 if ( yy_accept
[yy_current_state
] )
878 (yy_last_accepting_state
) = yy_current_state
;
879 (yy_last_accepting_cpos
) = yy_cp
;
881 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
883 yy_current_state
= (int) yy_def
[yy_current_state
];
884 if ( yy_current_state
>= 157 )
885 yy_c
= yy_meta
[(unsigned int) yy_c
];
887 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
890 while ( yy_current_state
!= 156 );
891 yy_cp
= (yy_last_accepting_cpos
);
892 yy_current_state
= (yy_last_accepting_state
);
895 yy_act
= yy_accept
[yy_current_state
];
899 if ( yy_act
!= YY_END_OF_BUFFER
&& yy_rule_can_match_eol
[yy_act
] )
902 for ( yyl
= 0; yyl
< yyleng
; ++yyl
)
903 if ( yytext
[yyl
] == '\n' )
909 do_action
: /* This label is used only to access EOF actions. */
912 { /* beginning of action switch */
913 case 0: /* must back up */
914 /* undo the effects of YY_DO_BEFORE_ACTION */
915 *yy_cp
= (yy_hold_char
);
916 yy_cp
= (yy_last_accepting_cpos
);
917 yy_current_state
= (yy_last_accepting_state
);
923 { string_buf_ptr
= string_buf
; old_startcond
= YY_START
;
929 { string_buf_ptr
= string_buf
; old_startcond
= YY_START
;
938 BEGIN(old_startcond
);
939 *string_buf_ptr
= '\0';
940 yylval
.string
= xstrdup(string_buf
);
941 DEBUG_PRINT("string: '%s'\n", yylval
.string
);
946 /* rule 5 can match eol */
949 /* rule 6 can match eol */
952 /* Ignore (continued strings, free fmt) */
955 /* rule 7 can match eol */
959 if (old_startcond
== fixed_fmt
)
960 ; /* Ignore (cont. strings, fixed fmt) */
962 unput(yytext
[strlen(yytext
)-1]);
966 /* rule 8 can match eol */
971 BEGIN(old_startcond
);
972 yylval
.number
= yylineno
;
973 RETURN(UNTERMINATED_STRING
);
979 { *string_buf_ptr
++ = yytext
[0]; }
984 { RETURN(EOSTMT
); } /* Treat comments like */
987 /* rule 11 can match eol */
990 { RETURN(EOSTMT
); } /* empty lines */
995 { RETURN(CPP_INCLUDE
); }
1000 { RETURN(F90PPR_INCLUDE
); }
1005 { RETURN(COCO_INCLUDE
); }
1010 { RETURN(CPP_DEFINE
); }
1015 { RETURN(F90PPR_DEFINE
); }
1020 { RETURN(CPP_UNDEF
); }
1025 { RETURN(F90PPR_UNDEF
); }
1030 { RETURN(CPP_IFDEF
); }
1035 { RETURN(CPP_IFNDEF
); }
1045 { RETURN(CPP_ELIF
); }
1050 { RETURN(CPP_ELSE
); }
1055 { RETURN(CPP_ENDIF
); }
1060 { RETURN(F90PPR_IFDEF
); }
1065 { RETURN(F90PPR_IFNDEF
); }
1070 { RETURN(F90PPR_IF
); }
1075 { RETURN(F90PPR_ELIF
); }
1080 { RETURN(F90PPR_ELSE
); }
1085 { RETURN(F90PPR_ENDIF
); }
1087 /* Line continuations, possible involving comments. */
1089 /* rule 31 can match eol */
1095 /* rule 32 can match eol */
1101 /* rule 33 can match eol */
1104 { RETURN(GARBAGE
); }
1109 { RETURN(ASSIGNMENT_OP
); }
1114 { ;yylval
.string
= xstrdup(yytext
); RETURN(WORD
); }
1119 { RETURN(GARBAGE
); }
1122 /* rule 37 can match eol */
1133 /* rule 39 can match eol */
1136 /* Ignore line-endings preceeded by \ */
1141 { RETURN(*yytext
); }
1143 case YY_STATE_EOF(INITIAL
):
1144 case YY_STATE_EOF(free_fmt
):
1145 case YY_STATE_EOF(fixed_fmt
):
1146 case YY_STATE_EOF(str_sq
):
1147 case YY_STATE_EOF(str_dq
):
1150 DEBUG_PRINT("EOF reached %i\n", incl_buff
);
1152 if (incl_buff
< 0) {
1153 if (last_returned
== EOSTMT
) {
1157 /* "EOF without \n first" cases. */
1162 yy_delete_buffer(YY_CURRENT_BUFFER
);
1163 yy_switch_to_buffer (include_stack
[incl_buff
]);
1164 yylineno
= line_num_stack
[incl_buff
];
1174 #line 1175 "<stdout>"
1176 case YY_END_OF_BUFFER
:
1178 /* Amount of text matched not including the EOB char. */
1179 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
1181 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1182 *yy_cp
= (yy_hold_char
);
1183 YY_RESTORE_YY_MORE_OFFSET
1185 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
1187 /* We're scanning a new file or input source. It's
1188 * possible that this happened because the user
1189 * just pointed yyin at a new source and called
1190 * yylex(). If so, then we have to assure
1191 * consistency between YY_CURRENT_BUFFER and our
1192 * globals. Here is the right place to do so, because
1193 * this is the first action (other than possibly a
1194 * back-up) that will match for the new input source.
1196 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1197 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
1198 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1201 /* Note that here we test for yy_c_buf_p "<=" to the position
1202 * of the first EOB in the buffer, since yy_c_buf_p will
1203 * already have been incremented past the NUL character
1204 * (since all states make transitions on EOB to the
1205 * end-of-buffer state). Contrast this with the test
1208 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1209 { /* This was really a NUL. */
1210 yy_state_type yy_next_state
;
1212 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
1214 yy_current_state
= yy_get_previous_state( );
1216 /* Okay, we're now positioned to make the NUL
1217 * transition. We couldn't have
1218 * yy_get_previous_state() go ahead and do it
1219 * for us because it doesn't know how to deal
1220 * with the possibility of jamming (and we don't
1221 * want to build jamming into it because then it
1222 * will run more slowly).
1225 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1227 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1229 if ( yy_next_state
)
1231 /* Consume the NUL. */
1232 yy_cp
= ++(yy_c_buf_p
);
1233 yy_current_state
= yy_next_state
;
1239 yy_cp
= (yy_last_accepting_cpos
);
1240 yy_current_state
= (yy_last_accepting_state
);
1241 goto yy_find_action
;
1245 else switch ( yy_get_next_buffer( ) )
1247 case EOB_ACT_END_OF_FILE
:
1249 (yy_did_buffer_switch_on_eof
) = 0;
1253 /* Note: because we've taken care in
1254 * yy_get_next_buffer() to have set up
1255 * yytext, we can now set up
1256 * yy_c_buf_p so that if some total
1257 * hoser (like flex itself) wants to
1258 * call the scanner after we return the
1259 * YY_NULL, it'll still work - another
1260 * YY_NULL will get returned.
1262 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
1264 yy_act
= YY_STATE_EOF(YY_START
);
1270 if ( ! (yy_did_buffer_switch_on_eof
) )
1276 case EOB_ACT_CONTINUE_SCAN
:
1278 (yytext_ptr
) + yy_amount_of_matched_text
;
1280 yy_current_state
= yy_get_previous_state( );
1282 yy_cp
= (yy_c_buf_p
);
1283 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1286 case EOB_ACT_LAST_MATCH
:
1288 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
1290 yy_current_state
= yy_get_previous_state( );
1292 yy_cp
= (yy_c_buf_p
);
1293 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1294 goto yy_find_action
;
1301 "fatal flex scanner internal error--no action found" );
1302 } /* end of action switch */
1303 } /* end of scanning one token */
1304 } /* end of yylex */
1306 /* yy_get_next_buffer - try to read in a new buffer
1308 * Returns a code representing an action:
1309 * EOB_ACT_LAST_MATCH -
1310 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1311 * EOB_ACT_END_OF_FILE - end of file
1313 static int yy_get_next_buffer (void)
1315 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
1316 register char *source
= (yytext_ptr
);
1317 register int number_to_move
, i
;
1320 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
1322 "fatal flex scanner internal error--end of buffer missed" );
1324 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
1325 { /* Don't try to fill the buffer, so this is an EOF. */
1326 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
1328 /* We matched a single character, the EOB, so
1329 * treat this as a final EOF.
1331 return EOB_ACT_END_OF_FILE
;
1336 /* We matched some text prior to the EOB, first
1339 return EOB_ACT_LAST_MATCH
;
1343 /* Try to read more data. */
1345 /* First move last chars to start of buffer. */
1346 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
1348 for ( i
= 0; i
< number_to_move
; ++i
)
1349 *(dest
++) = *(source
++);
1351 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1352 /* don't do the read, it's not guaranteed to return an EOF,
1355 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
1360 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
1362 while ( num_to_read
<= 0 )
1363 { /* Not enough room in the buffer - grow it. */
1365 /* just a shorter name for the current buffer */
1366 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
1368 int yy_c_buf_p_offset
=
1369 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
1371 if ( b
->yy_is_our_buffer
)
1373 int new_size
= b
->yy_buf_size
* 2;
1375 if ( new_size
<= 0 )
1376 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1378 b
->yy_buf_size
*= 2;
1380 b
->yy_ch_buf
= (char *)
1381 /* Include room in for 2 EOB chars. */
1382 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
1385 /* Can't grow it, we don't own it. */
1388 if ( ! b
->yy_ch_buf
)
1390 "fatal error - scanner input buffer overflow" );
1392 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1394 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
1399 if ( num_to_read
> YY_READ_BUF_SIZE
)
1400 num_to_read
= YY_READ_BUF_SIZE
;
1402 /* Read in more data. */
1403 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
1404 (yy_n_chars
), num_to_read
);
1406 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1409 if ( (yy_n_chars
) == 0 )
1411 if ( number_to_move
== YY_MORE_ADJ
)
1413 ret_val
= EOB_ACT_END_OF_FILE
;
1419 ret_val
= EOB_ACT_LAST_MATCH
;
1420 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
1421 YY_BUFFER_EOF_PENDING
;
1426 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1428 (yy_n_chars
) += number_to_move
;
1429 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
1430 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
1432 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
1437 /* yy_get_previous_state - get the state just before the EOB char was reached */
1439 static yy_state_type
yy_get_previous_state (void)
1441 register yy_state_type yy_current_state
;
1442 register char *yy_cp
;
1444 yy_current_state
= (yy_start
);
1445 yy_current_state
+= YY_AT_BOL();
1447 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
1449 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1450 if ( yy_accept
[yy_current_state
] )
1452 (yy_last_accepting_state
) = yy_current_state
;
1453 (yy_last_accepting_cpos
) = yy_cp
;
1455 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1457 yy_current_state
= (int) yy_def
[yy_current_state
];
1458 if ( yy_current_state
>= 157 )
1459 yy_c
= yy_meta
[(unsigned int) yy_c
];
1461 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1464 return yy_current_state
;
1467 /* yy_try_NUL_trans - try to make a transition on the NUL character
1470 * next_state = yy_try_NUL_trans( current_state );
1472 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
1474 register int yy_is_jam
;
1475 register char *yy_cp
= (yy_c_buf_p
);
1477 register YY_CHAR yy_c
= 1;
1478 if ( yy_accept
[yy_current_state
] )
1480 (yy_last_accepting_state
) = yy_current_state
;
1481 (yy_last_accepting_cpos
) = yy_cp
;
1483 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1485 yy_current_state
= (int) yy_def
[yy_current_state
];
1486 if ( yy_current_state
>= 157 )
1487 yy_c
= yy_meta
[(unsigned int) yy_c
];
1489 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1490 yy_is_jam
= (yy_current_state
== 156);
1492 return yy_is_jam
? 0 : yy_current_state
;
1495 static void yyunput (int c
, register char * yy_bp
)
1497 register char *yy_cp
;
1499 yy_cp
= (yy_c_buf_p
);
1501 /* undo effects of setting up yytext */
1502 *yy_cp
= (yy_hold_char
);
1504 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1505 { /* need to shift things up to make room */
1506 /* +2 for EOB chars. */
1507 register int number_to_move
= (yy_n_chars
) + 2;
1508 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
1509 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
1510 register char *source
=
1511 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
1513 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1514 *--dest
= *--source
;
1516 yy_cp
+= (int) (dest
- source
);
1517 yy_bp
+= (int) (dest
- source
);
1518 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
1519 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
1521 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1522 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1525 *--yy_cp
= (char) c
;
1531 (yytext_ptr
) = yy_bp
;
1532 (yy_hold_char
) = *yy_cp
;
1533 (yy_c_buf_p
) = yy_cp
;
1538 static int yyinput (void)
1540 static int input (void)
1546 *(yy_c_buf_p
) = (yy_hold_char
);
1548 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
1550 /* yy_c_buf_p now points to the character we want to return.
1551 * If this occurs *before* the EOB characters, then it's a
1552 * valid NUL; if not, then we've hit the end of the buffer.
1554 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1555 /* This was really a NUL. */
1556 *(yy_c_buf_p
) = '\0';
1559 { /* need more input */
1560 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
1563 switch ( yy_get_next_buffer( ) )
1565 case EOB_ACT_LAST_MATCH
:
1566 /* This happens because yy_g_n_b()
1567 * sees that we've accumulated a
1568 * token and flags that we need to
1569 * try matching the token before
1570 * proceeding. But for input(),
1571 * there's no matching to consider.
1572 * So convert the EOB_ACT_LAST_MATCH
1573 * to EOB_ACT_END_OF_FILE.
1576 /* Reset buffer status. */
1581 case EOB_ACT_END_OF_FILE
:
1586 if ( ! (yy_did_buffer_switch_on_eof
) )
1595 case EOB_ACT_CONTINUE_SCAN
:
1596 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
1602 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
1603 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
1604 (yy_hold_char
) = *++(yy_c_buf_p
);
1606 YY_CURRENT_BUFFER_LVALUE
->yy_at_bol
= (c
== '\n');
1607 if ( YY_CURRENT_BUFFER_LVALUE
->yy_at_bol
)
1614 #endif /* ifndef YY_NO_INPUT */
1616 /** Immediately switch to a different input stream.
1617 * @param input_file A readable stream.
1619 * @note This function does not reset the start condition to @c INITIAL .
1621 void yyrestart (FILE * input_file
)
1624 if ( ! YY_CURRENT_BUFFER
){
1625 yyensure_buffer_stack ();
1626 YY_CURRENT_BUFFER_LVALUE
=
1627 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1630 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
1631 yy_load_buffer_state( );
1634 /** Switch to a different input buffer.
1635 * @param new_buffer The new input buffer.
1638 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
1641 /* TODO. We should be able to replace this entire function body
1643 * yypop_buffer_state();
1644 * yypush_buffer_state(new_buffer);
1646 yyensure_buffer_stack ();
1647 if ( YY_CURRENT_BUFFER
== new_buffer
)
1650 if ( YY_CURRENT_BUFFER
)
1652 /* Flush out information for old buffer. */
1653 *(yy_c_buf_p
) = (yy_hold_char
);
1654 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1655 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1658 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1659 yy_load_buffer_state( );
1661 /* We don't actually know whether we did this switch during
1662 * EOF (yywrap()) processing, but the only time this flag
1663 * is looked at is after yywrap() is called, so it's safe
1664 * to go ahead and always set it.
1666 (yy_did_buffer_switch_on_eof
) = 1;
1669 static void yy_load_buffer_state (void)
1671 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1672 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
1673 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
1674 (yy_hold_char
) = *(yy_c_buf_p
);
1677 /** Allocate and initialize an input buffer state.
1678 * @param file A readable stream.
1679 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1681 * @return the allocated buffer state.
1683 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
1687 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
1689 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1691 b
->yy_buf_size
= size
;
1693 /* yy_ch_buf has to be 2 characters longer than the size given because
1694 * we need to put in 2 end-of-buffer characters.
1696 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 );
1697 if ( ! b
->yy_ch_buf
)
1698 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1700 b
->yy_is_our_buffer
= 1;
1702 yy_init_buffer(b
,file
);
1707 /** Destroy the buffer.
1708 * @param b a buffer created with yy_create_buffer()
1711 void yy_delete_buffer (YY_BUFFER_STATE b
)
1717 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
1718 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
1720 if ( b
->yy_is_our_buffer
)
1721 yyfree((void *) b
->yy_ch_buf
);
1723 yyfree((void *) b
);
1726 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
1730 #ifdef __THROW /* this is a gnuism */
1731 extern int isatty (int ) __THROW
;
1733 extern int isatty (int );
1740 /* Initializes or reinitializes a buffer.
1741 * This function is sometimes called more than once on the same buffer,
1742 * such as during a yyrestart() or at EOF.
1744 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
1749 yy_flush_buffer(b
);
1751 b
->yy_input_file
= file
;
1752 b
->yy_fill_buffer
= 1;
1754 /* If b is the current buffer, then yy_init_buffer was _probably_
1755 * called from yyrestart() or through yy_get_next_buffer.
1756 * In that case, we don't want to reset the lineno or column.
1758 if (b
!= YY_CURRENT_BUFFER
){
1759 b
->yy_bs_lineno
= 1;
1760 b
->yy_bs_column
= 0;
1763 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1768 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1769 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1772 void yy_flush_buffer (YY_BUFFER_STATE b
)
1779 /* We always need two end-of-buffer characters. The first causes
1780 * a transition to the end-of-buffer state. The second causes
1781 * a jam in that state.
1783 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1784 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1786 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1789 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1791 if ( b
== YY_CURRENT_BUFFER
)
1792 yy_load_buffer_state( );
1795 /** Pushes the new state onto the stack. The new state becomes
1796 * the current state. This function will allocate the stack
1798 * @param new_buffer The new state.
1801 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
1803 if (new_buffer
== NULL
)
1806 yyensure_buffer_stack();
1808 /* This block is copied from yy_switch_to_buffer. */
1809 if ( YY_CURRENT_BUFFER
)
1811 /* Flush out information for old buffer. */
1812 *(yy_c_buf_p
) = (yy_hold_char
);
1813 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1814 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1817 /* Only push if top exists. Otherwise, replace top. */
1818 if (YY_CURRENT_BUFFER
)
1819 (yy_buffer_stack_top
)++;
1820 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1822 /* copied from yy_switch_to_buffer. */
1823 yy_load_buffer_state( );
1824 (yy_did_buffer_switch_on_eof
) = 1;
1827 /** Removes and deletes the top of the stack, if present.
1828 * The next element becomes the new top.
1831 void yypop_buffer_state (void)
1833 if (!YY_CURRENT_BUFFER
)
1836 yy_delete_buffer(YY_CURRENT_BUFFER
);
1837 YY_CURRENT_BUFFER_LVALUE
= NULL
;
1838 if ((yy_buffer_stack_top
) > 0)
1839 --(yy_buffer_stack_top
);
1841 if (YY_CURRENT_BUFFER
) {
1842 yy_load_buffer_state( );
1843 (yy_did_buffer_switch_on_eof
) = 1;
1847 /* Allocates the stack if it does not exist.
1848 * Guarantees space for at least one push.
1850 static void yyensure_buffer_stack (void)
1854 if (!(yy_buffer_stack
)) {
1856 /* First allocation is just for 2 elements, since we don't know if this
1857 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1858 * immediate realloc on the next call.
1861 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
1862 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
1865 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
1867 (yy_buffer_stack_max
) = num_to_alloc
;
1868 (yy_buffer_stack_top
) = 0;
1872 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
1874 /* Increase the buffer to prepare for a possible push. */
1875 int grow_size
= 8 /* arbitrary grow size */;
1877 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
1878 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
1880 num_to_alloc
* sizeof(struct yy_buffer_state
*)
1883 /* zero only the new slots.*/
1884 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
1885 (yy_buffer_stack_max
) = num_to_alloc
;
1889 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1890 * @param base the character buffer
1891 * @param size the size in bytes of the character buffer
1893 * @return the newly allocated buffer state object.
1895 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
1900 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1901 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1902 /* They forgot to leave room for the EOB's. */
1905 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
1907 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1909 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1910 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1911 b
->yy_is_our_buffer
= 0;
1912 b
->yy_input_file
= 0;
1913 b
->yy_n_chars
= b
->yy_buf_size
;
1914 b
->yy_is_interactive
= 0;
1916 b
->yy_fill_buffer
= 0;
1917 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1919 yy_switch_to_buffer(b
);
1924 /** Setup the input buffer state to scan a string. The next call to yylex() will
1925 * scan from a @e copy of @a str.
1926 * @param str a NUL-terminated string to scan
1928 * @return the newly allocated buffer state object.
1929 * @note If you want to scan bytes that may contain NUL values, then use
1930 * yy_scan_bytes() instead.
1932 YY_BUFFER_STATE
yy_scan_string (yyconst
char * __yystr
)
1935 return yy_scan_bytes(__yystr
,strlen(__yystr
) );
1938 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1939 * scan from a @e copy of @a bytes.
1940 * @param bytes the byte buffer to scan
1941 * @param len the number of bytes in the buffer pointed to by @a bytes.
1943 * @return the newly allocated buffer state object.
1945 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
)
1952 /* Get memory for full buffer, including space for trailing EOB's. */
1953 n
= _yybytes_len
+ 2;
1954 buf
= (char *) yyalloc(n
);
1956 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1958 for ( i
= 0; i
< _yybytes_len
; ++i
)
1959 buf
[i
] = yybytes
[i
];
1961 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
1963 b
= yy_scan_buffer(buf
,n
);
1965 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1967 /* It's okay to grow etc. this buffer, and we should throw it
1968 * away when we're done.
1970 b
->yy_is_our_buffer
= 1;
1975 #ifndef YY_EXIT_FAILURE
1976 #define YY_EXIT_FAILURE 2
1979 static void yy_fatal_error (yyconst
char* msg
)
1981 (void) fprintf( stderr
, "%s\n", msg
);
1982 exit( YY_EXIT_FAILURE
);
1985 /* Redefine yyless() so it works in section 3 code. */
1991 /* Undo effects of setting up yytext. */ \
1992 int yyless_macro_arg = (n); \
1993 YY_LESS_LINENO(yyless_macro_arg);\
1994 yytext[yyleng] = (yy_hold_char); \
1995 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1996 (yy_hold_char) = *(yy_c_buf_p); \
1997 *(yy_c_buf_p) = '\0'; \
1998 yyleng = yyless_macro_arg; \
2002 /* Accessor methods (get/set functions) to struct members. */
2004 /** Get the current line number.
2007 int yyget_lineno (void)
2013 /** Get the input stream.
2016 FILE *yyget_in (void)
2021 /** Get the output stream.
2024 FILE *yyget_out (void)
2029 /** Get the length of the current token.
2032 int yyget_leng (void)
2037 /** Get the current token.
2041 char *yyget_text (void)
2046 /** Set the current line number.
2047 * @param line_number
2050 void yyset_lineno (int line_number
)
2053 yylineno
= line_number
;
2056 /** Set the input stream. This does not discard the current
2058 * @param in_str A readable stream.
2060 * @see yy_switch_to_buffer
2062 void yyset_in (FILE * in_str
)
2067 void yyset_out (FILE * out_str
)
2072 int yyget_debug (void)
2074 return yy_flex_debug
;
2077 void yyset_debug (int bdebug
)
2079 yy_flex_debug
= bdebug
;
2082 static int yy_init_globals (void)
2084 /* Initialization is the same as for the non-reentrant scanner.
2085 * This function is called from yylex_destroy(), so don't allocate here.
2088 /* We do not touch yylineno unless the option is enabled. */
2091 (yy_buffer_stack
) = 0;
2092 (yy_buffer_stack_top
) = 0;
2093 (yy_buffer_stack_max
) = 0;
2094 (yy_c_buf_p
) = (char *) 0;
2098 /* Defined in main.c */
2107 /* For future reference: Set errno on error, since we are called by
2113 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2114 int yylex_destroy (void)
2117 /* Pop the buffer stack, destroying each element. */
2118 while(YY_CURRENT_BUFFER
){
2119 yy_delete_buffer(YY_CURRENT_BUFFER
);
2120 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2121 yypop_buffer_state();
2124 /* Destroy the stack itself. */
2125 yyfree((yy_buffer_stack
) );
2126 (yy_buffer_stack
) = NULL
;
2128 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2129 * yylex() is called, initialization will occur. */
2136 * Internal utility routines.
2140 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
2143 for ( i
= 0; i
< n
; ++i
)
2148 #ifdef YY_NEED_STRLEN
2149 static int yy_flex_strlen (yyconst
char * s
)
2152 for ( n
= 0; s
[n
]; ++n
)
2159 void *yyalloc (yy_size_t size
)
2161 return (void *) malloc( size
);
2164 void *yyrealloc (void * ptr
, yy_size_t size
)
2166 /* The cast to (char *) in the following accommodates both
2167 * implementations that use char* generic pointers, and those
2168 * that use void* generic pointers. It works with the latter
2169 * because both ANSI C and C++ allow castless assignment from
2170 * any pointer type to void*, and deal with argument conversions
2171 * as though doing an assignment.
2173 return (void *) realloc( (char *) ptr
, size
);
2176 void yyfree (void * ptr
)
2178 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
2181 #define YYTABLES_NAME "yytables"
2188 /* "Include" file 'incfile' here. Return false for failure, true for success. */
2190 bool lex_include_file(const char *incfile
)
2194 DEBUG_PRINT("'%s'\n", incfile
);
2196 if (incl_buff
>= INCLUDE_RECURSION_LIMIT
) {
2197 warning("Recursion limit reached in file '%s'", incfile
);
2202 yyin
= open_src_file(incfile
, options
.src_path
);
2204 if (errno
== ENOENT
) {
2205 if (options
.warn_missing
)
2206 warning("Include file '%s' not found", incfile
);
2208 warning("Skipping include file '%s': %s", incfile
, strerror(errno
));
2214 include_stack
[incl_buff
] = YY_CURRENT_BUFFER
;
2215 yy_switch_to_buffer(yy_create_buffer (yyin
, YY_BUF_SIZE
));
2217 line_num_stack
[incl_buff
++] = yylineno
;
2224 void lex_set_format(SourceFmt fmt
)
2229 BEGIN(free_fmt
); break;
2231 BEGIN(fixed_fmt
); break;