1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
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 15
288 #define YY_END_OF_BUFFER 16
289 static yyconst
short int yy_accept
[60] =
291 0, 0, 16, 14, 13, 12, 11, 8, 8, 10,
292 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
293 10, 8, 0, 10, 10, 10, 10, 10, 10, 10,
294 10, 10, 10, 10, 10, 10, 7, 9, 10, 10,
295 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
296 5, 1, 2, 3, 10, 6, 10, 4, 0
299 static yyconst
int yy_ec
[256] =
301 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
302 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 4, 1, 1, 5, 1, 1, 1, 1, 1,
305 1, 1, 1, 1, 1, 1, 1, 6, 7, 7,
306 7, 7, 7, 7, 7, 7, 7, 1, 8, 1,
307 1, 1, 1, 1, 9, 10, 11, 12, 13, 10,
308 14, 15, 16, 15, 15, 15, 17, 18, 15, 15,
309 15, 19, 20, 15, 15, 15, 15, 15, 15, 15,
310 1, 1, 1, 1, 15, 1, 21, 10, 22, 23,
312 24, 10, 25, 15, 26, 15, 15, 15, 27, 28,
313 15, 29, 15, 30, 31, 15, 15, 15, 15, 32,
314 15, 15, 1, 1, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
319 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
320 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
321 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,
331 static yyconst
int yy_meta
[33] =
333 1, 1, 1, 1, 1, 2, 2, 1, 2, 2,
334 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
335 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
339 static yyconst
short int yy_base
[62] =
341 0, 0, 83, 84, 84, 84, 84, 27, 29, 70,
342 0, 62, 61, 60, 20, 55, 47, 46, 45, 12,
343 35, 37, 0, 0, 62, 60, 59, 58, 53, 49,
344 45, 43, 42, 41, 37, 32, 0, 0, 43, 44,
345 43, 42, 42, 36, 23, 27, 26, 25, 25, 20,
346 0, 0, 0, 0, 35, 0, 23, 0, 84, 58,
350 static yyconst
short int yy_def
[62] =
352 59, 1, 59, 59, 59, 59, 59, 59, 59, 60,
353 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
354 60, 59, 61, 60, 60, 60, 60, 60, 60, 60,
355 60, 60, 60, 60, 60, 60, 60, 61, 60, 60,
356 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
357 60, 60, 60, 60, 60, 60, 60, 60, 0, 59,
361 static yyconst
short int yy_nxt
[117] =
363 4, 5, 6, 5, 7, 8, 9, 7, 10, 11,
364 12, 13, 11, 14, 11, 15, 11, 11, 11, 11,
365 16, 17, 18, 11, 19, 20, 11, 11, 21, 11,
366 11, 11, 22, 22, 22, 22, 29, 30, 35, 36,
367 37, 37, 22, 22, 38, 58, 58, 56, 57, 54,
368 53, 52, 51, 56, 55, 54, 53, 52, 23, 24,
369 24, 51, 50, 49, 48, 47, 46, 45, 44, 43,
370 42, 41, 40, 39, 34, 33, 32, 31, 28, 27,
371 26, 25, 59, 3, 59, 59, 59, 59, 59, 59,
372 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
374 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
375 59, 59, 59, 59, 59, 59
378 static yyconst
short int yy_chk
[117] =
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 8, 8, 9, 9, 15, 15, 20, 20,
384 21, 21, 22, 22, 61, 57, 55, 50, 49, 48,
385 47, 46, 45, 44, 43, 42, 41, 40, 8, 60,
386 60, 39, 36, 35, 34, 33, 32, 31, 30, 29,
387 28, 27, 26, 25, 19, 18, 17, 16, 14, 13,
388 12, 10, 3, 59, 59, 59, 59, 59, 59, 59,
389 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
391 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
392 59, 59, 59, 59, 59, 59
395 static yy_state_type yy_last_accepting_state
;
396 static char *yy_last_accepting_cpos
;
398 /* The intent behind this definition is that it'll catch
399 * any uses of REJECT which flex missed.
401 #define REJECT reject_used_but_not_detected
402 #define yymore() yymore_used_but_not_detected
403 #define YY_MORE_ADJ 0
404 #define YY_RESTORE_YY_MORE_OFFSET
409 Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
411 This file is part of GAS, the GNU Assembler.
413 GAS is free software; you can redistribute it and/or modify
414 it under the terms of the GNU General Public License as published by
415 the Free Software Foundation; either version 2, or (at your option)
418 GAS is distributed in the hope that it will be useful,
419 but WITHOUT ANY WARRANTY; without even the implied warranty of
420 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
421 GNU General Public License for more details.
423 You should have received a copy of the GNU General Public License
424 along with GAS; see the file COPYING. If not, write to the Free
425 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
427 #line 22 "itbl-lex.l"
432 #include <itbl-parse.h>
435 #define DBG(x) printf x
436 #define MDBG(x) printf x
442 int insntbl_line
= 1;
445 /* Macros after this point can all be overridden by user definitions in
449 #ifndef YY_SKIP_YYWRAP
451 extern "C" int yywrap
YY_PROTO(( void ));
453 extern int yywrap
YY_PROTO(( void ));
458 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
462 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
465 #ifdef YY_NEED_STRLEN
466 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
471 static int yyinput
YY_PROTO(( void ));
473 static int input
YY_PROTO(( void ));
478 static int yy_start_stack_ptr
= 0;
479 static int yy_start_stack_depth
= 0;
480 static int *yy_start_stack
= 0;
481 #ifndef YY_NO_PUSH_STATE
482 static void yy_push_state
YY_PROTO(( int new_state
));
484 #ifndef YY_NO_POP_STATE
485 static void yy_pop_state
YY_PROTO(( void ));
487 #ifndef YY_NO_TOP_STATE
488 static int yy_top_state
YY_PROTO(( void ));
492 #define YY_NO_PUSH_STATE 1
493 #define YY_NO_POP_STATE 1
494 #define YY_NO_TOP_STATE 1
497 #ifdef YY_MALLOC_DECL
505 /* Just try to get by without declaring the routines. This will fail
506 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
507 * or sizeof(void*) != sizeof(int).
512 /* Amount of stuff to slurp up with each read. */
513 #ifndef YY_READ_BUF_SIZE
514 #define YY_READ_BUF_SIZE 8192
517 /* Copy whatever the last rule matched to the standard output. */
520 /* This used to be an fputs(), but since the string might contain NUL's,
521 * we now use fwrite().
523 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
526 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
527 * is returned in "result".
530 #define YY_INPUT(buf,result,max_size) \
531 if ( yy_current_buffer->yy_is_interactive ) \
534 for ( n = 0; n < max_size && \
535 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
538 buf[n++] = (char) c; \
539 if ( c == EOF && ferror( yyin ) ) \
540 YY_FATAL_ERROR( "input in flex scanner failed" ); \
546 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
548 if( errno != EINTR) \
550 YY_FATAL_ERROR( "input in flex scanner failed" ); \
559 /* No semi-colon after return; correct usage is to write "yyterminate();" -
560 * we don't want an extra ';' after the "return" because that will cause
561 * some compilers to complain about unreachable statements.
564 #define yyterminate() return YY_NULL
567 /* Number of entries by which start-condition stack grows. */
568 #ifndef YY_START_STACK_INCR
569 #define YY_START_STACK_INCR 25
572 /* Report a fatal error. */
573 #ifndef YY_FATAL_ERROR
574 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
577 /* Default declaration of generated scanner - a define so the user can
578 * easily add parameters.
581 #define YY_DECL int yylex YY_PROTO(( void ))
584 /* Code executed at the beginning of each rule, after yytext and yyleng
587 #ifndef YY_USER_ACTION
588 #define YY_USER_ACTION
591 /* Code executed at the end of each rule. */
593 #define YY_BREAK break;
596 #define YY_RULE_SETUP \
601 register yy_state_type yy_current_state
;
602 register char *yy_cp
, *yy_bp
;
605 #line 44 "itbl-lex.l"
619 yy_start
= 1; /* first start state */
627 if ( ! yy_current_buffer
)
629 yy_create_buffer( yyin
, YY_BUF_SIZE
);
631 yy_load_buffer_state();
634 while ( 1 ) /* loops until end-of-file is reached */
638 /* Support of yytext. */
639 *yy_cp
= yy_hold_char
;
641 /* yy_bp points to the position in yy_ch_buf of the start of
646 yy_current_state
= yy_start
;
650 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
651 if ( yy_accept
[yy_current_state
] )
653 yy_last_accepting_state
= yy_current_state
;
654 yy_last_accepting_cpos
= yy_cp
;
656 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
658 yy_current_state
= (int) yy_def
[yy_current_state
];
659 if ( yy_current_state
>= 60 )
660 yy_c
= yy_meta
[(unsigned int) yy_c
];
662 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
665 while ( yy_base
[yy_current_state
] != 84 );
668 yy_act
= yy_accept
[yy_current_state
];
670 { /* have to back up */
671 yy_cp
= yy_last_accepting_cpos
;
672 yy_current_state
= yy_last_accepting_state
;
673 yy_act
= yy_accept
[yy_current_state
];
679 do_action
: /* This label is used only to access EOF actions. */
683 { /* beginning of action switch */
684 case 0: /* must back up */
685 /* undo the effects of YY_DO_BEFORE_ACTION */
686 *yy_cp
= yy_hold_char
;
687 yy_cp
= yy_last_accepting_cpos
;
688 yy_current_state
= yy_last_accepting_state
;
693 #line 46 "itbl-lex.l"
700 #line 49 "itbl-lex.l"
707 #line 52 "itbl-lex.l"
714 #line 55 "itbl-lex.l"
721 #line 58 "itbl-lex.l"
728 #line 61 "itbl-lex.l"
735 #line 64 "itbl-lex.l"
738 yylval
.processor
= strtoul (yytext
+1, 0, 0);
744 #line 69 "itbl-lex.l"
747 yylval
.num
= strtoul (yytext
, 0, 0);
753 #line 74 "itbl-lex.l"
756 yylval
.num
= strtoul (yytext
, 0, 0);
762 #line 79 "itbl-lex.l"
765 yylval
.str
= strdup (yytext
);
771 #line 84 "itbl-lex.l"
774 while ((c
= input ()) != EOF
)
786 #line 95 "itbl-lex.l"
789 MDBG (("in lex, NL = %d (x%x)\n", NL
, NL
));
795 #line 100 "itbl-lex.l"
801 #line 102 "itbl-lex.l"
803 MDBG (("char = %x, %d\n", yytext
[0], yytext
[0]));
809 #line 106 "itbl-lex.l"
813 case YY_STATE_EOF(INITIAL
):
816 case YY_END_OF_BUFFER
:
818 /* Amount of text matched not including the EOB char. */
819 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
821 /* Undo the effects of YY_DO_BEFORE_ACTION. */
822 *yy_cp
= yy_hold_char
;
823 YY_RESTORE_YY_MORE_OFFSET
825 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
827 /* We're scanning a new file or input source. It's
828 * possible that this happened because the user
829 * just pointed yyin at a new source and called
830 * yylex(). If so, then we have to assure
831 * consistency between yy_current_buffer and our
832 * globals. Here is the right place to do so, because
833 * this is the first action (other than possibly a
834 * back-up) that will match for the new input source.
836 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
837 yy_current_buffer
->yy_input_file
= yyin
;
838 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
841 /* Note that here we test for yy_c_buf_p "<=" to the position
842 * of the first EOB in the buffer, since yy_c_buf_p will
843 * already have been incremented past the NUL character
844 * (since all states make transitions on EOB to the
845 * end-of-buffer state). Contrast this with the test
848 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
849 { /* This was really a NUL. */
850 yy_state_type yy_next_state
;
852 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
854 yy_current_state
= yy_get_previous_state();
856 /* Okay, we're now positioned to make the NUL
857 * transition. We couldn't have
858 * yy_get_previous_state() go ahead and do it
859 * for us because it doesn't know how to deal
860 * with the possibility of jamming (and we don't
861 * want to build jamming into it because then it
862 * will run more slowly).
865 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
867 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
871 /* Consume the NUL. */
872 yy_cp
= ++yy_c_buf_p
;
873 yy_current_state
= yy_next_state
;
884 else switch ( yy_get_next_buffer() )
886 case EOB_ACT_END_OF_FILE
:
888 yy_did_buffer_switch_on_eof
= 0;
892 /* Note: because we've taken care in
893 * yy_get_next_buffer() to have set up
894 * yytext, we can now set up
895 * yy_c_buf_p so that if some total
896 * hoser (like flex itself) wants to
897 * call the scanner after we return the
898 * YY_NULL, it'll still work - another
899 * YY_NULL will get returned.
901 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
903 yy_act
= YY_STATE_EOF(YY_START
);
909 if ( ! yy_did_buffer_switch_on_eof
)
915 case EOB_ACT_CONTINUE_SCAN
:
917 yytext_ptr
+ yy_amount_of_matched_text
;
919 yy_current_state
= yy_get_previous_state();
922 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
925 case EOB_ACT_LAST_MATCH
:
927 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
929 yy_current_state
= yy_get_previous_state();
932 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
940 "fatal flex scanner internal error--no action found" );
941 } /* end of action switch */
942 } /* end of scanning one token */
946 /* yy_get_next_buffer - try to read in a new buffer
948 * Returns a code representing an action:
949 * EOB_ACT_LAST_MATCH -
950 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
951 * EOB_ACT_END_OF_FILE - end of file
954 static int yy_get_next_buffer()
956 register char *dest
= yy_current_buffer
->yy_ch_buf
;
957 register char *source
= yytext_ptr
;
958 register int number_to_move
, i
;
961 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
963 "fatal flex scanner internal error--end of buffer missed" );
965 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
966 { /* Don't try to fill the buffer, so this is an EOF. */
967 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
969 /* We matched a single character, the EOB, so
970 * treat this as a final EOF.
972 return EOB_ACT_END_OF_FILE
;
977 /* We matched some text prior to the EOB, first
980 return EOB_ACT_LAST_MATCH
;
984 /* Try to read more data. */
986 /* First move last chars to start of buffer. */
987 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
989 for ( i
= 0; i
< number_to_move
; ++i
)
990 *(dest
++) = *(source
++);
992 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
993 /* don't do the read, it's not guaranteed to return an EOF,
996 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1001 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1003 while ( num_to_read
<= 0 )
1004 { /* Not enough room in the buffer - grow it. */
1005 #ifdef YY_USES_REJECT
1007 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1010 /* just a shorter name for the current buffer */
1011 YY_BUFFER_STATE b
= yy_current_buffer
;
1013 int yy_c_buf_p_offset
=
1014 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1016 if ( b
->yy_is_our_buffer
)
1018 int new_size
= b
->yy_buf_size
* 2;
1020 if ( new_size
<= 0 )
1021 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1023 b
->yy_buf_size
*= 2;
1025 b
->yy_ch_buf
= (char *)
1026 /* Include room in for 2 EOB chars. */
1027 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1028 b
->yy_buf_size
+ 2 );
1031 /* Can't grow it, we don't own it. */
1034 if ( ! b
->yy_ch_buf
)
1036 "fatal error - scanner input buffer overflow" );
1038 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1040 num_to_read
= yy_current_buffer
->yy_buf_size
-
1045 if ( num_to_read
> YY_READ_BUF_SIZE
)
1046 num_to_read
= YY_READ_BUF_SIZE
;
1048 /* Read in more data. */
1049 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1050 yy_n_chars
, num_to_read
);
1052 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1055 if ( yy_n_chars
== 0 )
1057 if ( number_to_move
== YY_MORE_ADJ
)
1059 ret_val
= EOB_ACT_END_OF_FILE
;
1065 ret_val
= EOB_ACT_LAST_MATCH
;
1066 yy_current_buffer
->yy_buffer_status
=
1067 YY_BUFFER_EOF_PENDING
;
1072 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1074 yy_n_chars
+= number_to_move
;
1075 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1076 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1078 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1084 /* yy_get_previous_state - get the state just before the EOB char was reached */
1086 static yy_state_type
yy_get_previous_state()
1088 register yy_state_type yy_current_state
;
1089 register char *yy_cp
;
1091 yy_current_state
= yy_start
;
1093 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1095 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1096 if ( yy_accept
[yy_current_state
] )
1098 yy_last_accepting_state
= yy_current_state
;
1099 yy_last_accepting_cpos
= yy_cp
;
1101 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1103 yy_current_state
= (int) yy_def
[yy_current_state
];
1104 if ( yy_current_state
>= 60 )
1105 yy_c
= yy_meta
[(unsigned int) yy_c
];
1107 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1110 return yy_current_state
;
1114 /* yy_try_NUL_trans - try to make a transition on the NUL character
1117 * next_state = yy_try_NUL_trans( current_state );
1120 #ifdef YY_USE_PROTOS
1121 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1123 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1124 yy_state_type yy_current_state
;
1127 register int yy_is_jam
;
1128 register char *yy_cp
= yy_c_buf_p
;
1130 register YY_CHAR yy_c
= 1;
1131 if ( yy_accept
[yy_current_state
] )
1133 yy_last_accepting_state
= yy_current_state
;
1134 yy_last_accepting_cpos
= yy_cp
;
1136 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1138 yy_current_state
= (int) yy_def
[yy_current_state
];
1139 if ( yy_current_state
>= 60 )
1140 yy_c
= yy_meta
[(unsigned int) yy_c
];
1142 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1143 yy_is_jam
= (yy_current_state
== 59);
1145 return yy_is_jam
? 0 : yy_current_state
;
1150 #ifdef YY_USE_PROTOS
1151 static void yyunput( int c
, register char *yy_bp
)
1153 static void yyunput( c
, yy_bp
)
1155 register char *yy_bp
;
1158 register char *yy_cp
= yy_c_buf_p
;
1160 /* undo effects of setting up yytext */
1161 *yy_cp
= yy_hold_char
;
1163 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1164 { /* need to shift things up to make room */
1165 /* +2 for EOB chars. */
1166 register int number_to_move
= yy_n_chars
+ 2;
1167 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1168 yy_current_buffer
->yy_buf_size
+ 2];
1169 register char *source
=
1170 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1172 while ( source
> yy_current_buffer
->yy_ch_buf
)
1173 *--dest
= *--source
;
1175 yy_cp
+= (int) (dest
- source
);
1176 yy_bp
+= (int) (dest
- source
);
1177 yy_current_buffer
->yy_n_chars
=
1178 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1180 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1181 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1184 *--yy_cp
= (char) c
;
1188 yy_hold_char
= *yy_cp
;
1191 #endif /* ifndef YY_NO_UNPUT */
1195 static int yyinput()
1202 *yy_c_buf_p
= yy_hold_char
;
1204 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1206 /* yy_c_buf_p now points to the character we want to return.
1207 * If this occurs *before* the EOB characters, then it's a
1208 * valid NUL; if not, then we've hit the end of the buffer.
1210 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1211 /* This was really a NUL. */
1215 { /* need more input */
1216 int offset
= yy_c_buf_p
- yytext_ptr
;
1219 switch ( yy_get_next_buffer() )
1221 case EOB_ACT_LAST_MATCH
:
1222 /* This happens because yy_g_n_b()
1223 * sees that we've accumulated a
1224 * token and flags that we need to
1225 * try matching the token before
1226 * proceeding. But for input(),
1227 * there's no matching to consider.
1228 * So convert the EOB_ACT_LAST_MATCH
1229 * to EOB_ACT_END_OF_FILE.
1232 /* Reset buffer status. */
1237 case EOB_ACT_END_OF_FILE
:
1242 if ( ! yy_did_buffer_switch_on_eof
)
1251 case EOB_ACT_CONTINUE_SCAN
:
1252 yy_c_buf_p
= yytext_ptr
+ offset
;
1258 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1259 *yy_c_buf_p
= '\0'; /* preserve yytext */
1260 yy_hold_char
= *++yy_c_buf_p
;
1267 #ifdef YY_USE_PROTOS
1268 void yyrestart( FILE *input_file
)
1270 void yyrestart( input_file
)
1274 if ( ! yy_current_buffer
)
1275 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1277 yy_init_buffer( yy_current_buffer
, input_file
);
1278 yy_load_buffer_state();
1282 #ifdef YY_USE_PROTOS
1283 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1285 void yy_switch_to_buffer( new_buffer
)
1286 YY_BUFFER_STATE new_buffer
;
1289 if ( yy_current_buffer
== new_buffer
)
1292 if ( yy_current_buffer
)
1294 /* Flush out information for old buffer. */
1295 *yy_c_buf_p
= yy_hold_char
;
1296 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1297 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1300 yy_current_buffer
= new_buffer
;
1301 yy_load_buffer_state();
1303 /* We don't actually know whether we did this switch during
1304 * EOF (yywrap()) processing, but the only time this flag
1305 * is looked at is after yywrap() is called, so it's safe
1306 * to go ahead and always set it.
1308 yy_did_buffer_switch_on_eof
= 1;
1312 #ifdef YY_USE_PROTOS
1313 void yy_load_buffer_state( void )
1315 void yy_load_buffer_state()
1318 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1319 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1320 yyin
= yy_current_buffer
->yy_input_file
;
1321 yy_hold_char
= *yy_c_buf_p
;
1325 #ifdef YY_USE_PROTOS
1326 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1328 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1335 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1337 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1339 b
->yy_buf_size
= size
;
1341 /* yy_ch_buf has to be 2 characters longer than the size given because
1342 * we need to put in 2 end-of-buffer characters.
1344 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1345 if ( ! b
->yy_ch_buf
)
1346 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1348 b
->yy_is_our_buffer
= 1;
1350 yy_init_buffer( b
, file
);
1356 #ifdef YY_USE_PROTOS
1357 void yy_delete_buffer( YY_BUFFER_STATE b
)
1359 void yy_delete_buffer( b
)
1366 if ( b
== yy_current_buffer
)
1367 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
1369 if ( b
->yy_is_our_buffer
)
1370 yy_flex_free( (void *) b
->yy_ch_buf
);
1372 yy_flex_free( (void *) b
);
1379 #ifndef YY_ALWAYS_INTERACTIVE
1380 #ifndef YY_NEVER_INTERACTIVE
1381 extern int isatty
YY_PROTO(( int ));
1386 #ifdef YY_USE_PROTOS
1387 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
1389 void yy_init_buffer( b
, file
)
1396 yy_flush_buffer( b
);
1398 b
->yy_input_file
= file
;
1399 b
->yy_fill_buffer
= 1;
1401 #if YY_ALWAYS_INTERACTIVE
1402 b
->yy_is_interactive
= 1;
1404 #if YY_NEVER_INTERACTIVE
1405 b
->yy_is_interactive
= 0;
1407 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1413 #ifdef YY_USE_PROTOS
1414 void yy_flush_buffer( YY_BUFFER_STATE b
)
1416 void yy_flush_buffer( b
)
1426 /* We always need two end-of-buffer characters. The first causes
1427 * a transition to the end-of-buffer state. The second causes
1428 * a jam in that state.
1430 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1431 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1433 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1436 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1438 if ( b
== yy_current_buffer
)
1439 yy_load_buffer_state();
1443 #ifndef YY_NO_SCAN_BUFFER
1444 #ifdef YY_USE_PROTOS
1445 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
1447 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
1455 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1456 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1457 /* They forgot to leave room for the EOB's. */
1460 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1462 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1464 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1465 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1466 b
->yy_is_our_buffer
= 0;
1467 b
->yy_input_file
= 0;
1468 b
->yy_n_chars
= b
->yy_buf_size
;
1469 b
->yy_is_interactive
= 0;
1471 b
->yy_fill_buffer
= 0;
1472 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1474 yy_switch_to_buffer( b
);
1481 #ifndef YY_NO_SCAN_STRING
1482 #ifdef YY_USE_PROTOS
1483 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
1485 YY_BUFFER_STATE
yy_scan_string( yy_str
)
1486 yyconst
char *yy_str
;
1490 for ( len
= 0; yy_str
[len
]; ++len
)
1493 return yy_scan_bytes( yy_str
, len
);
1498 #ifndef YY_NO_SCAN_BYTES
1499 #ifdef YY_USE_PROTOS
1500 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
1502 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
1503 yyconst
char *bytes
;
1512 /* Get memory for full buffer, including space for trailing EOB's. */
1514 buf
= (char *) yy_flex_alloc( n
);
1516 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1518 for ( i
= 0; i
< len
; ++i
)
1521 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
1523 b
= yy_scan_buffer( buf
, n
);
1525 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1527 /* It's okay to grow etc. this buffer, and we should throw it
1528 * away when we're done.
1530 b
->yy_is_our_buffer
= 1;
1537 #ifndef YY_NO_PUSH_STATE
1538 #ifdef YY_USE_PROTOS
1539 static void yy_push_state( int new_state
)
1541 static void yy_push_state( new_state
)
1545 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
1549 yy_start_stack_depth
+= YY_START_STACK_INCR
;
1550 new_size
= yy_start_stack_depth
* sizeof( int );
1552 if ( ! yy_start_stack
)
1553 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
1556 yy_start_stack
= (int *) yy_flex_realloc(
1557 (void *) yy_start_stack
, new_size
);
1559 if ( ! yy_start_stack
)
1561 "out of memory expanding start-condition stack" );
1564 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
1571 #ifndef YY_NO_POP_STATE
1572 static void yy_pop_state()
1574 if ( --yy_start_stack_ptr
< 0 )
1575 YY_FATAL_ERROR( "start-condition stack underflow" );
1577 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
1582 #ifndef YY_NO_TOP_STATE
1583 static int yy_top_state()
1585 return yy_start_stack
[yy_start_stack_ptr
- 1];
1589 #ifndef YY_EXIT_FAILURE
1590 #define YY_EXIT_FAILURE 2
1593 #ifdef YY_USE_PROTOS
1594 static void yy_fatal_error( yyconst
char msg
[] )
1596 static void yy_fatal_error( msg
)
1600 (void) fprintf( stderr
, "%s\n", msg
);
1601 exit( YY_EXIT_FAILURE
);
1606 /* Redefine yyless() so it works in section 3 code. */
1612 /* Undo effects of setting up yytext. */ \
1613 yytext[yyleng] = yy_hold_char; \
1614 yy_c_buf_p = yytext + n; \
1615 yy_hold_char = *yy_c_buf_p; \
1616 *yy_c_buf_p = '\0'; \
1622 /* Internal utility routines. */
1625 #ifdef YY_USE_PROTOS
1626 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
1628 static void yy_flex_strncpy( s1
, s2
, n
)
1635 for ( i
= 0; i
< n
; ++i
)
1640 #ifdef YY_NEED_STRLEN
1641 #ifdef YY_USE_PROTOS
1642 static int yy_flex_strlen( yyconst
char *s
)
1644 static int yy_flex_strlen( s
)
1649 for ( n
= 0; s
[n
]; ++n
)
1657 #ifdef YY_USE_PROTOS
1658 static void *yy_flex_alloc( yy_size_t size
)
1660 static void *yy_flex_alloc( size
)
1664 return (void *) malloc( size
);
1667 #ifdef YY_USE_PROTOS
1668 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
1670 static void *yy_flex_realloc( ptr
, size
)
1675 /* The cast to (char *) in the following accommodates both
1676 * implementations that use char* generic pointers, and those
1677 * that use void* generic pointers. It works with the latter
1678 * because both ANSI C and C++ allow castless assignment from
1679 * any pointer type to void*, and deal with argument conversions
1680 * as though doing an assignment.
1682 return (void *) realloc( (char *) ptr
, size
);
1685 #ifdef YY_USE_PROTOS
1686 static void yy_flex_free( void *ptr
)
1688 static void yy_flex_free( ptr
)
1702 #line 106 "itbl-lex.l"