5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define yy_create_buffer FtaParser_create_buffer
10 #define yy_delete_buffer FtaParser_delete_buffer
11 #define yy_flex_debug FtaParser_flex_debug
12 #define yy_init_buffer FtaParser_init_buffer
13 #define yy_flush_buffer FtaParser_flush_buffer
14 #define yy_load_buffer_state FtaParser_load_buffer_state
15 #define yy_switch_to_buffer FtaParser_switch_to_buffer
16 #define yyin FtaParserin
17 #define yyleng FtaParserleng
18 #define yylex FtaParserlex
19 #define yylineno FtaParserlineno
20 #define yyout FtaParserout
21 #define yyrestart FtaParserrestart
22 #define yytext FtaParsertext
23 #define yywrap FtaParserwrap
24 #define yyalloc FtaParseralloc
25 #define yyrealloc FtaParserrealloc
26 #define yyfree FtaParserfree
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 6
31 #define YY_FLEX_SUBMINOR_VERSION 0
32 #if YY_FLEX_SUBMINOR_VERSION > 0
36 /* First, we deal with platform-specific or compiler-specific issues. */
38 /* begin standard C headers. */
44 /* end standard C headers. */
46 /* flex integer type definitions */
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56 * if you want the limit (max/min) macros for int types.
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
108 #endif /* ! FLEXINT_H */
112 /* The "const" storage-class-modifier is valid. */
115 #else /* ! __cplusplus */
117 /* C99 requires __STDC__ to be defined as 1. */
118 #if defined (__STDC__)
122 #endif /* defined (__STDC__) */
123 #endif /* ! __cplusplus */
126 #define yyconst const
131 /* Returned upon end-of-file. */
134 /* Promotes a possibly negative, possibly signed char to an unsigned
135 * integer for use as an array index. If the signed char is negative,
136 * we want to instead treat it as an 8-bit unsigned char, hence the
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
141 /* Enter a start condition. This macro really ought to take a parameter,
142 * but we do it the disgusting crufty way forced on us by the ()-less
143 * definition of BEGIN.
145 #define BEGIN (yy_start) = 1 + 2 *
147 /* Translate the current start state into a value that can be later handed
148 * to BEGIN to return to the state. The YYSTATE alias is for lex
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
154 /* Action number for EOF rule of a given start state. */
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
157 /* Special action meaning "start processing a new file". */
158 #define YY_NEW_FILE FtaParserrestart(FtaParserin )
160 #define YY_END_OF_BUFFER_CHAR 0
162 /* Size of default input buffer. */
165 /* On IA-64, the buffer size is 16k, not 8k.
166 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
167 * Ditto for the __ia64__ case accordingly.
169 #define YY_BUF_SIZE 32768
171 #define YY_BUF_SIZE 16384
172 #endif /* __ia64__ */
175 /* The state buf must be large enough to hold one state per character in the main buffer.
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
181 typedef struct yy_buffer_state *YY_BUFFER_STATE;
184 #ifndef YY_TYPEDEF_YY_SIZE_T
185 #define YY_TYPEDEF_YY_SIZE_T
186 typedef size_t yy_size_t;
189 extern yy_size_t FtaParserleng;
191 extern FILE *FtaParserin, *FtaParserout;
193 #define EOB_ACT_CONTINUE_SCAN 0
194 #define EOB_ACT_END_OF_FILE 1
195 #define EOB_ACT_LAST_MATCH 2
197 #define YY_LESS_LINENO(n)
198 #define YY_LINENO_REWIND_TO(ptr)
200 /* Return all but the first "n" matched characters back to the input stream. */
204 /* Undo effects of setting up FtaParsertext. */ \
205 int yyless_macro_arg = (n); \
206 YY_LESS_LINENO(yyless_macro_arg);\
207 *yy_cp = (yy_hold_char); \
208 YY_RESTORE_YY_MORE_OFFSET \
209 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
210 YY_DO_BEFORE_ACTION; /* set up FtaParsertext again */ \
214 #define unput(c) yyunput( c, (yytext_ptr) )
216 #ifndef YY_STRUCT_YY_BUFFER_STATE
217 #define YY_STRUCT_YY_BUFFER_STATE
218 struct yy_buffer_state
222 char *yy_ch_buf; /* input buffer */
223 char *yy_buf_pos; /* current position in input buffer */
225 /* Size of input buffer in bytes, not including room for EOB
228 yy_size_t yy_buf_size;
230 /* Number of characters read into yy_ch_buf, not including EOB
235 /* Whether we "own" the buffer - i.e., we know we created it,
236 * and can realloc() it to grow it, and should free() it to
239 int yy_is_our_buffer;
241 /* Whether this is an "interactive" input source; if so, and
242 * if we're using stdio for input, then we want to use getc()
243 * instead of fread(), to make sure we stop fetching input after
246 int yy_is_interactive;
248 /* Whether we're considered to be at the beginning of a line.
249 * If so, '^' rules will be active on the next match, otherwise
254 int yy_bs_lineno; /**< The line count. */
255 int yy_bs_column; /**< The column count. */
257 /* Whether to try to fill the input buffer when we reach the
262 int yy_buffer_status;
264 #define YY_BUFFER_NEW 0
265 #define YY_BUFFER_NORMAL 1
266 /* When an EOF's been seen but there's still some text to process
267 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
268 * shouldn't try reading from the input source any more. We might
269 * still have a bunch of tokens to match, though, because of
270 * possible backing-up.
272 * When we actually see the EOF, we change the status to "new"
273 * (via FtaParserrestart()), so that the user can continue scanning by
274 * just pointing FtaParserin at a new input file.
276 #define YY_BUFFER_EOF_PENDING 2
279 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
281 /* Stack of input buffers. */
282 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
283 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
284 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
286 /* We provide macros for accessing buffer states in case in the
287 * future we want to put the buffer states in a more general
290 * Returns the top of the stack, or NULL.
292 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
293 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
296 /* Same as previous macro, but useful when we know that the buffer stack is not
297 * NULL or when we need an lvalue. For internal use only.
299 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
301 /* yy_hold_char holds the character lost when FtaParsertext is formed. */
302 static char yy_hold_char;
303 static int yy_n_chars; /* number of characters read into yy_ch_buf */
304 yy_size_t FtaParserleng;
306 /* Points to current character in buffer. */
307 static char *yy_c_buf_p = (char *) 0;
308 static int yy_init = 0; /* whether we need to initialize */
309 static int yy_start = 0; /* start state number */
311 /* Flag which is used to allow FtaParserwrap()'s to do buffer switches
312 * instead of setting up a fresh FtaParserin. A bit of a hack ...
314 static int yy_did_buffer_switch_on_eof;
316 void FtaParserrestart (FILE *input_file );
317 void FtaParser_switch_to_buffer (YY_BUFFER_STATE new_buffer );
318 YY_BUFFER_STATE FtaParser_create_buffer (FILE *file,int size );
319 void FtaParser_delete_buffer (YY_BUFFER_STATE b );
320 void FtaParser_flush_buffer (YY_BUFFER_STATE b );
321 void FtaParserpush_buffer_state (YY_BUFFER_STATE new_buffer );
322 void FtaParserpop_buffer_state (void );
324 static void FtaParserensure_buffer_stack (void );
325 static void FtaParser_load_buffer_state (void );
326 static void FtaParser_init_buffer (YY_BUFFER_STATE b,FILE *file );
328 #define YY_FLUSH_BUFFER FtaParser_flush_buffer(YY_CURRENT_BUFFER )
330 YY_BUFFER_STATE FtaParser_scan_buffer (char *base,yy_size_t size );
331 YY_BUFFER_STATE FtaParser_scan_string (yyconst char *yy_str );
332 YY_BUFFER_STATE FtaParser_scan_bytes (yyconst char *bytes,yy_size_t len );
334 void *FtaParseralloc (yy_size_t );
335 void *FtaParserrealloc (void *,yy_size_t );
336 void FtaParserfree (void * );
338 #define yy_new_buffer FtaParser_create_buffer
340 #define yy_set_interactive(is_interactive) \
342 if ( ! YY_CURRENT_BUFFER ){ \
343 FtaParserensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 FtaParser_create_buffer(FtaParserin,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
350 #define yy_set_bol(at_bol) \
352 if ( ! YY_CURRENT_BUFFER ){\
353 FtaParserensure_buffer_stack (); \
354 YY_CURRENT_BUFFER_LVALUE = \
355 FtaParser_create_buffer(FtaParserin,YY_BUF_SIZE ); \
357 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
360 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
362 /* Begin user sect3 */
364 #define FtaParserwrap() (/*CONSTCOND*/1)
365 #define YY_SKIP_YYWRAP
367 typedef unsigned char YY_CHAR;
369 FILE *FtaParserin = (FILE *) 0, *FtaParserout = (FILE *) 0;
371 typedef int yy_state_type;
373 extern int FtaParserlineno;
375 int FtaParserlineno = 1;
377 extern char *FtaParsertext;
381 #define yytext_ptr FtaParsertext
383 static yy_state_type yy_get_previous_state (void );
384 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
385 static int yy_get_next_buffer (void );
386 #if defined(__GNUC__) && __GNUC__ >= 3
387 __attribute__((__noreturn__))
389 static void yy_fatal_error (yyconst char msg[] );
391 /* Done after the current pattern has been matched and before the
392 * corresponding action - sets up FtaParsertext.
394 #define YY_DO_BEFORE_ACTION \
395 (yytext_ptr) = yy_bp; \
396 (yytext_ptr) -= (yy_more_len); \
397 FtaParserleng = (size_t) (yy_cp - (yytext_ptr)); \
398 (yy_hold_char) = *yy_cp; \
400 (yy_c_buf_p) = yy_cp;
402 #define YY_NUM_RULES 87
403 #define YY_END_OF_BUFFER 88
404 /* This struct is not used in this scanner,
405 but its presence is necessary. */
408 flex_int32_t yy_verify;
411 static yyconst flex_int16_t yy_accept[692] =
413 0, 0, 88, 86, 83, 82, 68, 86, 69, 68,
414 68, 72, 59, 64, 62, 65, 71, 71, 71, 71,
415 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
416 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
417 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
418 71, 71, 47, 48, 70, 83, 82, 0, 81, 80,
419 0, 76, 0, 75, 72, 0, 0, 60, 66, 63,
420 67, 61, 71, 71, 27, 71, 71, 71, 10, 71,
421 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
422 71, 71, 71, 71, 71, 71, 71, 28, 71, 28,
424 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
425 71, 71, 30, 71, 30, 71, 71, 71, 71, 71,
426 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
427 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
428 71, 71, 71, 71, 71, 71, 71, 71, 71, 28,
429 71, 71, 71, 71, 71, 30, 71, 71, 71, 71,
430 71, 71, 71, 71, 71, 0, 84, 0, 0, 85,
431 75, 0, 0, 77, 73, 1, 5, 1, 71, 71,
432 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
433 71, 52, 71, 71, 71, 71, 71, 41, 71, 71,
435 71, 71, 71, 71, 71, 71, 71, 7, 71, 6,
436 71, 29, 71, 71, 71, 71, 71, 71, 71, 71,
437 71, 71, 71, 71, 71, 71, 71, 71, 8, 71,
438 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
439 71, 71, 71, 71, 71, 1, 71, 71, 71, 71,
440 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
441 71, 71, 71, 71, 71, 71, 71, 71, 0, 79,
442 0, 78, 74, 71, 71, 71, 71, 71, 20, 71,
443 71, 71, 71, 71, 71, 71, 11, 71, 71, 71,
444 71, 71, 71, 71, 71, 71, 71, 71, 42, 71,
446 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
447 71, 71, 71, 71, 71, 71, 71, 33, 71, 71,
448 71, 71, 34, 71, 38, 71, 71, 71, 71, 71,
449 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
450 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
451 71, 71, 71, 71, 71, 9, 71, 71, 71, 39,
452 71, 71, 71, 18, 18, 71, 71, 71, 71, 71,
453 71, 71, 71, 71, 35, 71, 71, 71, 71, 71,
454 46, 71, 71, 71, 71, 71, 71, 36, 71, 71,
455 71, 71, 71, 49, 71, 71, 71, 32, 71, 71,
457 71, 71, 71, 71, 71, 18, 71, 71, 71, 71,
458 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
459 71, 71, 71, 45, 56, 71, 71, 71, 71, 26,
460 71, 71, 43, 71, 71, 71, 71, 71, 71, 71,
461 71, 71, 71, 71, 19, 71, 31, 51, 71, 71,
462 31, 71, 71, 71, 71, 71, 71, 71, 71, 71,
463 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
464 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
465 71, 71, 71, 71, 71, 71, 71, 71, 3, 71,
466 71, 71, 71, 71, 71, 71, 71, 71, 40, 71,
468 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
469 71, 71, 71, 71, 71, 71, 2, 71, 71, 71,
470 71, 71, 71, 71, 71, 71, 44, 71, 71, 71,
471 54, 71, 71, 50, 71, 71, 71, 71, 71, 71,
472 71, 71, 71, 4, 71, 71, 71, 71, 71, 71,
473 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
474 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
475 71, 71, 71, 71, 71, 71, 37, 37, 71, 71,
476 71, 71, 71, 71, 71, 71, 71, 37, 71, 71,
477 71, 71, 71, 71, 71, 71, 71, 71, 12, 71,
479 71, 71, 13, 71, 71, 71, 57, 22, 71, 71,
480 71, 71, 71, 71, 71, 71, 71, 71, 71, 24,
481 71, 71, 71, 71, 17, 71, 71, 71, 71, 71,
482 71, 71, 71, 53, 71, 71, 71, 71, 71, 71,
483 71, 71, 71, 25, 71, 71, 71, 71, 71, 71,
484 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
485 23, 21, 71, 71, 55, 71, 71, 71, 71, 71,
486 71, 71, 71, 71, 71, 71, 71, 71, 16, 71,
487 71, 15, 71, 71, 71, 71, 14, 71, 71, 58,
492 static yyconst YY_CHAR yy_ec[256] =
494 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
495 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
496 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
497 1, 2, 4, 1, 4, 4, 4, 4, 5, 4,
498 4, 4, 6, 4, 7, 8, 9, 10, 10, 10,
499 10, 10, 10, 11, 10, 10, 10, 4, 12, 13,
500 14, 15, 1, 4, 16, 17, 18, 19, 20, 21,
501 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
502 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
503 4, 1, 4, 1, 42, 1, 43, 44, 45, 46,
505 47, 48, 49, 50, 51, 52, 41, 53, 54, 55,
506 56, 57, 41, 58, 59, 60, 61, 62, 63, 64,
507 65, 41, 66, 4, 67, 68, 1, 1, 1, 1,
508 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
509 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
510 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
511 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
512 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
513 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
514 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
516 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
517 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
518 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
519 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
520 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
524 static yyconst YY_CHAR yy_meta[69] =
526 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
527 3, 1, 1, 1, 1, 3, 3, 3, 3, 3,
528 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
529 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
530 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
531 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
532 3, 3, 3, 3, 3, 1, 1, 1
535 static yyconst flex_uint16_t yy_base[697] =
537 0, 0, 814, 815, 811, 0, 815, 66, 805, 62,
538 802, 66, 815, 65, 815, 67, 55, 30, 63, 790,
539 0, 72, 42, 78, 54, 81, 102, 73, 75, 99,
540 101, 107, 123, 780, 121, 82, 96, 743, 106, 90,
541 749, 763, 750, 757, 118, 747, 102, 84, 119, 752,
542 127, 745, 815, 815, 815, 798, 0, 169, 815, 815,
543 796, 165, 795, 168, 173, 180, 770, 815, 815, 815,
544 815, 815, 0, 777, 0, 773, 748, 744, 0, 67,
545 756, 774, 142, 729, 745, 767, 760, 172, 756, 769,
546 731, 727, 752, 725, 743, 740, 716, 748, 159, 721,
548 754, 754, 725, 733, 738, 741, 705, 710, 712, 731,
549 705, 744, 721, 727, 719, 700, 726, 728, 735, 729,
550 706, 701, 726, 736, 718, 177, 697, 157, 732, 732,
551 719, 710, 702, 713, 708, 722, 681, 693, 706, 680,
552 691, 687, 150, 674, 690, 680, 676, 675, 668, 674,
553 680, 663, 668, 670, 664, 681, 662, 672, 667, 666,
554 159, 675, 657, 669, 657, 711, 815, 212, 710, 815,
555 214, 220, 218, 222, 685, 669, 0, 668, 693, 674,
556 678, 686, 662, 645, 648, 655, 677, 666, 672, 663,
557 669, 0, 636, 641, 658, 632, 668, 0, 640, 670,
559 678, 651, 676, 639, 650, 645, 623, 0, 660, 0,
560 632, 0, 647, 663, 658, 661, 629, 659, 639, 650,
561 645, 621, 617, 649, 650, 647, 634, 642, 0, 644,
562 616, 612, 614, 633, 624, 638, 637, 596, 639, 636,
563 620, 607, 593, 608, 607, 606, 604, 587, 590, 597,
564 583, 588, 580, 589, 592, 578, 588, 593, 588, 584,
565 580, 585, 581, 583, 569, 583, 569, 584, 225, 227,
566 229, 231, 815, 609, 608, 594, 598, 586, 0, 565,
567 568, 558, 588, 596, 596, 594, 0, 566, 581, 554,
568 581, 554, 575, 565, 590, 563, 546, 561, 0, 560,
570 581, 553, 583, 576, 564, 547, 537, 566, 563, 557,
571 555, 530, 528, 570, 561, 570, 549, 0, 551, 538,
572 524, 561, 0, 543, 0, 561, 555, 557, 526, 528,
573 558, 557, 529, 516, 519, 509, 521, 510, 511, 507,
574 522, 516, 513, 503, 500, 498, 513, 499, 506, 508,
575 511, 531, 503, 527, 521, 0, 498, 493, 527, 0,
576 512, 512, 486, 519, 491, 519, 491, 497, 501, 510,
577 499, 493, 504, 503, 0, 497, 509, 488, 480, 486,
578 0, 509, 484, 494, 482, 466, 487, 0, 493, 500,
579 497, 458, 468, 0, 500, 489, 487, 0, 460, 490,
581 462, 461, 458, 453, 449, 455, 456, 462, 447, 453,
582 459, 458, 442, 438, 448, 443, 446, 472, 444, 463,
583 469, 435, 440, 0, 0, 446, 445, 457, 430, 0,
584 459, 467, 0, 466, 456, 444, 418, 448, 444, 451,
585 417, 449, 443, 442, 0, 441, 446, 0, 436, 435,
586 0, 409, 439, 423, 440, 412, 440, 412, 411, 404,
587 409, 415, 401, 403, 393, 395, 400, 395, 392, 398,
588 399, 414, 388, 423, 402, 394, 400, 416, 415, 417,
589 389, 407, 409, 408, 378, 398, 372, 398, 0, 400,
590 373, 401, 391, 365, 395, 400, 393, 366, 0, 400,
592 386, 360, 385, 359, 358, 366, 372, 361, 363, 355,
593 350, 353, 347, 351, 347, 347, 0, 362, 365, 360,
594 363, 370, 343, 356, 355, 372, 0, 344, 374, 346,
595 350, 367, 339, 0, 354, 328, 358, 366, 349, 323,
596 365, 347, 321, 0, 338, 316, 322, 335, 325, 328,
597 323, 313, 311, 311, 165, 347, 226, 319, 344, 316,
598 332, 331, 335, 308, 329, 303, 323, 330, 303, 337,
599 309, 313, 320, 322, 295, 322, 308, 307, 200, 298,
600 296, 287, 290, 286, 288, 295, 284, 298, 299, 315,
601 317, 271, 285, 287, 304, 277, 311, 283, 0, 287,
603 286, 303, 0, 293, 267, 293, 0, 0, 289, 297,
604 296, 255, 269, 271, 262, 269, 49, 62, 98, 0,
605 180, 178, 163, 162, 0, 210, 186, 222, 223, 229,
606 208, 209, 216, 0, 223, 198, 208, 201, 197, 206,
607 217, 204, 233, 0, 210, 232, 208, 238, 213, 232,
608 246, 247, 239, 250, 224, 221, 218, 222, 227, 229,
609 0, 0, 257, 231, 0, 253, 228, 262, 257, 232,
610 237, 233, 235, 262, 237, 269, 243, 276, 0, 241,
611 246, 0, 269, 244, 270, 246, 0, 264, 274, 0,
612 815, 303, 306, 302, 309, 312
616 static yyconst flex_int16_t yy_def[697] =
618 691, 1, 691, 691, 691, 692, 691, 693, 691, 691,
619 691, 691, 691, 691, 691, 691, 694, 694, 694, 694,
620 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
621 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
622 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
623 694, 694, 691, 691, 691, 691, 692, 693, 691, 691,
624 695, 691, 696, 691, 691, 691, 691, 691, 691, 691,
625 691, 691, 694, 694, 694, 694, 694, 694, 694, 694,
626 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
627 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
629 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
630 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
631 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
632 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
633 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
634 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
635 694, 694, 694, 694, 694, 695, 691, 691, 696, 691,
636 691, 691, 691, 691, 691, 694, 694, 694, 694, 694,
637 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
638 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
640 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
641 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
642 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
643 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
644 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
645 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
646 694, 694, 694, 694, 694, 694, 694, 694, 691, 691,
647 691, 691, 691, 694, 694, 694, 694, 694, 694, 694,
648 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
649 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
651 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
652 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
653 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
654 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
655 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
656 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
657 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
658 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
659 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
660 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
662 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
663 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
664 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
665 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
666 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
667 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
668 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
669 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
670 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
671 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
673 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
674 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
675 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
676 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
677 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
678 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
679 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
680 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
681 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
682 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
684 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
685 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
686 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
687 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
688 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
689 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
690 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
691 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
692 694, 694, 694, 694, 694, 694, 694, 694, 694, 694,
693 0, 691, 691, 691, 691, 691
697 static yyconst flex_uint16_t yy_nxt[884] =
699 4, 5, 6, 7, 8, 7, 9, 10, 11, 12,
700 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
701 22, 23, 24, 25, 21, 21, 26, 27, 28, 29,
702 30, 21, 31, 32, 33, 34, 21, 35, 36, 21,
703 21, 21, 37, 38, 39, 21, 21, 40, 41, 42,
704 43, 21, 44, 45, 46, 47, 21, 48, 49, 50,
705 21, 21, 51, 52, 21, 53, 54, 55, 59, 79,
706 60, 62, 62, 64, 93, 65, 65, 68, 69, 70,
707 71, 72, 98, 74, 99, 66, 179, 87, 75, 80,
708 640, 76, 81, 95, 79, 88, 180, 96, 82, 94,
710 101, 67, 110, 102, 89, 112, 90, 113, 100, 77,
711 114, 139, 66, 75, 117, 83, 78, 104, 84, 641,
712 97, 105, 91, 85, 119, 106, 123, 103, 111, 92,
713 120, 118, 115, 124, 158, 116, 135, 140, 129, 159,
714 146, 125, 126, 136, 107, 130, 131, 147, 108, 642,
715 141, 121, 109, 127, 75, 132, 122, 142, 143, 156,
716 152, 144, 157, 137, 153, 160, 145, 128, 154, 163,
717 138, 59, 133, 60, 62, 62, 164, 171, 171, 161,
718 64, 589, 65, 65, 168, 173, 173, 172, 183, 174,
719 174, 189, 66, 227, 228, 201, 247, 184, 190, 643,
721 202, 232, 590, 263, 229, 248, 644, 230, 67, 645,
722 229, 168, 229, 233, 172, 264, 644, 269, 269, 66,
723 203, 270, 270, 171, 171, 271, 271, 174, 174, 272,
724 272, 174, 174, 172, 270, 270, 270, 270, 272, 272,
725 272, 272, 592, 612, 646, 647, 648, 649, 650, 651,
726 652, 653, 654, 655, 656, 644, 657, 658, 659, 660,
727 172, 661, 613, 593, 661, 662, 662, 663, 664, 665,
728 666, 667, 668, 669, 670, 661, 662, 671, 672, 673,
729 674, 675, 676, 677, 678, 679, 679, 680, 681, 679,
730 682, 682, 683, 684, 685, 682, 686, 687, 687, 688,
732 687, 689, 690, 57, 73, 57, 58, 58, 58, 166,
733 166, 166, 169, 169, 169, 639, 625, 638, 637, 620,
734 636, 635, 634, 633, 632, 631, 630, 629, 628, 627,
735 626, 625, 625, 624, 623, 620, 622, 621, 620, 619,
736 608, 618, 603, 617, 599, 616, 615, 614, 611, 610,
737 609, 608, 608, 607, 606, 605, 604, 603, 603, 602,
738 601, 600, 599, 599, 598, 597, 596, 595, 594, 591,
739 588, 587, 586, 585, 584, 583, 582, 581, 580, 579,
740 578, 577, 576, 575, 574, 573, 572, 571, 570, 569,
741 568, 567, 566, 565, 564, 563, 562, 561, 560, 559,
743 558, 557, 556, 555, 544, 554, 553, 552, 551, 550,
744 549, 548, 547, 546, 545, 517, 544, 544, 543, 542,
745 541, 540, 539, 538, 537, 536, 535, 534, 533, 532,
746 531, 530, 529, 528, 527, 527, 526, 525, 524, 523,
747 522, 521, 520, 519, 518, 517, 517, 516, 515, 514,
748 513, 512, 489, 511, 510, 509, 508, 507, 506, 505,
749 504, 503, 502, 501, 500, 499, 498, 497, 496, 495,
750 494, 493, 492, 491, 489, 490, 489, 488, 487, 486,
751 485, 484, 483, 482, 481, 480, 479, 478, 477, 476,
752 475, 474, 473, 472, 471, 470, 469, 451, 445, 468,
754 467, 466, 465, 464, 430, 463, 462, 461, 460, 459,
755 458, 457, 456, 455, 454, 453, 452, 451, 450, 449,
756 448, 447, 445, 446, 445, 444, 443, 442, 441, 440,
757 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
758 430, 429, 428, 427, 426, 425, 424, 423, 422, 421,
759 420, 419, 418, 417, 398, 416, 415, 414, 413, 412,
760 411, 410, 375, 409, 408, 407, 406, 405, 356, 404,
761 403, 402, 401, 400, 398, 399, 398, 397, 396, 395,
762 394, 393, 392, 391, 390, 389, 388, 387, 386, 385,
763 384, 383, 382, 381, 380, 379, 378, 377, 376, 375,
765 375, 374, 373, 372, 371, 370, 369, 368, 367, 366,
766 365, 364, 363, 362, 361, 360, 359, 356, 358, 357,
767 356, 355, 354, 353, 352, 351, 350, 349, 323, 348,
768 318, 347, 346, 345, 344, 343, 342, 341, 340, 339,
769 338, 287, 337, 279, 336, 335, 334, 333, 332, 331,
770 330, 329, 328, 327, 326, 323, 325, 324, 323, 322,
771 321, 318, 320, 319, 318, 317, 316, 315, 314, 313,
772 312, 311, 310, 309, 308, 307, 306, 305, 304, 303,
773 302, 301, 300, 299, 298, 297, 296, 295, 294, 293,
774 292, 291, 290, 289, 287, 288, 287, 286, 285, 284,
776 283, 279, 282, 281, 280, 279, 278, 277, 276, 275,
777 274, 273, 170, 167, 268, 267, 266, 265, 262, 261,
778 260, 259, 258, 212, 210, 257, 208, 256, 255, 254,
779 253, 252, 251, 250, 249, 177, 246, 245, 244, 243,
780 242, 241, 240, 239, 238, 237, 236, 235, 234, 231,
781 226, 225, 224, 223, 222, 221, 220, 219, 218, 217,
782 216, 215, 214, 213, 212, 212, 210, 211, 208, 210,
783 209, 208, 207, 206, 205, 204, 200, 199, 198, 197,
784 196, 195, 194, 193, 192, 191, 188, 187, 186, 185,
785 182, 181, 177, 178, 177, 176, 175, 170, 167, 56,
787 165, 162, 155, 151, 150, 149, 148, 79, 134, 86,
788 63, 61, 56, 691, 3, 691, 691, 691, 691, 691,
789 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
790 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
791 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
792 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
793 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
794 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
798 static yyconst flex_int16_t yy_chk[884] =
800 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
801 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
802 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
803 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
804 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
805 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
806 1, 1, 1, 1, 1, 1, 1, 1, 8, 18,
807 8, 10, 10, 12, 23, 12, 12, 14, 14, 14,
808 16, 16, 25, 17, 25, 12, 80, 22, 17, 19,
809 617, 17, 19, 24, 18, 22, 80, 24, 19, 23,
811 26, 12, 28, 26, 22, 29, 22, 29, 25, 17,
812 29, 36, 12, 17, 30, 19, 17, 27, 19, 618,
813 24, 27, 22, 19, 31, 27, 32, 26, 28, 22,
814 31, 30, 29, 32, 48, 29, 35, 36, 33, 48,
815 40, 32, 32, 35, 27, 33, 33, 40, 27, 619,
816 37, 31, 27, 32, 37, 33, 31, 37, 39, 47,
817 45, 39, 47, 35, 45, 49, 39, 32, 45, 51,
818 35, 58, 33, 58, 62, 62, 51, 64, 64, 49,
819 65, 555, 65, 65, 62, 66, 66, 64, 83, 66,
820 66, 88, 65, 126, 126, 99, 143, 83, 88, 621,
822 99, 128, 555, 161, 126, 143, 622, 126, 65, 623,
823 128, 62, 161, 128, 64, 161, 624, 168, 168, 65,
824 99, 168, 168, 171, 171, 172, 172, 173, 173, 172,
825 172, 174, 174, 171, 269, 269, 270, 270, 271, 271,
826 272, 272, 557, 579, 626, 627, 628, 629, 630, 631,
827 632, 633, 635, 636, 637, 638, 639, 640, 641, 642,
828 171, 643, 579, 557, 645, 646, 647, 648, 649, 650,
829 651, 652, 653, 654, 655, 656, 657, 658, 659, 660,
830 663, 664, 666, 667, 668, 669, 670, 671, 672, 673,
831 674, 675, 676, 677, 678, 680, 681, 683, 684, 685,
833 686, 688, 689, 692, 694, 692, 693, 693, 693, 695,
834 695, 695, 696, 696, 696, 616, 615, 614, 613, 612,
835 611, 610, 609, 606, 605, 604, 602, 601, 600, 598,
836 597, 596, 595, 594, 593, 592, 591, 590, 589, 588,
837 587, 586, 585, 584, 583, 582, 581, 580, 578, 577,
838 576, 575, 574, 573, 572, 571, 570, 569, 568, 567,
839 566, 565, 564, 563, 562, 561, 560, 559, 558, 556,
840 554, 553, 552, 551, 550, 549, 548, 547, 546, 545,
841 543, 542, 541, 540, 539, 538, 537, 536, 535, 533,
842 532, 531, 530, 529, 528, 526, 525, 524, 523, 522,
844 521, 520, 519, 518, 516, 515, 514, 513, 512, 511,
845 510, 509, 508, 507, 506, 505, 504, 503, 502, 501,
846 500, 498, 497, 496, 495, 494, 493, 492, 491, 490,
847 488, 487, 486, 485, 484, 483, 482, 481, 480, 479,
848 478, 477, 476, 475, 474, 473, 472, 471, 470, 469,
849 468, 467, 466, 465, 464, 463, 462, 461, 460, 459,
850 458, 457, 456, 455, 454, 453, 452, 450, 449, 447,
851 446, 444, 443, 442, 441, 440, 439, 438, 437, 436,
852 435, 434, 432, 431, 429, 428, 427, 426, 423, 422,
853 421, 420, 419, 418, 417, 416, 415, 414, 413, 412,
855 411, 410, 409, 408, 407, 406, 405, 404, 403, 402,
856 401, 400, 399, 397, 396, 395, 393, 392, 391, 390,
857 389, 387, 386, 385, 384, 383, 382, 380, 379, 378,
858 377, 376, 374, 373, 372, 371, 370, 369, 368, 367,
859 366, 365, 364, 363, 362, 361, 359, 358, 357, 355,
860 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
861 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
862 334, 333, 332, 331, 330, 329, 328, 327, 326, 324,
863 322, 321, 320, 319, 317, 316, 315, 314, 313, 312,
864 311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
866 301, 300, 298, 297, 296, 295, 294, 293, 292, 291,
867 290, 289, 288, 286, 285, 284, 283, 282, 281, 280,
868 278, 277, 276, 275, 274, 268, 267, 266, 265, 264,
869 263, 262, 261, 260, 259, 258, 257, 256, 255, 254,
870 253, 252, 251, 250, 249, 248, 247, 246, 245, 244,
871 243, 242, 241, 240, 239, 238, 237, 236, 235, 234,
872 233, 232, 231, 230, 228, 227, 226, 225, 224, 223,
873 222, 221, 220, 219, 218, 217, 216, 215, 214, 213,
874 211, 209, 207, 206, 205, 204, 203, 202, 201, 200,
875 199, 197, 196, 195, 194, 193, 191, 190, 189, 188,
877 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,
878 176, 175, 169, 166, 165, 164, 163, 162, 160, 159,
879 158, 157, 156, 155, 154, 153, 152, 151, 150, 149,
880 148, 147, 146, 145, 144, 142, 141, 140, 139, 138,
881 137, 136, 135, 134, 133, 132, 131, 130, 129, 127,
882 125, 124, 123, 122, 121, 120, 119, 118, 117, 116,
883 115, 114, 113, 112, 111, 110, 109, 108, 107, 106,
884 105, 104, 103, 102, 101, 100, 98, 97, 96, 95,
885 94, 93, 92, 91, 90, 89, 87, 86, 85, 84,
886 82, 81, 78, 77, 76, 74, 67, 63, 61, 56,
888 52, 50, 46, 44, 43, 42, 41, 38, 34, 20,
889 11, 9, 5, 3, 691, 691, 691, 691, 691, 691,
890 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
891 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
892 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
893 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
894 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
895 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
899 static yy_state_type yy_last_accepting_state;
900 static char *yy_last_accepting_cpos;
902 extern int FtaParser_flex_debug;
903 int FtaParser_flex_debug = 0;
905 /* The intent behind this definition is that it'll catch
906 * any uses of REJECT which flex missed.
908 #define REJECT reject_used_but_not_detected
909 static int yy_more_flag = 0;
910 static int yy_more_len = 0;
911 #define yymore() ((yy_more_flag) = 1)
912 #define YY_MORE_ADJ (yy_more_len)
913 #define YY_RESTORE_YY_MORE_OFFSET
916 /* ------------------------------------------------
917 Copyright 2020 AT&T Intellectual Property
918 Licensed under the Apache License, Version 2.0 (the "License");
919 you may not use this file except in compliance with the License.
920 You may obtain a copy of the License at
922 http://www.apache.org/licenses/LICENSE-2.0
924 Unless required by applicable law or agreed to in writing, software
925 distributed under the License is distributed on an "AS IS" BASIS,
926 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
927 See the License for the specific language governing permissions and
928 limitations under the License.
929 ------------------------------------------- */
932 flex -PFtaParser -oftalexer.cc fta.l
937 * AT&T lex can't handle this lexer due to lex bugs. It works with flex
938 * 2.3.7, pclex 2.0.5, and MKS lex 3.1a.
941 #include "parse_fta.h"
942 #include "parse_schema.h"
947 #include "fta.tab.cc.h"
950 Some includes that flex doesn't include as standard,
951 but which are needed.
958 // Prevent flex from defining FtaParserwrap as extern "C"
960 #define YY_SKIP_YYWRAP
962 /* No lex lib, supply the FtaParserwrap fcn. that normally resides there
965 //int FtaParserwrap(){return(1);}
967 extern int FtaParserdebug;
971 These variables are used for error reporting:
972 flex_fta_lineno : the line currently being parsed when the error occurs.
973 flex_fta_ch : the character on the line where the error occurs
974 flex_fta_linebuf : store the line for reporting.
976 NOTE : 1) the fixed size flex_fta_linebuf buffer is dangerous.
977 2) You might get pointed to a place shortly after
978 where the syntax error occurs. It is close enough
982 int flex_fta_lineno = 1;
984 char flex_fta_linebuf[200000];
986 char *flex_fta_stringinput = NULL;
987 int flex_fta_stringinput_ptr = 0;
988 FILE *flex_fta_fileinput = NULL;
989 int my_FtaParser_yyinput(char *buf, int max_size);
993 void FtaParsererror(char *s){
995 fprintf(stderr,"On line %d, char %d: %s (token %s):\n%s\n",
996 flex_fta_lineno, flex_fta_ch, s, FtaParsertext, flex_fta_linebuf );
997 for(i=0;i<flex_fta_ch;i++){
998 if(flex_fta_linebuf[i] == '\t'){
999 fprintf(stderr,"\t");
1001 fprintf(stderr," ");
1004 fprintf(stderr,"^\n");
1005 // fprintf(stderr,"%*s\n",1+flex_fta_ch,"^");
1009 #define YY_INPUT(b, r, ms) (r = my_FtaParser_yyinput(b,ms))
1011 /* MKS needs the next line to increase the NFA table */
1012 #line 1013 "ftalexer.cc"
1016 #ifndef YY_NO_UNISTD_H
1017 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1018 * down here because we want the user's section 1 to have been scanned first.
1019 * The user has a chance to override it with an option.
1024 #ifndef YY_EXTRA_TYPE
1025 #define YY_EXTRA_TYPE void *
1028 static int yy_init_globals (void );
1030 /* Accessor methods to globals.
1031 These are made visible to non-reentrant scanners for convenience. */
1033 int FtaParserlex_destroy (void );
1035 int FtaParserget_debug (void );
1037 void FtaParserset_debug (int debug_flag );
1039 YY_EXTRA_TYPE FtaParserget_extra (void );
1041 void FtaParserset_extra (YY_EXTRA_TYPE user_defined );
1043 FILE *FtaParserget_in (void );
1045 void FtaParserset_in (FILE * _in_str );
1047 FILE *FtaParserget_out (void );
1049 void FtaParserset_out (FILE * _out_str );
1051 yy_size_t FtaParserget_leng (void );
1053 char *FtaParserget_text (void );
1055 int FtaParserget_lineno (void );
1057 void FtaParserset_lineno (int _line_number );
1059 /* Macros after this point can all be overridden by user definitions in
1063 #ifndef YY_SKIP_YYWRAP
1065 extern "C" int FtaParserwrap (void );
1067 extern int FtaParserwrap (void );
1073 static void yyunput (int c,char *buf_ptr );
1078 static void yy_flex_strncpy (char *,yyconst char *,int );
1081 #ifdef YY_NEED_STRLEN
1082 static int yy_flex_strlen (yyconst char * );
1088 static int yyinput (void );
1090 static int input (void );
1095 /* Amount of stuff to slurp up with each read. */
1096 #ifndef YY_READ_BUF_SIZE
1098 /* On IA-64, the buffer size is 16k, not 8k */
1099 #define YY_READ_BUF_SIZE 16384
1101 #define YY_READ_BUF_SIZE 8192
1102 #endif /* __ia64__ */
1105 /* Copy whatever the last rule matched to the standard output. */
1107 /* This used to be an fputs(), but since the string might contain NUL's,
1108 * we now use fwrite().
1110 #define ECHO do { if (fwrite( FtaParsertext, FtaParserleng, 1, FtaParserout )) {} } while (0)
1113 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1114 * is returned in "result".
1117 #define YY_INPUT(buf,result,max_size) \
1118 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1122 for ( n = 0; n < max_size && \
1123 (c = getc( FtaParserin )) != EOF && c != '\n'; ++n ) \
1124 buf[n] = (char) c; \
1126 buf[n++] = (char) c; \
1127 if ( c == EOF && ferror( FtaParserin ) ) \
1128 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1134 while ( (result = fread(buf, 1, max_size, FtaParserin))==0 && ferror(FtaParserin)) \
1136 if( errno != EINTR) \
1138 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1142 clearerr(FtaParserin); \
1149 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1150 * we don't want an extra ';' after the "return" because that will cause
1151 * some compilers to complain about unreachable statements.
1154 #define yyterminate() return YY_NULL
1157 /* Number of entries by which start-condition stack grows. */
1158 #ifndef YY_START_STACK_INCR
1159 #define YY_START_STACK_INCR 25
1162 /* Report a fatal error. */
1163 #ifndef YY_FATAL_ERROR
1164 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1167 /* end tables serialization structures and prototypes */
1169 /* Default declaration of generated scanner - a define so the user can
1170 * easily add parameters.
1173 #define YY_DECL_IS_OURS 1
1175 extern int FtaParserlex (void);
1177 #define YY_DECL int FtaParserlex (void)
1178 #endif /* !YY_DECL */
1180 /* Code executed at the beginning of each rule, after FtaParsertext and FtaParserleng
1183 #ifndef YY_USER_ACTION
1184 #define YY_USER_ACTION
1187 /* Code executed at the end of each rule. */
1189 #define YY_BREAK /*LINTED*/break;
1192 #define YY_RULE_SETUP \
1195 /** The main scanner function which does all the work.
1199 yy_state_type yy_current_state;
1200 char *yy_cp, *yy_bp;
1212 (yy_start) = 1; /* first start state */
1214 if ( ! FtaParserin )
1215 FtaParserin = stdin;
1217 if ( ! FtaParserout )
1218 FtaParserout = stdout;
1220 if ( ! YY_CURRENT_BUFFER ) {
1221 FtaParserensure_buffer_stack ();
1222 YY_CURRENT_BUFFER_LVALUE =
1223 FtaParser_create_buffer(FtaParserin,YY_BUF_SIZE );
1226 FtaParser_load_buffer_state( );
1233 /* literal keyword tokens */
1236 The actions associated with each text token are to
1237 keep track of the current location (for syntax error reporting)
1238 and to report any necessary info to the emf.y parse tree builder
1240 Its likely that there are a number of omissions, inconsistencies
1241 (some keywords do not need to be in caps), and relics
1242 (keywords such as BETWEEN, INDICATOR, etc., are not used
1244 This parser is somewhat of a work in progress.
1247 /* Query keywords */
1249 #line 1250 "ftalexer.cc"
1251 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1254 if ( (yy_more_flag) )
1256 (yy_more_len) = (yy_c_buf_p) - (yytext_ptr);
1259 yy_cp = (yy_c_buf_p);
1261 /* Support of FtaParsertext. */
1262 *yy_cp = (yy_hold_char);
1264 /* yy_bp points to the position in yy_ch_buf of the start of
1269 yy_current_state = (yy_start);
1273 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1274 if ( yy_accept[yy_current_state] )
1276 (yy_last_accepting_state) = yy_current_state;
1277 (yy_last_accepting_cpos) = yy_cp;
1279 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1281 yy_current_state = (int) yy_def[yy_current_state];
1282 if ( yy_current_state >= 692 )
1283 yy_c = yy_meta[(unsigned int) yy_c];
1285 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1288 while ( yy_base[yy_current_state] != 815 );
1291 yy_act = yy_accept[yy_current_state];
1293 { /* have to back up */
1294 yy_cp = (yy_last_accepting_cpos);
1295 yy_current_state = (yy_last_accepting_state);
1296 yy_act = yy_accept[yy_current_state];
1299 YY_DO_BEFORE_ACTION;
1301 do_action: /* This label is used only to access EOF actions. */
1304 { /* beginning of action switch */
1305 case 0: /* must back up */
1306 /* undo the effects of YY_DO_BEFORE_ACTION */
1307 *yy_cp = (yy_hold_char);
1308 yy_cp = (yy_last_accepting_cpos);
1309 yy_current_state = (yy_last_accepting_state);
1310 goto yy_find_action;
1315 { flex_fta_ch+=FtaParserleng; return AND; }
1320 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("AND_AGGR"); return AGGR; }
1325 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("OR_AGGR"); return AGGR; }
1330 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("XOR_AGGR"); return AGGR; }
1335 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("AVG"); return AGGR; }
1340 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("MIN"); return AGGR; }
1345 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("MAX"); return AGGR; }
1350 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("SUM"); return AGGR; }
1355 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup("COUNT"); return AGGR; }
1360 { flex_fta_ch+=FtaParserleng; return BY; }
1365 { flex_fta_ch+=FtaParserleng; return FROM; }
1370 { flex_fta_ch+=FtaParserleng; return INNER_JOIN; }
1375 { flex_fta_ch+=FtaParserleng; return OUTER_JOIN; }
1380 { flex_fta_ch+=FtaParserleng; return RIGHT_OUTER_JOIN; }
1385 { flex_fta_ch+=FtaParserleng; return LEFT_OUTER_JOIN; }
1390 { flex_fta_ch+=FtaParserleng; return WATCHLIST_JOIN; }
1395 { flex_fta_ch+=FtaParserleng; return FILTER_JOIN; }
1400 { flex_fta_ch+=FtaParserleng; return GROUP; }
1405 { flex_fta_ch+=FtaParserleng; return ROLLUP; }
1410 { flex_fta_ch+=FtaParserleng; return CUBE; }
1415 { flex_fta_ch+=FtaParserleng; return GROUPING_SETS; }
1420 { flex_fta_ch+=FtaParserleng; return SUPERGROUP; }
1425 { flex_fta_ch+=FtaParserleng; return CLEANING_WHEN; }
1430 { flex_fta_ch+=FtaParserleng; return CLEANING_BY; }
1435 { flex_fta_ch+=FtaParserleng; return CLOSING_WHEN; }
1440 { flex_fta_ch+=FtaParserleng; return HAVING; }
1445 { flex_fta_ch+=FtaParserleng; return AS; }
1450 { flex_fta_ch+=FtaParserleng; return IN; }
1455 { flex_fta_ch+=FtaParserleng; return NOT; }
1460 { flex_fta_ch+=FtaParserleng; return OR; }
1465 { flex_fta_ch+=FtaParserleng; return SELECT; }
1470 { flex_fta_ch+=FtaParserleng; return WHERE; }
1475 { flex_fta_ch+=FtaParserleng; return SUCH;}
1480 { flex_fta_ch+=FtaParserleng; return THAT;}
1485 {flex_fta_ch+=FtaParserleng; return MERGE;}
1490 {flex_fta_ch+=FtaParserleng; return SLACK;}
1495 {flex_fta_ch+=FtaParserleng; return WATCHLIST;}
1500 { flex_fta_ch+=FtaParserleng; return TRUE_V;}
1505 { flex_fta_ch+=FtaParserleng; return FALSE_V;}
1510 { flex_fta_ch+=FtaParserleng; return TIMEVAL_L;}
1515 { flex_fta_ch+=FtaParserleng; return HEX_L;}
1520 { flex_fta_ch+=FtaParserleng; return LHEX_L;}
1525 { flex_fta_ch+=FtaParserleng; return IP_L;}
1530 { flex_fta_ch+=FtaParserleng; return IPV6_L;}
1535 { flex_fta_ch+=FtaParserleng; return DEFINE_SEC;}
1540 { flex_fta_ch+=FtaParserleng; return PARAM_SEC;}
1545 {flex_fta_ch+=FtaParserleng; return LEFTBRACE;}
1550 {flex_fta_ch+=FtaParserleng; return RIGHTBRACE;}
1553 Table definition keywords
1558 { flex_fta_ch+=FtaParserleng; return TABLE; }
1563 { flex_fta_ch+=FtaParserleng; return PROTOCOL; }
1568 { flex_fta_ch+=FtaParserleng; return STREAM; }
1573 { flex_fta_ch+=FtaParserleng; return FTA; }
1578 { flex_fta_ch+=FtaParserleng; return UNPACK_FCNS; }
1583 { flex_fta_ch+=FtaParserleng; return OPERATOR; }
1588 { flex_fta_ch+=FtaParserleng; return OPERATOR_VIEW; }
1593 { flex_fta_ch+=FtaParserleng; return FIELDS; }
1598 { flex_fta_ch+=FtaParserleng; return SUBQUERIES; }
1603 { flex_fta_ch+=FtaParserleng; return SELECTION_PUSHDOWN; }
1608 {flex_fta_ch+=FtaParserleng; return SEMICOLON;}
1616 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return SHIFT_OP; }
1631 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return COMPARISON; }
1636 { flex_fta_ch+=FtaParserleng; return FtaParsertext[0]; }
1641 { flex_fta_ch+=FtaParserleng; return FtaParsertext[0]; }
1646 { flex_fta_ch+=FtaParserleng; return FtaParsertext[0]; }
1652 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return NAME; }
1660 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return INTNUM; }
1665 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return LONGINTNUM; }
1678 { flex_fta_ch+=FtaParserleng; FtaParserlval.strval = strdup(FtaParsertext); return APPROXNUM; }
1688 FtaParserlval.strval = strdup(FtaParsertext+1);
1692 unput(c); /* just peeking */
1694 flex_fta_ch+=FtaParserleng;
1695 FtaParserlval.strval[FtaParserleng-2] = '\0';
1696 return STRING_TOKEN;
1702 *yy_cp = (yy_hold_char); /* undo effects of setting up FtaParsertext */
1703 (yy_c_buf_p) = yy_cp -= 1;
1704 YY_DO_BEFORE_ACTION; /* set up FtaParsertext again */
1707 { flex_fta_ch+=FtaParserleng; FtaParsererror("Unterminated string"); }
1710 /* Newline : advance the error reporting line number */
1711 /* and grab the next line into flex_fta_linebuf */
1714 /* rule 82 can match eol */
1717 {flex_fta_ch=0; flex_fta_lineno++;
1718 strcpy(flex_fta_linebuf,FtaParsertext+1);
1725 {flex_fta_ch+=FtaParserleng; } /* white space */
1728 *yy_cp = (yy_hold_char); /* undo effects of setting up FtaParsertext */
1729 (yy_c_buf_p) = yy_cp -= 1;
1730 YY_DO_BEFORE_ACTION; /* set up FtaParsertext again */
1733 {flex_fta_ch+=FtaParserleng; }; /* comment */
1736 *yy_cp = (yy_hold_char); /* undo effects of setting up FtaParsertext */
1737 (yy_c_buf_p) = yy_cp -= 1;
1738 YY_DO_BEFORE_ACTION; /* set up FtaParsertext again */
1741 {flex_fta_ch+=FtaParserleng; }; /* comment */
1744 /* rule 86 can match eol */
1747 {flex_fta_ch+=FtaParserleng; fprintf(stderr,"Warning: unknown token (ignored)\n"); FtaParsererror(FtaParsertext);}
1754 #line 1755 "ftalexer.cc"
1755 case YY_STATE_EOF(INITIAL):
1758 case YY_END_OF_BUFFER:
1760 /* Amount of text matched not including the EOB char. */
1761 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1763 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1764 *yy_cp = (yy_hold_char);
1765 YY_RESTORE_YY_MORE_OFFSET
1767 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1769 /* We're scanning a new file or input source. It's
1770 * possible that this happened because the user
1771 * just pointed FtaParserin at a new source and called
1772 * FtaParserlex(). If so, then we have to assure
1773 * consistency between YY_CURRENT_BUFFER and our
1774 * globals. Here is the right place to do so, because
1775 * this is the first action (other than possibly a
1776 * back-up) that will match for the new input source.
1778 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1779 YY_CURRENT_BUFFER_LVALUE->yy_input_file = FtaParserin;
1780 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1783 /* Note that here we test for yy_c_buf_p "<=" to the position
1784 * of the first EOB in the buffer, since yy_c_buf_p will
1785 * already have been incremented past the NUL character
1786 * (since all states make transitions on EOB to the
1787 * end-of-buffer state). Contrast this with the test
1790 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1791 { /* This was really a NUL. */
1792 yy_state_type yy_next_state;
1794 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1796 yy_current_state = yy_get_previous_state( );
1798 /* Okay, we're now positioned to make the NUL
1799 * transition. We couldn't have
1800 * yy_get_previous_state() go ahead and do it
1801 * for us because it doesn't know how to deal
1802 * with the possibility of jamming (and we don't
1803 * want to build jamming into it because then it
1804 * will run more slowly).
1807 yy_next_state = yy_try_NUL_trans( yy_current_state );
1809 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1811 if ( yy_next_state )
1813 /* Consume the NUL. */
1814 yy_cp = ++(yy_c_buf_p);
1815 yy_current_state = yy_next_state;
1821 yy_cp = (yy_c_buf_p);
1822 goto yy_find_action;
1826 else switch ( yy_get_next_buffer( ) )
1828 case EOB_ACT_END_OF_FILE:
1830 (yy_did_buffer_switch_on_eof) = 0;
1832 if ( FtaParserwrap( ) )
1834 /* Note: because we've taken care in
1835 * yy_get_next_buffer() to have set up
1836 * FtaParsertext, we can now set up
1837 * yy_c_buf_p so that if some total
1838 * hoser (like flex itself) wants to
1839 * call the scanner after we return the
1840 * YY_NULL, it'll still work - another
1841 * YY_NULL will get returned.
1843 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1845 yy_act = YY_STATE_EOF(YY_START);
1851 if ( ! (yy_did_buffer_switch_on_eof) )
1857 case EOB_ACT_CONTINUE_SCAN:
1859 (yytext_ptr) + yy_amount_of_matched_text;
1861 yy_current_state = yy_get_previous_state( );
1863 yy_cp = (yy_c_buf_p);
1864 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1867 case EOB_ACT_LAST_MATCH:
1869 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1871 yy_current_state = yy_get_previous_state( );
1873 yy_cp = (yy_c_buf_p);
1874 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1875 goto yy_find_action;
1882 "fatal flex scanner internal error--no action found" );
1883 } /* end of action switch */
1884 } /* end of scanning one token */
1885 } /* end of user's declarations */
1886 } /* end of FtaParserlex */
1888 /* yy_get_next_buffer - try to read in a new buffer
1890 * Returns a code representing an action:
1891 * EOB_ACT_LAST_MATCH -
1892 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1893 * EOB_ACT_END_OF_FILE - end of file
1895 static int yy_get_next_buffer (void)
1897 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1898 char *source = (yytext_ptr);
1899 yy_size_t number_to_move, i;
1902 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1904 "fatal flex scanner internal error--end of buffer missed" );
1906 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1907 { /* Don't try to fill the buffer, so this is an EOF. */
1908 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1910 /* We matched a single character, the EOB, so
1911 * treat this as a final EOF.
1913 return EOB_ACT_END_OF_FILE;
1918 /* We matched some text prior to the EOB, first
1921 return EOB_ACT_LAST_MATCH;
1925 /* Try to read more data. */
1927 /* First move last chars to start of buffer. */
1928 number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1930 for ( i = 0; i < number_to_move; ++i )
1931 *(dest++) = *(source++);
1933 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1934 /* don't do the read, it's not guaranteed to return an EOF,
1937 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1941 yy_size_t num_to_read =
1942 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1944 while ( num_to_read <= 0 )
1945 { /* Not enough room in the buffer - grow it. */
1947 /* just a shorter name for the current buffer */
1948 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1950 int yy_c_buf_p_offset =
1951 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1953 if ( b->yy_is_our_buffer )
1955 yy_size_t new_size = b->yy_buf_size * 2;
1957 if ( new_size <= 0 )
1958 b->yy_buf_size += b->yy_buf_size / 8;
1960 b->yy_buf_size *= 2;
1962 b->yy_ch_buf = (char *)
1963 /* Include room in for 2 EOB chars. */
1964 FtaParserrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1967 /* Can't grow it, we don't own it. */
1970 if ( ! b->yy_ch_buf )
1972 "fatal error - scanner input buffer overflow" );
1974 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1976 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1981 if ( num_to_read > YY_READ_BUF_SIZE )
1982 num_to_read = YY_READ_BUF_SIZE;
1984 /* Read in more data. */
1985 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1986 (yy_n_chars), num_to_read );
1988 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1991 if ( (yy_n_chars) == 0 )
1993 if ( number_to_move == YY_MORE_ADJ )
1995 ret_val = EOB_ACT_END_OF_FILE;
1996 FtaParserrestart(FtaParserin );
2001 ret_val = EOB_ACT_LAST_MATCH;
2002 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2003 YY_BUFFER_EOF_PENDING;
2008 ret_val = EOB_ACT_CONTINUE_SCAN;
2010 if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2011 /* Extend the array by 50%, plus the number we really need. */
2012 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2013 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) FtaParserrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2014 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2015 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2018 (yy_n_chars) += number_to_move;
2019 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2020 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2022 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2027 /* yy_get_previous_state - get the state just before the EOB char was reached */
2029 static yy_state_type yy_get_previous_state (void)
2031 yy_state_type yy_current_state;
2034 yy_current_state = (yy_start);
2036 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2038 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2039 if ( yy_accept[yy_current_state] )
2041 (yy_last_accepting_state) = yy_current_state;
2042 (yy_last_accepting_cpos) = yy_cp;
2044 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2046 yy_current_state = (int) yy_def[yy_current_state];
2047 if ( yy_current_state >= 692 )
2048 yy_c = yy_meta[(unsigned int) yy_c];
2050 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2053 return yy_current_state;
2056 /* yy_try_NUL_trans - try to make a transition on the NUL character
2059 * next_state = yy_try_NUL_trans( current_state );
2061 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2064 char *yy_cp = (yy_c_buf_p);
2067 if ( yy_accept[yy_current_state] )
2069 (yy_last_accepting_state) = yy_current_state;
2070 (yy_last_accepting_cpos) = yy_cp;
2072 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2074 yy_current_state = (int) yy_def[yy_current_state];
2075 if ( yy_current_state >= 692 )
2076 yy_c = yy_meta[(unsigned int) yy_c];
2078 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2079 yy_is_jam = (yy_current_state == 691);
2081 return yy_is_jam ? 0 : yy_current_state;
2086 static void yyunput (int c, char * yy_bp )
2090 yy_cp = (yy_c_buf_p);
2092 /* undo effects of setting up FtaParsertext */
2093 *yy_cp = (yy_hold_char);
2095 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2096 { /* need to shift things up to make room */
2097 /* +2 for EOB chars. */
2098 yy_size_t number_to_move = (yy_n_chars) + 2;
2099 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2100 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2102 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2104 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2105 *--dest = *--source;
2107 yy_cp += (int) (dest - source);
2108 yy_bp += (int) (dest - source);
2109 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2110 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2112 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2113 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2116 *--yy_cp = (char) c;
2118 (yytext_ptr) = yy_bp;
2119 (yy_hold_char) = *yy_cp;
2120 (yy_c_buf_p) = yy_cp;
2127 static int yyinput (void)
2129 static int input (void)
2135 *(yy_c_buf_p) = (yy_hold_char);
2137 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2139 /* yy_c_buf_p now points to the character we want to return.
2140 * If this occurs *before* the EOB characters, then it's a
2141 * valid NUL; if not, then we've hit the end of the buffer.
2143 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2144 /* This was really a NUL. */
2145 *(yy_c_buf_p) = '\0';
2148 { /* need more input */
2149 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2152 switch ( yy_get_next_buffer( ) )
2154 case EOB_ACT_LAST_MATCH:
2155 /* This happens because yy_g_n_b()
2156 * sees that we've accumulated a
2157 * token and flags that we need to
2158 * try matching the token before
2159 * proceeding. But for input(),
2160 * there's no matching to consider.
2161 * So convert the EOB_ACT_LAST_MATCH
2162 * to EOB_ACT_END_OF_FILE.
2165 /* Reset buffer status. */
2166 FtaParserrestart(FtaParserin );
2170 case EOB_ACT_END_OF_FILE:
2172 if ( FtaParserwrap( ) )
2175 if ( ! (yy_did_buffer_switch_on_eof) )
2184 case EOB_ACT_CONTINUE_SCAN:
2185 (yy_c_buf_p) = (yytext_ptr) + offset;
2191 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2192 *(yy_c_buf_p) = '\0'; /* preserve FtaParsertext */
2193 (yy_hold_char) = *++(yy_c_buf_p);
2197 #endif /* ifndef YY_NO_INPUT */
2199 /** Immediately switch to a different input stream.
2200 * @param input_file A readable stream.
2202 * @note This function does not reset the start condition to @c INITIAL .
2204 void FtaParserrestart (FILE * input_file )
2207 if ( ! YY_CURRENT_BUFFER ){
2208 FtaParserensure_buffer_stack ();
2209 YY_CURRENT_BUFFER_LVALUE =
2210 FtaParser_create_buffer(FtaParserin,YY_BUF_SIZE );
2213 FtaParser_init_buffer(YY_CURRENT_BUFFER,input_file );
2214 FtaParser_load_buffer_state( );
2217 /** Switch to a different input buffer.
2218 * @param new_buffer The new input buffer.
2221 void FtaParser_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2224 /* TODO. We should be able to replace this entire function body
2226 * FtaParserpop_buffer_state();
2227 * FtaParserpush_buffer_state(new_buffer);
2229 FtaParserensure_buffer_stack ();
2230 if ( YY_CURRENT_BUFFER == new_buffer )
2233 if ( YY_CURRENT_BUFFER )
2235 /* Flush out information for old buffer. */
2236 *(yy_c_buf_p) = (yy_hold_char);
2237 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2238 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2241 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2242 FtaParser_load_buffer_state( );
2244 /* We don't actually know whether we did this switch during
2245 * EOF (FtaParserwrap()) processing, but the only time this flag
2246 * is looked at is after FtaParserwrap() is called, so it's safe
2247 * to go ahead and always set it.
2249 (yy_did_buffer_switch_on_eof) = 1;
2252 static void FtaParser_load_buffer_state (void)
2254 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2255 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2256 FtaParserin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2257 (yy_hold_char) = *(yy_c_buf_p);
2260 /** Allocate and initialize an input buffer state.
2261 * @param file A readable stream.
2262 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2264 * @return the allocated buffer state.
2266 YY_BUFFER_STATE FtaParser_create_buffer (FILE * file, int size )
2270 b = (YY_BUFFER_STATE) FtaParseralloc(sizeof( struct yy_buffer_state ) );
2272 YY_FATAL_ERROR( "out of dynamic memory in FtaParser_create_buffer()" );
2274 b->yy_buf_size = (yy_size_t)size;
2276 /* yy_ch_buf has to be 2 characters longer than the size given because
2277 * we need to put in 2 end-of-buffer characters.
2279 b->yy_ch_buf = (char *) FtaParseralloc(b->yy_buf_size + 2 );
2280 if ( ! b->yy_ch_buf )
2281 YY_FATAL_ERROR( "out of dynamic memory in FtaParser_create_buffer()" );
2283 b->yy_is_our_buffer = 1;
2285 FtaParser_init_buffer(b,file );
2290 /** Destroy the buffer.
2291 * @param b a buffer created with FtaParser_create_buffer()
2294 void FtaParser_delete_buffer (YY_BUFFER_STATE b )
2300 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2301 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2303 if ( b->yy_is_our_buffer )
2304 FtaParserfree((void *) b->yy_ch_buf );
2306 FtaParserfree((void *) b );
2309 /* Initializes or reinitializes a buffer.
2310 * This function is sometimes called more than once on the same buffer,
2311 * such as during a FtaParserrestart() or at EOF.
2313 static void FtaParser_init_buffer (YY_BUFFER_STATE b, FILE * file )
2318 FtaParser_flush_buffer(b );
2320 b->yy_input_file = file;
2321 b->yy_fill_buffer = 1;
2323 /* If b is the current buffer, then FtaParser_init_buffer was _probably_
2324 * called from FtaParserrestart() or through yy_get_next_buffer.
2325 * In that case, we don't want to reset the lineno or column.
2327 if (b != YY_CURRENT_BUFFER){
2328 b->yy_bs_lineno = 1;
2329 b->yy_bs_column = 0;
2332 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2337 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2338 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2341 void FtaParser_flush_buffer (YY_BUFFER_STATE b )
2348 /* We always need two end-of-buffer characters. The first causes
2349 * a transition to the end-of-buffer state. The second causes
2350 * a jam in that state.
2352 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2353 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2355 b->yy_buf_pos = &b->yy_ch_buf[0];
2358 b->yy_buffer_status = YY_BUFFER_NEW;
2360 if ( b == YY_CURRENT_BUFFER )
2361 FtaParser_load_buffer_state( );
2364 /** Pushes the new state onto the stack. The new state becomes
2365 * the current state. This function will allocate the stack
2367 * @param new_buffer The new state.
2370 void FtaParserpush_buffer_state (YY_BUFFER_STATE new_buffer )
2372 if (new_buffer == NULL)
2375 FtaParserensure_buffer_stack();
2377 /* This block is copied from FtaParser_switch_to_buffer. */
2378 if ( YY_CURRENT_BUFFER )
2380 /* Flush out information for old buffer. */
2381 *(yy_c_buf_p) = (yy_hold_char);
2382 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2383 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2386 /* Only push if top exists. Otherwise, replace top. */
2387 if (YY_CURRENT_BUFFER)
2388 (yy_buffer_stack_top)++;
2389 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2391 /* copied from FtaParser_switch_to_buffer. */
2392 FtaParser_load_buffer_state( );
2393 (yy_did_buffer_switch_on_eof) = 1;
2396 /** Removes and deletes the top of the stack, if present.
2397 * The next element becomes the new top.
2400 void FtaParserpop_buffer_state (void)
2402 if (!YY_CURRENT_BUFFER)
2405 FtaParser_delete_buffer(YY_CURRENT_BUFFER );
2406 YY_CURRENT_BUFFER_LVALUE = NULL;
2407 if ((yy_buffer_stack_top) > 0)
2408 --(yy_buffer_stack_top);
2410 if (YY_CURRENT_BUFFER) {
2411 FtaParser_load_buffer_state( );
2412 (yy_did_buffer_switch_on_eof) = 1;
2416 /* Allocates the stack if it does not exist.
2417 * Guarantees space for at least one push.
2419 static void FtaParserensure_buffer_stack (void)
2421 yy_size_t num_to_alloc;
2423 if (!(yy_buffer_stack)) {
2425 /* First allocation is just for 2 elements, since we don't know if this
2426 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2427 * immediate realloc on the next call.
2429 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2430 (yy_buffer_stack) = (struct yy_buffer_state**)FtaParseralloc
2431 (num_to_alloc * sizeof(struct yy_buffer_state*)
2433 if ( ! (yy_buffer_stack) )
2434 YY_FATAL_ERROR( "out of dynamic memory in FtaParserensure_buffer_stack()" );
2436 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2438 (yy_buffer_stack_max) = num_to_alloc;
2439 (yy_buffer_stack_top) = 0;
2443 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2445 /* Increase the buffer to prepare for a possible push. */
2446 yy_size_t grow_size = 8 /* arbitrary grow size */;
2448 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2449 (yy_buffer_stack) = (struct yy_buffer_state**)FtaParserrealloc
2451 num_to_alloc * sizeof(struct yy_buffer_state*)
2453 if ( ! (yy_buffer_stack) )
2454 YY_FATAL_ERROR( "out of dynamic memory in FtaParserensure_buffer_stack()" );
2456 /* zero only the new slots.*/
2457 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2458 (yy_buffer_stack_max) = num_to_alloc;
2462 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2463 * @param base the character buffer
2464 * @param size the size in bytes of the character buffer
2466 * @return the newly allocated buffer state object.
2468 YY_BUFFER_STATE FtaParser_scan_buffer (char * base, yy_size_t size )
2473 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2474 base[size-1] != YY_END_OF_BUFFER_CHAR )
2475 /* They forgot to leave room for the EOB's. */
2478 b = (YY_BUFFER_STATE) FtaParseralloc(sizeof( struct yy_buffer_state ) );
2480 YY_FATAL_ERROR( "out of dynamic memory in FtaParser_scan_buffer()" );
2482 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2483 b->yy_buf_pos = b->yy_ch_buf = base;
2484 b->yy_is_our_buffer = 0;
2485 b->yy_input_file = 0;
2486 b->yy_n_chars = b->yy_buf_size;
2487 b->yy_is_interactive = 0;
2489 b->yy_fill_buffer = 0;
2490 b->yy_buffer_status = YY_BUFFER_NEW;
2492 FtaParser_switch_to_buffer(b );
2497 /** Setup the input buffer state to scan a string. The next call to FtaParserlex() will
2498 * scan from a @e copy of @a str.
2499 * @param yystr a NUL-terminated string to scan
2501 * @return the newly allocated buffer state object.
2502 * @note If you want to scan bytes that may contain NUL values, then use
2503 * FtaParser_scan_bytes() instead.
2505 YY_BUFFER_STATE FtaParser_scan_string (yyconst char * yystr )
2508 return FtaParser_scan_bytes(yystr,strlen(yystr) );
2511 /** Setup the input buffer state to scan the given bytes. The next call to FtaParserlex() will
2512 * scan from a @e copy of @a bytes.
2513 * @param yybytes the byte buffer to scan
2514 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2516 * @return the newly allocated buffer state object.
2518 YY_BUFFER_STATE FtaParser_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2525 /* Get memory for full buffer, including space for trailing EOB's. */
2526 n = _yybytes_len + 2;
2527 buf = (char *) FtaParseralloc(n );
2529 YY_FATAL_ERROR( "out of dynamic memory in FtaParser_scan_bytes()" );
2531 for ( i = 0; i < _yybytes_len; ++i )
2532 buf[i] = yybytes[i];
2534 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2536 b = FtaParser_scan_buffer(buf,n );
2538 YY_FATAL_ERROR( "bad buffer in FtaParser_scan_bytes()" );
2540 /* It's okay to grow etc. this buffer, and we should throw it
2541 * away when we're done.
2543 b->yy_is_our_buffer = 1;
2548 #ifndef YY_EXIT_FAILURE
2549 #define YY_EXIT_FAILURE 2
2552 static void yy_fatal_error (yyconst char* msg )
2554 (void) fprintf( stderr, "%s\n", msg );
2555 exit( YY_EXIT_FAILURE );
2558 /* Redefine yyless() so it works in section 3 code. */
2564 /* Undo effects of setting up FtaParsertext. */ \
2565 int yyless_macro_arg = (n); \
2566 YY_LESS_LINENO(yyless_macro_arg);\
2567 FtaParsertext[FtaParserleng] = (yy_hold_char); \
2568 (yy_c_buf_p) = FtaParsertext + yyless_macro_arg; \
2569 (yy_hold_char) = *(yy_c_buf_p); \
2570 *(yy_c_buf_p) = '\0'; \
2571 FtaParserleng = yyless_macro_arg; \
2575 /* Accessor methods (get/set functions) to struct members. */
2577 /** Get the current line number.
2580 int FtaParserget_lineno (void)
2583 return FtaParserlineno;
2586 /** Get the input stream.
2589 FILE *FtaParserget_in (void)
2594 /** Get the output stream.
2597 FILE *FtaParserget_out (void)
2599 return FtaParserout;
2602 /** Get the length of the current token.
2605 yy_size_t FtaParserget_leng (void)
2607 return FtaParserleng;
2610 /** Get the current token.
2614 char *FtaParserget_text (void)
2616 return FtaParsertext;
2619 /** Set the current line number.
2620 * @param _line_number line number
2623 void FtaParserset_lineno (int _line_number )
2626 FtaParserlineno = _line_number;
2629 /** Set the input stream. This does not discard the current
2631 * @param _in_str A readable stream.
2633 * @see FtaParser_switch_to_buffer
2635 void FtaParserset_in (FILE * _in_str )
2637 FtaParserin = _in_str ;
2640 void FtaParserset_out (FILE * _out_str )
2642 FtaParserout = _out_str ;
2645 int FtaParserget_debug (void)
2647 return FtaParser_flex_debug;
2650 void FtaParserset_debug (int _bdebug )
2652 FtaParser_flex_debug = _bdebug ;
2655 static int yy_init_globals (void)
2657 /* Initialization is the same as for the non-reentrant scanner.
2658 * This function is called from FtaParserlex_destroy(), so don't allocate here.
2661 (yy_buffer_stack) = 0;
2662 (yy_buffer_stack_top) = 0;
2663 (yy_buffer_stack_max) = 0;
2664 (yy_c_buf_p) = (char *) 0;
2668 /* Defined in main.c */
2670 FtaParserin = stdin;
2671 FtaParserout = stdout;
2673 FtaParserin = (FILE *) 0;
2674 FtaParserout = (FILE *) 0;
2677 /* For future reference: Set errno on error, since we are called by
2678 * FtaParserlex_init()
2683 /* FtaParserlex_destroy is for both reentrant and non-reentrant scanners. */
2684 int FtaParserlex_destroy (void)
2687 /* Pop the buffer stack, destroying each element. */
2688 while(YY_CURRENT_BUFFER){
2689 FtaParser_delete_buffer(YY_CURRENT_BUFFER );
2690 YY_CURRENT_BUFFER_LVALUE = NULL;
2691 FtaParserpop_buffer_state();
2694 /* Destroy the stack itself. */
2695 FtaParserfree((yy_buffer_stack) );
2696 (yy_buffer_stack) = NULL;
2698 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2699 * FtaParserlex() is called, initialization will occur. */
2706 * Internal utility routines.
2710 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2714 for ( i = 0; i < n; ++i )
2719 #ifdef YY_NEED_STRLEN
2720 static int yy_flex_strlen (yyconst char * s )
2723 for ( n = 0; s[n]; ++n )
2730 void *FtaParseralloc (yy_size_t size )
2732 return (void *) malloc( size );
2735 void *FtaParserrealloc (void * ptr, yy_size_t size )
2738 /* The cast to (char *) in the following accommodates both
2739 * implementations that use char* generic pointers, and those
2740 * that use void* generic pointers. It works with the latter
2741 * because both ANSI C and C++ allow castless assignment from
2742 * any pointer type to void*, and deal with argument conversions
2743 * as though doing an assignment.
2745 return (void *) realloc( (char *) ptr, size );
2748 void FtaParserfree (void * ptr )
2750 free( (char *) ptr ); /* see FtaParserrealloc() for (char *) cast */
2753 #define YYTABLES_NAME "yytables"
2759 int my_FtaParser_yyinput(char *buf, int max_size){
2763 if(flex_fta_stringinput != NULL){
2765 if(flex_fta_stringinput[flex_fta_stringinput_ptr] != '\0'){
2766 buf[c++] = flex_fta_stringinput[flex_fta_stringinput_ptr++];
2774 if(flex_fta_fileinput != NULL){
2775 while(c < max_size){
2776 inchar = getc(flex_fta_fileinput);
2789 void FtaParser_setfileinput(FILE *f){
2790 FtaParserrestart(NULL);
2792 flex_fta_fileinput = f;
2793 flex_fta_stringinput = NULL;
2794 flex_fta_lineno = 1;
2798 void FtaParser_setstringinput(char *s){
2799 FtaParserrestart(NULL);
2801 flex_fta_fileinput = NULL;
2802 flex_fta_stringinput = s;
2803 flex_fta_stringinput_ptr = 0;
2804 flex_fta_lineno = 1;