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" */
29 /* Use prototypes in function declarations. */
32 /* The "const" storage-class-modifier is valid. */
35 #else /* ! __cplusplus */
43 #endif /* ! __cplusplus */
62 #define YY_PROTO(proto) proto
64 #define YY_PROTO(proto) ()
67 /* Returned upon end-of-file. */
70 /* Promotes a possibly negative, possibly signed char to an unsigned
71 * integer for use as an array index. If the signed char is negative,
72 * we want to instead treat it as an 8-bit unsigned char, hence the
75 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
77 /* Enter a start condition. This macro really ought to take a parameter,
78 * but we do it the disgusting crufty way forced on us by the ()-less
79 * definition of BEGIN.
81 #define BEGIN yy_start = 1 + 2 *
83 /* Translate the current start state into a value that can be later handed
84 * to BEGIN to return to the state. The YYSTATE alias is for lex
87 #define YY_START ((yy_start - 1) / 2)
88 #define YYSTATE YY_START
90 /* Action number for EOF rule of a given start state. */
91 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
93 /* Special action meaning "start processing a new file". */
94 #define YY_NEW_FILE yyrestart( yyin )
96 #define YY_END_OF_BUFFER_CHAR 0
98 /* Size of default input buffer. */
99 #define YY_BUF_SIZE 16384
101 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
104 extern FILE *yyin
, *yyout
;
106 #define EOB_ACT_CONTINUE_SCAN 0
107 #define EOB_ACT_END_OF_FILE 1
108 #define EOB_ACT_LAST_MATCH 2
110 /* The funky do-while in the following #define is used to turn the definition
111 * int a single C statement (which needs a semi-colon terminator). This
112 * avoids problems with code like:
114 * if ( condition_holds )
117 * do_something_else();
119 * Prior to using the do-while the compiler would get upset at the
120 * "else" because it interpreted the "if" statement as being all
121 * done when it reached the ';' after the yyless() call.
124 /* Return all but the first 'n' matched characters back to the input stream. */
129 /* Undo effects of setting up yytext. */ \
130 *yy_cp = yy_hold_char; \
131 YY_RESTORE_YY_MORE_OFFSET \
132 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
133 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
137 #define unput(c) yyunput( c, yytext_ptr )
139 /* The following is because we cannot portably get our hands on size_t
140 * (without autoconf's help, which isn't available because we want
141 * flex-generated scanners to compile on their own).
143 typedef unsigned int yy_size_t
;
146 struct yy_buffer_state
150 char *yy_ch_buf
; /* input buffer */
151 char *yy_buf_pos
; /* current position in input buffer */
153 /* Size of input buffer in bytes, not including room for EOB
156 yy_size_t yy_buf_size
;
158 /* Number of characters read into yy_ch_buf, not including EOB
163 /* Whether we "own" the buffer - i.e., we know we created it,
164 * and can realloc() it to grow it, and should free() it to
167 int yy_is_our_buffer
;
169 /* Whether this is an "interactive" input source; if so, and
170 * if we're using stdio for input, then we want to use getc()
171 * instead of fread(), to make sure we stop fetching input after
174 int yy_is_interactive
;
176 /* Whether we're considered to be at the beginning of a line.
177 * If so, '^' rules will be active on the next match, otherwise
182 /* Whether to try to fill the input buffer when we reach the
187 int yy_buffer_status
;
188 #define YY_BUFFER_NEW 0
189 #define YY_BUFFER_NORMAL 1
190 /* When an EOF's been seen but there's still some text to process
191 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
192 * shouldn't try reading from the input source any more. We might
193 * still have a bunch of tokens to match, though, because of
194 * possible backing-up.
196 * When we actually see the EOF, we change the status to "new"
197 * (via yyrestart()), so that the user can continue scanning by
198 * just pointing yyin at a new input file.
200 #define YY_BUFFER_EOF_PENDING 2
203 static YY_BUFFER_STATE yy_current_buffer
= 0;
205 /* We provide macros for accessing buffer states in case in the
206 * future we want to put the buffer states in a more general
209 #define YY_CURRENT_BUFFER yy_current_buffer
212 /* yy_hold_char holds the character lost when yytext is formed. */
213 static char yy_hold_char
;
215 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
220 /* Points to current character in buffer. */
221 static char *yy_c_buf_p
= (char *) 0;
222 static int yy_init
= 1; /* whether we need to initialize */
223 static int yy_start
= 0; /* start state number */
225 /* Flag which is used to allow yywrap()'s to do buffer switches
226 * instead of setting up a fresh yyin. A bit of a hack ...
228 static int yy_did_buffer_switch_on_eof
;
230 void yyrestart
YY_PROTO(( FILE *input_file
));
232 void yy_switch_to_buffer
YY_PROTO(( YY_BUFFER_STATE new_buffer
));
233 void yy_load_buffer_state
YY_PROTO(( void ));
234 YY_BUFFER_STATE yy_create_buffer
YY_PROTO(( FILE *file
, int size
));
235 void yy_delete_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
236 void yy_init_buffer
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file
));
237 void yy_flush_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
238 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
240 YY_BUFFER_STATE yy_scan_buffer
YY_PROTO(( char *base
, yy_size_t size
));
241 YY_BUFFER_STATE yy_scan_string
YY_PROTO(( yyconst
char *yy_str
));
242 YY_BUFFER_STATE yy_scan_bytes
YY_PROTO(( yyconst
char *bytes
, int len
));
244 static void *yy_flex_alloc
YY_PROTO(( yy_size_t
));
245 static void *yy_flex_realloc
YY_PROTO(( void *, yy_size_t
));
246 static void yy_flex_free
YY_PROTO(( void * ));
248 #define yy_new_buffer yy_create_buffer
250 #define yy_set_interactive(is_interactive) \
252 if ( ! yy_current_buffer ) \
253 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
254 yy_current_buffer->yy_is_interactive = is_interactive; \
257 #define yy_set_bol(at_bol) \
259 if ( ! yy_current_buffer ) \
260 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261 yy_current_buffer->yy_at_bol = at_bol; \
264 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
266 typedef unsigned char YY_CHAR
;
267 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
268 typedef int yy_state_type
;
270 #define yytext_ptr yytext
272 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
274 static int yy_get_next_buffer
YY_PROTO(( void ));
275 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
277 /* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
280 #define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
287 #define YY_NUM_RULES 60
288 #define YY_END_OF_BUFFER 61
289 static yyconst
short int yy_accept
[138] =
291 0, 0, 61, 58, 59, 58, 58, 58, 58, 58,
292 58, 58, 58, 58, 58, 8, 58, 58, 46, 48,
293 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
294 45, 58, 44, 0, 43, 0, 0, 0, 10, 0,
295 47, 0, 0, 0, 42, 0, 0, 0, 0, 0,
296 30, 0, 0, 0, 40, 50, 0, 7, 0, 0,
297 56, 41, 0, 29, 0, 57, 39, 49, 38, 0,
298 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299 0, 0, 35, 0, 55, 0, 24, 0, 17, 18,
300 19, 28, 0, 0, 0, 0, 0, 0, 1, 37,
302 0, 36, 20, 22, 21, 23, 27, 34, 0, 0,
303 0, 32, 53, 54, 51, 26, 25, 33, 3, 0,
304 0, 13, 9, 12, 11, 31, 2, 0, 14, 16,
305 15, 0, 5, 4, 0, 52, 0
308 static yyconst
int yy_ec
[256] =
310 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
311 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
312 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
313 1, 3, 4, 1, 1, 1, 1, 1, 1, 1,
314 1, 1, 1, 1, 1, 5, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 6, 1, 7, 8, 9, 1, 10, 1,
317 11, 1, 12, 13, 1, 1, 14, 15, 16, 1,
318 1, 17, 18, 19, 1, 20, 21, 1, 22, 1,
319 1, 1, 1, 1, 1, 1, 23, 24, 25, 26,
321 27, 28, 29, 30, 31, 13, 1, 32, 33, 34,
322 35, 36, 36, 37, 38, 39, 36, 40, 41, 36,
323 42, 36, 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,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 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,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
336 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 static yyconst
int yy_meta
[43] =
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
343 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
344 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
349 static yyconst
short int yy_base
[138] =
351 0, 0, 156, 157, 157, 34, 121, 117, 123, 129,
352 113, 115, 13, 114, 17, 157, 118, 117, 157, 15,
353 37, 142, 44, 49, 111, 12, 103, 139, 52, 54,
354 138, 57, 157, 107, 157, 102, 104, 38, 157, 108,
355 106, 109, 109, 111, 157, 96, 129, 33, 93, 57,
356 157, 74, 127, 102, 157, 101, 51, 157, 109, 88,
357 157, 157, 96, 157, 121, 157, 157, 157, 157, 91,
358 157, 96, 118, 93, 117, 92, 91, 78, 78, 112,
359 88, 71, 157, 78, 157, 73, 157, 105, 157, 157,
360 157, 157, 106, 105, 75, 76, 101, 82, 157, 157,
362 101, 157, 157, 157, 157, 157, 157, 157, 100, 72,
363 88, 157, 157, 157, 157, 157, 157, 157, 157, 70,
364 97, 157, 157, 157, 157, 157, 157, 86, 157, 157,
365 157, 51, 157, 157, 37, 157, 157
368 static yyconst
short int yy_def
[138] =
370 137, 1, 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,
378 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
379 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, 137, 137, 137, 137,
383 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
384 137, 137, 137, 137, 137, 137, 0
387 static yyconst
short int yy_nxt
[200] =
389 4, 5, 6, 4, 4, 4, 7, 8, 9, 4,
390 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
391 20, 21, 22, 23, 24, 22, 22, 22, 10, 4,
392 25, 4, 26, 4, 27, 28, 28, 29, 30, 31,
393 32, 28, 33, 49, 53, 57, 59, 61, 50, 50,
394 54, 58, 61, 64, 51, 66, 34, 66, 35, 69,
395 66, 87, 84, 60, 36, 75, 85, 37, 38, 136,
396 39, 76, 40, 135, 41, 42, 89, 90, 62, 91,
397 44, 67, 95, 68, 123, 124, 125, 70, 134, 96,
398 129, 130, 131, 71, 88, 103, 104, 105, 106, 133,
400 132, 128, 127, 126, 122, 121, 120, 119, 118, 117,
401 116, 115, 114, 113, 112, 111, 110, 109, 108, 107,
402 102, 101, 95, 100, 99, 98, 97, 94, 93, 92,
403 86, 83, 82, 81, 80, 79, 78, 77, 74, 73,
404 72, 66, 66, 65, 63, 61, 56, 55, 52, 48,
405 47, 46, 45, 44, 43, 137, 3, 137, 137, 137,
406 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
407 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
408 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
409 137, 137, 137, 137, 137, 137, 137, 137, 137
413 static yyconst
short int yy_chk
[200] =
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 6, 13, 15, 20, 21, 23, 26, 13,
420 15, 20, 24, 26, 13, 29, 6, 30, 6, 32,
421 32, 50, 48, 21, 6, 38, 48, 6, 6, 135,
422 6, 38, 6, 132, 6, 6, 52, 52, 24, 52,
423 23, 29, 57, 30, 98, 98, 98, 32, 128, 57,
424 111, 111, 111, 32, 50, 74, 74, 74, 74, 121,
426 120, 110, 109, 101, 97, 96, 95, 94, 93, 88,
427 86, 84, 82, 81, 80, 79, 78, 77, 76, 75,
428 73, 72, 70, 65, 63, 60, 59, 56, 54, 53,
429 49, 47, 46, 44, 43, 42, 41, 40, 37, 36,
430 34, 31, 28, 27, 25, 22, 18, 17, 14, 12,
431 11, 10, 9, 8, 7, 3, 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, 137,
434 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
435 137, 137, 137, 137, 137, 137, 137, 137, 137
439 static yy_state_type yy_last_accepting_state
;
440 static char *yy_last_accepting_cpos
;
442 /* The intent behind this definition is that it'll catch
443 * any uses of REJECT which flex missed.
445 #define REJECT reject_used_but_not_detected
446 #define yymore() yymore_used_but_not_detected
447 #define YY_MORE_ADJ 0
448 #define YY_RESTORE_YY_MORE_OFFSET
457 /* Macros after this point can all be overridden by user definitions in
461 #ifndef YY_SKIP_YYWRAP
463 extern "C" int yywrap
YY_PROTO(( void ));
465 extern int yywrap
YY_PROTO(( void ));
470 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
474 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
477 #ifdef YY_NEED_STRLEN
478 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
483 static int yyinput
YY_PROTO(( void ));
485 static int input
YY_PROTO(( void ));
490 static int yy_start_stack_ptr
= 0;
491 static int yy_start_stack_depth
= 0;
492 static int *yy_start_stack
= 0;
493 #ifndef YY_NO_PUSH_STATE
494 static void yy_push_state
YY_PROTO(( int new_state
));
496 #ifndef YY_NO_POP_STATE
497 static void yy_pop_state
YY_PROTO(( void ));
499 #ifndef YY_NO_TOP_STATE
500 static int yy_top_state
YY_PROTO(( void ));
504 #define YY_NO_PUSH_STATE 1
505 #define YY_NO_POP_STATE 1
506 #define YY_NO_TOP_STATE 1
509 #ifdef YY_MALLOC_DECL
517 /* Just try to get by without declaring the routines. This will fail
518 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
519 * or sizeof(void*) != sizeof(int).
524 /* Amount of stuff to slurp up with each read. */
525 #ifndef YY_READ_BUF_SIZE
526 #define YY_READ_BUF_SIZE 8192
529 /* Copy whatever the last rule matched to the standard output. */
532 /* This used to be an fputs(), but since the string might contain NUL's,
533 * we now use fwrite().
535 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
538 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
539 * is returned in "result".
542 #define YY_INPUT(buf,result,max_size) \
543 if ( yy_current_buffer->yy_is_interactive ) \
546 for ( n = 0; n < max_size && \
547 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
550 buf[n++] = (char) c; \
551 if ( c == EOF && ferror( yyin ) ) \
552 YY_FATAL_ERROR( "input in flex scanner failed" ); \
558 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
560 if( errno != EINTR) \
562 YY_FATAL_ERROR( "input in flex scanner failed" ); \
571 /* No semi-colon after return; correct usage is to write "yyterminate();" -
572 * we don't want an extra ';' after the "return" because that will cause
573 * some compilers to complain about unreachable statements.
576 #define yyterminate() return YY_NULL
579 /* Number of entries by which start-condition stack grows. */
580 #ifndef YY_START_STACK_INCR
581 #define YY_START_STACK_INCR 25
584 /* Report a fatal error. */
585 #ifndef YY_FATAL_ERROR
586 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
589 /* Default declaration of generated scanner - a define so the user can
590 * easily add parameters.
593 #define YY_DECL int yylex YY_PROTO(( void ))
596 /* Code executed at the beginning of each rule, after yytext and yyleng
599 #ifndef YY_USER_ACTION
600 #define YY_USER_ACTION
603 /* Code executed at the end of each rule. */
605 #define YY_BREAK break;
608 #define YY_RULE_SETUP \
613 register yy_state_type yy_current_state
;
614 register char *yy_cp
, *yy_bp
;
630 yy_start
= 1; /* first start state */
638 if ( ! yy_current_buffer
)
640 yy_create_buffer( yyin
, YY_BUF_SIZE
);
642 yy_load_buffer_state();
645 while ( 1 ) /* loops until end-of-file is reached */
649 /* Support of yytext. */
650 *yy_cp
= yy_hold_char
;
652 /* yy_bp points to the position in yy_ch_buf of the start of
657 yy_current_state
= yy_start
;
661 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
662 if ( yy_accept
[yy_current_state
] )
664 yy_last_accepting_state
= yy_current_state
;
665 yy_last_accepting_cpos
= yy_cp
;
667 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
669 yy_current_state
= (int) yy_def
[yy_current_state
];
670 if ( yy_current_state
>= 138 )
671 yy_c
= yy_meta
[(unsigned int) yy_c
];
673 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
676 while ( yy_base
[yy_current_state
] != 157 );
679 yy_act
= yy_accept
[yy_current_state
];
681 { /* have to back up */
682 yy_cp
= yy_last_accepting_cpos
;
683 yy_current_state
= yy_last_accepting_state
;
684 yy_act
= yy_accept
[yy_current_state
];
690 do_action
: /* This label is used only to access EOF actions. */
694 { /* beginning of action switch */
695 case 0: /* must back up */
696 /* undo the effects of YY_DO_BEFORE_ACTION */
697 *yy_cp
= yy_hold_char
;
698 yy_cp
= yy_last_accepting_cpos
;
699 yy_current_state
= yy_last_accepting_state
;
980 {sprintf(buf
,"%s Naturlich!",yytext
);return(buf
);}
985 {sprintf(buf
,"%s Seig Heil!",yytext
);return(buf
);}
1002 #line 1003 "lex.yy.c"
1003 case YY_STATE_EOF(INITIAL
):
1006 case YY_END_OF_BUFFER
:
1008 /* Amount of text matched not including the EOB char. */
1009 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
1011 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1012 *yy_cp
= yy_hold_char
;
1013 YY_RESTORE_YY_MORE_OFFSET
1015 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
1017 /* We're scanning a new file or input source. It's
1018 * possible that this happened because the user
1019 * just pointed yyin at a new source and called
1020 * yylex(). If so, then we have to assure
1021 * consistency between yy_current_buffer and our
1022 * globals. Here is the right place to do so, because
1023 * this is the first action (other than possibly a
1024 * back-up) that will match for the new input source.
1026 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1027 yy_current_buffer
->yy_input_file
= yyin
;
1028 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1031 /* Note that here we test for yy_c_buf_p "<=" to the position
1032 * of the first EOB in the buffer, since yy_c_buf_p will
1033 * already have been incremented past the NUL character
1034 * (since all states make transitions on EOB to the
1035 * end-of-buffer state). Contrast this with the test
1038 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1039 { /* This was really a NUL. */
1040 yy_state_type yy_next_state
;
1042 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
1044 yy_current_state
= yy_get_previous_state();
1046 /* Okay, we're now positioned to make the NUL
1047 * transition. We couldn't have
1048 * yy_get_previous_state() go ahead and do it
1049 * for us because it doesn't know how to deal
1050 * with the possibility of jamming (and we don't
1051 * want to build jamming into it because then it
1052 * will run more slowly).
1055 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1057 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1059 if ( yy_next_state
)
1061 /* Consume the NUL. */
1062 yy_cp
= ++yy_c_buf_p
;
1063 yy_current_state
= yy_next_state
;
1070 goto yy_find_action
;
1074 else switch ( yy_get_next_buffer() )
1076 case EOB_ACT_END_OF_FILE
:
1078 yy_did_buffer_switch_on_eof
= 0;
1082 /* Note: because we've taken care in
1083 * yy_get_next_buffer() to have set up
1084 * yytext, we can now set up
1085 * yy_c_buf_p so that if some total
1086 * hoser (like flex itself) wants to
1087 * call the scanner after we return the
1088 * YY_NULL, it'll still work - another
1089 * YY_NULL will get returned.
1091 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
1093 yy_act
= YY_STATE_EOF(YY_START
);
1099 if ( ! yy_did_buffer_switch_on_eof
)
1105 case EOB_ACT_CONTINUE_SCAN
:
1107 yytext_ptr
+ yy_amount_of_matched_text
;
1109 yy_current_state
= yy_get_previous_state();
1112 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1115 case EOB_ACT_LAST_MATCH
:
1117 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
1119 yy_current_state
= yy_get_previous_state();
1122 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1123 goto yy_find_action
;
1130 "fatal flex scanner internal error--no action found" );
1131 } /* end of action switch */
1132 } /* end of scanning one token */
1133 } /* end of yylex */
1136 /* yy_get_next_buffer - try to read in a new buffer
1138 * Returns a code representing an action:
1139 * EOB_ACT_LAST_MATCH -
1140 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1141 * EOB_ACT_END_OF_FILE - end of file
1144 static int yy_get_next_buffer()
1146 register char *dest
= yy_current_buffer
->yy_ch_buf
;
1147 register char *source
= yytext_ptr
;
1148 register int number_to_move
, i
;
1151 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
1153 "fatal flex scanner internal error--end of buffer missed" );
1155 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
1156 { /* Don't try to fill the buffer, so this is an EOF. */
1157 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
1159 /* We matched a single character, the EOB, so
1160 * treat this as a final EOF.
1162 return EOB_ACT_END_OF_FILE
;
1167 /* We matched some text prior to the EOB, first
1170 return EOB_ACT_LAST_MATCH
;
1174 /* Try to read more data. */
1176 /* First move last chars to start of buffer. */
1177 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
1179 for ( i
= 0; i
< number_to_move
; ++i
)
1180 *(dest
++) = *(source
++);
1182 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1183 /* don't do the read, it's not guaranteed to return an EOF,
1186 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1191 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1193 while ( num_to_read
<= 0 )
1194 { /* Not enough room in the buffer - grow it. */
1195 #ifdef YY_USES_REJECT
1197 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1200 /* just a shorter name for the current buffer */
1201 YY_BUFFER_STATE b
= yy_current_buffer
;
1203 int yy_c_buf_p_offset
=
1204 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1206 if ( b
->yy_is_our_buffer
)
1208 int new_size
= b
->yy_buf_size
* 2;
1210 if ( new_size
<= 0 )
1211 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1213 b
->yy_buf_size
*= 2;
1215 b
->yy_ch_buf
= (char *)
1216 /* Include room in for 2 EOB chars. */
1217 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1218 b
->yy_buf_size
+ 2 );
1221 /* Can't grow it, we don't own it. */
1224 if ( ! b
->yy_ch_buf
)
1226 "fatal error - scanner input buffer overflow" );
1228 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1230 num_to_read
= yy_current_buffer
->yy_buf_size
-
1235 if ( num_to_read
> YY_READ_BUF_SIZE
)
1236 num_to_read
= YY_READ_BUF_SIZE
;
1238 /* Read in more data. */
1239 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1240 yy_n_chars
, num_to_read
);
1242 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1245 if ( yy_n_chars
== 0 )
1247 if ( number_to_move
== YY_MORE_ADJ
)
1249 ret_val
= EOB_ACT_END_OF_FILE
;
1255 ret_val
= EOB_ACT_LAST_MATCH
;
1256 yy_current_buffer
->yy_buffer_status
=
1257 YY_BUFFER_EOF_PENDING
;
1262 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1264 yy_n_chars
+= number_to_move
;
1265 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1266 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1268 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1274 /* yy_get_previous_state - get the state just before the EOB char was reached */
1276 static yy_state_type
yy_get_previous_state()
1278 register yy_state_type yy_current_state
;
1279 register char *yy_cp
;
1281 yy_current_state
= yy_start
;
1283 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1285 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1286 if ( yy_accept
[yy_current_state
] )
1288 yy_last_accepting_state
= yy_current_state
;
1289 yy_last_accepting_cpos
= yy_cp
;
1291 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1293 yy_current_state
= (int) yy_def
[yy_current_state
];
1294 if ( yy_current_state
>= 138 )
1295 yy_c
= yy_meta
[(unsigned int) yy_c
];
1297 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1300 return yy_current_state
;
1304 /* yy_try_NUL_trans - try to make a transition on the NUL character
1307 * next_state = yy_try_NUL_trans( current_state );
1310 #ifdef YY_USE_PROTOS
1311 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1313 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1314 yy_state_type yy_current_state
;
1317 register int yy_is_jam
;
1318 register char *yy_cp
= yy_c_buf_p
;
1320 register YY_CHAR yy_c
= 1;
1321 if ( yy_accept
[yy_current_state
] )
1323 yy_last_accepting_state
= yy_current_state
;
1324 yy_last_accepting_cpos
= yy_cp
;
1326 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1328 yy_current_state
= (int) yy_def
[yy_current_state
];
1329 if ( yy_current_state
>= 138 )
1330 yy_c
= yy_meta
[(unsigned int) yy_c
];
1332 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1333 yy_is_jam
= (yy_current_state
== 137);
1335 return yy_is_jam
? 0 : yy_current_state
;
1340 #ifdef YY_USE_PROTOS
1341 static void yyunput( int c
, register char *yy_bp
)
1343 static void yyunput( c
, yy_bp
)
1345 register char *yy_bp
;
1348 register char *yy_cp
= yy_c_buf_p
;
1350 /* undo effects of setting up yytext */
1351 *yy_cp
= yy_hold_char
;
1353 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1354 { /* need to shift things up to make room */
1355 /* +2 for EOB chars. */
1356 register int number_to_move
= yy_n_chars
+ 2;
1357 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1358 yy_current_buffer
->yy_buf_size
+ 2];
1359 register char *source
=
1360 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1362 while ( source
> yy_current_buffer
->yy_ch_buf
)
1363 *--dest
= *--source
;
1365 yy_cp
+= (int) (dest
- source
);
1366 yy_bp
+= (int) (dest
- source
);
1367 yy_current_buffer
->yy_n_chars
=
1368 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1370 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1371 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1374 *--yy_cp
= (char) c
;
1378 yy_hold_char
= *yy_cp
;
1381 #endif /* ifndef YY_NO_UNPUT */
1385 static int yyinput()
1392 *yy_c_buf_p
= yy_hold_char
;
1394 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1396 /* yy_c_buf_p now points to the character we want to return.
1397 * If this occurs *before* the EOB characters, then it's a
1398 * valid NUL; if not, then we've hit the end of the buffer.
1400 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1401 /* This was really a NUL. */
1405 { /* need more input */
1406 int offset
= yy_c_buf_p
- yytext_ptr
;
1409 switch ( yy_get_next_buffer() )
1411 case EOB_ACT_LAST_MATCH
:
1412 /* This happens because yy_g_n_b()
1413 * sees that we've accumulated a
1414 * token and flags that we need to
1415 * try matching the token before
1416 * proceeding. But for input(),
1417 * there's no matching to consider.
1418 * So convert the EOB_ACT_LAST_MATCH
1419 * to EOB_ACT_END_OF_FILE.
1422 /* Reset buffer status. */
1427 case EOB_ACT_END_OF_FILE
:
1432 if ( ! yy_did_buffer_switch_on_eof
)
1441 case EOB_ACT_CONTINUE_SCAN
:
1442 yy_c_buf_p
= yytext_ptr
+ offset
;
1448 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1449 *yy_c_buf_p
= '\0'; /* preserve yytext */
1450 yy_hold_char
= *++yy_c_buf_p
;
1457 #ifdef YY_USE_PROTOS
1458 void yyrestart( FILE *input_file
)
1460 void yyrestart( input_file
)
1464 if ( ! yy_current_buffer
)
1465 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1467 yy_init_buffer( yy_current_buffer
, input_file
);
1468 yy_load_buffer_state();
1472 #ifdef YY_USE_PROTOS
1473 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1475 void yy_switch_to_buffer( new_buffer
)
1476 YY_BUFFER_STATE new_buffer
;
1479 if ( yy_current_buffer
== new_buffer
)
1482 if ( yy_current_buffer
)
1484 /* Flush out information for old buffer. */
1485 *yy_c_buf_p
= yy_hold_char
;
1486 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1487 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1490 yy_current_buffer
= new_buffer
;
1491 yy_load_buffer_state();
1493 /* We don't actually know whether we did this switch during
1494 * EOF (yywrap()) processing, but the only time this flag
1495 * is looked at is after yywrap() is called, so it's safe
1496 * to go ahead and always set it.
1498 yy_did_buffer_switch_on_eof
= 1;
1502 #ifdef YY_USE_PROTOS
1503 void yy_load_buffer_state( void )
1505 void yy_load_buffer_state()
1508 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1509 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1510 yyin
= yy_current_buffer
->yy_input_file
;
1511 yy_hold_char
= *yy_c_buf_p
;
1515 #ifdef YY_USE_PROTOS
1516 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1518 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1525 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1527 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1529 b
->yy_buf_size
= size
;
1531 /* yy_ch_buf has to be 2 characters longer than the size given because
1532 * we need to put in 2 end-of-buffer characters.
1534 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1535 if ( ! b
->yy_ch_buf
)
1536 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1538 b
->yy_is_our_buffer
= 1;
1540 yy_init_buffer( b
, file
);
1546 #ifdef YY_USE_PROTOS
1547 void yy_delete_buffer( YY_BUFFER_STATE b
)
1549 void yy_delete_buffer( b
)
1556 if ( b
== yy_current_buffer
)
1557 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
1559 if ( b
->yy_is_our_buffer
)
1560 yy_flex_free( (void *) b
->yy_ch_buf
);
1562 yy_flex_free( (void *) b
);
1569 #ifndef YY_ALWAYS_INTERACTIVE
1570 #ifndef YY_NEVER_INTERACTIVE
1571 extern int isatty
YY_PROTO(( int ));
1576 #ifdef YY_USE_PROTOS
1577 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
1579 void yy_init_buffer( b
, file
)
1586 yy_flush_buffer( b
);
1588 b
->yy_input_file
= file
;
1589 b
->yy_fill_buffer
= 1;
1591 #if YY_ALWAYS_INTERACTIVE
1592 b
->yy_is_interactive
= 1;
1594 #if YY_NEVER_INTERACTIVE
1595 b
->yy_is_interactive
= 0;
1597 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1603 #ifdef YY_USE_PROTOS
1604 void yy_flush_buffer( YY_BUFFER_STATE b
)
1606 void yy_flush_buffer( b
)
1616 /* We always need two end-of-buffer characters. The first causes
1617 * a transition to the end-of-buffer state. The second causes
1618 * a jam in that state.
1620 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1621 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1623 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1626 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1628 if ( b
== yy_current_buffer
)
1629 yy_load_buffer_state();
1633 #ifndef YY_NO_SCAN_BUFFER
1634 #ifdef YY_USE_PROTOS
1635 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
1637 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
1645 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1646 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1647 /* They forgot to leave room for the EOB's. */
1650 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1652 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1654 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1655 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1656 b
->yy_is_our_buffer
= 0;
1657 b
->yy_input_file
= 0;
1658 b
->yy_n_chars
= b
->yy_buf_size
;
1659 b
->yy_is_interactive
= 0;
1661 b
->yy_fill_buffer
= 0;
1662 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1664 yy_switch_to_buffer( b
);
1671 #ifndef YY_NO_SCAN_STRING
1672 #ifdef YY_USE_PROTOS
1673 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
1675 YY_BUFFER_STATE
yy_scan_string( yy_str
)
1676 yyconst
char *yy_str
;
1680 for ( len
= 0; yy_str
[len
]; ++len
)
1683 return yy_scan_bytes( yy_str
, len
);
1688 #ifndef YY_NO_SCAN_BYTES
1689 #ifdef YY_USE_PROTOS
1690 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
1692 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
1693 yyconst
char *bytes
;
1702 /* Get memory for full buffer, including space for trailing EOB's. */
1704 buf
= (char *) yy_flex_alloc( n
);
1706 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1708 for ( i
= 0; i
< len
; ++i
)
1711 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
1713 b
= yy_scan_buffer( buf
, n
);
1715 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1717 /* It's okay to grow etc. this buffer, and we should throw it
1718 * away when we're done.
1720 b
->yy_is_our_buffer
= 1;
1727 #ifndef YY_NO_PUSH_STATE
1728 #ifdef YY_USE_PROTOS
1729 static void yy_push_state( int new_state
)
1731 static void yy_push_state( new_state
)
1735 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
1739 yy_start_stack_depth
+= YY_START_STACK_INCR
;
1740 new_size
= yy_start_stack_depth
* sizeof( int );
1742 if ( ! yy_start_stack
)
1743 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
1746 yy_start_stack
= (int *) yy_flex_realloc(
1747 (void *) yy_start_stack
, new_size
);
1749 if ( ! yy_start_stack
)
1751 "out of memory expanding start-condition stack" );
1754 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
1761 #ifndef YY_NO_POP_STATE
1762 static void yy_pop_state()
1764 if ( --yy_start_stack_ptr
< 0 )
1765 YY_FATAL_ERROR( "start-condition stack underflow" );
1767 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
1772 #ifndef YY_NO_TOP_STATE
1773 static int yy_top_state()
1775 return yy_start_stack
[yy_start_stack_ptr
- 1];
1779 #ifndef YY_EXIT_FAILURE
1780 #define YY_EXIT_FAILURE 2
1783 #ifdef YY_USE_PROTOS
1784 static void yy_fatal_error( yyconst
char msg
[] )
1786 static void yy_fatal_error( msg
)
1790 (void) fprintf( stderr
, "%s\n", msg
);
1791 exit( YY_EXIT_FAILURE
);
1796 /* Redefine yyless() so it works in section 3 code. */
1802 /* Undo effects of setting up yytext. */ \
1803 yytext[yyleng] = yy_hold_char; \
1804 yy_c_buf_p = yytext + n; \
1805 yy_hold_char = *yy_c_buf_p; \
1806 *yy_c_buf_p = '\0'; \
1812 /* Internal utility routines. */
1815 #ifdef YY_USE_PROTOS
1816 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
1818 static void yy_flex_strncpy( s1
, s2
, n
)
1825 for ( i
= 0; i
< n
; ++i
)
1830 #ifdef YY_NEED_STRLEN
1831 #ifdef YY_USE_PROTOS
1832 static int yy_flex_strlen( yyconst
char *s
)
1834 static int yy_flex_strlen( s
)
1839 for ( n
= 0; s
[n
]; ++n
)
1847 #ifdef YY_USE_PROTOS
1848 static void *yy_flex_alloc( yy_size_t size
)
1850 static void *yy_flex_alloc( size
)
1854 return (void *) malloc( size
);
1857 #ifdef YY_USE_PROTOS
1858 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
1860 static void *yy_flex_realloc( ptr
, size
)
1865 /* The cast to (char *) in the following accommodates both
1866 * implementations that use char* generic pointers, and those
1867 * that use void* generic pointers. It works with the latter
1868 * because both ANSI C and C++ allow castless assignment from
1869 * any pointer type to void*, and deal with argument conversions
1870 * as though doing an assignment.
1872 return (void *) realloc( (char *) ptr
, size
);
1875 #ifdef YY_USE_PROTOS
1876 static void yy_flex_free( void *ptr
)
1878 static void yy_flex_free( ptr
)