4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer null__create_buffer
9 #define yy_delete_buffer null__delete_buffer
10 #define yy_flex_debug null__flex_debug
11 #define yy_init_buffer null__init_buffer
12 #define yy_flush_buffer null__flush_buffer
13 #define yy_load_buffer_state null__load_buffer_state
14 #define yy_switch_to_buffer null__switch_to_buffer
16 #define yyleng null_leng
17 #define yylex null_lex
18 #define yylineno null_lineno
19 #define yyout null_out
20 #define yyrestart null_restart
21 #define yytext null_text
22 #define yywrap null_wrap
23 #define yyalloc null_alloc
24 #define yyrealloc null_realloc
25 #define yyfree null_free
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
76 /* Limits of integral types. */
78 #define INT8_MIN (-128)
81 #define INT16_MIN (-32767-1)
84 #define INT32_MIN (-2147483647-1)
87 #define INT8_MAX (127)
90 #define INT16_MAX (32767)
93 #define INT32_MAX (2147483647)
96 #define UINT8_MAX (255U)
99 #define UINT16_MAX (65535U)
102 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE null_restart(null_in )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
164 /* On IA-64, the buffer size is 16k, not 8k.
165 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
166 * Ditto for the __ia64__ case accordingly.
168 #define YY_BUF_SIZE 32768
170 #define YY_BUF_SIZE 16384
171 #endif /* __ia64__ */
174 /* The state buf must be large enough to hold one state per character in the main buffer.
176 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
178 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
179 #define YY_TYPEDEF_YY_BUFFER_STATE
180 typedef struct yy_buffer_state *YY_BUFFER_STATE;
183 extern int null_leng;
185 extern FILE *null_in, *null_out;
187 #define EOB_ACT_CONTINUE_SCAN 0
188 #define EOB_ACT_END_OF_FILE 1
189 #define EOB_ACT_LAST_MATCH 2
191 #define YY_LESS_LINENO(n)
193 /* Return all but the first "n" matched characters back to the input stream. */
197 /* Undo effects of setting up null_text. */ \
198 int yyless_macro_arg = (n); \
199 YY_LESS_LINENO(yyless_macro_arg);\
200 *yy_cp = (yy_hold_char); \
201 YY_RESTORE_YY_MORE_OFFSET \
202 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
203 YY_DO_BEFORE_ACTION; /* set up null_text again */ \
207 #define unput(c) yyunput( c, (yytext_ptr) )
209 #ifndef YY_TYPEDEF_YY_SIZE_T
210 #define YY_TYPEDEF_YY_SIZE_T
211 typedef size_t yy_size_t;
214 #ifndef YY_STRUCT_YY_BUFFER_STATE
215 #define YY_STRUCT_YY_BUFFER_STATE
216 struct yy_buffer_state
220 char *yy_ch_buf; /* input buffer */
221 char *yy_buf_pos; /* current position in input buffer */
223 /* Size of input buffer in bytes, not including room for EOB
226 yy_size_t yy_buf_size;
228 /* Number of characters read into yy_ch_buf, not including EOB
233 /* Whether we "own" the buffer - i.e., we know we created it,
234 * and can realloc() it to grow it, and should free() it to
237 int yy_is_our_buffer;
239 /* Whether this is an "interactive" input source; if so, and
240 * if we're using stdio for input, then we want to use getc()
241 * instead of fread(), to make sure we stop fetching input after
244 int yy_is_interactive;
246 /* Whether we're considered to be at the beginning of a line.
247 * If so, '^' rules will be active on the next match, otherwise
252 int yy_bs_lineno; /**< The line count. */
253 int yy_bs_column; /**< The column count. */
255 /* Whether to try to fill the input buffer when we reach the
260 int yy_buffer_status;
262 #define YY_BUFFER_NEW 0
263 #define YY_BUFFER_NORMAL 1
264 /* When an EOF's been seen but there's still some text to process
265 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
266 * shouldn't try reading from the input source any more. We might
267 * still have a bunch of tokens to match, though, because of
268 * possible backing-up.
270 * When we actually see the EOF, we change the status to "new"
271 * (via null_restart()), so that the user can continue scanning by
272 * just pointing null_in at a new input file.
274 #define YY_BUFFER_EOF_PENDING 2
277 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
279 /* Stack of input buffers. */
280 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
281 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
282 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
284 /* We provide macros for accessing buffer states in case in the
285 * future we want to put the buffer states in a more general
288 * Returns the top of the stack, or NULL.
290 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
291 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
294 /* Same as previous macro, but useful when we know that the buffer stack is not
295 * NULL or when we need an lvalue. For internal use only.
297 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
299 /* yy_hold_char holds the character lost when null_text is formed. */
300 static char yy_hold_char;
301 static int yy_n_chars; /* number of characters read into yy_ch_buf */
304 /* Points to current character in buffer. */
305 static char *yy_c_buf_p = (char *) 0;
306 static int yy_init = 0; /* whether we need to initialize */
307 static int yy_start = 0; /* start state number */
309 /* Flag which is used to allow null_wrap()'s to do buffer switches
310 * instead of setting up a fresh null_in. A bit of a hack ...
312 static int yy_did_buffer_switch_on_eof;
314 void null_restart (FILE *input_file );
315 void null__switch_to_buffer (YY_BUFFER_STATE new_buffer );
316 YY_BUFFER_STATE null__create_buffer (FILE *file,int size );
317 void null__delete_buffer (YY_BUFFER_STATE b );
318 void null__flush_buffer (YY_BUFFER_STATE b );
319 void null_push_buffer_state (YY_BUFFER_STATE new_buffer );
320 void null_pop_buffer_state (void );
322 static void null_ensure_buffer_stack (void );
323 static void null__load_buffer_state (void );
324 static void null__init_buffer (YY_BUFFER_STATE b,FILE *file );
326 #define YY_FLUSH_BUFFER null__flush_buffer(YY_CURRENT_BUFFER )
328 YY_BUFFER_STATE null__scan_buffer (char *base,yy_size_t size );
329 YY_BUFFER_STATE null__scan_string (yyconst char *yy_str );
330 YY_BUFFER_STATE null__scan_bytes (yyconst char *bytes,int len );
332 void *null_alloc (yy_size_t );
333 void *null_realloc (void *,yy_size_t );
334 void null_free (void * );
336 #define yy_new_buffer null__create_buffer
338 #define yy_set_interactive(is_interactive) \
340 if ( ! YY_CURRENT_BUFFER ){ \
341 null_ensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 null__create_buffer(null_in,YY_BUF_SIZE ); \
345 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
348 #define yy_set_bol(at_bol) \
350 if ( ! YY_CURRENT_BUFFER ){\
351 null_ensure_buffer_stack (); \
352 YY_CURRENT_BUFFER_LVALUE = \
353 null__create_buffer(null_in,YY_BUF_SIZE ); \
355 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
358 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
360 typedef unsigned char YY_CHAR;
362 FILE *null_in = (FILE *) 0, *null_out = (FILE *) 0;
364 typedef int yy_state_type;
366 extern int null_lineno;
370 extern char *null_text;
371 #define yytext_ptr null_text
373 static yy_state_type yy_get_previous_state (void );
374 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
375 static int yy_get_next_buffer (void );
376 static void yy_fatal_error (yyconst char msg[] );
378 /* Done after the current pattern has been matched and before the
379 * corresponding action - sets up null_text.
381 #define YY_DO_BEFORE_ACTION \
382 (yytext_ptr) = yy_bp; \
383 null_leng = (size_t) (yy_cp - yy_bp); \
384 (yy_hold_char) = *yy_cp; \
386 (yy_c_buf_p) = yy_cp;
388 #define YY_NUM_RULES 1
389 #define YY_END_OF_BUFFER 2
390 /* This struct is not used in this scanner,
391 but its presence is necessary. */
394 flex_int32_t yy_verify;
397 static yyconst flex_int16_t yy_accept[6] =
402 static yyconst flex_int32_t yy_ec[256] =
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 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,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 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,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 static yyconst flex_int32_t yy_meta[2] =
439 static yyconst flex_int16_t yy_base[7] =
444 static yyconst flex_int16_t yy_def[7] =
449 static yyconst flex_int16_t yy_nxt[5] =
454 static yyconst flex_int16_t yy_chk[5] =
459 static yy_state_type yy_last_accepting_state;
460 static char *yy_last_accepting_cpos;
462 extern int null__flex_debug;
463 int null__flex_debug = 0;
465 /* The intent behind this definition is that it'll catch
466 * any uses of REJECT which flex missed.
468 #define REJECT reject_used_but_not_detected
469 #define yymore() yymore_used_but_not_detected
470 #define YY_MORE_ADJ 0
471 #define YY_RESTORE_YY_MORE_OFFSET
473 #line 1 "../../fsinfo/null_lex.l"
474 #line 2 "../../fsinfo/null_lex.l"
475 #include "null_gram.h"
477 void null_error(const char *fmt, ...) {}
478 int null_wrap(void) { return 0; }
479 #define YY_NO_INPUT 1
480 #line 481 "lex.null_.c"
484 #ifndef YY_NO_UNISTD_H
485 /* Special case for "unistd.h", since it is non-ANSI. We include it way
486 * down here because we want the user's section 1 to have been scanned first.
487 * The user has a chance to override it with an option.
492 #ifndef YY_EXTRA_TYPE
493 #define YY_EXTRA_TYPE void *
496 static int yy_init_globals (void );
498 /* Accessor methods to globals.
499 These are made visible to non-reentrant scanners for convenience. */
501 int null_lex_destroy (void );
503 int null_get_debug (void );
505 void null_set_debug (int debug_flag );
507 YY_EXTRA_TYPE null_get_extra (void );
509 void null_set_extra (YY_EXTRA_TYPE user_defined );
511 FILE *null_get_in (void );
513 void null_set_in (FILE * in_str );
515 FILE *null_get_out (void );
517 void null_set_out (FILE * out_str );
519 int null_get_leng (void );
521 char *null_get_text (void );
523 int null_get_lineno (void );
525 void null_set_lineno (int line_number );
527 /* Macros after this point can all be overridden by user definitions in
531 #ifndef YY_SKIP_YYWRAP
533 extern "C" int null_wrap (void );
535 extern int null_wrap (void );
540 static void yy_flex_strncpy (char *,yyconst char *,int );
543 #ifdef YY_NEED_STRLEN
544 static int yy_flex_strlen (yyconst char * );
550 static int yyinput (void );
552 static int input (void );
557 /* Amount of stuff to slurp up with each read. */
558 #ifndef YY_READ_BUF_SIZE
560 /* On IA-64, the buffer size is 16k, not 8k */
561 #define YY_READ_BUF_SIZE 16384
563 #define YY_READ_BUF_SIZE 8192
564 #endif /* __ia64__ */
567 /* Copy whatever the last rule matched to the standard output. */
569 /* This used to be an fputs(), but since the string might contain NUL's,
570 * we now use fwrite().
572 #define ECHO do { if (fwrite( null_text, null_leng, 1, null_out )) {} } while (0)
575 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
576 * is returned in "result".
579 #define YY_INPUT(buf,result,max_size) \
580 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
584 for ( n = 0; n < max_size && \
585 (c = getc( null_in )) != EOF && c != '\n'; ++n ) \
588 buf[n++] = (char) c; \
589 if ( c == EOF && ferror( null_in ) ) \
590 YY_FATAL_ERROR( "input in flex scanner failed" ); \
596 while ( (result = fread(buf, 1, max_size, null_in))==0 && ferror(null_in)) \
598 if( errno != EINTR) \
600 YY_FATAL_ERROR( "input in flex scanner failed" ); \
611 /* No semi-colon after return; correct usage is to write "yyterminate();" -
612 * we don't want an extra ';' after the "return" because that will cause
613 * some compilers to complain about unreachable statements.
616 #define yyterminate() return YY_NULL
619 /* Number of entries by which start-condition stack grows. */
620 #ifndef YY_START_STACK_INCR
621 #define YY_START_STACK_INCR 25
624 /* Report a fatal error. */
625 #ifndef YY_FATAL_ERROR
626 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
629 /* end tables serialization structures and prototypes */
631 /* Default declaration of generated scanner - a define so the user can
632 * easily add parameters.
635 #define YY_DECL_IS_OURS 1
637 extern int null_lex (void);
639 #define YY_DECL int null_lex (void)
640 #endif /* !YY_DECL */
642 /* Code executed at the beginning of each rule, after null_text and null_leng
645 #ifndef YY_USER_ACTION
646 #define YY_USER_ACTION
649 /* Code executed at the end of each rule. */
651 #define YY_BREAK break;
654 #define YY_RULE_SETUP \
657 /** The main scanner function which does all the work.
661 register yy_state_type yy_current_state;
662 register char *yy_cp, *yy_bp;
665 #line 9 "../../fsinfo/null_lex.l"
667 #line 668 "lex.null_.c"
678 (yy_start) = 1; /* first start state */
686 if ( ! YY_CURRENT_BUFFER ) {
687 null_ensure_buffer_stack ();
688 YY_CURRENT_BUFFER_LVALUE =
689 null__create_buffer(null_in,YY_BUF_SIZE );
692 null__load_buffer_state( );
695 while ( 1 ) /* loops until end-of-file is reached */
697 yy_cp = (yy_c_buf_p);
699 /* Support of null_text. */
700 *yy_cp = (yy_hold_char);
702 /* yy_bp points to the position in yy_ch_buf of the start of
707 yy_current_state = (yy_start);
711 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
712 if ( yy_accept[yy_current_state] )
714 (yy_last_accepting_state) = yy_current_state;
715 (yy_last_accepting_cpos) = yy_cp;
717 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
719 yy_current_state = (int) yy_def[yy_current_state];
720 if ( yy_current_state >= 6 )
721 yy_c = yy_meta[(unsigned int) yy_c];
723 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
726 while ( yy_base[yy_current_state] != 3 );
729 yy_act = yy_accept[yy_current_state];
731 { /* have to back up */
732 yy_cp = (yy_last_accepting_cpos);
733 yy_current_state = (yy_last_accepting_state);
734 yy_act = yy_accept[yy_current_state];
739 do_action: /* This label is used only to access EOF actions. */
742 { /* beginning of action switch */
743 case 0: /* must back up */
744 /* undo the effects of YY_DO_BEFORE_ACTION */
745 *yy_cp = (yy_hold_char);
746 yy_cp = (yy_last_accepting_cpos);
747 yy_current_state = (yy_last_accepting_state);
752 #line 10 "../../fsinfo/null_lex.l"
755 #line 756 "lex.null_.c"
756 case YY_STATE_EOF(INITIAL):
759 case YY_END_OF_BUFFER:
761 /* Amount of text matched not including the EOB char. */
762 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
764 /* Undo the effects of YY_DO_BEFORE_ACTION. */
765 *yy_cp = (yy_hold_char);
766 YY_RESTORE_YY_MORE_OFFSET
768 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
770 /* We're scanning a new file or input source. It's
771 * possible that this happened because the user
772 * just pointed null_in at a new source and called
773 * null_lex(). If so, then we have to assure
774 * consistency between YY_CURRENT_BUFFER and our
775 * globals. Here is the right place to do so, because
776 * this is the first action (other than possibly a
777 * back-up) that will match for the new input source.
779 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
780 YY_CURRENT_BUFFER_LVALUE->yy_input_file = null_in;
781 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
784 /* Note that here we test for yy_c_buf_p "<=" to the position
785 * of the first EOB in the buffer, since yy_c_buf_p will
786 * already have been incremented past the NUL character
787 * (since all states make transitions on EOB to the
788 * end-of-buffer state). Contrast this with the test
791 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
792 { /* This was really a NUL. */
793 yy_state_type yy_next_state;
795 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
797 yy_current_state = yy_get_previous_state( );
799 /* Okay, we're now positioned to make the NUL
800 * transition. We couldn't have
801 * yy_get_previous_state() go ahead and do it
802 * for us because it doesn't know how to deal
803 * with the possibility of jamming (and we don't
804 * want to build jamming into it because then it
805 * will run more slowly).
808 yy_next_state = yy_try_NUL_trans( yy_current_state );
810 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
814 /* Consume the NUL. */
815 yy_cp = ++(yy_c_buf_p);
816 yy_current_state = yy_next_state;
822 yy_cp = (yy_c_buf_p);
827 else switch ( yy_get_next_buffer( ) )
829 case EOB_ACT_END_OF_FILE:
831 (yy_did_buffer_switch_on_eof) = 0;
835 /* Note: because we've taken care in
836 * yy_get_next_buffer() to have set up
837 * null_text, we can now set up
838 * yy_c_buf_p so that if some total
839 * hoser (like flex itself) wants to
840 * call the scanner after we return the
841 * YY_NULL, it'll still work - another
842 * YY_NULL will get returned.
844 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
846 yy_act = YY_STATE_EOF(YY_START);
852 if ( ! (yy_did_buffer_switch_on_eof) )
858 case EOB_ACT_CONTINUE_SCAN:
860 (yytext_ptr) + yy_amount_of_matched_text;
862 yy_current_state = yy_get_previous_state( );
864 yy_cp = (yy_c_buf_p);
865 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
868 case EOB_ACT_LAST_MATCH:
870 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
872 yy_current_state = yy_get_previous_state( );
874 yy_cp = (yy_c_buf_p);
875 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
883 "fatal flex scanner internal error--no action found" );
884 } /* end of action switch */
885 } /* end of scanning one token */
886 } /* end of null_lex */
888 /* yy_get_next_buffer - try to read in a new buffer
890 * Returns a code representing an action:
891 * EOB_ACT_LAST_MATCH -
892 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
893 * EOB_ACT_END_OF_FILE - end of file
895 static int yy_get_next_buffer (void)
897 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
898 register char *source = (yytext_ptr);
899 register int number_to_move, i;
902 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
904 "fatal flex scanner internal error--end of buffer missed" );
906 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
907 { /* Don't try to fill the buffer, so this is an EOF. */
908 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
910 /* We matched a single character, the EOB, so
911 * treat this as a final EOF.
913 return EOB_ACT_END_OF_FILE;
918 /* We matched some text prior to the EOB, first
921 return EOB_ACT_LAST_MATCH;
925 /* Try to read more data. */
927 /* First move last chars to start of buffer. */
928 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
930 for ( i = 0; i < number_to_move; ++i )
931 *(dest++) = *(source++);
933 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
934 /* don't do the read, it's not guaranteed to return an EOF,
937 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
942 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
944 while ( num_to_read <= 0 )
945 { /* Not enough room in the buffer - grow it. */
947 /* just a shorter name for the current buffer */
948 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
950 int yy_c_buf_p_offset =
951 (int) ((yy_c_buf_p) - b->yy_ch_buf);
953 if ( b->yy_is_our_buffer )
955 int new_size = b->yy_buf_size * 2;
958 b->yy_buf_size += b->yy_buf_size / 8;
962 b->yy_ch_buf = (char *)
963 /* Include room in for 2 EOB chars. */
964 null_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
967 /* Can't grow it, we don't own it. */
970 if ( ! b->yy_ch_buf )
972 "fatal error - scanner input buffer overflow" );
974 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
976 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
981 if ( num_to_read > YY_READ_BUF_SIZE )
982 num_to_read = YY_READ_BUF_SIZE;
984 /* Read in more data. */
985 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
986 (yy_n_chars), (size_t) num_to_read );
988 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
991 if ( (yy_n_chars) == 0 )
993 if ( number_to_move == YY_MORE_ADJ )
995 ret_val = EOB_ACT_END_OF_FILE;
996 null_restart(null_in );
1001 ret_val = EOB_ACT_LAST_MATCH;
1002 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1003 YY_BUFFER_EOF_PENDING;
1008 ret_val = EOB_ACT_CONTINUE_SCAN;
1010 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1011 /* Extend the array by 50%, plus the number we really need. */
1012 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1013 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) null_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1014 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1015 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1018 (yy_n_chars) += number_to_move;
1019 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1020 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1022 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1027 /* yy_get_previous_state - get the state just before the EOB char was reached */
1029 static yy_state_type yy_get_previous_state (void)
1031 register yy_state_type yy_current_state;
1032 register char *yy_cp;
1034 yy_current_state = (yy_start);
1036 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1038 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1039 if ( yy_accept[yy_current_state] )
1041 (yy_last_accepting_state) = yy_current_state;
1042 (yy_last_accepting_cpos) = yy_cp;
1044 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1046 yy_current_state = (int) yy_def[yy_current_state];
1047 if ( yy_current_state >= 6 )
1048 yy_c = yy_meta[(unsigned int) yy_c];
1050 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1053 return yy_current_state;
1056 /* yy_try_NUL_trans - try to make a transition on the NUL character
1059 * next_state = yy_try_NUL_trans( current_state );
1061 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1063 register int yy_is_jam;
1064 register char *yy_cp = (yy_c_buf_p);
1066 register YY_CHAR yy_c = 1;
1067 if ( yy_accept[yy_current_state] )
1069 (yy_last_accepting_state) = yy_current_state;
1070 (yy_last_accepting_cpos) = yy_cp;
1072 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1074 yy_current_state = (int) yy_def[yy_current_state];
1075 if ( yy_current_state >= 6 )
1076 yy_c = yy_meta[(unsigned int) yy_c];
1078 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1079 yy_is_jam = (yy_current_state == 5);
1081 return yy_is_jam ? 0 : yy_current_state;
1086 static int yyinput (void)
1088 static int input (void)
1094 *(yy_c_buf_p) = (yy_hold_char);
1096 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1098 /* yy_c_buf_p now points to the character we want to return.
1099 * If this occurs *before* the EOB characters, then it's a
1100 * valid NUL; if not, then we've hit the end of the buffer.
1102 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1103 /* This was really a NUL. */
1104 *(yy_c_buf_p) = '\0';
1107 { /* need more input */
1108 int offset = (yy_c_buf_p) - (yytext_ptr);
1111 switch ( yy_get_next_buffer( ) )
1113 case EOB_ACT_LAST_MATCH:
1114 /* This happens because yy_g_n_b()
1115 * sees that we've accumulated a
1116 * token and flags that we need to
1117 * try matching the token before
1118 * proceeding. But for input(),
1119 * there's no matching to consider.
1120 * So convert the EOB_ACT_LAST_MATCH
1121 * to EOB_ACT_END_OF_FILE.
1124 /* Reset buffer status. */
1125 null_restart(null_in );
1129 case EOB_ACT_END_OF_FILE:
1134 if ( ! (yy_did_buffer_switch_on_eof) )
1143 case EOB_ACT_CONTINUE_SCAN:
1144 (yy_c_buf_p) = (yytext_ptr) + offset;
1150 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1151 *(yy_c_buf_p) = '\0'; /* preserve null_text */
1152 (yy_hold_char) = *++(yy_c_buf_p);
1156 #endif /* ifndef YY_NO_INPUT */
1158 /** Immediately switch to a different input stream.
1159 * @param input_file A readable stream.
1161 * @note This function does not reset the start condition to @c INITIAL .
1163 void null_restart (FILE * input_file )
1166 if ( ! YY_CURRENT_BUFFER ){
1167 null_ensure_buffer_stack ();
1168 YY_CURRENT_BUFFER_LVALUE =
1169 null__create_buffer(null_in,YY_BUF_SIZE );
1172 null__init_buffer(YY_CURRENT_BUFFER,input_file );
1173 null__load_buffer_state( );
1176 /** Switch to a different input buffer.
1177 * @param new_buffer The new input buffer.
1180 void null__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1183 /* TODO. We should be able to replace this entire function body
1185 * null_pop_buffer_state();
1186 * null_push_buffer_state(new_buffer);
1188 null_ensure_buffer_stack ();
1189 if ( YY_CURRENT_BUFFER == new_buffer )
1192 if ( YY_CURRENT_BUFFER )
1194 /* Flush out information for old buffer. */
1195 *(yy_c_buf_p) = (yy_hold_char);
1196 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1197 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1200 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1201 null__load_buffer_state( );
1203 /* We don't actually know whether we did this switch during
1204 * EOF (null_wrap()) processing, but the only time this flag
1205 * is looked at is after null_wrap() is called, so it's safe
1206 * to go ahead and always set it.
1208 (yy_did_buffer_switch_on_eof) = 1;
1211 static void null__load_buffer_state (void)
1213 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1214 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1215 null_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1216 (yy_hold_char) = *(yy_c_buf_p);
1219 /** Allocate and initialize an input buffer state.
1220 * @param file A readable stream.
1221 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1223 * @return the allocated buffer state.
1225 YY_BUFFER_STATE null__create_buffer (FILE * file, int size )
1229 b = (YY_BUFFER_STATE) null_alloc(sizeof( struct yy_buffer_state ) );
1231 YY_FATAL_ERROR( "out of dynamic memory in null__create_buffer()" );
1233 b->yy_buf_size = size;
1235 /* yy_ch_buf has to be 2 characters longer than the size given because
1236 * we need to put in 2 end-of-buffer characters.
1238 b->yy_ch_buf = (char *) null_alloc(b->yy_buf_size + 2 );
1239 if ( ! b->yy_ch_buf )
1240 YY_FATAL_ERROR( "out of dynamic memory in null__create_buffer()" );
1242 b->yy_is_our_buffer = 1;
1244 null__init_buffer(b,file );
1249 /** Destroy the buffer.
1250 * @param b a buffer created with null__create_buffer()
1253 void null__delete_buffer (YY_BUFFER_STATE b )
1259 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1260 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1262 if ( b->yy_is_our_buffer )
1263 null_free((void *) b->yy_ch_buf );
1265 null_free((void *) b );
1269 extern int isatty (int );
1270 #endif /* __cplusplus */
1272 /* Initializes or reinitializes a buffer.
1273 * This function is sometimes called more than once on the same buffer,
1274 * such as during a null_restart() or at EOF.
1276 static void null__init_buffer (YY_BUFFER_STATE b, FILE * file )
1281 null__flush_buffer(b );
1283 b->yy_input_file = file;
1284 b->yy_fill_buffer = 1;
1286 /* If b is the current buffer, then null__init_buffer was _probably_
1287 * called from null_restart() or through yy_get_next_buffer.
1288 * In that case, we don't want to reset the lineno or column.
1290 if (b != YY_CURRENT_BUFFER){
1291 b->yy_bs_lineno = 1;
1292 b->yy_bs_column = 0;
1295 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1300 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1301 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1304 void null__flush_buffer (YY_BUFFER_STATE b )
1311 /* We always need two end-of-buffer characters. The first causes
1312 * a transition to the end-of-buffer state. The second causes
1313 * a jam in that state.
1315 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1316 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1318 b->yy_buf_pos = &b->yy_ch_buf[0];
1321 b->yy_buffer_status = YY_BUFFER_NEW;
1323 if ( b == YY_CURRENT_BUFFER )
1324 null__load_buffer_state( );
1327 /** Pushes the new state onto the stack. The new state becomes
1328 * the current state. This function will allocate the stack
1330 * @param new_buffer The new state.
1333 void null_push_buffer_state (YY_BUFFER_STATE new_buffer )
1335 if (new_buffer == NULL)
1338 null_ensure_buffer_stack();
1340 /* This block is copied from null__switch_to_buffer. */
1341 if ( YY_CURRENT_BUFFER )
1343 /* Flush out information for old buffer. */
1344 *(yy_c_buf_p) = (yy_hold_char);
1345 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1346 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1349 /* Only push if top exists. Otherwise, replace top. */
1350 if (YY_CURRENT_BUFFER)
1351 (yy_buffer_stack_top)++;
1352 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1354 /* copied from null__switch_to_buffer. */
1355 null__load_buffer_state( );
1356 (yy_did_buffer_switch_on_eof) = 1;
1359 /** Removes and deletes the top of the stack, if present.
1360 * The next element becomes the new top.
1363 void null_pop_buffer_state (void)
1365 if (!YY_CURRENT_BUFFER)
1368 null__delete_buffer(YY_CURRENT_BUFFER );
1369 YY_CURRENT_BUFFER_LVALUE = NULL;
1370 if ((yy_buffer_stack_top) > 0)
1371 --(yy_buffer_stack_top);
1373 if (YY_CURRENT_BUFFER) {
1374 null__load_buffer_state( );
1375 (yy_did_buffer_switch_on_eof) = 1;
1379 /* Allocates the stack if it does not exist.
1380 * Guarantees space for at least one push.
1382 static void null_ensure_buffer_stack (void)
1386 if (!(yy_buffer_stack)) {
1388 /* First allocation is just for 2 elements, since we don't know if this
1389 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1390 * immediate realloc on the next call.
1393 (yy_buffer_stack) = (struct yy_buffer_state**)null_alloc
1394 (num_to_alloc * sizeof(struct yy_buffer_state*)
1396 if ( ! (yy_buffer_stack) )
1397 YY_FATAL_ERROR( "out of dynamic memory in null_ensure_buffer_stack()" );
1399 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1401 (yy_buffer_stack_max) = num_to_alloc;
1402 (yy_buffer_stack_top) = 0;
1406 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1408 /* Increase the buffer to prepare for a possible push. */
1409 int grow_size = 8 /* arbitrary grow size */;
1411 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1412 (yy_buffer_stack) = (struct yy_buffer_state**)null_realloc
1414 num_to_alloc * sizeof(struct yy_buffer_state*)
1416 if ( ! (yy_buffer_stack) )
1417 YY_FATAL_ERROR( "out of dynamic memory in null_ensure_buffer_stack()" );
1419 /* zero only the new slots.*/
1420 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1421 (yy_buffer_stack_max) = num_to_alloc;
1425 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1426 * @param base the character buffer
1427 * @param size the size in bytes of the character buffer
1429 * @return the newly allocated buffer state object.
1431 YY_BUFFER_STATE null__scan_buffer (char * base, yy_size_t size )
1436 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1437 base[size-1] != YY_END_OF_BUFFER_CHAR )
1438 /* They forgot to leave room for the EOB's. */
1441 b = (YY_BUFFER_STATE) null_alloc(sizeof( struct yy_buffer_state ) );
1443 YY_FATAL_ERROR( "out of dynamic memory in null__scan_buffer()" );
1445 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1446 b->yy_buf_pos = b->yy_ch_buf = base;
1447 b->yy_is_our_buffer = 0;
1448 b->yy_input_file = 0;
1449 b->yy_n_chars = b->yy_buf_size;
1450 b->yy_is_interactive = 0;
1452 b->yy_fill_buffer = 0;
1453 b->yy_buffer_status = YY_BUFFER_NEW;
1455 null__switch_to_buffer(b );
1460 /** Setup the input buffer state to scan a string. The next call to null_lex() will
1461 * scan from a @e copy of @a str.
1462 * @param yystr a NUL-terminated string to scan
1464 * @return the newly allocated buffer state object.
1465 * @note If you want to scan bytes that may contain NUL values, then use
1466 * null__scan_bytes() instead.
1468 YY_BUFFER_STATE null__scan_string (yyconst char * yystr )
1471 return null__scan_bytes(yystr,strlen(yystr) );
1474 /** Setup the input buffer state to scan the given bytes. The next call to null_lex() will
1475 * scan from a @e copy of @a bytes.
1476 * @param yybytes the byte buffer to scan
1477 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1479 * @return the newly allocated buffer state object.
1481 YY_BUFFER_STATE null__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1488 /* Get memory for full buffer, including space for trailing EOB's. */
1489 n = _yybytes_len + 2;
1490 buf = (char *) null_alloc(n );
1492 YY_FATAL_ERROR( "out of dynamic memory in null__scan_bytes()" );
1494 for ( i = 0; i < _yybytes_len; ++i )
1495 buf[i] = yybytes[i];
1497 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1499 b = null__scan_buffer(buf,n );
1501 YY_FATAL_ERROR( "bad buffer in null__scan_bytes()" );
1503 /* It's okay to grow etc. this buffer, and we should throw it
1504 * away when we're done.
1506 b->yy_is_our_buffer = 1;
1511 #ifndef YY_EXIT_FAILURE
1512 #define YY_EXIT_FAILURE 2
1515 static void yy_fatal_error (yyconst char* msg )
1517 (void) fprintf( stderr, "%s\n", msg );
1518 exit( YY_EXIT_FAILURE );
1521 /* Redefine yyless() so it works in section 3 code. */
1527 /* Undo effects of setting up null_text. */ \
1528 int yyless_macro_arg = (n); \
1529 YY_LESS_LINENO(yyless_macro_arg);\
1530 null_text[null_leng] = (yy_hold_char); \
1531 (yy_c_buf_p) = null_text + yyless_macro_arg; \
1532 (yy_hold_char) = *(yy_c_buf_p); \
1533 *(yy_c_buf_p) = '\0'; \
1534 null_leng = yyless_macro_arg; \
1538 /* Accessor methods (get/set functions) to struct members. */
1540 /** Get the current line number.
1543 int null_get_lineno (void)
1549 /** Get the input stream.
1552 FILE *null_get_in (void)
1557 /** Get the output stream.
1560 FILE *null_get_out (void)
1565 /** Get the length of the current token.
1568 int null_get_leng (void)
1573 /** Get the current token.
1577 char *null_get_text (void)
1582 /** Set the current line number.
1583 * @param line_number
1586 void null_set_lineno (int line_number )
1589 null_lineno = line_number;
1592 /** Set the input stream. This does not discard the current
1594 * @param in_str A readable stream.
1596 * @see null__switch_to_buffer
1598 void null_set_in (FILE * in_str )
1603 void null_set_out (FILE * out_str )
1605 null_out = out_str ;
1608 int null_get_debug (void)
1610 return null__flex_debug;
1613 void null_set_debug (int bdebug )
1615 null__flex_debug = bdebug ;
1618 static int yy_init_globals (void)
1620 /* Initialization is the same as for the non-reentrant scanner.
1621 * This function is called from null_lex_destroy(), so don't allocate here.
1624 (yy_buffer_stack) = 0;
1625 (yy_buffer_stack_top) = 0;
1626 (yy_buffer_stack_max) = 0;
1627 (yy_c_buf_p) = (char *) 0;
1631 /* Defined in main.c */
1636 null_in = (FILE *) 0;
1637 null_out = (FILE *) 0;
1640 /* For future reference: Set errno on error, since we are called by
1646 /* null_lex_destroy is for both reentrant and non-reentrant scanners. */
1647 int null_lex_destroy (void)
1650 /* Pop the buffer stack, destroying each element. */
1651 while(YY_CURRENT_BUFFER){
1652 null__delete_buffer(YY_CURRENT_BUFFER );
1653 YY_CURRENT_BUFFER_LVALUE = NULL;
1654 null_pop_buffer_state();
1657 /* Destroy the stack itself. */
1658 null_free((yy_buffer_stack) );
1659 (yy_buffer_stack) = NULL;
1661 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1662 * null_lex() is called, initialization will occur. */
1669 * Internal utility routines.
1673 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1676 for ( i = 0; i < n; ++i )
1681 #ifdef YY_NEED_STRLEN
1682 static int yy_flex_strlen (yyconst char * s )
1685 for ( n = 0; s[n]; ++n )
1692 void *null_alloc (yy_size_t size )
1694 return (void *) malloc( size );
1697 void *null_realloc (void * ptr, yy_size_t size )
1699 /* The cast to (char *) in the following accommodates both
1700 * implementations that use char* generic pointers, and those
1701 * that use void* generic pointers. It works with the latter
1702 * because both ANSI C and C++ allow castless assignment from
1703 * any pointer type to void*, and deal with argument conversions
1704 * as though doing an assignment.
1706 return (void *) realloc( (char *) ptr, size );
1709 void null_free (void * ptr )
1711 free( (char *) ptr ); /* see null_realloc() for (char *) cast */
1714 #define YYTABLES_NAME "yytables"
1716 #line 10 "../../fsinfo/null_lex.l"