1 /* A lexical scanner generated by flex */
\r
3 /* Scanner skeleton version:
\r
8 #define YY_FLEX_MAJOR_VERSION 2
\r
9 #define YY_FLEX_MINOR_VERSION 5
\r
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
\r
27 /* Use prototypes in function declarations. */
\r
28 #define YY_USE_PROTOS
\r
30 /* The "const" storage-class-modifier is valid. */
\r
31 #define YY_USE_CONST
\r
33 #else /* ! __cplusplus */
\r
37 #define YY_USE_PROTOS
\r
38 #define YY_USE_CONST
\r
40 #endif /* __STDC__ */
\r
41 #endif /* ! __cplusplus */
\r
48 #define YY_USE_CONST
\r
49 #define YY_USE_PROTOS
\r
53 #define yyconst const
\r
59 #ifdef YY_USE_PROTOS
\r
60 #define YY_PROTO(proto) proto
\r
62 #define YY_PROTO(proto) ()
\r
65 /* Returned upon end-of-file. */
\r
68 /* Promotes a possibly negative, possibly signed char to an unsigned
\r
69 * integer for use as an array index. If the signed char is negative,
\r
70 * we want to instead treat it as an 8-bit unsigned char, hence the
\r
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
\r
75 /* Enter a start condition. This macro really ought to take a parameter,
\r
76 * but we do it the disgusting crufty way forced on us by the ()-less
\r
77 * definition of BEGIN.
\r
79 #define BEGIN yy_start = 1 + 2 *
\r
81 /* Translate the current start state into a value that can be later handed
\r
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
\r
85 #define YY_START ((yy_start - 1) / 2)
\r
86 #define YYSTATE YY_START
\r
88 /* Action number for EOF rule of a given start state. */
\r
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
\r
91 /* Special action meaning "start processing a new file". */
\r
92 #define YY_NEW_FILE yyrestart( yyin )
\r
94 #define YY_END_OF_BUFFER_CHAR 0
\r
96 /* Size of default input buffer. */
\r
97 #define YY_BUF_SIZE 16384
\r
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
\r
102 extern FILE *yyin, *yyout;
\r
104 #define EOB_ACT_CONTINUE_SCAN 0
\r
105 #define EOB_ACT_END_OF_FILE 1
\r
106 #define EOB_ACT_LAST_MATCH 2
\r
108 /* The funky do-while in the following #define is used to turn the definition
\r
109 * int a single C statement (which needs a semi-colon terminator). This
\r
110 * avoids problems with code like:
\r
112 * if ( condition_holds )
\r
115 * do_something_else();
\r
117 * Prior to using the do-while the compiler would get upset at the
\r
118 * "else" because it interpreted the "if" statement as being all
\r
119 * done when it reached the ';' after the yyless() call.
\r
122 /* Return all but the first 'n' matched characters back to the input stream. */
\r
124 #define yyless(n) \
\r
127 /* Undo effects of setting up yytext. */ \
\r
128 *yy_cp = yy_hold_char; \
\r
129 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
\r
130 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
\r
134 #define unput(c) yyunput( c, yytext_ptr )
\r
136 /* The following is because we cannot portably get our hands on size_t
\r
137 * (without autoconf's help, which isn't available because we want
\r
138 * flex-generated scanners to compile on their own).
\r
140 typedef unsigned int yy_size_t;
\r
143 struct yy_buffer_state
\r
145 FILE *yy_input_file;
\r
147 char *yy_ch_buf; /* input buffer */
\r
148 char *yy_buf_pos; /* current position in input buffer */
\r
150 /* Size of input buffer in bytes, not including room for EOB
\r
153 yy_size_t yy_buf_size;
\r
155 /* Number of characters read into yy_ch_buf, not including EOB
\r
160 /* Whether we "own" the buffer - i.e., we know we created it,
\r
161 * and can realloc() it to grow it, and should free() it to
\r
164 int yy_is_our_buffer;
\r
166 /* Whether this is an "interactive" input source; if so, and
\r
167 * if we're using stdio for input, then we want to use getc()
\r
168 * instead of fread(), to make sure we stop fetching input after
\r
171 int yy_is_interactive;
\r
173 /* Whether we're considered to be at the beginning of a line.
\r
174 * If so, '^' rules will be active on the next match, otherwise
\r
179 /* Whether to try to fill the input buffer when we reach the
\r
182 int yy_fill_buffer;
\r
184 int yy_buffer_status;
\r
185 #define YY_BUFFER_NEW 0
\r
186 #define YY_BUFFER_NORMAL 1
\r
187 /* When an EOF's been seen but there's still some text to process
\r
188 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
\r
189 * shouldn't try reading from the input source any more. We might
\r
190 * still have a bunch of tokens to match, though, because of
\r
191 * possible backing-up.
\r
193 * When we actually see the EOF, we change the status to "new"
\r
194 * (via yyrestart()), so that the user can continue scanning by
\r
195 * just pointing yyin at a new input file.
\r
197 #define YY_BUFFER_EOF_PENDING 2
\r
200 static YY_BUFFER_STATE yy_current_buffer = 0;
\r
202 /* We provide macros for accessing buffer states in case in the
\r
203 * future we want to put the buffer states in a more general
\r
206 #define YY_CURRENT_BUFFER yy_current_buffer
\r
209 /* yy_hold_char holds the character lost when yytext is formed. */
\r
210 static char yy_hold_char;
\r
212 static int yy_n_chars; /* number of characters read into yy_ch_buf */
\r
217 /* Points to current character in buffer. */
\r
218 static char *yy_c_buf_p = NULL;
\r
219 static int yy_init = 1; /* whether we need to initialize */
\r
220 static int yy_start = 0; /* start state number */
\r
222 /* Flag which is used to allow yywrap()'s to do buffer switches
\r
223 * instead of setting up a fresh yyin. A bit of a hack ...
\r
225 static int yy_did_buffer_switch_on_eof;
\r
227 void yyrestart YY_PROTO(( FILE *input_file ));
\r
229 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
\r
230 void yy_load_buffer_state YY_PROTO(( void ));
\r
231 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
\r
232 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
\r
233 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
\r
234 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
\r
235 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
\r
237 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
\r
238 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
\r
239 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
\r
241 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
\r
242 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
\r
243 static void yy_flex_free YY_PROTO(( void * ));
\r
245 #define yy_new_buffer yy_create_buffer
\r
247 #define yy_set_interactive(is_interactive) \
\r
249 if ( ! yy_current_buffer ) \
\r
250 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
\r
251 yy_current_buffer->yy_is_interactive = is_interactive; \
\r
254 #define yy_set_bol(at_bol) \
\r
256 if ( ! yy_current_buffer ) \
\r
257 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
\r
258 yy_current_buffer->yy_at_bol = at_bol; \
\r
261 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
\r
264 #define YY_USES_REJECT
\r
265 typedef unsigned char YY_CHAR;
\r
266 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
\r
267 typedef int yy_state_type;
\r
268 #define YY_FLEX_LEX_COMPAT
\r
269 extern int yylineno;
\r
271 extern char yytext[];
\r
274 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
\r
275 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
\r
276 static int yy_get_next_buffer YY_PROTO(( void ));
\r
277 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
\r
279 /* Done after the current pattern has been matched and before the
\r
280 * corresponding action - sets up yytext.
\r
282 #define YY_DO_BEFORE_ACTION \
\r
283 yytext_ptr = yy_bp; \
\r
284 yytext_ptr -= yy_more_len; \
\r
285 yyleng = (int) (yy_cp - yytext_ptr); \
\r
286 yy_hold_char = *yy_cp; \
\r
288 if ( yyleng >= YYLMAX ) \
\r
289 YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \
\r
290 yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \
\r
291 yy_c_buf_p = yy_cp;
\r
293 #define YY_NUM_RULES 11
\r
294 #define YY_END_OF_BUFFER 12
\r
295 static yyconst short int yy_acclist[47] =
\r
297 8, 8, 12, 10, 11, 6, 10, 11, 6, 11,
\r
298 10, 11, 10, 11, 8, 10, 11, 8, 10, 11,
\r
299 7, 9, 8, 4, 8, 8, 8, 2, 8, 5,
\r
300 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
\r
304 static yyconst short int yy_accept[36] =
\r
306 1, 2, 3, 4, 6, 9, 11, 13, 15, 18,
\r
307 21, 21, 22, 22, 23, 24, 26, 27, 28, 30,
\r
308 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
\r
312 static yyconst int yy_ec[256] =
\r
314 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
\r
315 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
\r
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
317 1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
\r
318 1, 1, 1, 1, 1, 1, 1, 6, 6, 6,
\r
319 6, 6, 6, 6, 6, 6, 6, 1, 1, 1,
\r
320 1, 1, 1, 1, 6, 6, 6, 6, 6, 6,
\r
321 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
\r
322 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
\r
323 1, 1, 1, 1, 7, 1, 8, 9, 10, 11,
\r
325 12, 6, 6, 6, 6, 6, 6, 13, 6, 14,
\r
326 15, 6, 6, 16, 6, 17, 6, 6, 6, 6,
\r
327 6, 6, 1, 1, 1, 1, 1, 1, 1, 1,
\r
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
344 static yyconst int yy_meta[18] =
\r
346 1, 1, 1, 1, 1, 2, 2, 2, 2, 2,
\r
347 2, 2, 2, 2, 2, 2, 2
\r
350 static yyconst short int yy_base[39] =
\r
352 0, 12, 46, 47, 47, 47, 41, 41, 0, 15,
\r
353 39, 47, 39, 47, 0, 0, 30, 24, 0, 0,
\r
354 24, 14, 21, 1, 12, 18, 12, 13, 9, 7,
\r
355 0, 7, 0, 47, 32, 34, 36, 4
\r
358 static yyconst short int yy_def[39] =
\r
360 35, 35, 34, 34, 34, 34, 36, 37, 38, 38,
\r
361 36, 34, 37, 34, 38, 38, 38, 38, 38, 38,
\r
362 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
\r
363 38, 38, 38, 0, 34, 34, 34, 34
\r
366 static yyconst short int yy_nxt[65] =
\r
368 4, 5, 6, 7, 8, 15, 34, 34, 34, 34,
\r
369 25, 10, 4, 5, 6, 7, 8, 26, 33, 32,
\r
370 31, 30, 29, 10, 16, 28, 27, 24, 17, 23,
\r
371 18, 19, 9, 9, 11, 11, 13, 13, 22, 21,
\r
372 20, 14, 12, 14, 12, 34, 3, 34, 34, 34,
\r
373 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
\r
377 static yyconst short int yy_chk[65] =
\r
379 1, 1, 1, 1, 1, 38, 0, 0, 0, 0,
\r
380 24, 1, 2, 2, 2, 2, 2, 24, 32, 30,
\r
381 29, 28, 27, 2, 10, 26, 25, 23, 10, 22,
\r
382 10, 10, 35, 35, 36, 36, 37, 37, 21, 18,
\r
383 17, 13, 11, 8, 7, 3, 34, 34, 34, 34,
\r
384 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
\r
388 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
\r
389 static char *yy_full_match;
\r
391 static int yy_more_flag = 0;
\r
392 static int yy_more_len = 0;
\r
393 #define yymore() (yy_more_flag = 1)
\r
394 #define YY_MORE_ADJ yy_more_len
\r
396 #define YYLMAX 8192
\r
399 char yytext[YYLMAX];
\r
401 #line 1 "et_lex.lex.l"
\r
404 /* Macros after this point can all be overridden by user definitions in
\r
408 #ifndef YY_SKIP_YYWRAP
\r
410 extern "C" int yywrap YY_PROTO(( void ));
\r
412 extern int yywrap YY_PROTO(( void ));
\r
416 #ifndef YY_NO_UNPUT
\r
417 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
\r
421 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
\r
424 #ifndef YY_NO_INPUT
\r
426 static int yyinput YY_PROTO(( void ));
\r
428 static int input YY_PROTO(( void ));
\r
433 static int yy_start_stack_ptr = 0;
\r
434 static int yy_start_stack_depth = 0;
\r
435 static int *yy_start_stack = 0;
\r
436 #ifndef YY_NO_PUSH_STATE
\r
437 static void yy_push_state YY_PROTO(( int new_state ));
\r
439 #ifndef YY_NO_POP_STATE
\r
440 static void yy_pop_state YY_PROTO(( void ));
\r
442 #ifndef YY_NO_TOP_STATE
\r
443 static int yy_top_state YY_PROTO(( void ));
\r
447 #define YY_NO_PUSH_STATE 1
\r
448 #define YY_NO_POP_STATE 1
\r
449 #define YY_NO_TOP_STATE 1
\r
452 #ifdef YY_MALLOC_DECL
\r
456 #ifndef __cplusplus
\r
457 #include <stdlib.h>
\r
460 /* Just try to get by without declaring the routines. This will fail
\r
461 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
\r
462 * or sizeof(void*) != sizeof(int).
\r
467 /* Amount of stuff to slurp up with each read. */
\r
468 #ifndef YY_READ_BUF_SIZE
\r
469 #define YY_READ_BUF_SIZE 8192
\r
472 /* Copy whatever the last rule matched to the standard output. */
\r
475 /* This used to be an fputs(), but since the string might contain NUL's,
\r
476 * we now use fwrite().
\r
478 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
\r
481 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
\r
482 * is returned in "result".
\r
485 #define YY_INPUT(buf,result,max_size) \
\r
486 if ( yy_current_buffer->yy_is_interactive ) \
\r
489 for ( n = 0; n < max_size && \
\r
490 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
\r
491 buf[n] = (char) c; \
\r
493 buf[n++] = (char) c; \
\r
494 if ( c == EOF && ferror( yyin ) ) \
\r
495 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
498 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
\r
499 && ferror( yyin ) ) \
\r
500 YY_FATAL_ERROR( "input in flex scanner failed" );
\r
503 /* No semi-colon after return; correct usage is to write "yyterminate();" -
\r
504 * we don't want an extra ';' after the "return" because that will cause
\r
505 * some compilers to complain about unreachable statements.
\r
507 #ifndef yyterminate
\r
508 #define yyterminate() return YY_NULL
\r
511 /* Number of entries by which start-condition stack grows. */
\r
512 #ifndef YY_START_STACK_INCR
\r
513 #define YY_START_STACK_INCR 25
\r
516 /* Report a fatal error. */
\r
517 #ifndef YY_FATAL_ERROR
\r
518 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
\r
521 /* Default declaration of generated scanner - a define so the user can
\r
522 * easily add parameters.
\r
525 #define YY_DECL int yylex YY_PROTO(( void ))
\r
528 /* Code executed at the beginning of each rule, after yytext and yyleng
\r
529 * have been set up.
\r
531 #ifndef YY_USER_ACTION
\r
532 #define YY_USER_ACTION
\r
535 /* Code executed at the end of each rule. */
\r
537 #define YY_BREAK break;
\r
540 #define YY_RULE_SETUP \
\r
545 register yy_state_type yy_current_state;
\r
546 register char *yy_cp, *yy_bp;
\r
547 register int yy_act;
\r
549 #line 3 "et_lex.lex.l"
\r
557 #ifdef YY_USER_INIT
\r
562 yy_start = 1; /* first start state */
\r
570 if ( ! yy_current_buffer )
\r
571 yy_current_buffer =
\r
572 yy_create_buffer( yyin, YY_BUF_SIZE );
\r
574 yy_load_buffer_state();
\r
577 while ( 1 ) /* loops until end-of-file is reached */
\r
580 if ( yy_more_flag )
\r
582 yy_more_len = yyleng;
\r
585 yy_cp = yy_c_buf_p;
\r
587 /* Support of yytext. */
\r
588 *yy_cp = yy_hold_char;
\r
590 /* yy_bp points to the position in yy_ch_buf of the start of
\r
595 yy_current_state = yy_start;
\r
596 yy_state_ptr = yy_state_buf;
\r
597 *yy_state_ptr++ = yy_current_state;
\r
601 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
\r
602 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
604 yy_current_state = (int) yy_def[yy_current_state];
\r
605 if ( yy_current_state >= 35 )
\r
606 yy_c = yy_meta[(unsigned int) yy_c];
\r
608 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
609 *yy_state_ptr++ = yy_current_state;
\r
612 while ( yy_base[yy_current_state] != 47 );
\r
615 yy_current_state = *--yy_state_ptr;
\r
616 yy_lp = yy_accept[yy_current_state];
\r
617 for ( ; ; ) /* until we find what rule we matched */
\r
619 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
\r
621 yy_act = yy_acclist[yy_lp];
\r
623 yy_full_match = yy_cp;
\r
628 yy_current_state = *--yy_state_ptr;
\r
629 yy_lp = yy_accept[yy_current_state];
\r
632 YY_DO_BEFORE_ACTION;
\r
634 if ( yy_act != YY_END_OF_BUFFER )
\r
637 for ( yyl = 0; yyl < yyleng; ++yyl )
\r
638 if ( yytext[yyl] == '\n' )
\r
642 do_action: /* This label is used only to access EOF actions. */
\r
646 { /* beginning of action switch */
\r
649 #line 5 "et_lex.lex.l"
\r
650 return ERROR_TABLE;
\r
654 #line 6 "et_lex.lex.l"
\r
655 return ERROR_TABLE;
\r
659 #line 7 "et_lex.lex.l"
\r
660 return ERROR_CODE_ENTRY;
\r
664 #line 8 "et_lex.lex.l"
\r
665 return ERROR_CODE_ENTRY;
\r
669 #line 9 "et_lex.lex.l"
\r
674 #line 11 "et_lex.lex.l"
\r
679 #line 13 "et_lex.lex.l"
\r
680 { register char *p; yylval.dynstr = ds((char *)yytext+1);
\r
681 if (p=strrchr(yylval.dynstr, '"')) *p='\0';
\r
682 return QUOTED_STRING;
\r
687 #line 18 "et_lex.lex.l"
\r
688 { yylval.dynstr = ds((char *)yytext); return STRING; }
\r
692 #line 20 "et_lex.lex.l"
\r
697 #line 22 "et_lex.lex.l"
\r
698 { return (*yytext); }
\r
702 #line 23 "et_lex.lex.l"
\r
705 case YY_STATE_EOF(INITIAL):
\r
708 case YY_END_OF_BUFFER:
\r
710 /* Amount of text matched not including the EOB char. */
\r
711 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
\r
713 /* Undo the effects of YY_DO_BEFORE_ACTION. */
\r
714 *yy_cp = yy_hold_char;
\r
716 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
\r
718 /* We're scanning a new file or input source. It's
\r
719 * possible that this happened because the user
\r
720 * just pointed yyin at a new source and called
\r
721 * yylex(). If so, then we have to assure
\r
722 * consistency between yy_current_buffer and our
\r
723 * globals. Here is the right place to do so, because
\r
724 * this is the first action (other than possibly a
\r
725 * back-up) that will match for the new input source.
\r
727 yy_n_chars = yy_current_buffer->yy_n_chars;
\r
728 yy_current_buffer->yy_input_file = yyin;
\r
729 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
\r
732 /* Note that here we test for yy_c_buf_p "<=" to the position
\r
733 * of the first EOB in the buffer, since yy_c_buf_p will
\r
734 * already have been incremented past the NUL character
\r
735 * (since all states make transitions on EOB to the
\r
736 * end-of-buffer state). Contrast this with the test
\r
739 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
\r
740 { /* This was really a NUL. */
\r
741 yy_state_type yy_next_state;
\r
743 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
\r
745 yy_current_state = yy_get_previous_state();
\r
747 /* Okay, we're now positioned to make the NUL
\r
748 * transition. We couldn't have
\r
749 * yy_get_previous_state() go ahead and do it
\r
750 * for us because it doesn't know how to deal
\r
751 * with the possibility of jamming (and we don't
\r
752 * want to build jamming into it because then it
\r
753 * will run more slowly).
\r
756 yy_next_state = yy_try_NUL_trans( yy_current_state );
\r
758 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
760 if ( yy_next_state )
\r
762 /* Consume the NUL. */
\r
763 yy_cp = ++yy_c_buf_p;
\r
764 yy_current_state = yy_next_state;
\r
770 yy_cp = yy_c_buf_p;
\r
771 goto yy_find_action;
\r
775 else switch ( yy_get_next_buffer() )
\r
777 case EOB_ACT_END_OF_FILE:
\r
779 yy_did_buffer_switch_on_eof = 0;
\r
783 /* Note: because we've taken care in
\r
784 * yy_get_next_buffer() to have set up
\r
785 * yytext, we can now set up
\r
786 * yy_c_buf_p so that if some total
\r
787 * hoser (like flex itself) wants to
\r
788 * call the scanner after we return the
\r
789 * YY_NULL, it'll still work - another
\r
790 * YY_NULL will get returned.
\r
792 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
\r
794 yy_act = YY_STATE_EOF(YY_START);
\r
800 if ( ! yy_did_buffer_switch_on_eof )
\r
806 case EOB_ACT_CONTINUE_SCAN:
\r
808 yytext_ptr + yy_amount_of_matched_text;
\r
810 yy_current_state = yy_get_previous_state();
\r
812 yy_cp = yy_c_buf_p;
\r
813 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
816 case EOB_ACT_LAST_MATCH:
\r
818 &yy_current_buffer->yy_ch_buf[yy_n_chars];
\r
820 yy_current_state = yy_get_previous_state();
\r
822 yy_cp = yy_c_buf_p;
\r
823 yy_bp = yytext_ptr + YY_MORE_ADJ;
\r
824 goto yy_find_action;
\r
831 "fatal flex scanner internal error--no action found" );
\r
832 } /* end of action switch */
\r
833 } /* end of scanning one token */
\r
834 } /* end of yylex */
\r
837 /* yy_get_next_buffer - try to read in a new buffer
\r
839 * Returns a code representing an action:
\r
840 * EOB_ACT_LAST_MATCH -
\r
841 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
\r
842 * EOB_ACT_END_OF_FILE - end of file
\r
845 static int yy_get_next_buffer()
\r
847 register char *dest = yy_current_buffer->yy_ch_buf;
\r
848 register char *source = yytext_ptr;
\r
849 register int number_to_move, i;
\r
852 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
\r
854 "fatal flex scanner internal error--end of buffer missed" );
\r
856 if ( yy_current_buffer->yy_fill_buffer == 0 )
\r
857 { /* Don't try to fill the buffer, so this is an EOF. */
\r
858 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
\r
860 /* We matched a singled characater, the EOB, so
\r
861 * treat this as a final EOF.
\r
863 return EOB_ACT_END_OF_FILE;
\r
868 /* We matched some text prior to the EOB, first
\r
871 return EOB_ACT_LAST_MATCH;
\r
875 /* Try to read more data. */
\r
877 /* First move last chars to start of buffer. */
\r
878 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
\r
880 for ( i = 0; i < number_to_move; ++i )
\r
881 *(dest++) = *(source++);
\r
883 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
\r
884 /* don't do the read, it's not guaranteed to return an EOF,
\r
885 * just force an EOF
\r
892 yy_current_buffer->yy_buf_size - number_to_move - 1;
\r
894 while ( num_to_read <= 0 )
\r
895 { /* Not enough room in the buffer - grow it. */
\r
896 #ifdef YY_USES_REJECT
\r
898 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
\r
901 /* just a shorter name for the current buffer */
\r
902 YY_BUFFER_STATE b = yy_current_buffer;
\r
904 int yy_c_buf_p_offset =
\r
905 (int) (yy_c_buf_p - b->yy_ch_buf);
\r
907 if ( b->yy_is_our_buffer )
\r
909 int new_size = b->yy_buf_size * 2;
\r
911 if ( new_size <= 0 )
\r
912 b->yy_buf_size += b->yy_buf_size / 8;
\r
914 b->yy_buf_size *= 2;
\r
916 b->yy_ch_buf = (char *)
\r
917 /* Include room in for 2 EOB chars. */
\r
918 yy_flex_realloc( (void *) b->yy_ch_buf,
\r
919 b->yy_buf_size + 2 );
\r
922 /* Can't grow it, we don't own it. */
\r
925 if ( ! b->yy_ch_buf )
\r
927 "fatal error - scanner input buffer overflow" );
\r
929 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
\r
931 num_to_read = yy_current_buffer->yy_buf_size -
\r
932 number_to_move - 1;
\r
936 if ( num_to_read > YY_READ_BUF_SIZE )
\r
937 num_to_read = YY_READ_BUF_SIZE;
\r
939 /* Read in more data. */
\r
940 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
\r
941 yy_n_chars, num_to_read );
\r
944 if ( yy_n_chars == 0 )
\r
946 if ( number_to_move == YY_MORE_ADJ )
\r
948 ret_val = EOB_ACT_END_OF_FILE;
\r
954 ret_val = EOB_ACT_LAST_MATCH;
\r
955 yy_current_buffer->yy_buffer_status =
\r
956 YY_BUFFER_EOF_PENDING;
\r
961 ret_val = EOB_ACT_CONTINUE_SCAN;
\r
963 yy_n_chars += number_to_move;
\r
964 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
\r
965 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
\r
967 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
\r
973 /* yy_get_previous_state - get the state just before the EOB char was reached */
\r
975 static yy_state_type yy_get_previous_state()
\r
977 register yy_state_type yy_current_state;
\r
978 register char *yy_cp;
\r
980 yy_current_state = yy_start;
\r
981 yy_state_ptr = yy_state_buf;
\r
982 *yy_state_ptr++ = yy_current_state;
\r
984 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
\r
986 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
\r
987 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
989 yy_current_state = (int) yy_def[yy_current_state];
\r
990 if ( yy_current_state >= 35 )
\r
991 yy_c = yy_meta[(unsigned int) yy_c];
\r
993 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
994 *yy_state_ptr++ = yy_current_state;
\r
997 return yy_current_state;
\r
1001 /* yy_try_NUL_trans - try to make a transition on the NUL character
\r
1004 * next_state = yy_try_NUL_trans( current_state );
\r
1007 #ifdef YY_USE_PROTOS
\r
1008 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
\r
1010 static yy_state_type yy_try_NUL_trans( yy_current_state )
\r
1011 yy_state_type yy_current_state;
\r
1014 register int yy_is_jam;
\r
1016 register YY_CHAR yy_c = 1;
\r
1017 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1019 yy_current_state = (int) yy_def[yy_current_state];
\r
1020 if ( yy_current_state >= 35 )
\r
1021 yy_c = yy_meta[(unsigned int) yy_c];
\r
1023 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1024 *yy_state_ptr++ = yy_current_state;
\r
1025 yy_is_jam = (yy_current_state == 34);
\r
1027 return yy_is_jam ? 0 : yy_current_state;
\r
1031 #ifndef YY_NO_UNPUT
\r
1032 #ifdef YY_USE_PROTOS
\r
1033 static void yyunput( int c, register char *yy_bp )
\r
1035 static void yyunput( c, yy_bp )
\r
1037 register char *yy_bp;
\r
1040 register char *yy_cp = yy_c_buf_p;
\r
1042 /* undo effects of setting up yytext */
\r
1043 *yy_cp = yy_hold_char;
\r
1045 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
\r
1046 { /* need to shift things up to make room */
\r
1047 /* +2 for EOB chars. */
\r
1048 register int number_to_move = yy_n_chars + 2;
\r
1049 register char *dest = &yy_current_buffer->yy_ch_buf[
\r
1050 yy_current_buffer->yy_buf_size + 2];
\r
1051 register char *source =
\r
1052 &yy_current_buffer->yy_ch_buf[number_to_move];
\r
1054 while ( source > yy_current_buffer->yy_ch_buf )
\r
1055 *--dest = *--source;
\r
1057 yy_cp += (int) (dest - source);
\r
1058 yy_bp += (int) (dest - source);
\r
1059 yy_n_chars = yy_current_buffer->yy_buf_size;
\r
1061 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
\r
1062 YY_FATAL_ERROR( "flex scanner push-back overflow" );
\r
1065 *--yy_cp = (char) c;
\r
1070 yytext_ptr = yy_bp;
\r
1071 yy_hold_char = *yy_cp;
\r
1072 yy_c_buf_p = yy_cp;
\r
1074 #endif /* ifndef YY_NO_UNPUT */
\r
1077 #ifdef __cplusplus
\r
1078 static int yyinput()
\r
1080 static int input()
\r
1085 *yy_c_buf_p = yy_hold_char;
\r
1087 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
\r
1089 /* yy_c_buf_p now points to the character we want to return.
\r
1090 * If this occurs *before* the EOB characters, then it's a
\r
1091 * valid NUL; if not, then we've hit the end of the buffer.
\r
1093 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
\r
1094 /* This was really a NUL. */
\r
1095 *yy_c_buf_p = '\0';
\r
1098 { /* need more input */
\r
1099 yytext_ptr = yy_c_buf_p;
\r
1102 switch ( yy_get_next_buffer() )
\r
1104 case EOB_ACT_END_OF_FILE:
\r
1109 yytext_ptr + YY_MORE_ADJ;
\r
1113 if ( ! yy_did_buffer_switch_on_eof )
\r
1115 #ifdef __cplusplus
\r
1122 case EOB_ACT_CONTINUE_SCAN:
\r
1123 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
\r
1126 case EOB_ACT_LAST_MATCH:
\r
1127 #ifdef __cplusplus
\r
1129 "unexpected last match in yyinput()" );
\r
1132 "unexpected last match in input()" );
\r
1138 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
\r
1139 *yy_c_buf_p = '\0'; /* preserve yytext */
\r
1140 yy_hold_char = *++yy_c_buf_p;
\r
1149 #ifdef YY_USE_PROTOS
\r
1150 void yyrestart( FILE *input_file )
\r
1152 void yyrestart( input_file )
\r
1156 if ( ! yy_current_buffer )
\r
1157 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
\r
1159 yy_init_buffer( yy_current_buffer, input_file );
\r
1160 yy_load_buffer_state();
\r
1164 #ifdef YY_USE_PROTOS
\r
1165 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
\r
1167 void yy_switch_to_buffer( new_buffer )
\r
1168 YY_BUFFER_STATE new_buffer;
\r
1171 if ( yy_current_buffer == new_buffer )
\r
1174 if ( yy_current_buffer )
\r
1176 /* Flush out information for old buffer. */
\r
1177 *yy_c_buf_p = yy_hold_char;
\r
1178 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
\r
1179 yy_current_buffer->yy_n_chars = yy_n_chars;
\r
1182 yy_current_buffer = new_buffer;
\r
1183 yy_load_buffer_state();
\r
1185 /* We don't actually know whether we did this switch during
\r
1186 * EOF (yywrap()) processing, but the only time this flag
\r
1187 * is looked at is after yywrap() is called, so it's safe
\r
1188 * to go ahead and always set it.
\r
1190 yy_did_buffer_switch_on_eof = 1;
\r
1194 #ifdef YY_USE_PROTOS
\r
1195 void yy_load_buffer_state( void )
\r
1197 void yy_load_buffer_state()
\r
1200 yy_n_chars = yy_current_buffer->yy_n_chars;
\r
1201 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
\r
1202 yyin = yy_current_buffer->yy_input_file;
\r
1203 yy_hold_char = *yy_c_buf_p;
\r
1207 #ifdef YY_USE_PROTOS
\r
1208 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
\r
1210 YY_BUFFER_STATE yy_create_buffer( file, size )
\r
1215 YY_BUFFER_STATE b;
\r
1217 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
\r
1219 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
\r
1221 b->yy_buf_size = size;
\r
1223 /* yy_ch_buf has to be 2 characters longer than the size given because
\r
1224 * we need to put in 2 end-of-buffer characters.
\r
1226 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
\r
1227 if ( ! b->yy_ch_buf )
\r
1228 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
\r
1230 b->yy_is_our_buffer = 1;
\r
1232 yy_init_buffer( b, file );
\r
1238 #ifdef YY_USE_PROTOS
\r
1239 void yy_delete_buffer( YY_BUFFER_STATE b )
\r
1241 void yy_delete_buffer( b )
\r
1242 YY_BUFFER_STATE b;
\r
1248 if ( b == yy_current_buffer )
\r
1249 yy_current_buffer = (YY_BUFFER_STATE) 0;
\r
1251 if ( b->yy_is_our_buffer )
\r
1252 yy_flex_free( (void *) b->yy_ch_buf );
\r
1254 yy_flex_free( (void *) b );
\r
1258 #ifndef YY_ALWAYS_INTERACTIVE
\r
1259 #ifndef YY_NEVER_INTERACTIVE
\r
1260 extern int isatty YY_PROTO(( int ));
\r
1264 #ifdef YY_USE_PROTOS
\r
1265 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
\r
1267 void yy_init_buffer( b, file )
\r
1268 YY_BUFFER_STATE b;
\r
1274 yy_flush_buffer( b );
\r
1276 b->yy_input_file = file;
\r
1277 b->yy_fill_buffer = 1;
\r
1279 #if YY_ALWAYS_INTERACTIVE
\r
1280 b->yy_is_interactive = 1;
\r
1282 #if YY_NEVER_INTERACTIVE
\r
1283 b->yy_is_interactive = 0;
\r
1285 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
\r
1291 #ifdef YY_USE_PROTOS
\r
1292 void yy_flush_buffer( YY_BUFFER_STATE b )
\r
1294 void yy_flush_buffer( b )
\r
1295 YY_BUFFER_STATE b;
\r
1299 b->yy_n_chars = 0;
\r
1301 /* We always need two end-of-buffer characters. The first causes
\r
1302 * a transition to the end-of-buffer state. The second causes
\r
1303 * a jam in that state.
\r
1305 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
\r
1306 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
\r
1308 b->yy_buf_pos = &b->yy_ch_buf[0];
\r
1311 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1313 if ( b == yy_current_buffer )
\r
1314 yy_load_buffer_state();
\r
1318 #ifndef YY_NO_SCAN_BUFFER
\r
1319 #ifdef YY_USE_PROTOS
\r
1320 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
\r
1322 YY_BUFFER_STATE yy_scan_buffer( base, size )
\r
1327 YY_BUFFER_STATE b;
\r
1330 base[size-2] != YY_END_OF_BUFFER_CHAR ||
\r
1331 base[size-1] != YY_END_OF_BUFFER_CHAR )
\r
1332 /* They forgot to leave room for the EOB's. */
\r
1335 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
\r
1337 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
\r
1339 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
\r
1340 b->yy_buf_pos = b->yy_ch_buf = base;
\r
1341 b->yy_is_our_buffer = 0;
\r
1342 b->yy_input_file = 0;
\r
1343 b->yy_n_chars = b->yy_buf_size;
\r
1344 b->yy_is_interactive = 0;
\r
1346 b->yy_fill_buffer = 0;
\r
1347 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1349 yy_switch_to_buffer( b );
\r
1356 #ifndef YY_NO_SCAN_STRING
\r
1357 #ifdef YY_USE_PROTOS
\r
1358 YY_BUFFER_STATE yy_scan_string( yyconst char *str )
\r
1360 YY_BUFFER_STATE yy_scan_string( str )
\r
1361 yyconst char *str;
\r
1365 for ( len = 0; str[len]; ++len )
\r
1368 return yy_scan_bytes( str, len );
\r
1373 #ifndef YY_NO_SCAN_BYTES
\r
1374 #ifdef YY_USE_PROTOS
\r
1375 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
\r
1377 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
\r
1378 yyconst char *bytes;
\r
1382 YY_BUFFER_STATE b;
\r
1387 /* Get memory for full buffer, including space for trailing EOB's. */
\r
1389 buf = (char *) yy_flex_alloc( n );
\r
1391 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
\r
1393 for ( i = 0; i < len; ++i )
\r
1394 buf[i] = bytes[i];
\r
1396 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
\r
1398 b = yy_scan_buffer( buf, n );
\r
1400 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
\r
1402 /* It's okay to grow etc. this buffer, and we should throw it
\r
1403 * away when we're done.
\r
1405 b->yy_is_our_buffer = 1;
\r
1412 #ifndef YY_NO_PUSH_STATE
\r
1413 #ifdef YY_USE_PROTOS
\r
1414 static void yy_push_state( int new_state )
\r
1416 static void yy_push_state( new_state )
\r
1420 if ( yy_start_stack_ptr >= yy_start_stack_depth )
\r
1422 yy_size_t new_size;
\r
1424 yy_start_stack_depth += YY_START_STACK_INCR;
\r
1425 new_size = yy_start_stack_depth * sizeof( int );
\r
1427 if ( ! yy_start_stack )
\r
1428 yy_start_stack = (int *) yy_flex_alloc( new_size );
\r
1431 yy_start_stack = (int *) yy_flex_realloc(
\r
1432 (void *) yy_start_stack, new_size );
\r
1434 if ( ! yy_start_stack )
\r
1436 "out of memory expanding start-condition stack" );
\r
1439 yy_start_stack[yy_start_stack_ptr++] = YY_START;
\r
1446 #ifndef YY_NO_POP_STATE
\r
1447 static void yy_pop_state()
\r
1449 if ( --yy_start_stack_ptr < 0 )
\r
1450 YY_FATAL_ERROR( "start-condition stack underflow" );
\r
1452 BEGIN(yy_start_stack[yy_start_stack_ptr]);
\r
1457 #ifndef YY_NO_TOP_STATE
\r
1458 static int yy_top_state()
\r
1460 return yy_start_stack[yy_start_stack_ptr - 1];
\r
1464 #ifndef YY_EXIT_FAILURE
\r
1465 #define YY_EXIT_FAILURE 2
\r
1468 #ifdef YY_USE_PROTOS
\r
1469 static void yy_fatal_error( yyconst char msg[] )
\r
1471 static void yy_fatal_error( msg )
\r
1475 (void) fprintf( stderr, "%s\n", msg );
\r
1476 exit( YY_EXIT_FAILURE );
\r
1481 /* Redefine yyless() so it works in section 3 code. */
\r
1484 #define yyless(n) \
\r
1487 /* Undo effects of setting up yytext. */ \
\r
1488 yytext[yyleng] = yy_hold_char; \
\r
1489 yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
\r
1490 yy_hold_char = *yy_c_buf_p; \
\r
1491 *yy_c_buf_p = '\0'; \
\r
1497 /* Internal utility routines. */
\r
1499 #ifndef yytext_ptr
\r
1500 #ifdef YY_USE_PROTOS
\r
1501 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
\r
1503 static void yy_flex_strncpy( s1, s2, n )
\r
1510 for ( i = 0; i < n; ++i )
\r
1516 #ifdef YY_USE_PROTOS
\r
1517 static void *yy_flex_alloc( yy_size_t size )
\r
1519 static void *yy_flex_alloc( size )
\r
1523 return (void *) malloc( size );
\r
1526 #ifdef YY_USE_PROTOS
\r
1527 static void *yy_flex_realloc( void *ptr, yy_size_t size )
\r
1529 static void *yy_flex_realloc( ptr, size )
\r
1534 /* The cast to (char *) in the following accommodates both
\r
1535 * implementations that use char* generic pointers, and those
\r
1536 * that use void* generic pointers. It works with the latter
\r
1537 * because both ANSI C and C++ allow castless assignment from
\r
1538 * any pointer type to void*, and deal with argument conversions
\r
1539 * as though doing an assignment.
\r
1541 return (void *) realloc( (char *) ptr, size );
\r
1544 #ifdef YY_USE_PROTOS
\r
1545 static void yy_flex_free( void *ptr )
\r
1547 static void yy_flex_free( ptr )
\r
1561 #line 23 "et_lex.lex.l"
\r
1563 /* Copyright (C) 1998 Transarc Corporation. All rights reserved.
\r
1566 int yywrap(void) {
\r