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 6
11 #define YY_FLEX_SUBMINOR_VERSION 4
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 defined (__STDC_VERSION__) && __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
;
57 /* Limits of integral types. */
59 #define INT8_MIN (-128)
62 #define INT16_MIN (-32767-1)
65 #define INT32_MIN (-2147483647-1)
68 #define INT8_MAX (127)
71 #define INT16_MAX (32767)
74 #define INT32_MAX (2147483647)
77 #define UINT8_MAX (255U)
80 #define UINT16_MAX (65535U)
83 #define UINT32_MAX (4294967295U)
87 #define SIZE_MAX (~(size_t)0)
92 #endif /* ! FLEXINT_H */
94 /* begin standard C++ headers. */
96 /* TODO: this is always defined, so inline it */
99 #if defined(__GNUC__) && __GNUC__ >= 3
100 #define yynoreturn __attribute__((__noreturn__))
105 /* Returned upon end-of-file. */
108 /* Promotes a possibly negative, possibly signed char to an
109 * integer in range [0..255] for use as an array index.
111 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
113 /* Enter a start condition. This macro really ought to take a parameter,
114 * but we do it the disgusting crufty way forced on us by the ()-less
115 * definition of BEGIN.
117 #define BEGIN (yy_start) = 1 + 2 *
118 /* Translate the current start state into a value that can be later handed
119 * to BEGIN to return to the state. The YYSTATE alias is for lex
122 #define YY_START (((yy_start) - 1) / 2)
123 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
126 /* Special action meaning "start processing a new file". */
127 #define YY_NEW_FILE yyrestart( yyin )
128 #define YY_END_OF_BUFFER_CHAR 0
130 /* Size of default input buffer. */
133 /* On IA-64, the buffer size is 16k, not 8k.
134 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
135 * Ditto for the __ia64__ case accordingly.
137 #define YY_BUF_SIZE 32768
139 #define YY_BUF_SIZE 16384
140 #endif /* __ia64__ */
143 /* The state buf must be large enough to hold one state per character in the main buffer.
145 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
147 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
148 #define YY_TYPEDEF_YY_BUFFER_STATE
149 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
152 #ifndef YY_TYPEDEF_YY_SIZE_T
153 #define YY_TYPEDEF_YY_SIZE_T
154 typedef size_t yy_size_t
;
159 extern FILE *yyin
, *yyout
;
161 #define EOB_ACT_CONTINUE_SCAN 0
162 #define EOB_ACT_END_OF_FILE 1
163 #define EOB_ACT_LAST_MATCH 2
165 #define YY_LESS_LINENO(n)
166 #define YY_LINENO_REWIND_TO(ptr)
168 /* Return all but the first "n" matched characters back to the input stream. */
172 /* Undo effects of setting up yytext. */ \
173 int yyless_macro_arg = (n); \
174 YY_LESS_LINENO(yyless_macro_arg);\
175 *yy_cp = (yy_hold_char); \
176 YY_RESTORE_YY_MORE_OFFSET \
177 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
178 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
181 #define unput(c) yyunput( c, (yytext_ptr) )
183 #ifndef YY_STRUCT_YY_BUFFER_STATE
184 #define YY_STRUCT_YY_BUFFER_STATE
185 struct yy_buffer_state
189 char *yy_ch_buf
; /* input buffer */
190 char *yy_buf_pos
; /* current position in input buffer */
192 /* Size of input buffer in bytes, not including room for EOB
197 /* Number of characters read into yy_ch_buf, not including EOB
202 /* Whether we "own" the buffer - i.e., we know we created it,
203 * and can realloc() it to grow it, and should free() it to
206 int yy_is_our_buffer
;
208 /* Whether this is an "interactive" input source; if so, and
209 * if we're using stdio for input, then we want to use getc()
210 * instead of fread(), to make sure we stop fetching input after
213 int yy_is_interactive
;
215 /* Whether we're considered to be at the beginning of a line.
216 * If so, '^' rules will be active on the next match, otherwise
221 int yy_bs_lineno
; /**< The line count. */
222 int yy_bs_column
; /**< The column count. */
224 /* Whether to try to fill the input buffer when we reach the
229 int yy_buffer_status
;
231 #define YY_BUFFER_NEW 0
232 #define YY_BUFFER_NORMAL 1
233 /* When an EOF's been seen but there's still some text to process
234 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
235 * shouldn't try reading from the input source any more. We might
236 * still have a bunch of tokens to match, though, because of
237 * possible backing-up.
239 * When we actually see the EOF, we change the status to "new"
240 * (via yyrestart()), so that the user can continue scanning by
241 * just pointing yyin at a new input file.
243 #define YY_BUFFER_EOF_PENDING 2
246 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
248 /* Stack of input buffers. */
249 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
250 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
251 static YY_BUFFER_STATE
* yy_buffer_stack
= NULL
; /**< Stack as an array. */
253 /* We provide macros for accessing buffer states in case in the
254 * future we want to put the buffer states in a more general
257 * Returns the top of the stack, or NULL.
259 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
260 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263 * NULL or when we need an lvalue. For internal use only.
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char
;
269 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p
= NULL
;
274 static int yy_init
= 0; /* whether we need to initialize */
275 static int yy_start
= 0; /* start state number */
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278 * instead of setting up a fresh yyin. A bit of a hack ...
280 static int yy_did_buffer_switch_on_eof
;
282 void yyrestart ( FILE *input_file
);
283 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer
);
284 YY_BUFFER_STATE
yy_create_buffer ( FILE *file
, int size
);
285 void yy_delete_buffer ( YY_BUFFER_STATE b
);
286 void yy_flush_buffer ( YY_BUFFER_STATE b
);
287 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer
);
288 void yypop_buffer_state ( void );
290 static void yyensure_buffer_stack ( void );
291 static void yy_load_buffer_state ( void );
292 static void yy_init_buffer ( YY_BUFFER_STATE b
, FILE *file
);
293 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
295 YY_BUFFER_STATE
yy_scan_buffer ( char *base
, yy_size_t size
);
296 YY_BUFFER_STATE
yy_scan_string ( const char *yy_str
);
297 YY_BUFFER_STATE
yy_scan_bytes ( const char *bytes
, int len
);
299 void *yyalloc ( yy_size_t
);
300 void *yyrealloc ( void *, yy_size_t
);
301 void yyfree ( void * );
303 #define yy_new_buffer yy_create_buffer
304 #define yy_set_interactive(is_interactive) \
306 if ( ! YY_CURRENT_BUFFER ){ \
307 yyensure_buffer_stack (); \
308 YY_CURRENT_BUFFER_LVALUE = \
309 yy_create_buffer( yyin, YY_BUF_SIZE ); \
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
313 #define yy_set_bol(at_bol) \
315 if ( ! YY_CURRENT_BUFFER ){\
316 yyensure_buffer_stack (); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer( yyin, YY_BUF_SIZE ); \
320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
324 /* Begin user sect3 */
326 #define yywrap() (/*CONSTCOND*/1)
327 #define YY_SKIP_YYWRAP
328 typedef flex_uint8_t YY_CHAR
;
330 FILE *yyin
= NULL
, *yyout
= NULL
;
332 typedef int yy_state_type
;
341 #define yytext_ptr yytext
343 static yy_state_type
yy_get_previous_state ( void );
344 static yy_state_type
yy_try_NUL_trans ( yy_state_type current_state
);
345 static int yy_get_next_buffer ( void );
346 static void yynoreturn
yy_fatal_error ( const char* msg
);
348 /* Done after the current pattern has been matched and before the
349 * corresponding action - sets up yytext.
351 #define YY_DO_BEFORE_ACTION \
352 (yytext_ptr) = yy_bp; \
353 yyleng = (int) (yy_cp - yy_bp); \
354 (yy_hold_char) = *yy_cp; \
356 (yy_c_buf_p) = yy_cp;
357 #define YY_NUM_RULES 5
358 #define YY_END_OF_BUFFER 6
359 /* This struct is not used in this scanner,
360 but its presence is necessary. */
363 flex_int32_t yy_verify
;
366 static const flex_int16_t yy_accept
[26] =
368 0, 0, 6, 5, 4, 5, 5, 5, 0, 0,
369 0, 0, 0, 0, 0, 0, 2, 0, 0, 3,
373 static const YY_CHAR yy_ec
[256] =
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 4, 4, 4,
380 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 5, 1, 1, 6,
386 1, 7, 1, 1, 1, 1, 1, 1, 1, 8,
387 9, 10, 1, 11, 1, 1, 12, 1, 13, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 static const YY_CHAR yy_meta
[14] =
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 static const flex_int16_t yy_base
[27] =
413 0, 11, 29, 30, 30, 19, 18, 16, 12, 13,
414 19, 13, 7, 15, 13, 10, 30, 10, 0, 30,
418 static const flex_int16_t yy_def
[27] =
420 26, 26, 25, 25, 25, 25, 25, 25, 25, 25,
421 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
422 25, 25, 25, 25, 0, 25
425 static const flex_int16_t yy_nxt
[44] =
427 4, 5, 25, 24, 23, 6, 7, 22, 25, 25,
428 21, 8, 5, 20, 19, 18, 6, 7, 17, 16,
429 15, 14, 8, 13, 12, 11, 10, 9, 25, 3,
430 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
434 static const flex_int16_t yy_chk
[44] =
436 26, 1, 0, 23, 22, 1, 1, 21, 0, 0,
437 19, 1, 2, 18, 16, 15, 2, 2, 14, 13,
438 12, 11, 2, 10, 9, 8, 7, 6, 3, 25,
439 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
443 static yy_state_type yy_last_accepting_state
;
444 static char *yy_last_accepting_cpos
;
446 extern int yy_flex_debug
;
447 int yy_flex_debug
= 0;
449 /* The intent behind this definition is that it'll catch
450 * any uses of REJECT which flex missed.
452 #define REJECT reject_used_but_not_detected
453 #define yymore() yymore_used_but_not_detected
454 #define YY_MORE_ADJ 0
455 #define YY_RESTORE_YY_MORE_OFFSET
458 #define YY_NO_INPUT 1
467 #ifndef YY_NO_UNISTD_H
468 /* Special case for "unistd.h", since it is non-ANSI. We include it way
469 * down here because we want the user's section 1 to have been scanned first.
470 * The user has a chance to override it with an option.
475 #ifndef YY_EXTRA_TYPE
476 #define YY_EXTRA_TYPE void *
479 static int yy_init_globals ( void );
481 /* Accessor methods to globals.
482 These are made visible to non-reentrant scanners for convenience. */
484 int yylex_destroy ( void );
486 int yyget_debug ( void );
488 void yyset_debug ( int debug_flag
);
490 YY_EXTRA_TYPE
yyget_extra ( void );
492 void yyset_extra ( YY_EXTRA_TYPE user_defined
);
494 FILE *yyget_in ( void );
496 void yyset_in ( FILE * _in_str
);
498 FILE *yyget_out ( void );
500 void yyset_out ( FILE * _out_str
);
502 int yyget_leng ( void );
504 char *yyget_text ( void );
506 int yyget_lineno ( void );
508 void yyset_lineno ( int _line_number
);
510 /* Macros after this point can all be overridden by user definitions in
514 #ifndef YY_SKIP_YYWRAP
516 extern "C" int yywrap ( void );
518 extern int yywrap ( void );
527 static void yy_flex_strncpy ( char *, const char *, int );
530 #ifdef YY_NEED_STRLEN
531 static int yy_flex_strlen ( const char * );
536 static int yyinput ( void );
538 static int input ( void );
543 /* Amount of stuff to slurp up with each read. */
544 #ifndef YY_READ_BUF_SIZE
546 /* On IA-64, the buffer size is 16k, not 8k */
547 #define YY_READ_BUF_SIZE 16384
549 #define YY_READ_BUF_SIZE 8192
550 #endif /* __ia64__ */
553 /* Copy whatever the last rule matched to the standard output. */
555 /* This used to be an fputs(), but since the string might contain NUL's,
556 * we now use fwrite().
558 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
561 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
562 * is returned in "result".
565 #define YY_INPUT(buf,result,max_size) \
566 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
570 for ( n = 0; n < max_size && \
571 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
574 buf[n++] = (char) c; \
575 if ( c == EOF && ferror( yyin ) ) \
576 YY_FATAL_ERROR( "input in flex scanner failed" ); \
582 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
584 if( errno != EINTR) \
586 YY_FATAL_ERROR( "input in flex scanner failed" ); \
597 /* No semi-colon after return; correct usage is to write "yyterminate();" -
598 * we don't want an extra ';' after the "return" because that will cause
599 * some compilers to complain about unreachable statements.
602 #define yyterminate() return YY_NULL
605 /* Number of entries by which start-condition stack grows. */
606 #ifndef YY_START_STACK_INCR
607 #define YY_START_STACK_INCR 25
610 /* Report a fatal error. */
611 #ifndef YY_FATAL_ERROR
612 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
615 /* end tables serialization structures and prototypes */
617 /* Default declaration of generated scanner - a define so the user can
618 * easily add parameters.
621 #define YY_DECL_IS_OURS 1
623 extern int yylex (void);
625 #define YY_DECL int yylex (void)
626 #endif /* !YY_DECL */
628 /* Code executed at the beginning of each rule, after yytext and yyleng
631 #ifndef YY_USER_ACTION
632 #define YY_USER_ACTION
635 /* Code executed at the end of each rule. */
637 #define YY_BREAK /*LINTED*/break;
640 #define YY_RULE_SETUP \
643 /** The main scanner function which does all the work.
647 yy_state_type yy_current_state
;
660 (yy_start
) = 1; /* first start state */
668 if ( ! YY_CURRENT_BUFFER
) {
669 yyensure_buffer_stack ();
670 YY_CURRENT_BUFFER_LVALUE
=
671 yy_create_buffer( yyin
, YY_BUF_SIZE
);
674 yy_load_buffer_state( );
683 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
685 yy_cp
= (yy_c_buf_p
);
687 /* Support of yytext. */
688 *yy_cp
= (yy_hold_char
);
690 /* yy_bp points to the position in yy_ch_buf of the start of
695 yy_current_state
= (yy_start
);
699 YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)] ;
700 if ( yy_accept
[yy_current_state
] )
702 (yy_last_accepting_state
) = yy_current_state
;
703 (yy_last_accepting_cpos
) = yy_cp
;
705 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
707 yy_current_state
= (int) yy_def
[yy_current_state
];
708 if ( yy_current_state
>= 26 )
709 yy_c
= yy_meta
[yy_c
];
711 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
];
714 while ( yy_base
[yy_current_state
] != 30 );
717 yy_act
= yy_accept
[yy_current_state
];
719 { /* have to back up */
720 yy_cp
= (yy_last_accepting_cpos
);
721 yy_current_state
= (yy_last_accepting_state
);
722 yy_act
= yy_accept
[yy_current_state
];
727 do_action
: /* This label is used only to access EOF actions. */
730 { /* beginning of action switch */
731 case 0: /* must back up */
732 /* undo the effects of YY_DO_BEFORE_ACTION */
733 *yy_cp
= (yy_hold_char
);
734 yy_cp
= (yy_last_accepting_cpos
);
735 yy_current_state
= (yy_last_accepting_state
);
742 x
+= yytext
[strlen(yytext
)-1]-'0';
749 z
-= yytext
[strlen(yytext
)-1]-'0';
756 z
+= yytext
[strlen(yytext
)-1]-'0';
760 /* rule 4 can match eol */
771 case YY_STATE_EOF(INITIAL
):
774 case YY_END_OF_BUFFER
:
776 /* Amount of text matched not including the EOB char. */
777 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
779 /* Undo the effects of YY_DO_BEFORE_ACTION. */
780 *yy_cp
= (yy_hold_char
);
781 YY_RESTORE_YY_MORE_OFFSET
783 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
785 /* We're scanning a new file or input source. It's
786 * possible that this happened because the user
787 * just pointed yyin at a new source and called
788 * yylex(). If so, then we have to assure
789 * consistency between YY_CURRENT_BUFFER and our
790 * globals. Here is the right place to do so, because
791 * this is the first action (other than possibly a
792 * back-up) that will match for the new input source.
794 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
795 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
796 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
799 /* Note that here we test for yy_c_buf_p "<=" to the position
800 * of the first EOB in the buffer, since yy_c_buf_p will
801 * already have been incremented past the NUL character
802 * (since all states make transitions on EOB to the
803 * end-of-buffer state). Contrast this with the test
806 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
807 { /* This was really a NUL. */
808 yy_state_type yy_next_state
;
810 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
812 yy_current_state
= yy_get_previous_state( );
814 /* Okay, we're now positioned to make the NUL
815 * transition. We couldn't have
816 * yy_get_previous_state() go ahead and do it
817 * for us because it doesn't know how to deal
818 * with the possibility of jamming (and we don't
819 * want to build jamming into it because then it
820 * will run more slowly).
823 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
825 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
829 /* Consume the NUL. */
830 yy_cp
= ++(yy_c_buf_p
);
831 yy_current_state
= yy_next_state
;
837 yy_cp
= (yy_c_buf_p
);
842 else switch ( yy_get_next_buffer( ) )
844 case EOB_ACT_END_OF_FILE
:
846 (yy_did_buffer_switch_on_eof
) = 0;
850 /* Note: because we've taken care in
851 * yy_get_next_buffer() to have set up
852 * yytext, we can now set up
853 * yy_c_buf_p so that if some total
854 * hoser (like flex itself) wants to
855 * call the scanner after we return the
856 * YY_NULL, it'll still work - another
857 * YY_NULL will get returned.
859 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
861 yy_act
= YY_STATE_EOF(YY_START
);
867 if ( ! (yy_did_buffer_switch_on_eof
) )
873 case EOB_ACT_CONTINUE_SCAN
:
875 (yytext_ptr
) + yy_amount_of_matched_text
;
877 yy_current_state
= yy_get_previous_state( );
879 yy_cp
= (yy_c_buf_p
);
880 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
883 case EOB_ACT_LAST_MATCH
:
885 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
887 yy_current_state
= yy_get_previous_state( );
889 yy_cp
= (yy_c_buf_p
);
890 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
898 "fatal flex scanner internal error--no action found" );
899 } /* end of action switch */
900 } /* end of scanning one token */
901 } /* end of user's declarations */
904 /* yy_get_next_buffer - try to read in a new buffer
906 * Returns a code representing an action:
907 * EOB_ACT_LAST_MATCH -
908 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
909 * EOB_ACT_END_OF_FILE - end of file
911 static int yy_get_next_buffer (void)
913 char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
914 char *source
= (yytext_ptr
);
915 int number_to_move
, i
;
918 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
920 "fatal flex scanner internal error--end of buffer missed" );
922 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
923 { /* Don't try to fill the buffer, so this is an EOF. */
924 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
926 /* We matched a single character, the EOB, so
927 * treat this as a final EOF.
929 return EOB_ACT_END_OF_FILE
;
934 /* We matched some text prior to the EOB, first
937 return EOB_ACT_LAST_MATCH
;
941 /* Try to read more data. */
943 /* First move last chars to start of buffer. */
944 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
) - 1);
946 for ( i
= 0; i
< number_to_move
; ++i
)
947 *(dest
++) = *(source
++);
949 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
950 /* don't do the read, it's not guaranteed to return an EOF,
953 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
958 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
960 while ( num_to_read
<= 0 )
961 { /* Not enough room in the buffer - grow it. */
963 /* just a shorter name for the current buffer */
964 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER_LVALUE
;
966 int yy_c_buf_p_offset
=
967 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
969 if ( b
->yy_is_our_buffer
)
971 int new_size
= b
->yy_buf_size
* 2;
974 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
978 b
->yy_ch_buf
= (char *)
979 /* Include room in for 2 EOB chars. */
980 yyrealloc( (void *) b
->yy_ch_buf
,
981 (yy_size_t
) (b
->yy_buf_size
+ 2) );
984 /* Can't grow it, we don't own it. */
987 if ( ! b
->yy_ch_buf
)
989 "fatal error - scanner input buffer overflow" );
991 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
993 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
998 if ( num_to_read
> YY_READ_BUF_SIZE
)
999 num_to_read
= YY_READ_BUF_SIZE
;
1001 /* Read in more data. */
1002 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
1003 (yy_n_chars
), num_to_read
);
1005 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1008 if ( (yy_n_chars
) == 0 )
1010 if ( number_to_move
== YY_MORE_ADJ
)
1012 ret_val
= EOB_ACT_END_OF_FILE
;
1018 ret_val
= EOB_ACT_LAST_MATCH
;
1019 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
1020 YY_BUFFER_EOF_PENDING
;
1025 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1027 if (((yy_n_chars
) + number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
1028 /* Extend the array by 50%, plus the number we really need. */
1029 int new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
1030 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) yyrealloc(
1031 (void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
, (yy_size_t
) new_size
);
1032 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1033 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1034 /* "- 2" to take care of EOB's */
1035 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
= (int) (new_size
- 2);
1038 (yy_n_chars
) += number_to_move
;
1039 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
1040 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
1042 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
1047 /* yy_get_previous_state - get the state just before the EOB char was reached */
1049 static yy_state_type
yy_get_previous_state (void)
1051 yy_state_type yy_current_state
;
1054 yy_current_state
= (yy_start
);
1056 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
1058 YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1059 if ( yy_accept
[yy_current_state
] )
1061 (yy_last_accepting_state
) = yy_current_state
;
1062 (yy_last_accepting_cpos
) = yy_cp
;
1064 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1066 yy_current_state
= (int) yy_def
[yy_current_state
];
1067 if ( yy_current_state
>= 26 )
1068 yy_c
= yy_meta
[yy_c
];
1070 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
];
1073 return yy_current_state
;
1076 /* yy_try_NUL_trans - try to make a transition on the NUL character
1079 * next_state = yy_try_NUL_trans( current_state );
1081 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
1084 char *yy_cp
= (yy_c_buf_p
);
1087 if ( yy_accept
[yy_current_state
] )
1089 (yy_last_accepting_state
) = yy_current_state
;
1090 (yy_last_accepting_cpos
) = yy_cp
;
1092 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1094 yy_current_state
= (int) yy_def
[yy_current_state
];
1095 if ( yy_current_state
>= 26 )
1096 yy_c
= yy_meta
[yy_c
];
1098 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + yy_c
];
1099 yy_is_jam
= (yy_current_state
== 25);
1101 return yy_is_jam
? 0 : yy_current_state
;
1110 static int yyinput (void)
1112 static int input (void)
1118 *(yy_c_buf_p
) = (yy_hold_char
);
1120 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
1122 /* yy_c_buf_p now points to the character we want to return.
1123 * If this occurs *before* the EOB characters, then it's a
1124 * valid NUL; if not, then we've hit the end of the buffer.
1126 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1127 /* This was really a NUL. */
1128 *(yy_c_buf_p
) = '\0';
1131 { /* need more input */
1132 int offset
= (int) ((yy_c_buf_p
) - (yytext_ptr
));
1135 switch ( yy_get_next_buffer( ) )
1137 case EOB_ACT_LAST_MATCH
:
1138 /* This happens because yy_g_n_b()
1139 * sees that we've accumulated a
1140 * token and flags that we need to
1141 * try matching the token before
1142 * proceeding. But for input(),
1143 * there's no matching to consider.
1144 * So convert the EOB_ACT_LAST_MATCH
1145 * to EOB_ACT_END_OF_FILE.
1148 /* Reset buffer status. */
1153 case EOB_ACT_END_OF_FILE
:
1158 if ( ! (yy_did_buffer_switch_on_eof
) )
1167 case EOB_ACT_CONTINUE_SCAN
:
1168 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
1174 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
1175 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
1176 (yy_hold_char
) = *++(yy_c_buf_p
);
1180 #endif /* ifndef YY_NO_INPUT */
1182 /** Immediately switch to a different input stream.
1183 * @param input_file A readable stream.
1185 * @note This function does not reset the start condition to @c INITIAL .
1187 void yyrestart (FILE * input_file
)
1190 if ( ! YY_CURRENT_BUFFER
){
1191 yyensure_buffer_stack ();
1192 YY_CURRENT_BUFFER_LVALUE
=
1193 yy_create_buffer( yyin
, YY_BUF_SIZE
);
1196 yy_init_buffer( YY_CURRENT_BUFFER
, input_file
);
1197 yy_load_buffer_state( );
1200 /** Switch to a different input buffer.
1201 * @param new_buffer The new input buffer.
1204 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
1207 /* TODO. We should be able to replace this entire function body
1209 * yypop_buffer_state();
1210 * yypush_buffer_state(new_buffer);
1212 yyensure_buffer_stack ();
1213 if ( YY_CURRENT_BUFFER
== new_buffer
)
1216 if ( YY_CURRENT_BUFFER
)
1218 /* Flush out information for old buffer. */
1219 *(yy_c_buf_p
) = (yy_hold_char
);
1220 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1221 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1224 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1225 yy_load_buffer_state( );
1227 /* We don't actually know whether we did this switch during
1228 * EOF (yywrap()) processing, but the only time this flag
1229 * is looked at is after yywrap() is called, so it's safe
1230 * to go ahead and always set it.
1232 (yy_did_buffer_switch_on_eof
) = 1;
1235 static void yy_load_buffer_state (void)
1237 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1238 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
1239 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
1240 (yy_hold_char
) = *(yy_c_buf_p
);
1243 /** Allocate and initialize an input buffer state.
1244 * @param file A readable stream.
1245 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1247 * @return the allocated buffer state.
1249 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
1253 b
= (YY_BUFFER_STATE
) yyalloc( sizeof( struct yy_buffer_state
) );
1255 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1257 b
->yy_buf_size
= size
;
1259 /* yy_ch_buf has to be 2 characters longer than the size given because
1260 * we need to put in 2 end-of-buffer characters.
1262 b
->yy_ch_buf
= (char *) yyalloc( (yy_size_t
) (b
->yy_buf_size
+ 2) );
1263 if ( ! b
->yy_ch_buf
)
1264 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1266 b
->yy_is_our_buffer
= 1;
1268 yy_init_buffer( b
, file
);
1273 /** Destroy the buffer.
1274 * @param b a buffer created with yy_create_buffer()
1277 void yy_delete_buffer (YY_BUFFER_STATE b
)
1283 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
1284 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
1286 if ( b
->yy_is_our_buffer
)
1287 yyfree( (void *) b
->yy_ch_buf
);
1289 yyfree( (void *) b
);
1292 /* Initializes or reinitializes a buffer.
1293 * This function is sometimes called more than once on the same buffer,
1294 * such as during a yyrestart() or at EOF.
1296 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
1301 yy_flush_buffer( b
);
1303 b
->yy_input_file
= file
;
1304 b
->yy_fill_buffer
= 1;
1306 /* If b is the current buffer, then yy_init_buffer was _probably_
1307 * called from yyrestart() or through yy_get_next_buffer.
1308 * In that case, we don't want to reset the lineno or column.
1310 if (b
!= YY_CURRENT_BUFFER
){
1311 b
->yy_bs_lineno
= 1;
1312 b
->yy_bs_column
= 0;
1315 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1320 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1321 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1324 void yy_flush_buffer (YY_BUFFER_STATE b
)
1331 /* We always need two end-of-buffer characters. The first causes
1332 * a transition to the end-of-buffer state. The second causes
1333 * a jam in that state.
1335 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1336 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1338 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1341 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1343 if ( b
== YY_CURRENT_BUFFER
)
1344 yy_load_buffer_state( );
1347 /** Pushes the new state onto the stack. The new state becomes
1348 * the current state. This function will allocate the stack
1350 * @param new_buffer The new state.
1353 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
1355 if (new_buffer
== NULL
)
1358 yyensure_buffer_stack();
1360 /* This block is copied from yy_switch_to_buffer. */
1361 if ( YY_CURRENT_BUFFER
)
1363 /* Flush out information for old buffer. */
1364 *(yy_c_buf_p
) = (yy_hold_char
);
1365 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1366 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1369 /* Only push if top exists. Otherwise, replace top. */
1370 if (YY_CURRENT_BUFFER
)
1371 (yy_buffer_stack_top
)++;
1372 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1374 /* copied from yy_switch_to_buffer. */
1375 yy_load_buffer_state( );
1376 (yy_did_buffer_switch_on_eof
) = 1;
1379 /** Removes and deletes the top of the stack, if present.
1380 * The next element becomes the new top.
1383 void yypop_buffer_state (void)
1385 if (!YY_CURRENT_BUFFER
)
1388 yy_delete_buffer(YY_CURRENT_BUFFER
);
1389 YY_CURRENT_BUFFER_LVALUE
= NULL
;
1390 if ((yy_buffer_stack_top
) > 0)
1391 --(yy_buffer_stack_top
);
1393 if (YY_CURRENT_BUFFER
) {
1394 yy_load_buffer_state( );
1395 (yy_did_buffer_switch_on_eof
) = 1;
1399 /* Allocates the stack if it does not exist.
1400 * Guarantees space for at least one push.
1402 static void yyensure_buffer_stack (void)
1404 yy_size_t num_to_alloc
;
1406 if (!(yy_buffer_stack
)) {
1408 /* First allocation is just for 2 elements, since we don't know if this
1409 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1410 * immediate realloc on the next call.
1412 num_to_alloc
= 1; /* After all that talk, this was set to 1 anyways... */
1413 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
1414 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
1416 if ( ! (yy_buffer_stack
) )
1417 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1419 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
1421 (yy_buffer_stack_max
) = num_to_alloc
;
1422 (yy_buffer_stack_top
) = 0;
1426 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
1428 /* Increase the buffer to prepare for a possible push. */
1429 yy_size_t grow_size
= 8 /* arbitrary grow size */;
1431 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
1432 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
1434 num_to_alloc
* sizeof(struct yy_buffer_state
*)
1436 if ( ! (yy_buffer_stack
) )
1437 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1439 /* zero only the new slots.*/
1440 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
1441 (yy_buffer_stack_max
) = num_to_alloc
;
1445 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1446 * @param base the character buffer
1447 * @param size the size in bytes of the character buffer
1449 * @return the newly allocated buffer state object.
1451 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
1456 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1457 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1458 /* They forgot to leave room for the EOB's. */
1461 b
= (YY_BUFFER_STATE
) yyalloc( sizeof( struct yy_buffer_state
) );
1463 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1465 b
->yy_buf_size
= (int) (size
- 2); /* "- 2" to take care of EOB's */
1466 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1467 b
->yy_is_our_buffer
= 0;
1468 b
->yy_input_file
= NULL
;
1469 b
->yy_n_chars
= b
->yy_buf_size
;
1470 b
->yy_is_interactive
= 0;
1472 b
->yy_fill_buffer
= 0;
1473 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1475 yy_switch_to_buffer( b
);
1480 /** Setup the input buffer state to scan a string. The next call to yylex() will
1481 * scan from a @e copy of @a str.
1482 * @param yystr a NUL-terminated string to scan
1484 * @return the newly allocated buffer state object.
1485 * @note If you want to scan bytes that may contain NUL values, then use
1486 * yy_scan_bytes() instead.
1488 YY_BUFFER_STATE
yy_scan_string (const char * yystr
)
1491 return yy_scan_bytes( yystr
, (int) strlen(yystr
) );
1494 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1495 * scan from a @e copy of @a bytes.
1496 * @param yybytes the byte buffer to scan
1497 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1499 * @return the newly allocated buffer state object.
1501 YY_BUFFER_STATE
yy_scan_bytes (const char * yybytes
, int _yybytes_len
)
1508 /* Get memory for full buffer, including space for trailing EOB's. */
1509 n
= (yy_size_t
) (_yybytes_len
+ 2);
1510 buf
= (char *) yyalloc( n
);
1512 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1514 for ( i
= 0; i
< _yybytes_len
; ++i
)
1515 buf
[i
] = yybytes
[i
];
1517 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
1519 b
= yy_scan_buffer( buf
, n
);
1521 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1523 /* It's okay to grow etc. this buffer, and we should throw it
1524 * away when we're done.
1526 b
->yy_is_our_buffer
= 1;
1531 #ifndef YY_EXIT_FAILURE
1532 #define YY_EXIT_FAILURE 2
1535 static void yynoreturn
yy_fatal_error (const char* msg
)
1537 fprintf( stderr
, "%s\n", msg
);
1538 exit( YY_EXIT_FAILURE
);
1541 /* Redefine yyless() so it works in section 3 code. */
1547 /* Undo effects of setting up yytext. */ \
1548 int yyless_macro_arg = (n); \
1549 YY_LESS_LINENO(yyless_macro_arg);\
1550 yytext[yyleng] = (yy_hold_char); \
1551 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1552 (yy_hold_char) = *(yy_c_buf_p); \
1553 *(yy_c_buf_p) = '\0'; \
1554 yyleng = yyless_macro_arg; \
1558 /* Accessor methods (get/set functions) to struct members. */
1560 /** Get the current line number.
1563 int yyget_lineno (void)
1569 /** Get the input stream.
1572 FILE *yyget_in (void)
1577 /** Get the output stream.
1580 FILE *yyget_out (void)
1585 /** Get the length of the current token.
1588 int yyget_leng (void)
1593 /** Get the current token.
1597 char *yyget_text (void)
1602 /** Set the current line number.
1603 * @param _line_number line number
1606 void yyset_lineno (int _line_number
)
1609 yylineno
= _line_number
;
1612 /** Set the input stream. This does not discard the current
1614 * @param _in_str A readable stream.
1616 * @see yy_switch_to_buffer
1618 void yyset_in (FILE * _in_str
)
1623 void yyset_out (FILE * _out_str
)
1628 int yyget_debug (void)
1630 return yy_flex_debug
;
1633 void yyset_debug (int _bdebug
)
1635 yy_flex_debug
= _bdebug
;
1638 static int yy_init_globals (void)
1640 /* Initialization is the same as for the non-reentrant scanner.
1641 * This function is called from yylex_destroy(), so don't allocate here.
1644 (yy_buffer_stack
) = NULL
;
1645 (yy_buffer_stack_top
) = 0;
1646 (yy_buffer_stack_max
) = 0;
1647 (yy_c_buf_p
) = NULL
;
1651 /* Defined in main.c */
1660 /* For future reference: Set errno on error, since we are called by
1666 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1667 int yylex_destroy (void)
1670 /* Pop the buffer stack, destroying each element. */
1671 while(YY_CURRENT_BUFFER
){
1672 yy_delete_buffer( YY_CURRENT_BUFFER
);
1673 YY_CURRENT_BUFFER_LVALUE
= NULL
;
1674 yypop_buffer_state();
1677 /* Destroy the stack itself. */
1678 yyfree((yy_buffer_stack
) );
1679 (yy_buffer_stack
) = NULL
;
1681 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1682 * yylex() is called, initialization will occur. */
1689 * Internal utility routines.
1693 static void yy_flex_strncpy (char* s1
, const char * s2
, int n
)
1697 for ( i
= 0; i
< n
; ++i
)
1702 #ifdef YY_NEED_STRLEN
1703 static int yy_flex_strlen (const char * s
)
1706 for ( n
= 0; s
[n
]; ++n
)
1713 void *yyalloc (yy_size_t size
)
1715 return malloc(size
);
1718 void *yyrealloc (void * ptr
, yy_size_t size
)
1721 /* The cast to (char *) in the following accommodates both
1722 * implementations that use char* generic pointers, and those
1723 * that use void* generic pointers. It works with the latter
1724 * because both ANSI C and C++ allow castless assignment from
1725 * any pointer type to void*, and deal with argument conversions
1726 * as though doing an assignment.
1728 return realloc(ptr
, size
);
1731 void yyfree (void * ptr
)
1733 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
1736 #define YYTABLES_NAME "yytables"
1744 printf("x: %d, z: %d, x*z: %d\n", x
, z
, x
*z
);