1 /* File created from flex.skl via mkskel.sh */
6 "/* A lexical scanner generated by flex */",
8 "/* Scanner skeleton version:",
9 " * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $",
12 "#define FLEX_SCANNER",
13 "#define YY_FLEX_MAJOR_VERSION 2",
14 "#define YY_FLEX_MINOR_VERSION 5",
21 "/* cfront 1.2 defines \"c_plusplus\" instead of \"__cplusplus\" */",
23 "#ifndef __cplusplus",
24 "#define __cplusplus",
31 "#include <stdlib.h>",
35 "#include <unistd.h>",
37 "/* Use prototypes in function declarations. */",
38 "#define YY_USE_PROTOS",
40 "/* The \"const\" storage-class-modifier is valid. */",
41 "#define YY_USE_CONST",
43 "#else /* ! __cplusplus */",
47 "#define YY_USE_PROTOS",
48 "#define YY_USE_CONST",
50 "#endif /* __STDC__ */",
51 "#endif /* ! __cplusplus */",
57 "#include <stdlib.h>",
58 "#define YY_USE_CONST",
59 "#define YY_USE_PROTOS",
62 "#ifdef YY_USE_CONST",
63 "#define yyconst const",
69 "#ifdef YY_USE_PROTOS",
70 "#define YY_PROTO(proto) proto",
72 "#define YY_PROTO(proto) ()",
75 "/* Returned upon end-of-file. */",
78 "/* Promotes a possibly negative, possibly signed char to an unsigned",
79 " * integer for use as an array index. If the signed char is negative,",
80 " * we want to instead treat it as an 8-bit unsigned char, hence the",
83 "#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)",
85 "/* Enter a start condition. This macro really ought to take a parameter,",
86 " * but we do it the disgusting crufty way forced on us by the ()-less",
87 " * definition of BEGIN.",
89 "#define BEGIN yy_start = 1 + 2 *",
91 "/* Translate the current start state into a value that can be later handed",
92 " * to BEGIN to return to the state. The YYSTATE alias is for lex",
95 "#define YY_START ((yy_start - 1) / 2)",
96 "#define YYSTATE YY_START",
98 "/* Action number for EOF rule of a given start state. */",
99 "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)",
101 "/* Special action meaning \"start processing a new file\". */",
102 "#define YY_NEW_FILE yyrestart( yyin )",
104 "#define YY_END_OF_BUFFER_CHAR 0",
106 "/* Size of default input buffer. */",
107 "#define YY_BUF_SIZE 16384",
109 "typedef struct yy_buffer_state *YY_BUFFER_STATE;",
111 "extern int yyleng;",
113 "extern FILE *yyin, *yyout;",
116 "#define EOB_ACT_CONTINUE_SCAN 0",
117 "#define EOB_ACT_END_OF_FILE 1",
118 "#define EOB_ACT_LAST_MATCH 2",
120 "/* The funky do-while in the following #define is used to turn the definition",
121 " * int a single C statement (which needs a semi-colon terminator). This",
122 " * avoids problems with code like:",
124 " * if ( condition_holds )",
127 " * do_something_else();",
129 " * Prior to using the do-while the compiler would get upset at the",
130 " * \"else\" because it interpreted the \"if\" statement as being all",
131 " * done when it reached the ';' after the yyless() call.",
134 "/* Return all but the first 'n' matched characters back to the input stream. */",
136 "#define yyless(n) \\",
139 " /* Undo effects of setting up yytext. */ \\",
140 " *yy_cp = yy_hold_char; \\",
141 " YY_RESTORE_YY_MORE_OFFSET \\",
142 " yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \\",
143 " YY_DO_BEFORE_ACTION; /* set up yytext again */ \\",
147 "#define unput(c) yyunput( c, yytext_ptr )",
149 "/* The following is because we cannot portably get our hands on size_t",
150 " * (without autoconf's help, which isn't available because we want",
151 " * flex-generated scanners to compile on their own).",
153 "typedef unsigned int yy_size_t;",
156 "struct yy_buffer_state",
159 " FILE *yy_input_file;",
161 " istream* yy_input_file;",
164 " char *yy_ch_buf; /* input buffer */",
165 " char *yy_buf_pos; /* current position in input buffer */",
167 " /* Size of input buffer in bytes, not including room for EOB",
170 " yy_size_t yy_buf_size;",
172 " /* Number of characters read into yy_ch_buf, not including EOB",
177 " /* Whether we \"own\" the buffer - i.e., we know we created it,",
178 " * and can realloc() it to grow it, and should free() it to",
181 " int yy_is_our_buffer;",
183 " /* Whether this is an \"interactive\" input source; if so, and",
184 " * if we're using stdio for input, then we want to use getc()",
185 " * instead of fread(), to make sure we stop fetching input after",
188 " int yy_is_interactive;",
190 " /* Whether we're considered to be at the beginning of a line.",
191 " * If so, '^' rules will be active on the next match, otherwise",
196 " /* Whether to try to fill the input buffer when we reach the",
199 " int yy_fill_buffer;",
201 " int yy_buffer_status;",
202 "#define YY_BUFFER_NEW 0",
203 "#define YY_BUFFER_NORMAL 1",
204 " /* When an EOF's been seen but there's still some text to process",
205 " * then we mark the buffer as YY_EOF_PENDING, to indicate that we",
206 " * shouldn't try reading from the input source any more. We might",
207 " * still have a bunch of tokens to match, though, because of",
208 " * possible backing-up.",
210 " * When we actually see the EOF, we change the status to \"new\"",
211 " * (via yyrestart()), so that the user can continue scanning by",
212 " * just pointing yyin at a new input file.",
214 "#define YY_BUFFER_EOF_PENDING 2",
217 "%- Standard (non-C++) definition",
218 "static YY_BUFFER_STATE yy_current_buffer = 0;",
221 "/* We provide macros for accessing buffer states in case in the",
222 " * future we want to put the buffer states in a more general",
223 " * \"scanner state\".",
225 "#define YY_CURRENT_BUFFER yy_current_buffer",
228 "%- Standard (non-C++) definition",
229 "/* yy_hold_char holds the character lost when yytext is formed. */",
230 "static char yy_hold_char;",
232 "static int yy_n_chars; /* number of characters read into yy_ch_buf */",
237 "/* Points to current character in buffer. */",
238 "static char *yy_c_buf_p = (char *) 0;",
239 "static int yy_init = 1; /* whether we need to initialize */",
240 "static int yy_start = 0; /* start state number */",
242 "/* Flag which is used to allow yywrap()'s to do buffer switches",
243 " * instead of setting up a fresh yyin. A bit of a hack ...",
245 "static int yy_did_buffer_switch_on_eof;",
247 "void yyrestart YY_PROTO(( FILE *input_file ));",
249 "void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));",
250 "void yy_load_buffer_state YY_PROTO(( void ));",
251 "YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));",
252 "void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
253 "void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));",
254 "void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
255 "#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )",
257 "YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));",
258 "YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));",
259 "YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));",
262 "static void *yy_flex_alloc YY_PROTO(( yy_size_t ));",
263 "static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));",
264 "static void yy_flex_free YY_PROTO(( void * ));",
266 "#define yy_new_buffer yy_create_buffer",
268 "#define yy_set_interactive(is_interactive) \\",
270 " if ( ! yy_current_buffer ) \\",
271 " yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \\",
272 " yy_current_buffer->yy_is_interactive = is_interactive; \\",
275 "#define yy_set_bol(at_bol) \\",
277 " if ( ! yy_current_buffer ) \\",
278 " yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \\",
279 " yy_current_buffer->yy_at_bol = at_bol; \\",
282 "#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)",
284 "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
286 "%- Standard (non-C++) definition",
287 "static yy_state_type yy_get_previous_state YY_PROTO(( void ));",
288 "static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));",
289 "static int yy_get_next_buffer YY_PROTO(( void ));",
290 "static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));",
293 "/* Done after the current pattern has been matched and before the",
294 " * corresponding action - sets up yytext.",
296 "#define YY_DO_BEFORE_ACTION \\",
297 " yytext_ptr = yy_bp; \\",
298 "%% code to fiddle yytext and yyleng for yymore() goes here",
299 " yy_hold_char = *yy_cp; \\",
300 " *yy_cp = '\\0'; \\",
301 "%% code to copy yytext_ptr to yytext[] goes here, if %array",
302 " yy_c_buf_p = yy_cp;",
304 "%% data tables for the DFA and the user's section 1 definitions go here",
306 "/* Macros after this point can all be overridden by user definitions in",
310 "#ifndef YY_SKIP_YYWRAP",
311 "#ifdef __cplusplus",
312 "extern \"C\" int yywrap YY_PROTO(( void ));",
314 "extern int yywrap YY_PROTO(( void ));",
319 "#ifndef YY_NO_UNPUT",
320 "static void yyunput YY_PROTO(( int c, char *buf_ptr ));",
324 "#ifndef yytext_ptr",
325 "static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));",
328 "#ifdef YY_NEED_STRLEN",
329 "static int yy_flex_strlen YY_PROTO(( yyconst char * ));",
332 "#ifndef YY_NO_INPUT",
333 "%- Standard (non-C++) definition",
334 "#ifdef __cplusplus",
335 "static int yyinput YY_PROTO(( void ));",
337 "static int input YY_PROTO(( void ));",
343 "static int yy_start_stack_ptr = 0;",
344 "static int yy_start_stack_depth = 0;",
345 "static int *yy_start_stack = 0;",
346 "#ifndef YY_NO_PUSH_STATE",
347 "static void yy_push_state YY_PROTO(( int new_state ));",
349 "#ifndef YY_NO_POP_STATE",
350 "static void yy_pop_state YY_PROTO(( void ));",
352 "#ifndef YY_NO_TOP_STATE",
353 "static int yy_top_state YY_PROTO(( void ));",
357 "#define YY_NO_PUSH_STATE 1",
358 "#define YY_NO_POP_STATE 1",
359 "#define YY_NO_TOP_STATE 1",
362 "#ifdef YY_MALLOC_DECL",
366 "#ifndef __cplusplus",
367 "#include <stdlib.h>",
370 "/* Just try to get by without declaring the routines. This will fail",
371 " * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)",
372 " * or sizeof(void*) != sizeof(int).",
377 "/* Amount of stuff to slurp up with each read. */",
378 "#ifndef YY_READ_BUF_SIZE",
379 "#define YY_READ_BUF_SIZE 8192",
382 "/* Copy whatever the last rule matched to the standard output. */",
385 "%- Standard (non-C++) definition",
386 "/* This used to be an fputs(), but since the string might contain NUL's,",
387 " * we now use fwrite().",
389 "#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )",
391 "#define ECHO LexerOutput( yytext, yyleng )",
395 "/* Gets input and stuffs it into \"buf\". number of characters read, or YY_NULL,",
396 " * is returned in \"result\".",
399 "#define YY_INPUT(buf,result,max_size) \\",
400 "%% fread()/read() definition of YY_INPUT goes here unless we're doing C++",
402 " if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \\",
403 " YY_FATAL_ERROR( \"input in flex scanner failed\" );",
407 "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -",
408 " * we don't want an extra ';' after the \"return\" because that will cause",
409 " * some compilers to complain about unreachable statements.",
411 "#ifndef yyterminate",
412 "#define yyterminate() return YY_NULL",
415 "/* Number of entries by which start-condition stack grows. */",
416 "#ifndef YY_START_STACK_INCR",
417 "#define YY_START_STACK_INCR 25",
420 "/* Report a fatal error. */",
421 "#ifndef YY_FATAL_ERROR",
423 "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )",
425 "#define YY_FATAL_ERROR(msg) LexerError( msg )",
429 "/* Default declaration of generated scanner - a define so the user can",
430 " * easily add parameters.",
433 "%- Standard (non-C++) definition",
434 "#define YY_DECL int yylex YY_PROTO(( void ))",
436 "#define YY_DECL int yyFlexLexer::yylex()",
440 "/* Code executed at the beginning of each rule, after yytext and yyleng",
441 " * have been set up.",
443 "#ifndef YY_USER_ACTION",
444 "#define YY_USER_ACTION",
447 "/* Code executed at the end of each rule. */",
449 "#define YY_BREAK break;",
452 "%% YY_RULE_SETUP definition goes here",
456 " register yy_state_type yy_current_state;",
457 " register char *yy_cp, *yy_bp;",
458 " register int yy_act;",
460 "%% user's declarations go here",
466 "#ifdef YY_USER_INIT",
470 " if ( ! yy_start )",
471 " yy_start = 1; /* first start state */",
487 " if ( ! yy_current_buffer )",
488 " yy_current_buffer =",
489 " yy_create_buffer( yyin, YY_BUF_SIZE );",
491 " yy_load_buffer_state();",
494 " while ( 1 ) /* loops until end-of-file is reached */",
496 "%% yymore()-related code goes here",
497 " yy_cp = yy_c_buf_p;",
499 " /* Support of yytext. */",
500 " *yy_cp = yy_hold_char;",
502 " /* yy_bp points to the position in yy_ch_buf of the start of",
503 " * the current run.",
507 "%% code to set up and find next match goes here",
510 "%% code to find the action number goes here",
512 " YY_DO_BEFORE_ACTION;",
514 "%% code for yylineno update goes here",
516 "do_action: /* This label is used only to access EOF actions. */",
518 "%% debug code goes here",
520 " switch ( yy_act )",
521 " { /* beginning of action switch */",
522 "%% actions go here",
524 " case YY_END_OF_BUFFER:",
526 " /* Amount of text matched not including the EOB char. */",
527 " int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;",
529 " /* Undo the effects of YY_DO_BEFORE_ACTION. */",
530 " *yy_cp = yy_hold_char;",
531 " YY_RESTORE_YY_MORE_OFFSET",
533 " if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )",
535 " /* We're scanning a new file or input source. It's",
536 " * possible that this happened because the user",
537 " * just pointed yyin at a new source and called",
538 " * yylex(). If so, then we have to assure",
539 " * consistency between yy_current_buffer and our",
540 " * globals. Here is the right place to do so, because",
541 " * this is the first action (other than possibly a",
542 " * back-up) that will match for the new input source.",
544 " yy_n_chars = yy_current_buffer->yy_n_chars;",
545 " yy_current_buffer->yy_input_file = yyin;",
546 " yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;",
549 " /* Note that here we test for yy_c_buf_p \"<=\" to the position",
550 " * of the first EOB in the buffer, since yy_c_buf_p will",
551 " * already have been incremented past the NUL character",
552 " * (since all states make transitions on EOB to the",
553 " * end-of-buffer state). Contrast this with the test",
556 " if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
557 " { /* This was really a NUL. */",
558 " yy_state_type yy_next_state;",
560 " yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;",
562 " yy_current_state = yy_get_previous_state();",
564 " /* Okay, we're now positioned to make the NUL",
565 " * transition. We couldn't have",
566 " * yy_get_previous_state() go ahead and do it",
567 " * for us because it doesn't know how to deal",
568 " * with the possibility of jamming (and we don't",
569 " * want to build jamming into it because then it",
570 " * will run more slowly).",
573 " yy_next_state = yy_try_NUL_trans( yy_current_state );",
575 " yy_bp = yytext_ptr + YY_MORE_ADJ;",
577 " if ( yy_next_state )",
579 " /* Consume the NUL. */",
580 " yy_cp = ++yy_c_buf_p;",
581 " yy_current_state = yy_next_state;",
587 "%% code to do back-up for compressed tables and set up yy_cp goes here",
588 " goto yy_find_action;",
592 " else switch ( yy_get_next_buffer() )",
594 " case EOB_ACT_END_OF_FILE:",
596 " yy_did_buffer_switch_on_eof = 0;",
600 " /* Note: because we've taken care in",
601 " * yy_get_next_buffer() to have set up",
602 " * yytext, we can now set up",
603 " * yy_c_buf_p so that if some total",
604 " * hoser (like flex itself) wants to",
605 " * call the scanner after we return the",
606 " * YY_NULL, it'll still work - another",
607 " * YY_NULL will get returned.",
609 " yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
611 " yy_act = YY_STATE_EOF(YY_START);",
617 " if ( ! yy_did_buffer_switch_on_eof )",
623 " case EOB_ACT_CONTINUE_SCAN:",
625 " yytext_ptr + yy_amount_of_matched_text;",
627 " yy_current_state = yy_get_previous_state();",
629 " yy_cp = yy_c_buf_p;",
630 " yy_bp = yytext_ptr + YY_MORE_ADJ;",
633 " case EOB_ACT_LAST_MATCH:",
635 " &yy_current_buffer->yy_ch_buf[yy_n_chars];",
637 " yy_current_state = yy_get_previous_state();",
639 " yy_cp = yy_c_buf_p;",
640 " yy_bp = yytext_ptr + YY_MORE_ADJ;",
641 " goto yy_find_action;",
648 " \"fatal flex scanner internal error--no action found\" );",
649 " } /* end of action switch */",
650 " } /* end of scanning one token */",
651 " } /* end of yylex */",
654 "yyFlexLexer::yyFlexLexer( istream* arg_yyin, ostream* arg_yyout )",
657 " yyout = arg_yyout;",
661 " yy_flex_debug = 0;",
662 " yylineno = 1; // this will only get updated if %option yylineno",
664 " yy_did_buffer_switch_on_eof = 0;",
666 " yy_looking_for_trail_begin = 0;",
667 " yy_more_flag = 0;",
669 " yy_more_offset = yy_prev_more_offset = 0;",
671 " yy_start_stack_ptr = yy_start_stack_depth = 0;",
672 " yy_start_stack = 0;",
674 " yy_current_buffer = 0;",
676 "#ifdef YY_USES_REJECT",
677 " yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];",
679 " yy_state_buf = 0;",
683 "yyFlexLexer::~yyFlexLexer()",
685 " delete yy_state_buf;",
686 " yy_delete_buffer( yy_current_buffer );",
689 "void yyFlexLexer::switch_streams( istream* new_in, ostream* new_out )",
693 " yy_delete_buffer( yy_current_buffer );",
694 " yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );",
701 "#ifdef YY_INTERACTIVE",
702 "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )",
704 "int yyFlexLexer::LexerInput( char* buf, int max_size )",
707 " if ( yyin->eof() || yyin->fail() )",
710 "#ifdef YY_INTERACTIVE",
711 " yyin->get( buf[0] );",
713 " if ( yyin->eof() )",
716 " if ( yyin->bad() )",
722 " (void) yyin->read( buf, max_size );",
724 " if ( yyin->bad() )",
727 " return yyin->gcount();",
731 "void yyFlexLexer::LexerOutput( const char* buf, int size )",
733 " (void) yyout->write( buf, size );",
737 "/* yy_get_next_buffer - try to read in a new buffer",
739 " * Returns a code representing an action:",
740 " * EOB_ACT_LAST_MATCH -",
741 " * EOB_ACT_CONTINUE_SCAN - continue scanning from current position",
742 " * EOB_ACT_END_OF_FILE - end of file",
746 "static int yy_get_next_buffer()",
748 "int yyFlexLexer::yy_get_next_buffer()",
751 " register char *dest = yy_current_buffer->yy_ch_buf;",
752 " register char *source = yytext_ptr;",
753 " register int number_to_move, i;",
756 " if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )",
758 " \"fatal flex scanner internal error--end of buffer missed\" );",
760 " if ( yy_current_buffer->yy_fill_buffer == 0 )",
761 " { /* Don't try to fill the buffer, so this is an EOF. */",
762 " if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )",
764 " /* We matched a single character, the EOB, so",
765 " * treat this as a final EOF.",
767 " return EOB_ACT_END_OF_FILE;",
772 " /* We matched some text prior to the EOB, first",
775 " return EOB_ACT_LAST_MATCH;",
779 " /* Try to read more data. */",
781 " /* First move last chars to start of buffer. */",
782 " number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;",
784 " for ( i = 0; i < number_to_move; ++i )",
785 " *(dest++) = *(source++);",
787 " if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )",
788 " /* don't do the read, it's not guaranteed to return an EOF,",
789 " * just force an EOF",
791 " yy_current_buffer->yy_n_chars = yy_n_chars = 0;",
795 " int num_to_read =",
796 " yy_current_buffer->yy_buf_size - number_to_move - 1;",
798 " while ( num_to_read <= 0 )",
799 " { /* Not enough room in the buffer - grow it. */",
800 "#ifdef YY_USES_REJECT",
802 "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );",
805 " /* just a shorter name for the current buffer */",
806 " YY_BUFFER_STATE b = yy_current_buffer;",
808 " int yy_c_buf_p_offset =",
809 " (int) (yy_c_buf_p - b->yy_ch_buf);",
811 " if ( b->yy_is_our_buffer )",
813 " int new_size = b->yy_buf_size * 2;",
815 " if ( new_size <= 0 )",
816 " b->yy_buf_size += b->yy_buf_size / 8;",
818 " b->yy_buf_size *= 2;",
820 " b->yy_ch_buf = (char *)",
821 " /* Include room in for 2 EOB chars. */",
822 " yy_flex_realloc( (void *) b->yy_ch_buf,",
823 " b->yy_buf_size + 2 );",
826 " /* Can't grow it, we don't own it. */",
827 " b->yy_ch_buf = 0;",
829 " if ( ! b->yy_ch_buf )",
831 " \"fatal error - scanner input buffer overflow\" );",
833 " yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];",
835 " num_to_read = yy_current_buffer->yy_buf_size -",
836 " number_to_move - 1;",
840 " if ( num_to_read > YY_READ_BUF_SIZE )",
841 " num_to_read = YY_READ_BUF_SIZE;",
843 " /* Read in more data. */",
844 " YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),",
845 " yy_n_chars, num_to_read );",
847 " yy_current_buffer->yy_n_chars = yy_n_chars;",
850 " if ( yy_n_chars == 0 )",
852 " if ( number_to_move == YY_MORE_ADJ )",
854 " ret_val = EOB_ACT_END_OF_FILE;",
855 " yyrestart( yyin );",
860 " ret_val = EOB_ACT_LAST_MATCH;",
861 " yy_current_buffer->yy_buffer_status =",
862 " YY_BUFFER_EOF_PENDING;",
867 " ret_val = EOB_ACT_CONTINUE_SCAN;",
869 " yy_n_chars += number_to_move;",
870 " yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;",
871 " yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;",
873 " yytext_ptr = &yy_current_buffer->yy_ch_buf[0];",
879 "/* yy_get_previous_state - get the state just before the EOB char was reached */",
882 "static yy_state_type yy_get_previous_state()",
884 "yy_state_type yyFlexLexer::yy_get_previous_state()",
887 " register yy_state_type yy_current_state;",
888 " register char *yy_cp;",
890 "%% code to get the start state into yy_current_state goes here",
892 " for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )",
894 "%% code to find the next state goes here",
897 " return yy_current_state;",
901 "/* yy_try_NUL_trans - try to make a transition on the NUL character",
904 " * next_state = yy_try_NUL_trans( current_state );",
908 "#ifdef YY_USE_PROTOS",
909 "static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )",
911 "static yy_state_type yy_try_NUL_trans( yy_current_state )",
912 "yy_state_type yy_current_state;",
915 "yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )",
918 " register int yy_is_jam;",
919 "%% code to find the next state, and perhaps do backing up, goes here",
921 " return yy_is_jam ? 0 : yy_current_state;",
926 "#ifndef YY_NO_UNPUT",
927 "#ifdef YY_USE_PROTOS",
928 "static void yyunput( int c, register char *yy_bp )",
930 "static void yyunput( c, yy_bp )",
932 "register char *yy_bp;",
935 "void yyFlexLexer::yyunput( int c, register char* yy_bp )",
938 " register char *yy_cp = yy_c_buf_p;",
940 " /* undo effects of setting up yytext */",
941 " *yy_cp = yy_hold_char;",
943 " if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
944 " { /* need to shift things up to make room */",
945 " /* +2 for EOB chars. */",
946 " register int number_to_move = yy_n_chars + 2;",
947 " register char *dest = &yy_current_buffer->yy_ch_buf[",
948 " yy_current_buffer->yy_buf_size + 2];",
949 " register char *source =",
950 " &yy_current_buffer->yy_ch_buf[number_to_move];",
952 " while ( source > yy_current_buffer->yy_ch_buf )",
953 " *--dest = *--source;",
955 " yy_cp += (int) (dest - source);",
956 " yy_bp += (int) (dest - source);",
957 " yy_current_buffer->yy_n_chars =",
958 " yy_n_chars = yy_current_buffer->yy_buf_size;",
960 " if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
961 " YY_FATAL_ERROR( \"flex scanner push-back overflow\" );",
964 " *--yy_cp = (char) c;",
966 "%% update yylineno here",
968 " yytext_ptr = yy_bp;",
969 " yy_hold_char = *yy_cp;",
970 " yy_c_buf_p = yy_cp;",
973 "#endif /* ifndef YY_NO_UNPUT */",
978 "#ifdef __cplusplus",
979 "static int yyinput()",
981 "static int input()",
984 "int yyFlexLexer::yyinput()",
989 " *yy_c_buf_p = yy_hold_char;",
991 " if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )",
993 " /* yy_c_buf_p now points to the character we want to return.",
994 " * If this occurs *before* the EOB characters, then it's a",
995 " * valid NUL; if not, then we've hit the end of the buffer.",
997 " if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
998 " /* This was really a NUL. */",
999 " *yy_c_buf_p = '\\0';",
1002 " { /* need more input */",
1003 " int offset = yy_c_buf_p - yytext_ptr;",
1006 " switch ( yy_get_next_buffer() )",
1008 " case EOB_ACT_LAST_MATCH:",
1009 " /* This happens because yy_g_n_b()",
1010 " * sees that we've accumulated a",
1011 " * token and flags that we need to",
1012 " * try matching the token before",
1013 " * proceeding. But for input(),",
1014 " * there's no matching to consider.",
1015 " * So convert the EOB_ACT_LAST_MATCH",
1016 " * to EOB_ACT_END_OF_FILE.",
1019 " /* Reset buffer status. */",
1020 " yyrestart( yyin );",
1022 " /* fall through */",
1024 " case EOB_ACT_END_OF_FILE:",
1029 " if ( ! yy_did_buffer_switch_on_eof )",
1031 "#ifdef __cplusplus",
1032 " return yyinput();",
1038 " case EOB_ACT_CONTINUE_SCAN:",
1039 " yy_c_buf_p = yytext_ptr + offset;",
1045 " c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */",
1046 " *yy_c_buf_p = '\\0'; /* preserve yytext */",
1047 " yy_hold_char = *++yy_c_buf_p;",
1049 "%% update BOL and yylineno",
1056 "#ifdef YY_USE_PROTOS",
1057 "void yyrestart( FILE *input_file )",
1059 "void yyrestart( input_file )",
1060 "FILE *input_file;",
1063 "void yyFlexLexer::yyrestart( istream* input_file )",
1066 " if ( ! yy_current_buffer )",
1067 " yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );",
1069 " yy_init_buffer( yy_current_buffer, input_file );",
1070 " yy_load_buffer_state();",
1075 "#ifdef YY_USE_PROTOS",
1076 "void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
1078 "void yy_switch_to_buffer( new_buffer )",
1079 "YY_BUFFER_STATE new_buffer;",
1082 "void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
1085 " if ( yy_current_buffer == new_buffer )",
1088 " if ( yy_current_buffer )",
1090 " /* Flush out information for old buffer. */",
1091 " *yy_c_buf_p = yy_hold_char;",
1092 " yy_current_buffer->yy_buf_pos = yy_c_buf_p;",
1093 " yy_current_buffer->yy_n_chars = yy_n_chars;",
1096 " yy_current_buffer = new_buffer;",
1097 " yy_load_buffer_state();",
1099 " /* We don't actually know whether we did this switch during",
1100 " * EOF (yywrap()) processing, but the only time this flag",
1101 " * is looked at is after yywrap() is called, so it's safe",
1102 " * to go ahead and always set it.",
1104 " yy_did_buffer_switch_on_eof = 1;",
1109 "#ifdef YY_USE_PROTOS",
1110 "void yy_load_buffer_state( void )",
1112 "void yy_load_buffer_state()",
1115 "void yyFlexLexer::yy_load_buffer_state()",
1118 " yy_n_chars = yy_current_buffer->yy_n_chars;",
1119 " yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;",
1120 " yyin = yy_current_buffer->yy_input_file;",
1121 " yy_hold_char = *yy_c_buf_p;",
1126 "#ifdef YY_USE_PROTOS",
1127 "YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )",
1129 "YY_BUFFER_STATE yy_create_buffer( file, size )",
1134 "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )",
1137 " YY_BUFFER_STATE b;",
1139 " b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
1141 " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
1143 " b->yy_buf_size = size;",
1145 " /* yy_ch_buf has to be 2 characters longer than the size given because",
1146 " * we need to put in 2 end-of-buffer characters.",
1148 " b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );",
1149 " if ( ! b->yy_ch_buf )",
1150 " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
1152 " b->yy_is_our_buffer = 1;",
1154 " yy_init_buffer( b, file );",
1161 "#ifdef YY_USE_PROTOS",
1162 "void yy_delete_buffer( YY_BUFFER_STATE b )",
1164 "void yy_delete_buffer( b )",
1165 "YY_BUFFER_STATE b;",
1168 "void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )",
1174 " if ( b == yy_current_buffer )",
1175 " yy_current_buffer = (YY_BUFFER_STATE) 0;",
1177 " if ( b->yy_is_our_buffer )",
1178 " yy_flex_free( (void *) b->yy_ch_buf );",
1180 " yy_flex_free( (void *) b );",
1185 "#ifndef YY_ALWAYS_INTERACTIVE",
1186 "#ifndef YY_NEVER_INTERACTIVE",
1187 "extern int isatty YY_PROTO(( int ));",
1191 "#ifdef YY_USE_PROTOS",
1192 "void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )",
1194 "void yy_init_buffer( b, file )",
1195 "YY_BUFFER_STATE b;",
1200 "extern \"C\" int isatty YY_PROTO(( int ));",
1201 "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )",
1205 " yy_flush_buffer( b );",
1207 " b->yy_input_file = file;",
1208 " b->yy_fill_buffer = 1;",
1211 "#if YY_ALWAYS_INTERACTIVE",
1212 " b->yy_is_interactive = 1;",
1214 "#if YY_NEVER_INTERACTIVE",
1215 " b->yy_is_interactive = 0;",
1217 " b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;",
1221 " b->yy_is_interactive = 0;",
1227 "#ifdef YY_USE_PROTOS",
1228 "void yy_flush_buffer( YY_BUFFER_STATE b )",
1230 "void yy_flush_buffer( b )",
1231 "YY_BUFFER_STATE b;",
1235 "void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )",
1241 " b->yy_n_chars = 0;",
1243 " /* We always need two end-of-buffer characters. The first causes",
1244 " * a transition to the end-of-buffer state. The second causes",
1245 " * a jam in that state.",
1247 " b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;",
1248 " b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;",
1250 " b->yy_buf_pos = &b->yy_ch_buf[0];",
1252 " b->yy_at_bol = 1;",
1253 " b->yy_buffer_status = YY_BUFFER_NEW;",
1255 " if ( b == yy_current_buffer )",
1256 " yy_load_buffer_state();",
1261 "#ifndef YY_NO_SCAN_BUFFER",
1263 "#ifdef YY_USE_PROTOS",
1264 "YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )",
1266 "YY_BUFFER_STATE yy_scan_buffer( base, size )",
1271 " YY_BUFFER_STATE b;",
1273 " if ( size < 2 ||",
1274 " base[size-2] != YY_END_OF_BUFFER_CHAR ||",
1275 " base[size-1] != YY_END_OF_BUFFER_CHAR )",
1276 " /* They forgot to leave room for the EOB's. */",
1279 " b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
1281 " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_buffer()\" );",
1283 " b->yy_buf_size = size - 2; /* \"- 2\" to take care of EOB's */",
1284 " b->yy_buf_pos = b->yy_ch_buf = base;",
1285 " b->yy_is_our_buffer = 0;",
1286 " b->yy_input_file = 0;",
1287 " b->yy_n_chars = b->yy_buf_size;",
1288 " b->yy_is_interactive = 0;",
1289 " b->yy_at_bol = 1;",
1290 " b->yy_fill_buffer = 0;",
1291 " b->yy_buffer_status = YY_BUFFER_NEW;",
1293 " yy_switch_to_buffer( b );",
1301 "#ifndef YY_NO_SCAN_STRING",
1303 "#ifdef YY_USE_PROTOS",
1304 "YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )",
1306 "YY_BUFFER_STATE yy_scan_string( yy_str )",
1307 "yyconst char *yy_str;",
1311 " for ( len = 0; yy_str[len]; ++len )",
1314 " return yy_scan_bytes( yy_str, len );",
1320 "#ifndef YY_NO_SCAN_BYTES",
1322 "#ifdef YY_USE_PROTOS",
1323 "YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )",
1325 "YY_BUFFER_STATE yy_scan_bytes( bytes, len )",
1326 "yyconst char *bytes;",
1330 " YY_BUFFER_STATE b;",
1335 " /* Get memory for full buffer, including space for trailing EOB's. */",
1337 " buf = (char *) yy_flex_alloc( n );",
1339 " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_bytes()\" );",
1341 " for ( i = 0; i < len; ++i )",
1342 " buf[i] = bytes[i];",
1344 " buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;",
1346 " b = yy_scan_buffer( buf, n );",
1348 " YY_FATAL_ERROR( \"bad buffer in yy_scan_bytes()\" );",
1350 " /* It's okay to grow etc. this buffer, and we should throw it",
1351 " * away when we're done.",
1353 " b->yy_is_our_buffer = 1;",
1361 "#ifndef YY_NO_PUSH_STATE",
1363 "#ifdef YY_USE_PROTOS",
1364 "static void yy_push_state( int new_state )",
1366 "static void yy_push_state( new_state )",
1370 "void yyFlexLexer::yy_push_state( int new_state )",
1373 " if ( yy_start_stack_ptr >= yy_start_stack_depth )",
1375 " yy_size_t new_size;",
1377 " yy_start_stack_depth += YY_START_STACK_INCR;",
1378 " new_size = yy_start_stack_depth * sizeof( int );",
1380 " if ( ! yy_start_stack )",
1381 " yy_start_stack = (int *) yy_flex_alloc( new_size );",
1384 " yy_start_stack = (int *) yy_flex_realloc(",
1385 " (void *) yy_start_stack, new_size );",
1387 " if ( ! yy_start_stack )",
1389 " \"out of memory expanding start-condition stack\" );",
1392 " yy_start_stack[yy_start_stack_ptr++] = YY_START;",
1394 " BEGIN(new_state);",
1399 "#ifndef YY_NO_POP_STATE",
1401 "static void yy_pop_state()",
1403 "void yyFlexLexer::yy_pop_state()",
1406 " if ( --yy_start_stack_ptr < 0 )",
1407 " YY_FATAL_ERROR( \"start-condition stack underflow\" );",
1409 " BEGIN(yy_start_stack[yy_start_stack_ptr]);",
1414 "#ifndef YY_NO_TOP_STATE",
1416 "static int yy_top_state()",
1418 "int yyFlexLexer::yy_top_state()",
1421 " return yy_start_stack[yy_start_stack_ptr - 1];",
1425 "#ifndef YY_EXIT_FAILURE",
1426 "#define YY_EXIT_FAILURE 2",
1430 "#ifdef YY_USE_PROTOS",
1431 "static void yy_fatal_error( yyconst char msg[] )",
1433 "static void yy_fatal_error( msg )",
1437 " (void) fprintf( stderr, \"%s\\n\", msg );",
1438 " exit( YY_EXIT_FAILURE );",
1443 "void yyFlexLexer::LexerError( yyconst char msg[] )",
1445 " cerr << msg << '\\n';",
1446 " exit( YY_EXIT_FAILURE );",
1451 "/* Redefine yyless() so it works in section 3 code. */",
1454 "#define yyless(n) \\",
1457 " /* Undo effects of setting up yytext. */ \\",
1458 " yytext[yyleng] = yy_hold_char; \\",
1459 " yy_c_buf_p = yytext + n; \\",
1460 " yy_hold_char = *yy_c_buf_p; \\",
1461 " *yy_c_buf_p = '\\0'; \\",
1467 "/* Internal utility routines. */",
1469 "#ifndef yytext_ptr",
1470 "#ifdef YY_USE_PROTOS",
1471 "static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )",
1473 "static void yy_flex_strncpy( s1, s2, n )",
1475 "yyconst char *s2;",
1480 " for ( i = 0; i < n; ++i )",
1485 "#ifdef YY_NEED_STRLEN",
1486 "#ifdef YY_USE_PROTOS",
1487 "static int yy_flex_strlen( yyconst char *s )",
1489 "static int yy_flex_strlen( s )",
1494 " for ( n = 0; s[n]; ++n )",
1502 "#ifdef YY_USE_PROTOS",
1503 "static void *yy_flex_alloc( yy_size_t size )",
1505 "static void *yy_flex_alloc( size )",
1509 " return (void *) malloc( size );",
1512 "#ifdef YY_USE_PROTOS",
1513 "static void *yy_flex_realloc( void *ptr, yy_size_t size )",
1515 "static void *yy_flex_realloc( ptr, size )",
1520 " /* The cast to (char *) in the following accommodates both",
1521 " * implementations that use char* generic pointers, and those",
1522 " * that use void* generic pointers. It works with the latter",
1523 " * because both ANSI C and C++ allow castless assignment from",
1524 " * any pointer type to void*, and deal with argument conversions",
1525 " * as though doing an assignment.",
1527 " return (void *) realloc( (char *) ptr, size );",
1530 "#ifdef YY_USE_PROTOS",
1531 "static void yy_flex_free( void *ptr )",
1533 "static void yy_flex_free( ptr )",