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) ()
68 /* Returned upon end-of-file. */
71 /* Promotes a possibly negative, possibly signed char to an unsigned
72 * integer for use as an array index. If the signed char is negative,
73 * we want to instead treat it as an 8-bit unsigned char, hence the
76 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
78 /* Enter a start condition. This macro really ought to take a parameter,
79 * but we do it the disgusting crufty way forced on us by the ()-less
80 * definition of BEGIN.
82 #define BEGIN yy_start = 1 + 2 *
84 /* Translate the current start state into a value that can be later handed
85 * to BEGIN to return to the state. The YYSTATE alias is for lex
88 #define YY_START ((yy_start - 1) / 2)
89 #define YYSTATE YY_START
91 /* Action number for EOF rule of a given start state. */
92 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
94 /* Special action meaning "start processing a new file". */
95 #define YY_NEW_FILE yyrestart( yyin )
97 #define YY_END_OF_BUFFER_CHAR 0
99 /* Size of default input buffer. */
100 #define YY_BUF_SIZE 16384
102 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
105 extern FILE *yyin
, *yyout
;
107 #define EOB_ACT_CONTINUE_SCAN 0
108 #define EOB_ACT_END_OF_FILE 1
109 #define EOB_ACT_LAST_MATCH 2
111 /* The funky do-while in the following #define is used to turn the definition
112 * int a single C statement (which needs a semi-colon terminator). This
113 * avoids problems with code like:
115 * if ( condition_holds )
118 * do_something_else();
120 * Prior to using the do-while the compiler would get upset at the
121 * "else" because it interpreted the "if" statement as being all
122 * done when it reached the ';' after the yyless() call.
125 /* Return all but the first 'n' matched characters back to the input stream. */
130 /* Undo effects of setting up yytext. */ \
131 *yy_cp = yy_hold_char; \
132 YY_RESTORE_YY_MORE_OFFSET \
133 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
134 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
138 #define unput(c) yyunput( c, yytext_ptr )
140 /* The following is because we cannot portably get our hands on size_t
141 * (without autoconf's help, which isn't available because we want
142 * flex-generated scanners to compile on their own).
144 typedef unsigned int yy_size_t
;
147 struct yy_buffer_state
151 char *yy_ch_buf
; /* input buffer */
152 char *yy_buf_pos
; /* current position in input buffer */
154 /* Size of input buffer in bytes, not including room for EOB
157 yy_size_t yy_buf_size
;
159 /* Number of characters read into yy_ch_buf, not including EOB
164 /* Whether we "own" the buffer - i.e., we know we created it,
165 * and can realloc() it to grow it, and should free() it to
168 int yy_is_our_buffer
;
170 /* Whether this is an "interactive" input source; if so, and
171 * if we're using stdio for input, then we want to use getc()
172 * instead of fread(), to make sure we stop fetching input after
175 int yy_is_interactive
;
177 /* Whether we're considered to be at the beginning of a line.
178 * If so, '^' rules will be active on the next match, otherwise
183 /* Whether to try to fill the input buffer when we reach the
188 int yy_buffer_status
;
189 #define YY_BUFFER_NEW 0
190 #define YY_BUFFER_NORMAL 1
191 /* When an EOF's been seen but there's still some text to process
192 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
193 * shouldn't try reading from the input source any more. We might
194 * still have a bunch of tokens to match, though, because of
195 * possible backing-up.
197 * When we actually see the EOF, we change the status to "new"
198 * (via yyrestart()), so that the user can continue scanning by
199 * just pointing yyin at a new input file.
201 #define YY_BUFFER_EOF_PENDING 2
204 static YY_BUFFER_STATE yy_current_buffer
= 0;
206 /* We provide macros for accessing buffer states in case in the
207 * future we want to put the buffer states in a more general
210 #define YY_CURRENT_BUFFER yy_current_buffer
213 /* yy_hold_char holds the character lost when yytext is formed. */
214 static char yy_hold_char
;
216 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
221 /* Points to current character in buffer. */
222 static char *yy_c_buf_p
= (char *) 0;
223 static int yy_init
= 1; /* whether we need to initialize */
224 static int yy_start
= 0; /* start state number */
226 /* Flag which is used to allow yywrap()'s to do buffer switches
227 * instead of setting up a fresh yyin. A bit of a hack ...
229 static int yy_did_buffer_switch_on_eof
;
231 void yyrestart
YY_PROTO(( FILE *input_file
));
233 void yy_switch_to_buffer
YY_PROTO(( YY_BUFFER_STATE new_buffer
));
234 void yy_load_buffer_state
YY_PROTO(( void ));
235 YY_BUFFER_STATE yy_create_buffer
YY_PROTO(( FILE *file
, int size
));
236 void yy_delete_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
237 void yy_init_buffer
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file
));
238 void yy_flush_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
239 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
241 YY_BUFFER_STATE yy_scan_buffer
YY_PROTO(( char *base
, yy_size_t size
));
242 YY_BUFFER_STATE yy_scan_string
YY_PROTO(( yyconst
char *yy_str
));
243 YY_BUFFER_STATE yy_scan_bytes
YY_PROTO(( yyconst
char *bytes
, int len
));
245 static void *yy_flex_alloc
YY_PROTO(( yy_size_t
));
246 static void *yy_flex_realloc
YY_PROTO(( void *, yy_size_t
));
247 static void yy_flex_free
YY_PROTO(( void * ));
249 #define yy_new_buffer yy_create_buffer
251 #define yy_set_interactive(is_interactive) \
253 if ( ! yy_current_buffer ) \
254 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
255 yy_current_buffer->yy_is_interactive = is_interactive; \
258 #define yy_set_bol(at_bol) \
260 if ( ! yy_current_buffer ) \
261 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
262 yy_current_buffer->yy_at_bol = at_bol; \
265 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
267 typedef unsigned char YY_CHAR
;
268 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
269 typedef int yy_state_type
;
271 #define yytext_ptr yytext
273 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
274 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
275 static int yy_get_next_buffer
YY_PROTO(( void ));
276 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
278 /* Done after the current pattern has been matched and before the
279 * corresponding action - sets up yytext.
281 #define YY_DO_BEFORE_ACTION \
282 yytext_ptr = yy_bp; \
283 yyleng = (int) (yy_cp - yy_bp); \
284 yy_hold_char = *yy_cp; \
288 #define YY_NUM_RULES 15
289 #define YY_END_OF_BUFFER 16
290 static yyconst
short int yy_accept
[60] =
292 0, 0, 16, 14, 13, 12, 11, 8, 8, 10,
293 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
294 10, 8, 0, 10, 10, 10, 10, 10, 10, 10,
295 10, 10, 10, 10, 10, 10, 7, 9, 10, 10,
296 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
297 5, 1, 2, 3, 10, 6, 10, 4, 0
300 static yyconst
int yy_ec
[256] =
302 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
305 1, 4, 1, 1, 5, 1, 1, 1, 1, 1,
306 1, 1, 1, 1, 1, 1, 1, 6, 7, 7,
307 7, 7, 7, 7, 7, 7, 7, 1, 8, 1,
308 1, 1, 1, 1, 9, 10, 11, 12, 13, 10,
309 14, 15, 16, 15, 15, 15, 17, 18, 15, 15,
310 15, 19, 20, 15, 15, 15, 15, 15, 15, 15,
311 1, 1, 1, 1, 15, 1, 21, 10, 22, 23,
313 24, 10, 25, 15, 26, 15, 15, 15, 27, 28,
314 15, 29, 15, 30, 31, 15, 15, 15, 15, 32,
315 15, 15, 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,
322 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,
332 static yyconst
int yy_meta
[33] =
334 1, 1, 1, 1, 1, 2, 2, 1, 2, 2,
335 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
336 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
340 static yyconst
short int yy_base
[62] =
342 0, 0, 83, 84, 84, 84, 84, 27, 29, 70,
343 0, 62, 61, 60, 20, 55, 47, 46, 45, 12,
344 35, 37, 0, 0, 62, 60, 59, 58, 53, 49,
345 45, 43, 42, 41, 37, 32, 0, 0, 43, 44,
346 43, 42, 42, 36, 23, 27, 26, 25, 25, 20,
347 0, 0, 0, 0, 35, 0, 23, 0, 84, 58,
351 static yyconst
short int yy_def
[62] =
353 59, 1, 59, 59, 59, 59, 59, 59, 59, 60,
354 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
355 60, 59, 61, 60, 60, 60, 60, 60, 60, 60,
356 60, 60, 60, 60, 60, 60, 60, 61, 60, 60,
357 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
358 60, 60, 60, 60, 60, 60, 60, 60, 0, 59,
362 static yyconst
short int yy_nxt
[117] =
364 4, 5, 6, 5, 7, 8, 9, 7, 10, 11,
365 12, 13, 11, 14, 11, 15, 11, 11, 11, 11,
366 16, 17, 18, 11, 19, 20, 11, 11, 21, 11,
367 11, 11, 22, 22, 22, 22, 29, 30, 35, 36,
368 37, 37, 22, 22, 38, 58, 58, 56, 57, 54,
369 53, 52, 51, 56, 55, 54, 53, 52, 23, 24,
370 24, 51, 50, 49, 48, 47, 46, 45, 44, 43,
371 42, 41, 40, 39, 34, 33, 32, 31, 28, 27,
372 26, 25, 59, 3, 59, 59, 59, 59, 59, 59,
373 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
375 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
376 59, 59, 59, 59, 59, 59
379 static yyconst
short int yy_chk
[117] =
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, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 8, 8, 9, 9, 15, 15, 20, 20,
385 21, 21, 22, 22, 61, 57, 55, 50, 49, 48,
386 47, 46, 45, 44, 43, 42, 41, 40, 8, 60,
387 60, 39, 36, 35, 34, 33, 32, 31, 30, 29,
388 28, 27, 26, 25, 19, 18, 17, 16, 14, 13,
389 12, 10, 3, 59, 59, 59, 59, 59, 59, 59,
390 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
392 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
393 59, 59, 59, 59, 59, 59
396 static yy_state_type yy_last_accepting_state
;
397 static char *yy_last_accepting_cpos
;
399 /* The intent behind this definition is that it'll catch
400 * any uses of REJECT which flex missed.
402 #define REJECT reject_used_but_not_detected
403 #define yymore() yymore_used_but_not_detected
404 #define YY_MORE_ADJ 0
405 #define YY_RESTORE_YY_MORE_OFFSET
410 Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
412 This file is part of GAS, the GNU Assembler.
414 GAS is free software; you can redistribute it and/or modify
415 it under the terms of the GNU General Public License as published by
416 the Free Software Foundation; either version 2, or (at your option)
419 GAS is distributed in the hope that it will be useful,
420 but WITHOUT ANY WARRANTY; without even the implied warranty of
421 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
422 GNU General Public License for more details.
424 You should have received a copy of the GNU General Public License
425 along with GAS; see the file COPYING. If not, write to the Free
426 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
428 #line 22 "itbl-lex.l"
433 #include <itbl-parse.h>
436 #define DBG(x) printf x
437 #define MDBG(x) printf x
443 int insntbl_line
= 1;
444 #line 445 "itbl-lex.c"
446 /* Macros after this point can all be overridden by user definitions in
450 #ifndef YY_SKIP_YYWRAP
452 extern "C" int yywrap
YY_PROTO(( void ));
454 extern int yywrap
YY_PROTO(( void ));
459 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
463 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
466 #ifdef YY_NEED_STRLEN
467 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
472 static int yyinput
YY_PROTO(( void ));
474 static int input
YY_PROTO(( void ));
479 static int yy_start_stack_ptr
= 0;
480 static int yy_start_stack_depth
= 0;
481 static int *yy_start_stack
= 0;
482 #ifndef YY_NO_PUSH_STATE
483 static void yy_push_state
YY_PROTO(( int new_state
));
485 #ifndef YY_NO_POP_STATE
486 static void yy_pop_state
YY_PROTO(( void ));
488 #ifndef YY_NO_TOP_STATE
489 static int yy_top_state
YY_PROTO(( void ));
493 #define YY_NO_PUSH_STATE 1
494 #define YY_NO_POP_STATE 1
495 #define YY_NO_TOP_STATE 1
498 #ifdef YY_MALLOC_DECL
506 /* Just try to get by without declaring the routines. This will fail
507 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
508 * or sizeof(void*) != sizeof(int).
513 /* Amount of stuff to slurp up with each read. */
514 #ifndef YY_READ_BUF_SIZE
515 #define YY_READ_BUF_SIZE 8192
518 /* Copy whatever the last rule matched to the standard output. */
521 /* This used to be an fputs(), but since the string might contain NUL's,
522 * we now use fwrite().
524 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
527 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
528 * is returned in "result".
531 #define YY_INPUT(buf,result,max_size) \
532 if ( yy_current_buffer->yy_is_interactive ) \
535 for ( n = 0; n < max_size && \
536 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
539 buf[n++] = (char) c; \
540 if ( c == EOF && ferror( yyin ) ) \
541 YY_FATAL_ERROR( "input in flex scanner failed" ); \
547 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
549 if( errno != EINTR) \
551 YY_FATAL_ERROR( "input in flex scanner failed" ); \
560 /* No semi-colon after return; correct usage is to write "yyterminate();" -
561 * we don't want an extra ';' after the "return" because that will cause
562 * some compilers to complain about unreachable statements.
565 #define yyterminate() return YY_NULL
568 /* Number of entries by which start-condition stack grows. */
569 #ifndef YY_START_STACK_INCR
570 #define YY_START_STACK_INCR 25
573 /* Report a fatal error. */
574 #ifndef YY_FATAL_ERROR
575 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
578 /* Default declaration of generated scanner - a define so the user can
579 * easily add parameters.
582 #define YY_DECL int yylex YY_PROTO(( void ))
585 /* Code executed at the beginning of each rule, after yytext and yyleng
588 #ifndef YY_USER_ACTION
589 #define YY_USER_ACTION
592 /* Code executed at the end of each rule. */
594 #define YY_BREAK break;
597 #define YY_RULE_SETUP \
602 register yy_state_type yy_current_state
;
603 register char *yy_cp
, *yy_bp
;
606 #line 44 "itbl-lex.l"
609 #line 610 "itbl-lex.c"
620 yy_start
= 1; /* first start state */
628 if ( ! yy_current_buffer
)
630 yy_create_buffer( yyin
, YY_BUF_SIZE
);
632 yy_load_buffer_state();
635 while ( 1 ) /* loops until end-of-file is reached */
639 /* Support of yytext. */
640 *yy_cp
= yy_hold_char
;
642 /* yy_bp points to the position in yy_ch_buf of the start of
647 yy_current_state
= yy_start
;
651 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
652 if ( yy_accept
[yy_current_state
] )
654 yy_last_accepting_state
= yy_current_state
;
655 yy_last_accepting_cpos
= yy_cp
;
657 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
659 yy_current_state
= (int) yy_def
[yy_current_state
];
660 if ( yy_current_state
>= 60 )
661 yy_c
= yy_meta
[(unsigned int) yy_c
];
663 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
666 while ( yy_base
[yy_current_state
] != 84 );
669 yy_act
= yy_accept
[yy_current_state
];
671 { /* have to back up */
672 yy_cp
= yy_last_accepting_cpos
;
673 yy_current_state
= yy_last_accepting_state
;
674 yy_act
= yy_accept
[yy_current_state
];
680 do_action
: /* This label is used only to access EOF actions. */
684 { /* beginning of action switch */
685 case 0: /* must back up */
686 /* undo the effects of YY_DO_BEFORE_ACTION */
687 *yy_cp
= yy_hold_char
;
688 yy_cp
= yy_last_accepting_cpos
;
689 yy_current_state
= yy_last_accepting_state
;
694 #line 46 "itbl-lex.l"
701 #line 49 "itbl-lex.l"
708 #line 52 "itbl-lex.l"
715 #line 55 "itbl-lex.l"
722 #line 58 "itbl-lex.l"
729 #line 61 "itbl-lex.l"
736 #line 64 "itbl-lex.l"
739 yylval
.processor
= strtoul (yytext
+1, 0, 0);
745 #line 69 "itbl-lex.l"
748 yylval
.num
= strtoul (yytext
, 0, 0);
754 #line 74 "itbl-lex.l"
757 yylval
.num
= strtoul (yytext
, 0, 0);
763 #line 79 "itbl-lex.l"
766 yylval
.str
= strdup (yytext
);
772 #line 84 "itbl-lex.l"
775 while ((c
= input ()) != EOF
)
787 #line 95 "itbl-lex.l"
790 MDBG (("in lex, NL = %d (x%x)\n", NL
, NL
));
796 #line 100 "itbl-lex.l"
802 #line 102 "itbl-lex.l"
804 MDBG (("char = %x, %d\n", yytext
[0], yytext
[0]));
810 #line 106 "itbl-lex.l"
813 #line 814 "itbl-lex.c"
814 case YY_STATE_EOF(INITIAL
):
817 case YY_END_OF_BUFFER
:
819 /* Amount of text matched not including the EOB char. */
820 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
822 /* Undo the effects of YY_DO_BEFORE_ACTION. */
823 *yy_cp
= yy_hold_char
;
824 YY_RESTORE_YY_MORE_OFFSET
826 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
828 /* We're scanning a new file or input source. It's
829 * possible that this happened because the user
830 * just pointed yyin at a new source and called
831 * yylex(). If so, then we have to assure
832 * consistency between yy_current_buffer and our
833 * globals. Here is the right place to do so, because
834 * this is the first action (other than possibly a
835 * back-up) that will match for the new input source.
837 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
838 yy_current_buffer
->yy_input_file
= yyin
;
839 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
842 /* Note that here we test for yy_c_buf_p "<=" to the position
843 * of the first EOB in the buffer, since yy_c_buf_p will
844 * already have been incremented past the NUL character
845 * (since all states make transitions on EOB to the
846 * end-of-buffer state). Contrast this with the test
849 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
850 { /* This was really a NUL. */
851 yy_state_type yy_next_state
;
853 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
855 yy_current_state
= yy_get_previous_state();
857 /* Okay, we're now positioned to make the NUL
858 * transition. We couldn't have
859 * yy_get_previous_state() go ahead and do it
860 * for us because it doesn't know how to deal
861 * with the possibility of jamming (and we don't
862 * want to build jamming into it because then it
863 * will run more slowly).
866 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
868 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
872 /* Consume the NUL. */
873 yy_cp
= ++yy_c_buf_p
;
874 yy_current_state
= yy_next_state
;
885 else switch ( yy_get_next_buffer() )
887 case EOB_ACT_END_OF_FILE
:
889 yy_did_buffer_switch_on_eof
= 0;
893 /* Note: because we've taken care in
894 * yy_get_next_buffer() to have set up
895 * yytext, we can now set up
896 * yy_c_buf_p so that if some total
897 * hoser (like flex itself) wants to
898 * call the scanner after we return the
899 * YY_NULL, it'll still work - another
900 * YY_NULL will get returned.
902 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
904 yy_act
= YY_STATE_EOF(YY_START
);
910 if ( ! yy_did_buffer_switch_on_eof
)
916 case EOB_ACT_CONTINUE_SCAN
:
918 yytext_ptr
+ yy_amount_of_matched_text
;
920 yy_current_state
= yy_get_previous_state();
923 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
926 case EOB_ACT_LAST_MATCH
:
928 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
930 yy_current_state
= yy_get_previous_state();
933 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
941 "fatal flex scanner internal error--no action found" );
942 } /* end of action switch */
943 } /* end of scanning one token */
947 /* yy_get_next_buffer - try to read in a new buffer
949 * Returns a code representing an action:
950 * EOB_ACT_LAST_MATCH -
951 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
952 * EOB_ACT_END_OF_FILE - end of file
955 static int yy_get_next_buffer()
957 register char *dest
= yy_current_buffer
->yy_ch_buf
;
958 register char *source
= yytext_ptr
;
959 register int number_to_move
, i
;
962 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
964 "fatal flex scanner internal error--end of buffer missed" );
966 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
967 { /* Don't try to fill the buffer, so this is an EOF. */
968 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
970 /* We matched a single character, the EOB, so
971 * treat this as a final EOF.
973 return EOB_ACT_END_OF_FILE
;
978 /* We matched some text prior to the EOB, first
981 return EOB_ACT_LAST_MATCH
;
985 /* Try to read more data. */
987 /* First move last chars to start of buffer. */
988 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
990 for ( i
= 0; i
< number_to_move
; ++i
)
991 *(dest
++) = *(source
++);
993 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
994 /* don't do the read, it's not guaranteed to return an EOF,
997 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1002 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1004 while ( num_to_read
<= 0 )
1005 { /* Not enough room in the buffer - grow it. */
1006 #ifdef YY_USES_REJECT
1008 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1011 /* just a shorter name for the current buffer */
1012 YY_BUFFER_STATE b
= yy_current_buffer
;
1014 int yy_c_buf_p_offset
=
1015 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1017 if ( b
->yy_is_our_buffer
)
1019 int new_size
= b
->yy_buf_size
* 2;
1021 if ( new_size
<= 0 )
1022 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1024 b
->yy_buf_size
*= 2;
1026 b
->yy_ch_buf
= (char *)
1027 /* Include room in for 2 EOB chars. */
1028 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1029 b
->yy_buf_size
+ 2 );
1032 /* Can't grow it, we don't own it. */
1035 if ( ! b
->yy_ch_buf
)
1037 "fatal error - scanner input buffer overflow" );
1039 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1041 num_to_read
= yy_current_buffer
->yy_buf_size
-
1046 if ( num_to_read
> YY_READ_BUF_SIZE
)
1047 num_to_read
= YY_READ_BUF_SIZE
;
1049 /* Read in more data. */
1050 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1051 yy_n_chars
, num_to_read
);
1053 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1056 if ( yy_n_chars
== 0 )
1058 if ( number_to_move
== YY_MORE_ADJ
)
1060 ret_val
= EOB_ACT_END_OF_FILE
;
1066 ret_val
= EOB_ACT_LAST_MATCH
;
1067 yy_current_buffer
->yy_buffer_status
=
1068 YY_BUFFER_EOF_PENDING
;
1073 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1075 yy_n_chars
+= number_to_move
;
1076 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1077 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1079 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1085 /* yy_get_previous_state - get the state just before the EOB char was reached */
1087 static yy_state_type
yy_get_previous_state()
1089 register yy_state_type yy_current_state
;
1090 register char *yy_cp
;
1092 yy_current_state
= yy_start
;
1094 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1096 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1097 if ( yy_accept
[yy_current_state
] )
1099 yy_last_accepting_state
= yy_current_state
;
1100 yy_last_accepting_cpos
= yy_cp
;
1102 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1104 yy_current_state
= (int) yy_def
[yy_current_state
];
1105 if ( yy_current_state
>= 60 )
1106 yy_c
= yy_meta
[(unsigned int) yy_c
];
1108 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1111 return yy_current_state
;
1115 /* yy_try_NUL_trans - try to make a transition on the NUL character
1118 * next_state = yy_try_NUL_trans( current_state );
1121 #ifdef YY_USE_PROTOS
1122 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1124 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1125 yy_state_type yy_current_state
;
1128 register int yy_is_jam
;
1129 register char *yy_cp
= yy_c_buf_p
;
1131 register YY_CHAR yy_c
= 1;
1132 if ( yy_accept
[yy_current_state
] )
1134 yy_last_accepting_state
= yy_current_state
;
1135 yy_last_accepting_cpos
= yy_cp
;
1137 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1139 yy_current_state
= (int) yy_def
[yy_current_state
];
1140 if ( yy_current_state
>= 60 )
1141 yy_c
= yy_meta
[(unsigned int) yy_c
];
1143 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1144 yy_is_jam
= (yy_current_state
== 59);
1146 return yy_is_jam
? 0 : yy_current_state
;
1151 #ifdef YY_USE_PROTOS
1152 static void yyunput( int c
, register char *yy_bp
)
1154 static void yyunput( c
, yy_bp
)
1156 register char *yy_bp
;
1159 register char *yy_cp
= yy_c_buf_p
;
1161 /* undo effects of setting up yytext */
1162 *yy_cp
= yy_hold_char
;
1164 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1165 { /* need to shift things up to make room */
1166 /* +2 for EOB chars. */
1167 register int number_to_move
= yy_n_chars
+ 2;
1168 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1169 yy_current_buffer
->yy_buf_size
+ 2];
1170 register char *source
=
1171 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1173 while ( source
> yy_current_buffer
->yy_ch_buf
)
1174 *--dest
= *--source
;
1176 yy_cp
+= (int) (dest
- source
);
1177 yy_bp
+= (int) (dest
- source
);
1178 yy_current_buffer
->yy_n_chars
=
1179 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1181 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1182 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1185 *--yy_cp
= (char) c
;
1189 yy_hold_char
= *yy_cp
;
1192 #endif /* ifndef YY_NO_UNPUT */
1196 static int yyinput()
1203 *yy_c_buf_p
= yy_hold_char
;
1205 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1207 /* yy_c_buf_p now points to the character we want to return.
1208 * If this occurs *before* the EOB characters, then it's a
1209 * valid NUL; if not, then we've hit the end of the buffer.
1211 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1212 /* This was really a NUL. */
1216 { /* need more input */
1217 int offset
= yy_c_buf_p
- yytext_ptr
;
1220 switch ( yy_get_next_buffer() )
1222 case EOB_ACT_LAST_MATCH
:
1223 /* This happens because yy_g_n_b()
1224 * sees that we've accumulated a
1225 * token and flags that we need to
1226 * try matching the token before
1227 * proceeding. But for input(),
1228 * there's no matching to consider.
1229 * So convert the EOB_ACT_LAST_MATCH
1230 * to EOB_ACT_END_OF_FILE.
1233 /* Reset buffer status. */
1238 case EOB_ACT_END_OF_FILE
:
1243 if ( ! yy_did_buffer_switch_on_eof
)
1252 case EOB_ACT_CONTINUE_SCAN
:
1253 yy_c_buf_p
= yytext_ptr
+ offset
;
1259 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1260 *yy_c_buf_p
= '\0'; /* preserve yytext */
1261 yy_hold_char
= *++yy_c_buf_p
;
1268 #ifdef YY_USE_PROTOS
1269 void yyrestart( FILE *input_file
)
1271 void yyrestart( input_file
)
1275 if ( ! yy_current_buffer
)
1276 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1278 yy_init_buffer( yy_current_buffer
, input_file
);
1279 yy_load_buffer_state();
1283 #ifdef YY_USE_PROTOS
1284 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1286 void yy_switch_to_buffer( new_buffer
)
1287 YY_BUFFER_STATE new_buffer
;
1290 if ( yy_current_buffer
== new_buffer
)
1293 if ( yy_current_buffer
)
1295 /* Flush out information for old buffer. */
1296 *yy_c_buf_p
= yy_hold_char
;
1297 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1298 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1301 yy_current_buffer
= new_buffer
;
1302 yy_load_buffer_state();
1304 /* We don't actually know whether we did this switch during
1305 * EOF (yywrap()) processing, but the only time this flag
1306 * is looked at is after yywrap() is called, so it's safe
1307 * to go ahead and always set it.
1309 yy_did_buffer_switch_on_eof
= 1;
1313 #ifdef YY_USE_PROTOS
1314 void yy_load_buffer_state( void )
1316 void yy_load_buffer_state()
1319 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1320 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1321 yyin
= yy_current_buffer
->yy_input_file
;
1322 yy_hold_char
= *yy_c_buf_p
;
1326 #ifdef YY_USE_PROTOS
1327 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1329 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1336 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1338 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1340 b
->yy_buf_size
= size
;
1342 /* yy_ch_buf has to be 2 characters longer than the size given because
1343 * we need to put in 2 end-of-buffer characters.
1345 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1346 if ( ! b
->yy_ch_buf
)
1347 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1349 b
->yy_is_our_buffer
= 1;
1351 yy_init_buffer( b
, file
);
1357 #ifdef YY_USE_PROTOS
1358 void yy_delete_buffer( YY_BUFFER_STATE b
)
1360 void yy_delete_buffer( b
)
1367 if ( b
== yy_current_buffer
)
1368 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
1370 if ( b
->yy_is_our_buffer
)
1371 yy_flex_free( (void *) b
->yy_ch_buf
);
1373 yy_flex_free( (void *) b
);
1380 #ifndef YY_ALWAYS_INTERACTIVE
1381 #ifndef YY_NEVER_INTERACTIVE
1382 extern int isatty
YY_PROTO(( int ));
1387 #ifdef YY_USE_PROTOS
1388 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
1390 void yy_init_buffer( b
, file
)
1397 yy_flush_buffer( b
);
1399 b
->yy_input_file
= file
;
1400 b
->yy_fill_buffer
= 1;
1402 #if YY_ALWAYS_INTERACTIVE
1403 b
->yy_is_interactive
= 1;
1405 #if YY_NEVER_INTERACTIVE
1406 b
->yy_is_interactive
= 0;
1408 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1414 #ifdef YY_USE_PROTOS
1415 void yy_flush_buffer( YY_BUFFER_STATE b
)
1417 void yy_flush_buffer( b
)
1427 /* We always need two end-of-buffer characters. The first causes
1428 * a transition to the end-of-buffer state. The second causes
1429 * a jam in that state.
1431 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1432 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1434 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1437 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1439 if ( b
== yy_current_buffer
)
1440 yy_load_buffer_state();
1444 #ifndef YY_NO_SCAN_BUFFER
1445 #ifdef YY_USE_PROTOS
1446 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
1448 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
1456 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1457 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1458 /* They forgot to leave room for the EOB's. */
1461 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1463 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1465 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1466 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1467 b
->yy_is_our_buffer
= 0;
1468 b
->yy_input_file
= 0;
1469 b
->yy_n_chars
= b
->yy_buf_size
;
1470 b
->yy_is_interactive
= 0;
1472 b
->yy_fill_buffer
= 0;
1473 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1475 yy_switch_to_buffer( b
);
1482 #ifndef YY_NO_SCAN_STRING
1483 #ifdef YY_USE_PROTOS
1484 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
1486 YY_BUFFER_STATE
yy_scan_string( yy_str
)
1487 yyconst
char *yy_str
;
1491 for ( len
= 0; yy_str
[len
]; ++len
)
1494 return yy_scan_bytes( yy_str
, len
);
1499 #ifndef YY_NO_SCAN_BYTES
1500 #ifdef YY_USE_PROTOS
1501 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
1503 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
1504 yyconst
char *bytes
;
1513 /* Get memory for full buffer, including space for trailing EOB's. */
1515 buf
= (char *) yy_flex_alloc( n
);
1517 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1519 for ( i
= 0; i
< len
; ++i
)
1522 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
1524 b
= yy_scan_buffer( buf
, n
);
1526 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1528 /* It's okay to grow etc. this buffer, and we should throw it
1529 * away when we're done.
1531 b
->yy_is_our_buffer
= 1;
1538 #ifndef YY_NO_PUSH_STATE
1539 #ifdef YY_USE_PROTOS
1540 static void yy_push_state( int new_state
)
1542 static void yy_push_state( new_state
)
1546 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
1550 yy_start_stack_depth
+= YY_START_STACK_INCR
;
1551 new_size
= yy_start_stack_depth
* sizeof( int );
1553 if ( ! yy_start_stack
)
1554 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
1557 yy_start_stack
= (int *) yy_flex_realloc(
1558 (void *) yy_start_stack
, new_size
);
1560 if ( ! yy_start_stack
)
1562 "out of memory expanding start-condition stack" );
1565 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
1572 #ifndef YY_NO_POP_STATE
1573 static void yy_pop_state()
1575 if ( --yy_start_stack_ptr
< 0 )
1576 YY_FATAL_ERROR( "start-condition stack underflow" );
1578 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
1583 #ifndef YY_NO_TOP_STATE
1584 static int yy_top_state()
1586 return yy_start_stack
[yy_start_stack_ptr
- 1];
1590 #ifndef YY_EXIT_FAILURE
1591 #define YY_EXIT_FAILURE 2
1594 #ifdef YY_USE_PROTOS
1595 static void yy_fatal_error( yyconst
char msg
[] )
1597 static void yy_fatal_error( msg
)
1601 (void) fprintf( stderr
, "%s\n", msg
);
1602 exit( YY_EXIT_FAILURE
);
1607 /* Redefine yyless() so it works in section 3 code. */
1613 /* Undo effects of setting up yytext. */ \
1614 yytext[yyleng] = yy_hold_char; \
1615 yy_c_buf_p = yytext + n; \
1616 yy_hold_char = *yy_c_buf_p; \
1617 *yy_c_buf_p = '\0'; \
1623 /* Internal utility routines. */
1626 #ifdef YY_USE_PROTOS
1627 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
1629 static void yy_flex_strncpy( s1
, s2
, n
)
1636 for ( i
= 0; i
< n
; ++i
)
1641 #ifdef YY_NEED_STRLEN
1642 #ifdef YY_USE_PROTOS
1643 static int yy_flex_strlen( yyconst
char *s
)
1645 static int yy_flex_strlen( s
)
1650 for ( n
= 0; s
[n
]; ++n
)
1658 #ifdef YY_USE_PROTOS
1659 static void *yy_flex_alloc( yy_size_t size
)
1661 static void *yy_flex_alloc( size
)
1665 return (void *) malloc( size
);
1668 #ifdef YY_USE_PROTOS
1669 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
1671 static void *yy_flex_realloc( ptr
, size
)
1676 /* The cast to (char *) in the following accommodates both
1677 * implementations that use char* generic pointers, and those
1678 * that use void* generic pointers. It works with the latter
1679 * because both ANSI C and C++ allow castless assignment from
1680 * any pointer type to void*, and deal with argument conversions
1681 * as though doing an assignment.
1683 return (void *) realloc( (char *) ptr
, size
);
1686 #ifdef YY_USE_PROTOS
1687 static void yy_flex_free( void *ptr
)
1689 static void yy_flex_free( ptr
)
1703 #line 106 "itbl-lex.l"