1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header: /cvs/src/src/gas/Attic/itbl-lex.c,v 1.1.16.1 2006/04/16 18:36:43 drow 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) ()
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, 2002, 2005 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, 51 Franklin Street - Fifth Floor, Boston, MA
428 #line 22 "itbl-lex.l"
433 #include "itbl-lex.h"
434 #include <itbl-parse.h>
437 #define DBG(x) printf x
438 #define MDBG(x) printf x
444 int insntbl_line = 1;
445 #line 446 "itbl-lex.c"
447 /* Macros after this point can all be overridden by user definitions in
451 #ifndef YY_SKIP_YYWRAP
453 extern "C" int yywrap YY_PROTO(( void ));
455 extern int yywrap YY_PROTO(( void ));
460 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
464 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
467 #ifdef YY_NEED_STRLEN
468 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
473 static int yyinput YY_PROTO(( void ));
475 static int input YY_PROTO(( void ));
480 static int yy_start_stack_ptr = 0;
481 static int yy_start_stack_depth = 0;
482 static int *yy_start_stack = 0;
483 #ifndef YY_NO_PUSH_STATE
484 static void yy_push_state YY_PROTO(( int new_state ));
486 #ifndef YY_NO_POP_STATE
487 static void yy_pop_state YY_PROTO(( void ));
489 #ifndef YY_NO_TOP_STATE
490 static int yy_top_state YY_PROTO(( void ));
494 #define YY_NO_PUSH_STATE 1
495 #define YY_NO_POP_STATE 1
496 #define YY_NO_TOP_STATE 1
499 #ifdef YY_MALLOC_DECL
507 /* Just try to get by without declaring the routines. This will fail
508 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
509 * or sizeof(void*) != sizeof(int).
514 /* Amount of stuff to slurp up with each read. */
515 #ifndef YY_READ_BUF_SIZE
516 #define YY_READ_BUF_SIZE 8192
519 /* Copy whatever the last rule matched to the standard output. */
522 /* This used to be an fputs(), but since the string might contain NUL's,
523 * we now use fwrite().
525 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
528 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
529 * is returned in "result".
532 #define YY_INPUT(buf,result,max_size) \
533 if ( yy_current_buffer->yy_is_interactive ) \
536 for ( n = 0; n < max_size && \
537 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
540 buf[n++] = (char) c; \
541 if ( c == EOF && ferror( yyin ) ) \
542 YY_FATAL_ERROR( "input in flex scanner failed" ); \
548 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
550 if( errno != EINTR) \
552 YY_FATAL_ERROR( "input in flex scanner failed" ); \
561 /* No semi-colon after return; correct usage is to write "yyterminate();" -
562 * we don't want an extra ';' after the "return" because that will cause
563 * some compilers to complain about unreachable statements.
566 #define yyterminate() return YY_NULL
569 /* Number of entries by which start-condition stack grows. */
570 #ifndef YY_START_STACK_INCR
571 #define YY_START_STACK_INCR 25
574 /* Report a fatal error. */
575 #ifndef YY_FATAL_ERROR
576 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
579 /* Default declaration of generated scanner - a define so the user can
580 * easily add parameters.
583 #define YY_DECL int yylex YY_PROTO(( void ))
586 /* Code executed at the beginning of each rule, after yytext and yyleng
589 #ifndef YY_USER_ACTION
590 #define YY_USER_ACTION
593 /* Code executed at the end of each rule. */
595 #define YY_BREAK break;
598 #define YY_RULE_SETUP \
603 register yy_state_type yy_current_state;
604 register char *yy_cp, *yy_bp;
607 #line 45 "itbl-lex.l"
610 #line 611 "itbl-lex.c"
621 yy_start = 1; /* first start state */
629 if ( ! yy_current_buffer )
631 yy_create_buffer( yyin, YY_BUF_SIZE );
633 yy_load_buffer_state();
636 while ( 1 ) /* loops until end-of-file is reached */
640 /* Support of yytext. */
641 *yy_cp = yy_hold_char;
643 /* yy_bp points to the position in yy_ch_buf of the start of
648 yy_current_state = yy_start;
652 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
653 if ( yy_accept[yy_current_state] )
655 yy_last_accepting_state = yy_current_state;
656 yy_last_accepting_cpos = yy_cp;
658 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
660 yy_current_state = (int) yy_def[yy_current_state];
661 if ( yy_current_state >= 60 )
662 yy_c = yy_meta[(unsigned int) yy_c];
664 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
667 while ( yy_base[yy_current_state] != 84 );
670 yy_act = yy_accept[yy_current_state];
672 { /* have to back up */
673 yy_cp = yy_last_accepting_cpos;
674 yy_current_state = yy_last_accepting_state;
675 yy_act = yy_accept[yy_current_state];
681 do_action: /* This label is used only to access EOF actions. */
685 { /* beginning of action switch */
686 case 0: /* must back up */
687 /* undo the effects of YY_DO_BEFORE_ACTION */
688 *yy_cp = yy_hold_char;
689 yy_cp = yy_last_accepting_cpos;
690 yy_current_state = yy_last_accepting_state;
695 #line 47 "itbl-lex.l"
702 #line 50 "itbl-lex.l"
709 #line 53 "itbl-lex.l"
716 #line 56 "itbl-lex.l"
723 #line 59 "itbl-lex.l"
730 #line 62 "itbl-lex.l"
737 #line 65 "itbl-lex.l"
740 yylval.processor = strtoul (yytext+1, 0, 0);
746 #line 70 "itbl-lex.l"
749 yylval.num = strtoul (yytext, 0, 0);
755 #line 75 "itbl-lex.l"
758 yylval.num = strtoul (yytext, 0, 0);
764 #line 80 "itbl-lex.l"
767 yylval.str = strdup (yytext);
773 #line 85 "itbl-lex.l"
776 while ((c = input ()) != EOF)
788 #line 96 "itbl-lex.l"
791 MDBG (("in lex, NL = %d (x%x)\n", NL, NL));
797 #line 101 "itbl-lex.l"
803 #line 103 "itbl-lex.l"
805 MDBG (("char = %x, %d\n", yytext[0], yytext[0]));
811 #line 107 "itbl-lex.l"
814 #line 815 "itbl-lex.c"
815 case YY_STATE_EOF(INITIAL):
818 case YY_END_OF_BUFFER:
820 /* Amount of text matched not including the EOB char. */
821 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
823 /* Undo the effects of YY_DO_BEFORE_ACTION. */
824 *yy_cp = yy_hold_char;
825 YY_RESTORE_YY_MORE_OFFSET
827 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
829 /* We're scanning a new file or input source. It's
830 * possible that this happened because the user
831 * just pointed yyin at a new source and called
832 * yylex(). If so, then we have to assure
833 * consistency between yy_current_buffer and our
834 * globals. Here is the right place to do so, because
835 * this is the first action (other than possibly a
836 * back-up) that will match for the new input source.
838 yy_n_chars = yy_current_buffer->yy_n_chars;
839 yy_current_buffer->yy_input_file = yyin;
840 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
843 /* Note that here we test for yy_c_buf_p "<=" to the position
844 * of the first EOB in the buffer, since yy_c_buf_p will
845 * already have been incremented past the NUL character
846 * (since all states make transitions on EOB to the
847 * end-of-buffer state). Contrast this with the test
850 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
851 { /* This was really a NUL. */
852 yy_state_type yy_next_state;
854 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
856 yy_current_state = yy_get_previous_state();
858 /* Okay, we're now positioned to make the NUL
859 * transition. We couldn't have
860 * yy_get_previous_state() go ahead and do it
861 * for us because it doesn't know how to deal
862 * with the possibility of jamming (and we don't
863 * want to build jamming into it because then it
864 * will run more slowly).
867 yy_next_state = yy_try_NUL_trans( yy_current_state );
869 yy_bp = yytext_ptr + YY_MORE_ADJ;
873 /* Consume the NUL. */
874 yy_cp = ++yy_c_buf_p;
875 yy_current_state = yy_next_state;
886 else switch ( yy_get_next_buffer() )
888 case EOB_ACT_END_OF_FILE:
890 yy_did_buffer_switch_on_eof = 0;
894 /* Note: because we've taken care in
895 * yy_get_next_buffer() to have set up
896 * yytext, we can now set up
897 * yy_c_buf_p so that if some total
898 * hoser (like flex itself) wants to
899 * call the scanner after we return the
900 * YY_NULL, it'll still work - another
901 * YY_NULL will get returned.
903 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
905 yy_act = YY_STATE_EOF(YY_START);
911 if ( ! yy_did_buffer_switch_on_eof )
917 case EOB_ACT_CONTINUE_SCAN:
919 yytext_ptr + yy_amount_of_matched_text;
921 yy_current_state = yy_get_previous_state();
924 yy_bp = yytext_ptr + YY_MORE_ADJ;
927 case EOB_ACT_LAST_MATCH:
929 &yy_current_buffer->yy_ch_buf[yy_n_chars];
931 yy_current_state = yy_get_previous_state();
934 yy_bp = yytext_ptr + YY_MORE_ADJ;
942 "fatal flex scanner internal error--no action found" );
943 } /* end of action switch */
944 } /* end of scanning one token */
948 /* yy_get_next_buffer - try to read in a new buffer
950 * Returns a code representing an action:
951 * EOB_ACT_LAST_MATCH -
952 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
953 * EOB_ACT_END_OF_FILE - end of file
956 static int yy_get_next_buffer()
958 register char *dest = yy_current_buffer->yy_ch_buf;
959 register char *source = yytext_ptr;
960 register int number_to_move, i;
963 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
965 "fatal flex scanner internal error--end of buffer missed" );
967 if ( yy_current_buffer->yy_fill_buffer == 0 )
968 { /* Don't try to fill the buffer, so this is an EOF. */
969 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
971 /* We matched a single character, the EOB, so
972 * treat this as a final EOF.
974 return EOB_ACT_END_OF_FILE;
979 /* We matched some text prior to the EOB, first
982 return EOB_ACT_LAST_MATCH;
986 /* Try to read more data. */
988 /* First move last chars to start of buffer. */
989 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
991 for ( i = 0; i < number_to_move; ++i )
992 *(dest++) = *(source++);
994 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
995 /* don't do the read, it's not guaranteed to return an EOF,
998 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1003 yy_current_buffer->yy_buf_size - number_to_move - 1;
1005 while ( num_to_read <= 0 )
1006 { /* Not enough room in the buffer - grow it. */
1007 #ifdef YY_USES_REJECT
1009 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1012 /* just a shorter name for the current buffer */
1013 YY_BUFFER_STATE b = yy_current_buffer;
1015 int yy_c_buf_p_offset =
1016 (int) (yy_c_buf_p - b->yy_ch_buf);
1018 if ( b->yy_is_our_buffer )
1020 int new_size = b->yy_buf_size * 2;
1022 if ( new_size <= 0 )
1023 b->yy_buf_size += b->yy_buf_size / 8;
1025 b->yy_buf_size *= 2;
1027 b->yy_ch_buf = (char *)
1028 /* Include room in for 2 EOB chars. */
1029 yy_flex_realloc( (void *) b->yy_ch_buf,
1030 b->yy_buf_size + 2 );
1033 /* Can't grow it, we don't own it. */
1036 if ( ! b->yy_ch_buf )
1038 "fatal error - scanner input buffer overflow" );
1040 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1042 num_to_read = yy_current_buffer->yy_buf_size -
1047 if ( num_to_read > YY_READ_BUF_SIZE )
1048 num_to_read = YY_READ_BUF_SIZE;
1050 /* Read in more data. */
1051 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1052 yy_n_chars, num_to_read );
1054 yy_current_buffer->yy_n_chars = yy_n_chars;
1057 if ( yy_n_chars == 0 )
1059 if ( number_to_move == YY_MORE_ADJ )
1061 ret_val = EOB_ACT_END_OF_FILE;
1067 ret_val = EOB_ACT_LAST_MATCH;
1068 yy_current_buffer->yy_buffer_status =
1069 YY_BUFFER_EOF_PENDING;
1074 ret_val = EOB_ACT_CONTINUE_SCAN;
1076 yy_n_chars += number_to_move;
1077 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1078 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1080 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1086 /* yy_get_previous_state - get the state just before the EOB char was reached */
1088 static yy_state_type yy_get_previous_state()
1090 register yy_state_type yy_current_state;
1091 register char *yy_cp;
1093 yy_current_state = yy_start;
1095 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1097 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1098 if ( yy_accept[yy_current_state] )
1100 yy_last_accepting_state = yy_current_state;
1101 yy_last_accepting_cpos = yy_cp;
1103 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1105 yy_current_state = (int) yy_def[yy_current_state];
1106 if ( yy_current_state >= 60 )
1107 yy_c = yy_meta[(unsigned int) yy_c];
1109 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1112 return yy_current_state;
1116 /* yy_try_NUL_trans - try to make a transition on the NUL character
1119 * next_state = yy_try_NUL_trans( current_state );
1122 #ifdef YY_USE_PROTOS
1123 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1125 static yy_state_type yy_try_NUL_trans( yy_current_state )
1126 yy_state_type yy_current_state;
1129 register int yy_is_jam;
1130 register char *yy_cp = yy_c_buf_p;
1132 register YY_CHAR yy_c = 1;
1133 if ( yy_accept[yy_current_state] )
1135 yy_last_accepting_state = yy_current_state;
1136 yy_last_accepting_cpos = yy_cp;
1138 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1140 yy_current_state = (int) yy_def[yy_current_state];
1141 if ( yy_current_state >= 60 )
1142 yy_c = yy_meta[(unsigned int) yy_c];
1144 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1145 yy_is_jam = (yy_current_state == 59);
1147 return yy_is_jam ? 0 : yy_current_state;
1152 #ifdef YY_USE_PROTOS
1153 static void yyunput( int c, register char *yy_bp )
1155 static void yyunput( c, yy_bp )
1157 register char *yy_bp;
1160 register char *yy_cp = yy_c_buf_p;
1162 /* undo effects of setting up yytext */
1163 *yy_cp = yy_hold_char;
1165 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1166 { /* need to shift things up to make room */
1167 /* +2 for EOB chars. */
1168 register int number_to_move = yy_n_chars + 2;
1169 register char *dest = &yy_current_buffer->yy_ch_buf[
1170 yy_current_buffer->yy_buf_size + 2];
1171 register char *source =
1172 &yy_current_buffer->yy_ch_buf[number_to_move];
1174 while ( source > yy_current_buffer->yy_ch_buf )
1175 *--dest = *--source;
1177 yy_cp += (int) (dest - source);
1178 yy_bp += (int) (dest - source);
1179 yy_current_buffer->yy_n_chars =
1180 yy_n_chars = yy_current_buffer->yy_buf_size;
1182 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1183 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1186 *--yy_cp = (char) c;
1190 yy_hold_char = *yy_cp;
1193 #endif /* ifndef YY_NO_UNPUT */
1197 static int yyinput()
1204 *yy_c_buf_p = yy_hold_char;
1206 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1208 /* yy_c_buf_p now points to the character we want to return.
1209 * If this occurs *before* the EOB characters, then it's a
1210 * valid NUL; if not, then we've hit the end of the buffer.
1212 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1213 /* This was really a NUL. */
1217 { /* need more input */
1218 int offset = yy_c_buf_p - yytext_ptr;
1221 switch ( yy_get_next_buffer() )
1223 case EOB_ACT_LAST_MATCH:
1224 /* This happens because yy_g_n_b()
1225 * sees that we've accumulated a
1226 * token and flags that we need to
1227 * try matching the token before
1228 * proceeding. But for input(),
1229 * there's no matching to consider.
1230 * So convert the EOB_ACT_LAST_MATCH
1231 * to EOB_ACT_END_OF_FILE.
1234 /* Reset buffer status. */
1239 case EOB_ACT_END_OF_FILE:
1244 if ( ! yy_did_buffer_switch_on_eof )
1253 case EOB_ACT_CONTINUE_SCAN:
1254 yy_c_buf_p = yytext_ptr + offset;
1260 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1261 *yy_c_buf_p = '\0'; /* preserve yytext */
1262 yy_hold_char = *++yy_c_buf_p;
1269 #ifdef YY_USE_PROTOS
1270 void yyrestart( FILE *input_file )
1272 void yyrestart( input_file )
1276 if ( ! yy_current_buffer )
1277 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1279 yy_init_buffer( yy_current_buffer, input_file );
1280 yy_load_buffer_state();
1284 #ifdef YY_USE_PROTOS
1285 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1287 void yy_switch_to_buffer( new_buffer )
1288 YY_BUFFER_STATE new_buffer;
1291 if ( yy_current_buffer == new_buffer )
1294 if ( yy_current_buffer )
1296 /* Flush out information for old buffer. */
1297 *yy_c_buf_p = yy_hold_char;
1298 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1299 yy_current_buffer->yy_n_chars = yy_n_chars;
1302 yy_current_buffer = new_buffer;
1303 yy_load_buffer_state();
1305 /* We don't actually know whether we did this switch during
1306 * EOF (yywrap()) processing, but the only time this flag
1307 * is looked at is after yywrap() is called, so it's safe
1308 * to go ahead and always set it.
1310 yy_did_buffer_switch_on_eof = 1;
1314 #ifdef YY_USE_PROTOS
1315 void yy_load_buffer_state( void )
1317 void yy_load_buffer_state()
1320 yy_n_chars = yy_current_buffer->yy_n_chars;
1321 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1322 yyin = yy_current_buffer->yy_input_file;
1323 yy_hold_char = *yy_c_buf_p;
1327 #ifdef YY_USE_PROTOS
1328 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1330 YY_BUFFER_STATE yy_create_buffer( file, size )
1337 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1339 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1341 b->yy_buf_size = size;
1343 /* yy_ch_buf has to be 2 characters longer than the size given because
1344 * we need to put in 2 end-of-buffer characters.
1346 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1347 if ( ! b->yy_ch_buf )
1348 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1350 b->yy_is_our_buffer = 1;
1352 yy_init_buffer( b, file );
1358 #ifdef YY_USE_PROTOS
1359 void yy_delete_buffer( YY_BUFFER_STATE b )
1361 void yy_delete_buffer( b )
1368 if ( b == yy_current_buffer )
1369 yy_current_buffer = (YY_BUFFER_STATE) 0;
1371 if ( b->yy_is_our_buffer )
1372 yy_flex_free( (void *) b->yy_ch_buf );
1374 yy_flex_free( (void *) b );
1381 #ifndef YY_ALWAYS_INTERACTIVE
1382 #ifndef YY_NEVER_INTERACTIVE
1383 extern int isatty YY_PROTO(( int ));
1388 #ifdef YY_USE_PROTOS
1389 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1391 void yy_init_buffer( b, file )
1398 yy_flush_buffer( b );
1400 b->yy_input_file = file;
1401 b->yy_fill_buffer = 1;
1403 #if YY_ALWAYS_INTERACTIVE
1404 b->yy_is_interactive = 1;
1406 #if YY_NEVER_INTERACTIVE
1407 b->yy_is_interactive = 0;
1409 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1415 #ifdef YY_USE_PROTOS
1416 void yy_flush_buffer( YY_BUFFER_STATE b )
1418 void yy_flush_buffer( b )
1428 /* We always need two end-of-buffer characters. The first causes
1429 * a transition to the end-of-buffer state. The second causes
1430 * a jam in that state.
1432 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1433 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1435 b->yy_buf_pos = &b->yy_ch_buf[0];
1438 b->yy_buffer_status = YY_BUFFER_NEW;
1440 if ( b == yy_current_buffer )
1441 yy_load_buffer_state();
1445 #ifndef YY_NO_SCAN_BUFFER
1446 #ifdef YY_USE_PROTOS
1447 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1449 YY_BUFFER_STATE yy_scan_buffer( base, size )
1457 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1458 base[size-1] != YY_END_OF_BUFFER_CHAR )
1459 /* They forgot to leave room for the EOB's. */
1462 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1464 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1466 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1467 b->yy_buf_pos = b->yy_ch_buf = base;
1468 b->yy_is_our_buffer = 0;
1469 b->yy_input_file = 0;
1470 b->yy_n_chars = b->yy_buf_size;
1471 b->yy_is_interactive = 0;
1473 b->yy_fill_buffer = 0;
1474 b->yy_buffer_status = YY_BUFFER_NEW;
1476 yy_switch_to_buffer( b );
1483 #ifndef YY_NO_SCAN_STRING
1484 #ifdef YY_USE_PROTOS
1485 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1487 YY_BUFFER_STATE yy_scan_string( yy_str )
1488 yyconst char *yy_str;
1492 for ( len = 0; yy_str[len]; ++len )
1495 return yy_scan_bytes( yy_str, len );
1500 #ifndef YY_NO_SCAN_BYTES
1501 #ifdef YY_USE_PROTOS
1502 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1504 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1505 yyconst char *bytes;
1514 /* Get memory for full buffer, including space for trailing EOB's. */
1516 buf = (char *) yy_flex_alloc( n );
1518 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1520 for ( i = 0; i < len; ++i )
1523 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1525 b = yy_scan_buffer( buf, n );
1527 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1529 /* It's okay to grow etc. this buffer, and we should throw it
1530 * away when we're done.
1532 b->yy_is_our_buffer = 1;
1539 #ifndef YY_NO_PUSH_STATE
1540 #ifdef YY_USE_PROTOS
1541 static void yy_push_state( int new_state )
1543 static void yy_push_state( new_state )
1547 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1551 yy_start_stack_depth += YY_START_STACK_INCR;
1552 new_size = yy_start_stack_depth * sizeof( int );
1554 if ( ! yy_start_stack )
1555 yy_start_stack = (int *) yy_flex_alloc( new_size );
1558 yy_start_stack = (int *) yy_flex_realloc(
1559 (void *) yy_start_stack, new_size );
1561 if ( ! yy_start_stack )
1563 "out of memory expanding start-condition stack" );
1566 yy_start_stack[yy_start_stack_ptr++] = YY_START;
1573 #ifndef YY_NO_POP_STATE
1574 static void yy_pop_state()
1576 if ( --yy_start_stack_ptr < 0 )
1577 YY_FATAL_ERROR( "start-condition stack underflow" );
1579 BEGIN(yy_start_stack[yy_start_stack_ptr]);
1584 #ifndef YY_NO_TOP_STATE
1585 static int yy_top_state()
1587 return yy_start_stack[yy_start_stack_ptr - 1];
1591 #ifndef YY_EXIT_FAILURE
1592 #define YY_EXIT_FAILURE 2
1595 #ifdef YY_USE_PROTOS
1596 static void yy_fatal_error( yyconst char msg[] )
1598 static void yy_fatal_error( msg )
1602 (void) fprintf( stderr, "%s\n", msg );
1603 exit( YY_EXIT_FAILURE );
1608 /* Redefine yyless() so it works in section 3 code. */
1614 /* Undo effects of setting up yytext. */ \
1615 yytext[yyleng] = yy_hold_char; \
1616 yy_c_buf_p = yytext + n; \
1617 yy_hold_char = *yy_c_buf_p; \
1618 *yy_c_buf_p = '\0'; \
1624 /* Internal utility routines. */
1627 #ifdef YY_USE_PROTOS
1628 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1630 static void yy_flex_strncpy( s1, s2, n )
1637 for ( i = 0; i < n; ++i )
1642 #ifdef YY_NEED_STRLEN
1643 #ifdef YY_USE_PROTOS
1644 static int yy_flex_strlen( yyconst char *s )
1646 static int yy_flex_strlen( s )
1651 for ( n = 0; s[n]; ++n )
1659 #ifdef YY_USE_PROTOS
1660 static void *yy_flex_alloc( yy_size_t size )
1662 static void *yy_flex_alloc( size )
1666 return (void *) malloc( size );
1669 #ifdef YY_USE_PROTOS
1670 static void *yy_flex_realloc( void *ptr, yy_size_t size )
1672 static void *yy_flex_realloc( ptr, size )
1677 /* The cast to (char *) in the following accommodates both
1678 * implementations that use char* generic pointers, and those
1679 * that use void* generic pointers. It works with the latter
1680 * because both ANSI C and C++ allow castless assignment from
1681 * any pointer type to void*, and deal with argument conversions
1682 * as though doing an assignment.
1684 return (void *) realloc( (char *) ptr, size );
1687 #ifdef YY_USE_PROTOS
1688 static void yy_flex_free( void *ptr )
1690 static void yy_flex_free( ptr )
1704 #line 107 "itbl-lex.l"