1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
102 extern FILE *yyin
, *yyout
;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t
;
144 struct yy_buffer_state
148 char *yy_ch_buf
; /* input buffer */
149 char *yy_buf_pos
; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size
;
156 /* Number of characters read into yy_ch_buf, not including EOB
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
165 int yy_is_our_buffer
;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
172 int yy_is_interactive
;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
180 /* Whether to try to fill the input buffer when we reach the
185 int yy_buffer_status
;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer
= 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char
;
213 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p
= (char *) 0;
220 static int yy_init
= 1; /* whether we need to initialize */
221 static int yy_start
= 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof
;
228 void yyrestart
YY_PROTO(( FILE *input_file
));
230 void yy_switch_to_buffer
YY_PROTO(( YY_BUFFER_STATE new_buffer
));
231 void yy_load_buffer_state
YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer
YY_PROTO(( FILE *file
, int size
));
233 void yy_delete_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
234 void yy_init_buffer
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file
));
235 void yy_flush_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer
YY_PROTO(( char *base
, yy_size_t size
));
239 YY_BUFFER_STATE yy_scan_string
YY_PROTO(( yyconst
char *yy_str
));
240 YY_BUFFER_STATE yy_scan_bytes
YY_PROTO(( yyconst
char *bytes
, int len
));
242 static void *yy_flex_alloc
YY_PROTO(( yy_size_t
));
243 static void *yy_flex_realloc
YY_PROTO(( void *, yy_size_t
));
244 static void yy_flex_free
YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264 typedef unsigned char YY_CHAR
;
265 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
266 typedef int yy_state_type
;
268 #define yytext_ptr yytext
270 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
272 static int yy_get_next_buffer
YY_PROTO(( void ));
273 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
275 /* Done after the current pattern has been matched and before the
276 * corresponding action - sets up yytext.
278 #define YY_DO_BEFORE_ACTION \
279 yytext_ptr = yy_bp; \
280 yyleng = (int) (yy_cp - yy_bp); \
281 yy_hold_char = *yy_cp; \
285 #define YY_NUM_RULES 60
286 #define YY_END_OF_BUFFER 61
287 static yyconst
short int yy_accept
[138] =
289 0, 0, 61, 58, 59, 58, 58, 58, 58, 58,
290 58, 58, 58, 58, 58, 8, 58, 58, 46, 48,
291 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
292 45, 58, 44, 0, 43, 0, 0, 0, 10, 0,
293 47, 0, 0, 0, 42, 0, 0, 0, 0, 0,
294 30, 0, 0, 0, 40, 50, 0, 7, 0, 0,
295 56, 41, 0, 29, 0, 57, 39, 49, 38, 0,
296 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
297 0, 0, 35, 0, 55, 0, 24, 0, 17, 18,
298 19, 28, 0, 0, 0, 0, 0, 0, 1, 37,
300 0, 36, 20, 22, 21, 23, 27, 34, 0, 0,
301 0, 32, 53, 54, 51, 26, 25, 33, 3, 0,
302 0, 13, 9, 12, 11, 31, 2, 0, 14, 16,
303 15, 0, 5, 4, 0, 52, 0
306 static yyconst
int yy_ec
[256] =
308 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
309 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
310 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
311 1, 3, 4, 1, 1, 1, 1, 1, 1, 1,
312 1, 1, 1, 1, 1, 5, 1, 1, 1, 1,
313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
314 1, 1, 6, 1, 7, 8, 9, 1, 10, 1,
315 11, 1, 12, 13, 1, 1, 14, 15, 16, 1,
316 1, 17, 18, 19, 1, 20, 21, 1, 22, 1,
317 1, 1, 1, 1, 1, 1, 23, 24, 25, 26,
319 27, 28, 29, 30, 31, 13, 1, 32, 33, 34,
320 35, 36, 36, 37, 38, 39, 36, 40, 41, 36,
321 42, 36, 1, 1, 1, 1, 1, 1, 1, 1,
322 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
323 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
326 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
327 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 static yyconst
int yy_meta
[43] =
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 static yyconst
short int yy_base
[138] =
349 0, 0, 156, 157, 157, 34, 121, 117, 123, 129,
350 113, 115, 13, 114, 17, 157, 118, 117, 157, 15,
351 37, 142, 44, 49, 111, 12, 103, 139, 52, 54,
352 138, 57, 157, 107, 157, 102, 104, 38, 157, 108,
353 106, 109, 109, 111, 157, 96, 129, 33, 93, 57,
354 157, 74, 127, 102, 157, 101, 51, 157, 109, 88,
355 157, 157, 96, 157, 121, 157, 157, 157, 157, 91,
356 157, 96, 118, 93, 117, 92, 91, 78, 78, 112,
357 88, 71, 157, 78, 157, 73, 157, 105, 157, 157,
358 157, 157, 106, 105, 75, 76, 101, 82, 157, 157,
360 101, 157, 157, 157, 157, 157, 157, 157, 100, 72,
361 88, 157, 157, 157, 157, 157, 157, 157, 157, 70,
362 97, 157, 157, 157, 157, 157, 157, 86, 157, 157,
363 157, 51, 157, 157, 37, 157, 157
366 static yyconst
short int yy_def
[138] =
368 137, 1, 137, 137, 137, 137, 137, 137, 137, 137,
369 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
370 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
371 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
372 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
373 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
374 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
375 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
376 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
377 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
379 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
380 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
381 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
382 137, 137, 137, 137, 137, 137, 0
385 static yyconst
short int yy_nxt
[200] =
387 4, 5, 6, 4, 4, 4, 7, 8, 9, 4,
388 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
389 20, 21, 22, 23, 24, 22, 22, 22, 10, 4,
390 25, 4, 26, 4, 27, 28, 28, 29, 30, 31,
391 32, 28, 33, 49, 53, 57, 59, 61, 50, 50,
392 54, 58, 61, 64, 51, 66, 34, 66, 35, 69,
393 66, 87, 84, 60, 36, 75, 85, 37, 38, 136,
394 39, 76, 40, 135, 41, 42, 89, 90, 62, 91,
395 44, 67, 95, 68, 123, 124, 125, 70, 134, 96,
396 129, 130, 131, 71, 88, 103, 104, 105, 106, 133,
398 132, 128, 127, 126, 122, 121, 120, 119, 118, 117,
399 116, 115, 114, 113, 112, 111, 110, 109, 108, 107,
400 102, 101, 95, 100, 99, 98, 97, 94, 93, 92,
401 86, 83, 82, 81, 80, 79, 78, 77, 74, 73,
402 72, 66, 66, 65, 63, 61, 56, 55, 52, 48,
403 47, 46, 45, 44, 43, 137, 3, 137, 137, 137,
404 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
405 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
406 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
407 137, 137, 137, 137, 137, 137, 137, 137, 137
411 static yyconst
short int yy_chk
[200] =
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 6, 13, 15, 20, 21, 23, 26, 13,
418 15, 20, 24, 26, 13, 29, 6, 30, 6, 32,
419 32, 50, 48, 21, 6, 38, 48, 6, 6, 135,
420 6, 38, 6, 132, 6, 6, 52, 52, 24, 52,
421 23, 29, 57, 30, 98, 98, 98, 32, 128, 57,
422 111, 111, 111, 32, 50, 74, 74, 74, 74, 121,
424 120, 110, 109, 101, 97, 96, 95, 94, 93, 88,
425 86, 84, 82, 81, 80, 79, 78, 77, 76, 75,
426 73, 72, 70, 65, 63, 60, 59, 56, 54, 53,
427 49, 47, 46, 44, 43, 42, 41, 40, 37, 36,
428 34, 31, 28, 27, 25, 22, 18, 17, 14, 12,
429 11, 10, 9, 8, 7, 3, 137, 137, 137, 137,
430 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
431 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
432 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
433 137, 137, 137, 137, 137, 137, 137, 137, 137
437 static yy_state_type yy_last_accepting_state
;
438 static char *yy_last_accepting_cpos
;
440 /* The intent behind this definition is that it'll catch
441 * any uses of REJECT which flex missed.
443 #define REJECT reject_used_but_not_detected
444 #define yymore() yymore_used_but_not_detected
445 #define YY_MORE_ADJ 0
446 #define YY_RESTORE_YY_MORE_OFFSET
455 /* Macros after this point can all be overridden by user definitions in
459 #ifndef YY_SKIP_YYWRAP
461 extern "C" int yywrap
YY_PROTO(( void ));
463 extern int yywrap
YY_PROTO(( void ));
468 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
472 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
475 #ifdef YY_NEED_STRLEN
476 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
481 static int yyinput
YY_PROTO(( void ));
483 static int input
YY_PROTO(( void ));
488 static int yy_start_stack_ptr
= 0;
489 static int yy_start_stack_depth
= 0;
490 static int *yy_start_stack
= 0;
491 #ifndef YY_NO_PUSH_STATE
492 static void yy_push_state
YY_PROTO(( int new_state
));
494 #ifndef YY_NO_POP_STATE
495 static void yy_pop_state
YY_PROTO(( void ));
497 #ifndef YY_NO_TOP_STATE
498 static int yy_top_state
YY_PROTO(( void ));
502 #define YY_NO_PUSH_STATE 1
503 #define YY_NO_POP_STATE 1
504 #define YY_NO_TOP_STATE 1
507 #ifdef YY_MALLOC_DECL
515 /* Just try to get by without declaring the routines. This will fail
516 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
517 * or sizeof(void*) != sizeof(int).
522 /* Amount of stuff to slurp up with each read. */
523 #ifndef YY_READ_BUF_SIZE
524 #define YY_READ_BUF_SIZE 8192
527 /* Copy whatever the last rule matched to the standard output. */
530 /* This used to be an fputs(), but since the string might contain NUL's,
531 * we now use fwrite().
533 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
536 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
537 * is returned in "result".
540 #define YY_INPUT(buf,result,max_size) \
541 if ( yy_current_buffer->yy_is_interactive ) \
544 for ( n = 0; n < max_size && \
545 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
548 buf[n++] = (char) c; \
549 if ( c == EOF && ferror( yyin ) ) \
550 YY_FATAL_ERROR( "input in flex scanner failed" ); \
553 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
554 && ferror( yyin ) ) \
555 YY_FATAL_ERROR( "input in flex scanner failed" );
558 /* No semi-colon after return; correct usage is to write "yyterminate();" -
559 * we don't want an extra ';' after the "return" because that will cause
560 * some compilers to complain about unreachable statements.
563 #define yyterminate() return YY_NULL
566 /* Number of entries by which start-condition stack grows. */
567 #ifndef YY_START_STACK_INCR
568 #define YY_START_STACK_INCR 25
571 /* Report a fatal error. */
572 #ifndef YY_FATAL_ERROR
573 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
576 /* Default declaration of generated scanner - a define so the user can
577 * easily add parameters.
580 #define YY_DECL int yylex YY_PROTO(( void ))
583 /* Code executed at the beginning of each rule, after yytext and yyleng
586 #ifndef YY_USER_ACTION
587 #define YY_USER_ACTION
590 /* Code executed at the end of each rule. */
592 #define YY_BREAK break;
595 #define YY_RULE_SETUP \
600 register yy_state_type yy_current_state
;
601 register char *yy_cp
, *yy_bp
;
617 yy_start
= 1; /* first start state */
625 if ( ! yy_current_buffer
)
627 yy_create_buffer( yyin
, YY_BUF_SIZE
);
629 yy_load_buffer_state();
632 while ( 1 ) /* loops until end-of-file is reached */
636 /* Support of yytext. */
637 *yy_cp
= yy_hold_char
;
639 /* yy_bp points to the position in yy_ch_buf of the start of
644 yy_current_state
= yy_start
;
648 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
649 if ( yy_accept
[yy_current_state
] )
651 yy_last_accepting_state
= yy_current_state
;
652 yy_last_accepting_cpos
= yy_cp
;
654 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
656 yy_current_state
= (int) yy_def
[yy_current_state
];
657 if ( yy_current_state
>= 138 )
658 yy_c
= yy_meta
[(unsigned int) yy_c
];
660 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
663 while ( yy_base
[yy_current_state
] != 157 );
666 yy_act
= yy_accept
[yy_current_state
];
668 { /* have to back up */
669 yy_cp
= yy_last_accepting_cpos
;
670 yy_current_state
= yy_last_accepting_state
;
671 yy_act
= yy_accept
[yy_current_state
];
677 do_action
: /* This label is used only to access EOF actions. */
681 { /* beginning of action switch */
682 case 0: /* must back up */
683 /* undo the effects of YY_DO_BEFORE_ACTION */
684 *yy_cp
= yy_hold_char
;
685 yy_cp
= yy_last_accepting_cpos
;
686 yy_current_state
= yy_last_accepting_state
;
967 {sprintf(buf
,"%s Naturlich!",yytext
);return(buf
);}
972 {sprintf(buf
,"%s Seig Heil!",yytext
);return(buf
);}
990 case YY_STATE_EOF(INITIAL
):
993 case YY_END_OF_BUFFER
:
995 /* Amount of text matched not including the EOB char. */
996 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
998 /* Undo the effects of YY_DO_BEFORE_ACTION. */
999 *yy_cp
= yy_hold_char
;
1000 YY_RESTORE_YY_MORE_OFFSET
1002 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
1004 /* We're scanning a new file or input source. It's
1005 * possible that this happened because the user
1006 * just pointed yyin at a new source and called
1007 * yylex(). If so, then we have to assure
1008 * consistency between yy_current_buffer and our
1009 * globals. Here is the right place to do so, because
1010 * this is the first action (other than possibly a
1011 * back-up) that will match for the new input source.
1013 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1014 yy_current_buffer
->yy_input_file
= yyin
;
1015 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1018 /* Note that here we test for yy_c_buf_p "<=" to the position
1019 * of the first EOB in the buffer, since yy_c_buf_p will
1020 * already have been incremented past the NUL character
1021 * (since all states make transitions on EOB to the
1022 * end-of-buffer state). Contrast this with the test
1025 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1026 { /* This was really a NUL. */
1027 yy_state_type yy_next_state
;
1029 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
1031 yy_current_state
= yy_get_previous_state();
1033 /* Okay, we're now positioned to make the NUL
1034 * transition. We couldn't have
1035 * yy_get_previous_state() go ahead and do it
1036 * for us because it doesn't know how to deal
1037 * with the possibility of jamming (and we don't
1038 * want to build jamming into it because then it
1039 * will run more slowly).
1042 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1044 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1046 if ( yy_next_state
)
1048 /* Consume the NUL. */
1049 yy_cp
= ++yy_c_buf_p
;
1050 yy_current_state
= yy_next_state
;
1057 goto yy_find_action
;
1061 else switch ( yy_get_next_buffer() )
1063 case EOB_ACT_END_OF_FILE
:
1065 yy_did_buffer_switch_on_eof
= 0;
1069 /* Note: because we've taken care in
1070 * yy_get_next_buffer() to have set up
1071 * yytext, we can now set up
1072 * yy_c_buf_p so that if some total
1073 * hoser (like flex itself) wants to
1074 * call the scanner after we return the
1075 * YY_NULL, it'll still work - another
1076 * YY_NULL will get returned.
1078 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
1080 yy_act
= YY_STATE_EOF(YY_START
);
1086 if ( ! yy_did_buffer_switch_on_eof
)
1092 case EOB_ACT_CONTINUE_SCAN
:
1094 yytext_ptr
+ yy_amount_of_matched_text
;
1096 yy_current_state
= yy_get_previous_state();
1099 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1102 case EOB_ACT_LAST_MATCH
:
1104 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
1106 yy_current_state
= yy_get_previous_state();
1109 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1110 goto yy_find_action
;
1117 "fatal flex scanner internal error--no action found" );
1118 } /* end of action switch */
1119 } /* end of scanning one token */
1120 } /* end of yylex */
1123 /* yy_get_next_buffer - try to read in a new buffer
1125 * Returns a code representing an action:
1126 * EOB_ACT_LAST_MATCH -
1127 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1128 * EOB_ACT_END_OF_FILE - end of file
1131 static int yy_get_next_buffer()
1133 register char *dest
= yy_current_buffer
->yy_ch_buf
;
1134 register char *source
= yytext_ptr
;
1135 register int number_to_move
, i
;
1138 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
1140 "fatal flex scanner internal error--end of buffer missed" );
1142 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
1143 { /* Don't try to fill the buffer, so this is an EOF. */
1144 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
1146 /* We matched a single character, the EOB, so
1147 * treat this as a final EOF.
1149 return EOB_ACT_END_OF_FILE
;
1154 /* We matched some text prior to the EOB, first
1157 return EOB_ACT_LAST_MATCH
;
1161 /* Try to read more data. */
1163 /* First move last chars to start of buffer. */
1164 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
1166 for ( i
= 0; i
< number_to_move
; ++i
)
1167 *(dest
++) = *(source
++);
1169 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1170 /* don't do the read, it's not guaranteed to return an EOF,
1173 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1178 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1180 while ( num_to_read
<= 0 )
1181 { /* Not enough room in the buffer - grow it. */
1182 #ifdef YY_USES_REJECT
1184 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1187 /* just a shorter name for the current buffer */
1188 YY_BUFFER_STATE b
= yy_current_buffer
;
1190 int yy_c_buf_p_offset
=
1191 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1193 if ( b
->yy_is_our_buffer
)
1195 int new_size
= b
->yy_buf_size
* 2;
1197 if ( new_size
<= 0 )
1198 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1200 b
->yy_buf_size
*= 2;
1202 b
->yy_ch_buf
= (char *)
1203 /* Include room in for 2 EOB chars. */
1204 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1205 b
->yy_buf_size
+ 2 );
1208 /* Can't grow it, we don't own it. */
1211 if ( ! b
->yy_ch_buf
)
1213 "fatal error - scanner input buffer overflow" );
1215 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1217 num_to_read
= yy_current_buffer
->yy_buf_size
-
1222 if ( num_to_read
> YY_READ_BUF_SIZE
)
1223 num_to_read
= YY_READ_BUF_SIZE
;
1225 /* Read in more data. */
1226 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1227 yy_n_chars
, num_to_read
);
1229 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1232 if ( yy_n_chars
== 0 )
1234 if ( number_to_move
== YY_MORE_ADJ
)
1236 ret_val
= EOB_ACT_END_OF_FILE
;
1242 ret_val
= EOB_ACT_LAST_MATCH
;
1243 yy_current_buffer
->yy_buffer_status
=
1244 YY_BUFFER_EOF_PENDING
;
1249 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1251 yy_n_chars
+= number_to_move
;
1252 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1253 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1255 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1261 /* yy_get_previous_state - get the state just before the EOB char was reached */
1263 static yy_state_type
yy_get_previous_state()
1265 register yy_state_type yy_current_state
;
1266 register char *yy_cp
;
1268 yy_current_state
= yy_start
;
1270 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1272 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1273 if ( yy_accept
[yy_current_state
] )
1275 yy_last_accepting_state
= yy_current_state
;
1276 yy_last_accepting_cpos
= yy_cp
;
1278 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1280 yy_current_state
= (int) yy_def
[yy_current_state
];
1281 if ( yy_current_state
>= 138 )
1282 yy_c
= yy_meta
[(unsigned int) yy_c
];
1284 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1287 return yy_current_state
;
1291 /* yy_try_NUL_trans - try to make a transition on the NUL character
1294 * next_state = yy_try_NUL_trans( current_state );
1297 #ifdef YY_USE_PROTOS
1298 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1300 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1301 yy_state_type yy_current_state
;
1304 register int yy_is_jam
;
1305 register char *yy_cp
= yy_c_buf_p
;
1307 register YY_CHAR yy_c
= 1;
1308 if ( yy_accept
[yy_current_state
] )
1310 yy_last_accepting_state
= yy_current_state
;
1311 yy_last_accepting_cpos
= yy_cp
;
1313 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1315 yy_current_state
= (int) yy_def
[yy_current_state
];
1316 if ( yy_current_state
>= 138 )
1317 yy_c
= yy_meta
[(unsigned int) yy_c
];
1319 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1320 yy_is_jam
= (yy_current_state
== 137);
1322 return yy_is_jam
? 0 : yy_current_state
;
1327 #ifdef YY_USE_PROTOS
1328 static void yyunput( int c
, register char *yy_bp
)
1330 static void yyunput( c
, yy_bp
)
1332 register char *yy_bp
;
1335 register char *yy_cp
= yy_c_buf_p
;
1337 /* undo effects of setting up yytext */
1338 *yy_cp
= yy_hold_char
;
1340 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1341 { /* need to shift things up to make room */
1342 /* +2 for EOB chars. */
1343 register int number_to_move
= yy_n_chars
+ 2;
1344 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1345 yy_current_buffer
->yy_buf_size
+ 2];
1346 register char *source
=
1347 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1349 while ( source
> yy_current_buffer
->yy_ch_buf
)
1350 *--dest
= *--source
;
1352 yy_cp
+= (int) (dest
- source
);
1353 yy_bp
+= (int) (dest
- source
);
1354 yy_current_buffer
->yy_n_chars
=
1355 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1357 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1358 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1361 *--yy_cp
= (char) c
;
1365 yy_hold_char
= *yy_cp
;
1368 #endif /* ifndef YY_NO_UNPUT */
1372 static int yyinput()
1379 *yy_c_buf_p
= yy_hold_char
;
1381 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1383 /* yy_c_buf_p now points to the character we want to return.
1384 * If this occurs *before* the EOB characters, then it's a
1385 * valid NUL; if not, then we've hit the end of the buffer.
1387 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1388 /* This was really a NUL. */
1392 { /* need more input */
1393 int offset
= yy_c_buf_p
- yytext_ptr
;
1396 switch ( yy_get_next_buffer() )
1398 case EOB_ACT_LAST_MATCH
:
1399 /* This happens because yy_g_n_b()
1400 * sees that we've accumulated a
1401 * token and flags that we need to
1402 * try matching the token before
1403 * proceeding. But for input(),
1404 * there's no matching to consider.
1405 * So convert the EOB_ACT_LAST_MATCH
1406 * to EOB_ACT_END_OF_FILE.
1409 /* Reset buffer status. */
1414 case EOB_ACT_END_OF_FILE
:
1419 if ( ! yy_did_buffer_switch_on_eof
)
1428 case EOB_ACT_CONTINUE_SCAN
:
1429 yy_c_buf_p
= yytext_ptr
+ offset
;
1435 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1436 *yy_c_buf_p
= '\0'; /* preserve yytext */
1437 yy_hold_char
= *++yy_c_buf_p
;
1444 #ifdef YY_USE_PROTOS
1445 void yyrestart( FILE *input_file
)
1447 void yyrestart( input_file
)
1451 if ( ! yy_current_buffer
)
1452 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1454 yy_init_buffer( yy_current_buffer
, input_file
);
1455 yy_load_buffer_state();
1459 #ifdef YY_USE_PROTOS
1460 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1462 void yy_switch_to_buffer( new_buffer
)
1463 YY_BUFFER_STATE new_buffer
;
1466 if ( yy_current_buffer
== new_buffer
)
1469 if ( yy_current_buffer
)
1471 /* Flush out information for old buffer. */
1472 *yy_c_buf_p
= yy_hold_char
;
1473 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1474 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1477 yy_current_buffer
= new_buffer
;
1478 yy_load_buffer_state();
1480 /* We don't actually know whether we did this switch during
1481 * EOF (yywrap()) processing, but the only time this flag
1482 * is looked at is after yywrap() is called, so it's safe
1483 * to go ahead and always set it.
1485 yy_did_buffer_switch_on_eof
= 1;
1489 #ifdef YY_USE_PROTOS
1490 void yy_load_buffer_state( void )
1492 void yy_load_buffer_state()
1495 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1496 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1497 yyin
= yy_current_buffer
->yy_input_file
;
1498 yy_hold_char
= *yy_c_buf_p
;
1502 #ifdef YY_USE_PROTOS
1503 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1505 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1512 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1514 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1516 b
->yy_buf_size
= size
;
1518 /* yy_ch_buf has to be 2 characters longer than the size given because
1519 * we need to put in 2 end-of-buffer characters.
1521 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1522 if ( ! b
->yy_ch_buf
)
1523 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1525 b
->yy_is_our_buffer
= 1;
1527 yy_init_buffer( b
, file
);
1533 #ifdef YY_USE_PROTOS
1534 void yy_delete_buffer( YY_BUFFER_STATE b
)
1536 void yy_delete_buffer( b
)
1543 if ( b
== yy_current_buffer
)
1544 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
1546 if ( b
->yy_is_our_buffer
)
1547 yy_flex_free( (void *) b
->yy_ch_buf
);
1549 yy_flex_free( (void *) b
);
1553 #ifndef YY_ALWAYS_INTERACTIVE
1554 #ifndef YY_NEVER_INTERACTIVE
1555 extern int isatty
YY_PROTO(( int ));
1559 #ifdef YY_USE_PROTOS
1560 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
1562 void yy_init_buffer( b
, file
)
1569 yy_flush_buffer( b
);
1571 b
->yy_input_file
= file
;
1572 b
->yy_fill_buffer
= 1;
1574 #if YY_ALWAYS_INTERACTIVE
1575 b
->yy_is_interactive
= 1;
1577 #if YY_NEVER_INTERACTIVE
1578 b
->yy_is_interactive
= 0;
1580 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1586 #ifdef YY_USE_PROTOS
1587 void yy_flush_buffer( YY_BUFFER_STATE b
)
1589 void yy_flush_buffer( b
)
1599 /* We always need two end-of-buffer characters. The first causes
1600 * a transition to the end-of-buffer state. The second causes
1601 * a jam in that state.
1603 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1604 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1606 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1609 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1611 if ( b
== yy_current_buffer
)
1612 yy_load_buffer_state();
1616 #ifndef YY_NO_SCAN_BUFFER
1617 #ifdef YY_USE_PROTOS
1618 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
1620 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
1628 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1629 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1630 /* They forgot to leave room for the EOB's. */
1633 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1635 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1637 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1638 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1639 b
->yy_is_our_buffer
= 0;
1640 b
->yy_input_file
= 0;
1641 b
->yy_n_chars
= b
->yy_buf_size
;
1642 b
->yy_is_interactive
= 0;
1644 b
->yy_fill_buffer
= 0;
1645 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1647 yy_switch_to_buffer( b
);
1654 #ifndef YY_NO_SCAN_STRING
1655 #ifdef YY_USE_PROTOS
1656 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
1658 YY_BUFFER_STATE
yy_scan_string( yy_str
)
1659 yyconst
char *yy_str
;
1663 for ( len
= 0; yy_str
[len
]; ++len
)
1666 return yy_scan_bytes( yy_str
, len
);
1671 #ifndef YY_NO_SCAN_BYTES
1672 #ifdef YY_USE_PROTOS
1673 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
1675 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
1676 yyconst
char *bytes
;
1685 /* Get memory for full buffer, including space for trailing EOB's. */
1687 buf
= (char *) yy_flex_alloc( n
);
1689 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1691 for ( i
= 0; i
< len
; ++i
)
1694 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
1696 b
= yy_scan_buffer( buf
, n
);
1698 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1700 /* It's okay to grow etc. this buffer, and we should throw it
1701 * away when we're done.
1703 b
->yy_is_our_buffer
= 1;
1710 #ifndef YY_NO_PUSH_STATE
1711 #ifdef YY_USE_PROTOS
1712 static void yy_push_state( int new_state
)
1714 static void yy_push_state( new_state
)
1718 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
1722 yy_start_stack_depth
+= YY_START_STACK_INCR
;
1723 new_size
= yy_start_stack_depth
* sizeof( int );
1725 if ( ! yy_start_stack
)
1726 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
1729 yy_start_stack
= (int *) yy_flex_realloc(
1730 (void *) yy_start_stack
, new_size
);
1732 if ( ! yy_start_stack
)
1734 "out of memory expanding start-condition stack" );
1737 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
1744 #ifndef YY_NO_POP_STATE
1745 static void yy_pop_state()
1747 if ( --yy_start_stack_ptr
< 0 )
1748 YY_FATAL_ERROR( "start-condition stack underflow" );
1750 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
1755 #ifndef YY_NO_TOP_STATE
1756 static int yy_top_state()
1758 return yy_start_stack
[yy_start_stack_ptr
- 1];
1762 #ifndef YY_EXIT_FAILURE
1763 #define YY_EXIT_FAILURE 2
1766 #ifdef YY_USE_PROTOS
1767 static void yy_fatal_error( yyconst
char msg
[] )
1769 static void yy_fatal_error( msg
)
1773 (void) fprintf( stderr
, "%s\n", msg
);
1774 exit( YY_EXIT_FAILURE
);
1779 /* Redefine yyless() so it works in section 3 code. */
1785 /* Undo effects of setting up yytext. */ \
1786 yytext[yyleng] = yy_hold_char; \
1787 yy_c_buf_p = yytext + n; \
1788 yy_hold_char = *yy_c_buf_p; \
1789 *yy_c_buf_p = '\0'; \
1795 /* Internal utility routines. */
1798 #ifdef YY_USE_PROTOS
1799 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
1801 static void yy_flex_strncpy( s1
, s2
, n
)
1808 for ( i
= 0; i
< n
; ++i
)
1813 #ifdef YY_NEED_STRLEN
1814 #ifdef YY_USE_PROTOS
1815 static int yy_flex_strlen( yyconst
char *s
)
1817 static int yy_flex_strlen( s
)
1822 for ( n
= 0; s
[n
]; ++n
)
1830 #ifdef YY_USE_PROTOS
1831 static void *yy_flex_alloc( yy_size_t size
)
1833 static void *yy_flex_alloc( size
)
1837 return (void *) malloc( size
);
1840 #ifdef YY_USE_PROTOS
1841 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
1843 static void *yy_flex_realloc( ptr
, size
)
1848 /* The cast to (char *) in the following accommodates both
1849 * implementations that use char* generic pointers, and those
1850 * that use void* generic pointers. It works with the latter
1851 * because both ANSI C and C++ allow castless assignment from
1852 * any pointer type to void*, and deal with argument conversions
1853 * as though doing an assignment.
1855 return (void *) realloc( (char *) ptr
, size
);
1858 #ifdef YY_USE_PROTOS
1859 static void yy_flex_free( void *ptr
)
1861 static void yy_flex_free( ptr
)