3 #define YY_INT_ALIGNED short int
5 /* A lexical scanner generated by flex */
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
10 #define YY_FLEX_SUBMINOR_VERSION 37
11 #if YY_FLEX_SUBMINOR_VERSION > 0
15 /* First, we deal with platform-specific or compiler-specific issues. */
17 #if defined(__FreeBSD__)
18 #ifndef __STDC_LIMIT_MACROS
19 #define __STDC_LIMIT_MACROS
21 #include <sys/cdefs.h>
27 /* begin standard C headers. */
33 /* end standard C headers. */
35 /* flex integer type definitions */
40 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
42 #if defined(__FreeBSD__) || \
43 (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
45 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
46 * if you want the limit (max/min) macros for int types.
48 #ifndef __STDC_LIMIT_MACROS
49 #define __STDC_LIMIT_MACROS 1
53 typedef int8_t flex_int8_t;
54 typedef uint8_t flex_uint8_t;
55 typedef int16_t flex_int16_t;
56 typedef uint16_t flex_uint16_t;
57 typedef int32_t flex_int32_t;
58 typedef uint32_t flex_uint32_t;
60 typedef signed char flex_int8_t;
61 typedef short int flex_int16_t;
62 typedef int flex_int32_t;
63 typedef unsigned char flex_uint8_t;
64 typedef unsigned short int flex_uint16_t;
65 typedef unsigned int flex_uint32_t;
67 /* Limits of integral types. */
69 #define INT8_MIN (-128)
72 #define INT16_MIN (-32767-1)
75 #define INT32_MIN (-2147483647-1)
78 #define INT8_MAX (127)
81 #define INT16_MAX (32767)
84 #define INT32_MAX (2147483647)
87 #define UINT8_MAX (255U)
90 #define UINT16_MAX (65535U)
93 #define UINT32_MAX (4294967295U)
98 #endif /* ! FLEXINT_H */
102 /* The "const" storage-class-modifier is valid. */
105 #else /* ! __cplusplus */
107 /* C99 requires __STDC__ to be defined as 1. */
108 #if defined (__STDC__)
112 #endif /* defined (__STDC__) */
113 #endif /* ! __cplusplus */
116 #define yyconst const
121 /* Returned upon end-of-file. */
124 /* Promotes a possibly negative, possibly signed char to an unsigned
125 * integer for use as an array index. If the signed char is negative,
126 * we want to instead treat it as an 8-bit unsigned char, hence the
129 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
131 /* Enter a start condition. This macro really ought to take a parameter,
132 * but we do it the disgusting crufty way forced on us by the ()-less
133 * definition of BEGIN.
135 #define BEGIN (yy_start) = 1 + 2 *
137 /* Translate the current start state into a value that can be later handed
138 * to BEGIN to return to the state. The YYSTATE alias is for lex
141 #define YY_START (((yy_start) - 1) / 2)
142 #define YYSTATE YY_START
144 /* Action number for EOF rule of a given start state. */
145 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
147 /* Special action meaning "start processing a new file". */
148 #define YY_NEW_FILE yyrestart(yyin )
150 #define YY_END_OF_BUFFER_CHAR 0
152 /* Size of default input buffer. */
154 #define YY_BUF_SIZE 16384
157 /* The state buf must be large enough to hold one state per character in the main buffer.
159 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
161 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
162 #define YY_TYPEDEF_YY_BUFFER_STATE
163 typedef struct yy_buffer_state *YY_BUFFER_STATE;
166 #ifndef YY_TYPEDEF_YY_SIZE_T
167 #define YY_TYPEDEF_YY_SIZE_T
168 typedef size_t yy_size_t;
171 extern yy_size_t yyleng;
173 extern FILE *yyin, *yyout;
175 #define EOB_ACT_CONTINUE_SCAN 0
176 #define EOB_ACT_END_OF_FILE 1
177 #define EOB_ACT_LAST_MATCH 2
179 #define YY_LESS_LINENO(n)
181 /* Return all but the first "n" matched characters back to the input stream. */
185 /* Undo effects of setting up yytext. */ \
186 int yyless_macro_arg = (n); \
187 YY_LESS_LINENO(yyless_macro_arg);\
188 *yy_cp = (yy_hold_char); \
189 YY_RESTORE_YY_MORE_OFFSET \
190 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
191 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
195 #define unput(c) yyunput( c, (yytext_ptr) )
197 #ifndef YY_STRUCT_YY_BUFFER_STATE
198 #define YY_STRUCT_YY_BUFFER_STATE
199 struct yy_buffer_state
203 char *yy_ch_buf; /* input buffer */
204 char *yy_buf_pos; /* current position in input buffer */
206 /* Size of input buffer in bytes, not including room for EOB
209 yy_size_t yy_buf_size;
211 /* Number of characters read into yy_ch_buf, not including EOB
214 yy_size_t yy_n_chars;
216 /* Whether we "own" the buffer - i.e., we know we created it,
217 * and can realloc() it to grow it, and should free() it to
220 int yy_is_our_buffer;
222 /* Whether this is an "interactive" input source; if so, and
223 * if we're using stdio for input, then we want to use getc()
224 * instead of fread(), to make sure we stop fetching input after
227 int yy_is_interactive;
229 /* Whether we're considered to be at the beginning of a line.
230 * If so, '^' rules will be active on the next match, otherwise
235 int yy_bs_lineno; /**< The line count. */
236 int yy_bs_column; /**< The column count. */
238 /* Whether to try to fill the input buffer when we reach the
243 int yy_buffer_status;
245 #define YY_BUFFER_NEW 0
246 #define YY_BUFFER_NORMAL 1
247 /* When an EOF's been seen but there's still some text to process
248 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
249 * shouldn't try reading from the input source any more. We might
250 * still have a bunch of tokens to match, though, because of
251 * possible backing-up.
253 * When we actually see the EOF, we change the status to "new"
254 * (via yyrestart()), so that the user can continue scanning by
255 * just pointing yyin at a new input file.
257 #define YY_BUFFER_EOF_PENDING 2
260 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
262 /* Stack of input buffers. */
263 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
264 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
265 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
267 /* We provide macros for accessing buffer states in case in the
268 * future we want to put the buffer states in a more general
271 * Returns the top of the stack, or NULL.
273 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
274 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
276 #define yy_current_buffer YY_CURRENT_BUFFER
278 /* Same as previous macro, but useful when we know that the buffer stack is not
279 * NULL or when we need an lvalue. For internal use only.
281 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
283 /* yy_hold_char holds the character lost when yytext is formed. */
284 static char yy_hold_char;
285 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
288 /* Points to current character in buffer. */
289 static char *yy_c_buf_p = (char *) 0;
290 static int yy_init = 0; /* whether we need to initialize */
291 static int yy_start = 0; /* start state number */
293 /* Flag which is used to allow yywrap()'s to do buffer switches
294 * instead of setting up a fresh yyin. A bit of a hack ...
296 static int yy_did_buffer_switch_on_eof;
298 void yyrestart (FILE *input_file );
299 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
300 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
301 void yy_delete_buffer (YY_BUFFER_STATE b );
302 void yy_flush_buffer (YY_BUFFER_STATE b );
303 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
304 void yypop_buffer_state (void );
306 static void yyensure_buffer_stack (void );
307 static void yy_load_buffer_state (void );
308 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
310 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
312 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
313 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
314 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
316 void *yyalloc (yy_size_t );
317 void *yyrealloc (void *,yy_size_t );
318 void yyfree (void * );
320 #define yy_new_buffer yy_create_buffer
322 #define yy_set_interactive(is_interactive) \
324 if ( ! YY_CURRENT_BUFFER ){ \
325 yyensure_buffer_stack (); \
326 YY_CURRENT_BUFFER_LVALUE = \
327 yy_create_buffer(yyin,YY_BUF_SIZE ); \
329 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
332 #define yy_set_bol(at_bol) \
334 if ( ! YY_CURRENT_BUFFER ){\
335 yyensure_buffer_stack (); \
336 YY_CURRENT_BUFFER_LVALUE = \
337 yy_create_buffer(yyin,YY_BUF_SIZE ); \
339 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
342 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
344 /* Begin user sect3 */
347 #define YY_SKIP_YYWRAP
349 typedef unsigned char YY_CHAR;
351 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
353 typedef int yy_state_type;
360 #define yytext_ptr yytext
362 static yy_state_type yy_get_previous_state (void );
363 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
364 static int yy_get_next_buffer (void );
365 static void yy_fatal_error (yyconst char msg[] ) __dead2;
367 /* Done after the current pattern has been matched and before the
368 * corresponding action - sets up yytext.
370 #define YY_DO_BEFORE_ACTION \
371 (yytext_ptr) = yy_bp; \
372 yyleng = (size_t) (yy_cp - yy_bp); \
373 (yy_hold_char) = *yy_cp; \
375 (yy_c_buf_p) = yy_cp;
377 #define YY_NUM_RULES 14
378 #define YY_END_OF_BUFFER 15
379 /* This struct is not used in this scanner,
380 but its presence is necessary. */
383 flex_int32_t yy_verify;
386 static yyconst flex_int16_t yy_accept[35] =
388 0, 0, 15, 13, 1, 1, 13, 13, 13, 2,
389 2, 13, 13, 13, 13, 1, 9, 10, 12, 2,
390 0, 0, 2, 6, 4, 8, 5, 7, 11, 0,
394 static yyconst flex_int32_t yy_ec[256] =
396 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 2, 4, 1, 1, 1, 1, 5, 1, 1,
400 1, 6, 1, 1, 1, 1, 1, 7, 8, 8,
401 8, 8, 8, 8, 8, 9, 9, 10, 1, 11,
402 12, 13, 1, 1, 14, 14, 14, 14, 14, 14,
403 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
404 15, 16, 15, 15, 15, 15, 15, 17, 15, 15,
405 1, 1, 1, 1, 1, 1, 14, 14, 14, 14,
407 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
408 15, 15, 15, 16, 15, 15, 15, 15, 15, 17,
409 15, 15, 1, 18, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 static yyconst flex_int32_t yy_meta[19] =
428 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
429 1, 1, 1, 3, 4, 4, 4, 1
432 static yyconst flex_int16_t yy_base[39] =
434 0, 0, 48, 49, 17, 19, 35, 41, 39, 16,
435 0, 14, 32, 15, 25, 27, 49, 49, 49, 27,
436 0, 0, 0, 49, 49, 49, 49, 49, 49, 32,
437 0, 0, 0, 49, 39, 29, 34, 36
440 static yyconst flex_int16_t yy_def[39] =
442 34, 1, 34, 34, 34, 34, 34, 34, 34, 34,
443 35, 34, 34, 34, 34, 34, 34, 34, 34, 34,
444 36, 37, 35, 34, 34, 34, 34, 34, 34, 36,
445 37, 38, 38, 0, 34, 34, 34, 34
448 static yyconst flex_int16_t yy_nxt[68] =
450 4, 5, 6, 7, 8, 9, 10, 11, 11, 4,
451 12, 13, 14, 4, 4, 4, 4, 15, 16, 16,
452 16, 16, 20, 20, 24, 25, 27, 28, 16, 16,
453 30, 21, 22, 20, 20, 31, 31, 33, 33, 33,
454 23, 32, 29, 26, 19, 18, 17, 34, 3, 34,
455 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
456 34, 34, 34, 34, 34, 34, 34
459 static yyconst flex_int16_t yy_chk[68] =
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 1, 1, 1, 1, 1, 1, 1, 5, 5,
463 6, 6, 10, 10, 12, 12, 14, 14, 16, 16,
464 36, 10, 10, 20, 20, 37, 37, 38, 38, 38,
465 35, 30, 15, 13, 9, 8, 7, 3, 34, 34,
466 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
467 34, 34, 34, 34, 34, 34, 34
470 static yy_state_type yy_last_accepting_state;
471 static char *yy_last_accepting_cpos;
473 extern int yy_flex_debug;
474 int yy_flex_debug = 0;
476 /* The intent behind this definition is that it'll catch
477 * any uses of REJECT which flex missed.
479 #define REJECT reject_used_but_not_detected
480 #define yymore() yymore_used_but_not_detected
481 #define YY_MORE_ADJ 0
482 #define YY_RESTORE_YY_MORE_OFFSET
484 #define YY_NO_INPUT 1
485 /* $OpenBSD: tokenizer.l,v 1.9 2017/06/15 13:48:42 bcallah Exp $ */
487 * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org>
489 * Permission to use, copy, modify, and distribute this software for any
490 * purpose with or without fee is hereby granted, provided that the above
491 * copyright notice and this permission notice appear in all copies.
493 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
494 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
495 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
496 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
497 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
498 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
499 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
510 extern void m4_warnx(const char *, ...);
511 extern int mimic_gnu;
512 extern int32_t yylval;
514 int32_t number(void);
515 int32_t parse_radix(void);
516 extern int yylex(void);
518 #define YY_DECL int yylex(void)
522 #ifndef YY_NO_UNISTD_H
523 /* Special case for "unistd.h", since it is non-ANSI. We include it way
524 * down here because we want the user's section 1 to have been scanned first.
525 * The user has a chance to override it with an option.
530 #ifndef YY_EXTRA_TYPE
531 #define YY_EXTRA_TYPE void *
534 static int yy_init_globals (void );
536 /* Accessor methods to globals.
537 These are made visible to non-reentrant scanners for convenience. */
539 int yylex_destroy (void );
541 int yyget_debug (void );
543 void yyset_debug (int debug_flag );
545 YY_EXTRA_TYPE yyget_extra (void );
547 void yyset_extra (YY_EXTRA_TYPE user_defined );
549 FILE *yyget_in (void );
551 void yyset_in (FILE * in_str );
553 FILE *yyget_out (void );
555 void yyset_out (FILE * out_str );
557 yy_size_t yyget_leng (void );
559 char *yyget_text (void );
561 int yyget_lineno (void );
563 void yyset_lineno (int line_number );
565 /* Macros after this point can all be overridden by user definitions in
569 #ifndef YY_SKIP_YYWRAP
571 extern "C" int yywrap (void );
573 extern int yywrap (void );
578 static void yy_flex_strncpy (char *,yyconst char *,int );
581 #ifdef YY_NEED_STRLEN
582 static int yy_flex_strlen (yyconst char * );
588 static int yyinput (void );
590 static int input (void );
595 /* Amount of stuff to slurp up with each read. */
596 #ifndef YY_READ_BUF_SIZE
597 #define YY_READ_BUF_SIZE 8192
600 /* Copy whatever the last rule matched to the standard output. */
602 /* This used to be an fputs(), but since the string might contain NUL's,
603 * we now use fwrite().
605 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
608 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
609 * is returned in "result".
612 #define YY_INPUT(buf,result,max_size) \
613 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
617 for ( n = 0; n < max_size && \
618 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
621 buf[n++] = (char) c; \
622 if ( c == EOF && ferror( yyin ) ) \
623 YY_FATAL_ERROR( "input in flex scanner failed" ); \
629 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
631 if( errno != EINTR) \
633 YY_FATAL_ERROR( "input in flex scanner failed" ); \
644 /* No semi-colon after return; correct usage is to write "yyterminate();" -
645 * we don't want an extra ';' after the "return" because that will cause
646 * some compilers to complain about unreachable statements.
649 #define yyterminate() return YY_NULL
652 /* Number of entries by which start-condition stack grows. */
653 #ifndef YY_START_STACK_INCR
654 #define YY_START_STACK_INCR 25
657 /* Report a fatal error. */
658 #ifndef YY_FATAL_ERROR
659 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
662 /* end tables serialization structures and prototypes */
664 /* Default declaration of generated scanner - a define so the user can
665 * easily add parameters.
668 #define YY_DECL_IS_OURS 1
670 extern int yylex (void);
672 #define YY_DECL int yylex (void)
673 #endif /* !YY_DECL */
675 /* Code executed at the beginning of each rule, after yytext and yyleng
678 #ifndef YY_USER_ACTION
679 #define YY_USER_ACTION
682 /* Code executed at the end of each rule. */
684 #define YY_BREAK break;
687 #define YY_RULE_SETUP \
690 /** The main scanner function which does all the work.
694 yy_state_type yy_current_state;
709 (yy_start) = 1; /* first start state */
717 if ( ! YY_CURRENT_BUFFER ) {
718 yyensure_buffer_stack ();
719 YY_CURRENT_BUFFER_LVALUE =
720 yy_create_buffer(yyin,YY_BUF_SIZE );
723 yy_load_buffer_state( );
726 while ( 1 ) /* loops until end-of-file is reached */
728 yy_cp = (yy_c_buf_p);
730 /* Support of yytext. */
731 *yy_cp = (yy_hold_char);
733 /* yy_bp points to the position in yy_ch_buf of the start of
738 yy_current_state = (yy_start);
742 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
743 if ( yy_accept[yy_current_state] )
745 (yy_last_accepting_state) = yy_current_state;
746 (yy_last_accepting_cpos) = yy_cp;
748 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
750 yy_current_state = (int) yy_def[yy_current_state];
751 if ( yy_current_state >= 35 )
752 yy_c = yy_meta[(unsigned int) yy_c];
754 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
757 while ( yy_base[yy_current_state] != 49 );
760 yy_act = yy_accept[yy_current_state];
762 { /* have to back up */
763 yy_cp = (yy_last_accepting_cpos);
764 yy_current_state = (yy_last_accepting_state);
765 yy_act = yy_accept[yy_current_state];
770 do_action: /* This label is used only to access EOF actions. */
773 { /* beginning of action switch */
774 case 0: /* must back up */
775 /* undo the effects of YY_DO_BEFORE_ACTION */
776 *yy_cp = (yy_hold_char);
777 yy_cp = (yy_last_accepting_cpos);
778 yy_current_state = (yy_last_accepting_state);
782 /* rule 1 can match eol */
788 { yylval = number(); return(NUMBER); }
793 yylval = parse_radix(); return(NUMBER);
833 { if (mimic_gnu) { return (EXPONENT); } }
837 { return yytext[0]; }
843 case YY_STATE_EOF(INITIAL):
846 case YY_END_OF_BUFFER:
848 /* Amount of text matched not including the EOB char. */
849 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
851 /* Undo the effects of YY_DO_BEFORE_ACTION. */
852 *yy_cp = (yy_hold_char);
853 YY_RESTORE_YY_MORE_OFFSET
855 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
857 /* We're scanning a new file or input source. It's
858 * possible that this happened because the user
859 * just pointed yyin at a new source and called
860 * yylex(). If so, then we have to assure
861 * consistency between YY_CURRENT_BUFFER and our
862 * globals. Here is the right place to do so, because
863 * this is the first action (other than possibly a
864 * back-up) that will match for the new input source.
866 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
867 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
868 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
871 /* Note that here we test for yy_c_buf_p "<=" to the position
872 * of the first EOB in the buffer, since yy_c_buf_p will
873 * already have been incremented past the NUL character
874 * (since all states make transitions on EOB to the
875 * end-of-buffer state). Contrast this with the test
878 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
879 { /* This was really a NUL. */
880 yy_state_type yy_next_state;
882 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
884 yy_current_state = yy_get_previous_state( );
886 /* Okay, we're now positioned to make the NUL
887 * transition. We couldn't have
888 * yy_get_previous_state() go ahead and do it
889 * for us because it doesn't know how to deal
890 * with the possibility of jamming (and we don't
891 * want to build jamming into it because then it
892 * will run more slowly).
895 yy_next_state = yy_try_NUL_trans( yy_current_state );
897 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
901 /* Consume the NUL. */
902 yy_cp = ++(yy_c_buf_p);
903 yy_current_state = yy_next_state;
909 yy_cp = (yy_c_buf_p);
914 else switch ( yy_get_next_buffer( ) )
916 case EOB_ACT_END_OF_FILE:
918 (yy_did_buffer_switch_on_eof) = 0;
922 /* Note: because we've taken care in
923 * yy_get_next_buffer() to have set up
924 * yytext, we can now set up
925 * yy_c_buf_p so that if some total
926 * hoser (like flex itself) wants to
927 * call the scanner after we return the
928 * YY_NULL, it'll still work - another
929 * YY_NULL will get returned.
931 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
933 yy_act = YY_STATE_EOF(YY_START);
939 if ( ! (yy_did_buffer_switch_on_eof) )
945 case EOB_ACT_CONTINUE_SCAN:
947 (yytext_ptr) + yy_amount_of_matched_text;
949 yy_current_state = yy_get_previous_state( );
951 yy_cp = (yy_c_buf_p);
952 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
955 case EOB_ACT_LAST_MATCH:
957 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
959 yy_current_state = yy_get_previous_state( );
961 yy_cp = (yy_c_buf_p);
962 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
970 "fatal flex scanner internal error--no action found" );
971 } /* end of action switch */
972 } /* end of scanning one token */
975 /* yy_get_next_buffer - try to read in a new buffer
977 * Returns a code representing an action:
978 * EOB_ACT_LAST_MATCH -
979 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
980 * EOB_ACT_END_OF_FILE - end of file
982 static int yy_get_next_buffer (void)
984 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
985 char *source = (yytext_ptr);
986 int number_to_move, i;
989 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
991 "fatal flex scanner internal error--end of buffer missed" );
993 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
994 { /* Don't try to fill the buffer, so this is an EOF. */
995 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
997 /* We matched a single character, the EOB, so
998 * treat this as a final EOF.
1000 return EOB_ACT_END_OF_FILE;
1005 /* We matched some text prior to the EOB, first
1008 return EOB_ACT_LAST_MATCH;
1012 /* Try to read more data. */
1014 /* First move last chars to start of buffer. */
1015 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1017 for ( i = 0; i < number_to_move; ++i )
1018 *(dest++) = *(source++);
1020 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1021 /* don't do the read, it's not guaranteed to return an EOF,
1024 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1028 yy_size_t num_to_read =
1029 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1031 while ( num_to_read <= 0 )
1032 { /* Not enough room in the buffer - grow it. */
1034 /* just a shorter name for the current buffer */
1035 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1037 int yy_c_buf_p_offset =
1038 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1040 if ( b->yy_is_our_buffer )
1042 yy_size_t new_size = b->yy_buf_size * 2;
1044 if ( new_size <= 0 )
1045 b->yy_buf_size += b->yy_buf_size / 8;
1047 b->yy_buf_size *= 2;
1049 b->yy_ch_buf = (char *)
1050 /* Include room in for 2 EOB chars. */
1051 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1054 /* Can't grow it, we don't own it. */
1057 if ( ! b->yy_ch_buf )
1059 "fatal error - scanner input buffer overflow" );
1061 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1063 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1068 if ( num_to_read > YY_READ_BUF_SIZE )
1069 num_to_read = YY_READ_BUF_SIZE;
1071 /* Read in more data. */
1072 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1073 (yy_n_chars), num_to_read );
1075 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1078 if ( (yy_n_chars) == 0 )
1080 if ( number_to_move == YY_MORE_ADJ )
1082 ret_val = EOB_ACT_END_OF_FILE;
1088 ret_val = EOB_ACT_LAST_MATCH;
1089 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1090 YY_BUFFER_EOF_PENDING;
1095 ret_val = EOB_ACT_CONTINUE_SCAN;
1097 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1098 /* Extend the array by 50%, plus the number we really need. */
1099 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1100 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1101 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1102 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1105 (yy_n_chars) += number_to_move;
1106 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1107 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1109 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1114 /* yy_get_previous_state - get the state just before the EOB char was reached */
1116 static yy_state_type yy_get_previous_state (void)
1118 yy_state_type yy_current_state;
1121 yy_current_state = (yy_start);
1123 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1125 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1126 if ( yy_accept[yy_current_state] )
1128 (yy_last_accepting_state) = yy_current_state;
1129 (yy_last_accepting_cpos) = yy_cp;
1131 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1133 yy_current_state = (int) yy_def[yy_current_state];
1134 if ( yy_current_state >= 35 )
1135 yy_c = yy_meta[(unsigned int) yy_c];
1137 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1140 return yy_current_state;
1143 /* yy_try_NUL_trans - try to make a transition on the NUL character
1146 * next_state = yy_try_NUL_trans( current_state );
1148 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1151 char *yy_cp = (yy_c_buf_p);
1154 if ( yy_accept[yy_current_state] )
1156 (yy_last_accepting_state) = yy_current_state;
1157 (yy_last_accepting_cpos) = yy_cp;
1159 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1161 yy_current_state = (int) yy_def[yy_current_state];
1162 if ( yy_current_state >= 35 )
1163 yy_c = yy_meta[(unsigned int) yy_c];
1165 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1166 yy_is_jam = (yy_current_state == 34);
1168 return yy_is_jam ? 0 : yy_current_state;
1173 static int yyinput (void)
1175 static int input (void)
1181 *(yy_c_buf_p) = (yy_hold_char);
1183 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1185 /* yy_c_buf_p now points to the character we want to return.
1186 * If this occurs *before* the EOB characters, then it's a
1187 * valid NUL; if not, then we've hit the end of the buffer.
1189 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1190 /* This was really a NUL. */
1191 *(yy_c_buf_p) = '\0';
1194 { /* need more input */
1195 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1198 switch ( yy_get_next_buffer( ) )
1200 case EOB_ACT_LAST_MATCH:
1201 /* This happens because yy_g_n_b()
1202 * sees that we've accumulated a
1203 * token and flags that we need to
1204 * try matching the token before
1205 * proceeding. But for input(),
1206 * there's no matching to consider.
1207 * So convert the EOB_ACT_LAST_MATCH
1208 * to EOB_ACT_END_OF_FILE.
1211 /* Reset buffer status. */
1216 case EOB_ACT_END_OF_FILE:
1221 if ( ! (yy_did_buffer_switch_on_eof) )
1230 case EOB_ACT_CONTINUE_SCAN:
1231 (yy_c_buf_p) = (yytext_ptr) + offset;
1237 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1238 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1239 (yy_hold_char) = *++(yy_c_buf_p);
1243 #endif /* ifndef YY_NO_INPUT */
1245 /** Immediately switch to a different input stream.
1246 * @param input_file A readable stream.
1248 * @note This function does not reset the start condition to @c INITIAL .
1250 void yyrestart (FILE * input_file )
1253 if ( ! YY_CURRENT_BUFFER ){
1254 yyensure_buffer_stack ();
1255 YY_CURRENT_BUFFER_LVALUE =
1256 yy_create_buffer(yyin,YY_BUF_SIZE );
1259 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1260 yy_load_buffer_state( );
1263 /** Switch to a different input buffer.
1264 * @param new_buffer The new input buffer.
1267 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1270 /* TODO. We should be able to replace this entire function body
1272 * yypop_buffer_state();
1273 * yypush_buffer_state(new_buffer);
1275 yyensure_buffer_stack ();
1276 if ( YY_CURRENT_BUFFER == new_buffer )
1279 if ( YY_CURRENT_BUFFER )
1281 /* Flush out information for old buffer. */
1282 *(yy_c_buf_p) = (yy_hold_char);
1283 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1284 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1287 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1288 yy_load_buffer_state( );
1290 /* We don't actually know whether we did this switch during
1291 * EOF (yywrap()) processing, but the only time this flag
1292 * is looked at is after yywrap() is called, so it's safe
1293 * to go ahead and always set it.
1295 (yy_did_buffer_switch_on_eof) = 1;
1298 static void yy_load_buffer_state (void)
1300 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1301 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1302 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1303 (yy_hold_char) = *(yy_c_buf_p);
1306 /** Allocate and initialize an input buffer state.
1307 * @param file A readable stream.
1308 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1310 * @return the allocated buffer state.
1312 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1316 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1318 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1320 b->yy_buf_size = size;
1322 /* yy_ch_buf has to be 2 characters longer than the size given because
1323 * we need to put in 2 end-of-buffer characters.
1325 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1326 if ( ! b->yy_ch_buf )
1327 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1329 b->yy_is_our_buffer = 1;
1331 yy_init_buffer(b,file );
1336 /** Destroy the buffer.
1337 * @param b a buffer created with yy_create_buffer()
1340 void yy_delete_buffer (YY_BUFFER_STATE b )
1346 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1347 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1349 if ( b->yy_is_our_buffer )
1350 yyfree((void *) b->yy_ch_buf );
1352 yyfree((void *) b );
1355 /* Initializes or reinitializes a buffer.
1356 * This function is sometimes called more than once on the same buffer,
1357 * such as during a yyrestart() or at EOF.
1359 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1364 yy_flush_buffer(b );
1366 b->yy_input_file = file;
1367 b->yy_fill_buffer = 1;
1369 /* If b is the current buffer, then yy_init_buffer was _probably_
1370 * called from yyrestart() or through yy_get_next_buffer.
1371 * In that case, we don't want to reset the lineno or column.
1373 if (b != YY_CURRENT_BUFFER){
1374 b->yy_bs_lineno = 1;
1375 b->yy_bs_column = 0;
1378 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1383 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1384 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1387 void yy_flush_buffer (YY_BUFFER_STATE b )
1394 /* We always need two end-of-buffer characters. The first causes
1395 * a transition to the end-of-buffer state. The second causes
1396 * a jam in that state.
1398 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1399 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1401 b->yy_buf_pos = &b->yy_ch_buf[0];
1404 b->yy_buffer_status = YY_BUFFER_NEW;
1406 if ( b == YY_CURRENT_BUFFER )
1407 yy_load_buffer_state( );
1410 /** Pushes the new state onto the stack. The new state becomes
1411 * the current state. This function will allocate the stack
1413 * @param new_buffer The new state.
1416 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1418 if (new_buffer == NULL)
1421 yyensure_buffer_stack();
1423 /* This block is copied from yy_switch_to_buffer. */
1424 if ( YY_CURRENT_BUFFER )
1426 /* Flush out information for old buffer. */
1427 *(yy_c_buf_p) = (yy_hold_char);
1428 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1429 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1432 /* Only push if top exists. Otherwise, replace top. */
1433 if (YY_CURRENT_BUFFER)
1434 (yy_buffer_stack_top)++;
1435 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1437 /* copied from yy_switch_to_buffer. */
1438 yy_load_buffer_state( );
1439 (yy_did_buffer_switch_on_eof) = 1;
1442 /** Removes and deletes the top of the stack, if present.
1443 * The next element becomes the new top.
1446 void yypop_buffer_state (void)
1448 if (!YY_CURRENT_BUFFER)
1451 yy_delete_buffer(YY_CURRENT_BUFFER );
1452 YY_CURRENT_BUFFER_LVALUE = NULL;
1453 if ((yy_buffer_stack_top) > 0)
1454 --(yy_buffer_stack_top);
1456 if (YY_CURRENT_BUFFER) {
1457 yy_load_buffer_state( );
1458 (yy_did_buffer_switch_on_eof) = 1;
1462 /* Allocates the stack if it does not exist.
1463 * Guarantees space for at least one push.
1465 static void yyensure_buffer_stack (void)
1467 yy_size_t num_to_alloc;
1469 if (!(yy_buffer_stack)) {
1471 /* First allocation is just for 2 elements, since we don't know if this
1472 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1473 * immediate realloc on the next call.
1476 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1477 (num_to_alloc * sizeof(struct yy_buffer_state*)
1479 if ( ! (yy_buffer_stack) )
1480 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1482 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1484 (yy_buffer_stack_max) = num_to_alloc;
1485 (yy_buffer_stack_top) = 0;
1489 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1491 /* Increase the buffer to prepare for a possible push. */
1492 int grow_size = 8 /* arbitrary grow size */;
1494 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1495 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1497 num_to_alloc * sizeof(struct yy_buffer_state*)
1499 if ( ! (yy_buffer_stack) )
1500 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1502 /* zero only the new slots.*/
1503 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1504 (yy_buffer_stack_max) = num_to_alloc;
1508 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1509 * @param base the character buffer
1510 * @param size the size in bytes of the character buffer
1512 * @return the newly allocated buffer state object.
1514 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1519 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1520 base[size-1] != YY_END_OF_BUFFER_CHAR )
1521 /* They forgot to leave room for the EOB's. */
1524 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1526 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1528 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1529 b->yy_buf_pos = b->yy_ch_buf = base;
1530 b->yy_is_our_buffer = 0;
1531 b->yy_input_file = 0;
1532 b->yy_n_chars = b->yy_buf_size;
1533 b->yy_is_interactive = 0;
1535 b->yy_fill_buffer = 0;
1536 b->yy_buffer_status = YY_BUFFER_NEW;
1538 yy_switch_to_buffer(b );
1543 /** Setup the input buffer state to scan a string. The next call to yylex() will
1544 * scan from a @e copy of @a str.
1545 * @param yystr a NUL-terminated string to scan
1547 * @return the newly allocated buffer state object.
1548 * @note If you want to scan bytes that may contain NUL values, then use
1549 * yy_scan_bytes() instead.
1551 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1554 return yy_scan_bytes(yystr,strlen(yystr) );
1557 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1558 * scan from a @e copy of @a bytes.
1559 * @param yybytes the byte buffer to scan
1560 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1562 * @return the newly allocated buffer state object.
1564 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1571 /* Get memory for full buffer, including space for trailing EOB's. */
1572 n = _yybytes_len + 2;
1573 buf = (char *) yyalloc(n );
1575 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1577 for ( i = 0; i < _yybytes_len; ++i )
1578 buf[i] = yybytes[i];
1580 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1582 b = yy_scan_buffer(buf,n );
1584 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1586 /* It's okay to grow etc. this buffer, and we should throw it
1587 * away when we're done.
1589 b->yy_is_our_buffer = 1;
1594 #ifndef YY_EXIT_FAILURE
1595 #define YY_EXIT_FAILURE 2
1598 static void yy_fatal_error (yyconst char* msg )
1600 (void) fprintf( stderr, "%s\n", msg );
1601 exit( YY_EXIT_FAILURE );
1604 /* Redefine yyless() so it works in section 3 code. */
1610 /* Undo effects of setting up yytext. */ \
1611 int yyless_macro_arg = (n); \
1612 YY_LESS_LINENO(yyless_macro_arg);\
1613 yytext[yyleng] = (yy_hold_char); \
1614 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1615 (yy_hold_char) = *(yy_c_buf_p); \
1616 *(yy_c_buf_p) = '\0'; \
1617 yyleng = yyless_macro_arg; \
1621 /* Accessor methods (get/set functions) to struct members. */
1623 /** Get the current line number.
1626 int yyget_lineno (void)
1632 /** Get the input stream.
1635 FILE *yyget_in (void)
1640 /** Get the output stream.
1643 FILE *yyget_out (void)
1648 /** Get the length of the current token.
1651 yy_size_t yyget_leng (void)
1656 /** Get the current token.
1660 char *yyget_text (void)
1665 /** Set the current line number.
1666 * @param line_number
1669 void yyset_lineno (int line_number )
1672 yylineno = line_number;
1675 /** Set the input stream. This does not discard the current
1677 * @param in_str A readable stream.
1679 * @see yy_switch_to_buffer
1681 void yyset_in (FILE * in_str )
1686 void yyset_out (FILE * out_str )
1691 int yyget_debug (void)
1693 return yy_flex_debug;
1696 void yyset_debug (int bdebug )
1698 yy_flex_debug = bdebug ;
1701 static int yy_init_globals (void)
1703 /* Initialization is the same as for the non-reentrant scanner.
1704 * This function is called from yylex_destroy(), so don't allocate here.
1707 (yy_buffer_stack) = 0;
1708 (yy_buffer_stack_top) = 0;
1709 (yy_buffer_stack_max) = 0;
1710 (yy_c_buf_p) = (char *) 0;
1714 /* Defined in main.c */
1723 /* For future reference: Set errno on error, since we are called by
1729 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1730 int yylex_destroy (void)
1733 /* Pop the buffer stack, destroying each element. */
1734 while(YY_CURRENT_BUFFER){
1735 yy_delete_buffer(YY_CURRENT_BUFFER );
1736 YY_CURRENT_BUFFER_LVALUE = NULL;
1737 yypop_buffer_state();
1740 /* Destroy the stack itself. */
1741 yyfree((yy_buffer_stack) );
1742 (yy_buffer_stack) = NULL;
1744 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1745 * yylex() is called, initialization will occur. */
1752 * Internal utility routines.
1756 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1759 for ( i = 0; i < n; ++i )
1764 #ifdef YY_NEED_STRLEN
1765 static int yy_flex_strlen (yyconst char * s )
1768 for ( n = 0; s[n]; ++n )
1775 void *yyalloc (yy_size_t size )
1777 return (void *) malloc( size );
1780 void *yyrealloc (void * ptr, yy_size_t size )
1782 /* The cast to (char *) in the following accommodates both
1783 * implementations that use char* generic pointers, and those
1784 * that use void* generic pointers. It works with the latter
1785 * because both ANSI C and C++ allow castless assignment from
1786 * any pointer type to void*, and deal with argument conversions
1787 * as though doing an assignment.
1789 return (void *) realloc( (char *) ptr, size );
1792 void yyfree (void * ptr )
1794 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1797 #define YYTABLES_NAME "yytables"
1808 l = strtol(yytext, NULL, 0);
1809 if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) ||
1810 l > INT32_MAX || l < INT32_MIN) {
1811 m4_warnx("numeric overflow in expr: %s", yytext);
1825 base = strtol(yytext+2, &next, 0);
1826 if (base > 36 || next == NULL) {
1827 m4_warnx("error in number %s", yytext);
1830 while (*next != 0) {
1831 if (*next >= '0' && *next <= '9')
1833 else if (*next >= 'a' && *next <= 'z')
1834 d = *next - 'a' + 10;
1836 assert(*next >= 'A' && *next <= 'Z');
1837 d = *next - 'A' + 10;
1840 m4_warnx("error in number %s", yytext);