4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer i386__create_buffer
9 #define yy_delete_buffer i386__delete_buffer
10 #define yy_flex_debug i386__flex_debug
11 #define yy_init_buffer i386__init_buffer
12 #define yy_flush_buffer i386__flush_buffer
13 #define yy_load_buffer_state i386__load_buffer_state
14 #define yy_switch_to_buffer i386__switch_to_buffer
16 #define yyleng i386_leng
17 #define yylex i386_lex
18 #define yylineno i386_lineno
19 #define yyout i386_out
20 #define yyrestart i386_restart
21 #define yytext i386_text
22 #define yywrap i386_wrap
23 #define yyalloc i386_alloc
24 #define yyrealloc i386_realloc
25 #define yyfree i386_free
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
77 /* Limits of integral types. */
79 #define INT8_MIN (-128)
82 #define INT16_MIN (-32767-1)
85 #define INT32_MIN (-2147483647-1)
88 #define INT8_MAX (127)
91 #define INT16_MAX (32767)
94 #define INT32_MAX (2147483647)
97 #define UINT8_MAX (255U)
100 #define UINT16_MAX (65535U)
103 #define UINT32_MAX (4294967295U)
106 #endif /* ! FLEXINT_H */
110 /* The "const" storage-class-modifier is valid. */
113 #else /* ! __cplusplus */
115 /* C99 requires __STDC__ to be defined as 1. */
116 #if defined (__STDC__)
120 #endif /* defined (__STDC__) */
121 #endif /* ! __cplusplus */
124 #define yyconst const
129 /* Returned upon end-of-file. */
132 /* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
137 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
143 #define BEGIN (yy_start) = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
149 #define YY_START (((yy_start) - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE i386_restart(i386_in )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
162 #define YY_BUF_SIZE 16384
165 /* The state buf must be large enough to hold one state per character in the main buffer.
167 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
170 #define YY_TYPEDEF_YY_BUFFER_STATE
171 typedef struct yy_buffer_state *YY_BUFFER_STATE;
174 extern int i386_leng;
176 extern FILE *i386_in, *i386_out;
178 #define EOB_ACT_CONTINUE_SCAN 0
179 #define EOB_ACT_END_OF_FILE 1
180 #define EOB_ACT_LAST_MATCH 2
182 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
183 * access to the local variable yy_act. Since yyless() is a macro, it would break
184 * existing scanners that call yyless() from OUTSIDE i386_lex.
185 * One obvious solution it to make yy_act a global. I tried that, and saw
186 * a 5% performance hit in a non-i386_lineno scanner, because yy_act is
187 * normally declared as a register variable-- so it is not worth it.
189 #define YY_LESS_LINENO(n) \
192 for ( yyl = n; yyl < i386_leng; ++yyl )\
193 if ( i386_text[yyl] == '\n' )\
197 /* Return all but the first "n" matched characters back to the input stream. */
201 /* Undo effects of setting up i386_text. */ \
202 int yyless_macro_arg = (n); \
203 YY_LESS_LINENO(yyless_macro_arg);\
204 *yy_cp = (yy_hold_char); \
205 YY_RESTORE_YY_MORE_OFFSET \
206 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
207 YY_DO_BEFORE_ACTION; /* set up i386_text again */ \
211 #define unput(c) yyunput( c, (yytext_ptr) )
213 #ifndef YY_TYPEDEF_YY_SIZE_T
214 #define YY_TYPEDEF_YY_SIZE_T
215 typedef size_t yy_size_t;
218 #ifndef YY_STRUCT_YY_BUFFER_STATE
219 #define YY_STRUCT_YY_BUFFER_STATE
220 struct yy_buffer_state
224 char *yy_ch_buf; /* input buffer */
225 char *yy_buf_pos; /* current position in input buffer */
227 /* Size of input buffer in bytes, not including room for EOB
230 yy_size_t yy_buf_size;
232 /* Number of characters read into yy_ch_buf, not including EOB
237 /* Whether we "own" the buffer - i.e., we know we created it,
238 * and can realloc() it to grow it, and should free() it to
241 int yy_is_our_buffer;
243 /* Whether this is an "interactive" input source; if so, and
244 * if we're using stdio for input, then we want to use getc()
245 * instead of fread(), to make sure we stop fetching input after
248 int yy_is_interactive;
250 /* Whether we're considered to be at the beginning of a line.
251 * If so, '^' rules will be active on the next match, otherwise
256 int yy_bs_lineno; /**< The line count. */
257 int yy_bs_column; /**< The column count. */
259 /* Whether to try to fill the input buffer when we reach the
264 int yy_buffer_status;
266 #define YY_BUFFER_NEW 0
267 #define YY_BUFFER_NORMAL 1
268 /* When an EOF's been seen but there's still some text to process
269 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
270 * shouldn't try reading from the input source any more. We might
271 * still have a bunch of tokens to match, though, because of
272 * possible backing-up.
274 * When we actually see the EOF, we change the status to "new"
275 * (via i386_restart()), so that the user can continue scanning by
276 * just pointing i386_in at a new input file.
278 #define YY_BUFFER_EOF_PENDING 2
281 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
283 /* Stack of input buffers. */
284 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
285 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
286 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
288 /* We provide macros for accessing buffer states in case in the
289 * future we want to put the buffer states in a more general
292 * Returns the top of the stack, or NULL.
294 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
295 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
298 /* Same as previous macro, but useful when we know that the buffer stack is not
299 * NULL or when we need an lvalue. For internal use only.
301 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
303 /* yy_hold_char holds the character lost when i386_text is formed. */
304 static char yy_hold_char;
305 static int yy_n_chars; /* number of characters read into yy_ch_buf */
308 /* Points to current character in buffer. */
309 static char *yy_c_buf_p = (char *) 0;
310 static int yy_init = 0; /* whether we need to initialize */
311 static int yy_start = 0; /* start state number */
313 /* Flag which is used to allow i386_wrap()'s to do buffer switches
314 * instead of setting up a fresh i386_in. A bit of a hack ...
316 static int yy_did_buffer_switch_on_eof;
318 void i386_restart (FILE *input_file );
319 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer );
320 YY_BUFFER_STATE i386__create_buffer (FILE *file,int size );
321 void i386__delete_buffer (YY_BUFFER_STATE b );
322 void i386__flush_buffer (YY_BUFFER_STATE b );
323 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer );
324 void i386_pop_buffer_state (void );
326 static void i386_ensure_buffer_stack (void );
327 static void i386__load_buffer_state (void );
328 static void i386__init_buffer (YY_BUFFER_STATE b,FILE *file );
330 #define YY_FLUSH_BUFFER i386__flush_buffer(YY_CURRENT_BUFFER )
332 YY_BUFFER_STATE i386__scan_buffer (char *base,yy_size_t size );
333 YY_BUFFER_STATE i386__scan_string (yyconst char *yy_str );
334 YY_BUFFER_STATE i386__scan_bytes (yyconst char *bytes,int len );
336 void *i386_alloc (yy_size_t );
337 void *i386_realloc (void *,yy_size_t );
338 void i386_free (void * );
340 #define yy_new_buffer i386__create_buffer
342 #define yy_set_interactive(is_interactive) \
344 if ( ! YY_CURRENT_BUFFER ){ \
345 i386_ensure_buffer_stack (); \
346 YY_CURRENT_BUFFER_LVALUE = \
347 i386__create_buffer(i386_in,YY_BUF_SIZE ); \
349 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
352 #define yy_set_bol(at_bol) \
354 if ( ! YY_CURRENT_BUFFER ){\
355 i386_ensure_buffer_stack (); \
356 YY_CURRENT_BUFFER_LVALUE = \
357 i386__create_buffer(i386_in,YY_BUF_SIZE ); \
359 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
362 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
364 /* Begin user sect3 */
366 #define i386_wrap(n) 1
367 #define YY_SKIP_YYWRAP
369 typedef unsigned char YY_CHAR;
371 FILE *i386_in = (FILE *) 0, *i386_out = (FILE *) 0;
373 typedef int yy_state_type;
375 extern int i386_lineno;
379 extern char *i386_text;
380 #define yytext_ptr i386_text
382 static yy_state_type yy_get_previous_state (void );
383 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
384 static int yy_get_next_buffer (void );
385 static void yy_fatal_error (yyconst char msg[] );
387 /* Done after the current pattern has been matched and before the
388 * corresponding action - sets up i386_text.
390 #define YY_DO_BEFORE_ACTION \
391 (yytext_ptr) = yy_bp; \
392 i386_leng = (size_t) (yy_cp - yy_bp); \
393 (yy_hold_char) = *yy_cp; \
395 (yy_c_buf_p) = yy_cp;
397 #define YY_NUM_RULES 21
398 #define YY_END_OF_BUFFER 22
399 /* This struct is not used in this scanner,
400 but its presence is necessary. */
403 flex_int32_t yy_verify;
406 static yyconst flex_int16_t yy_accept[62] =
408 0, 0, 0, 0, 22, 20, 17, 15, 20, 5,
409 20, 14, 16, 19, 18, 15, 12, 7, 8, 13,
410 11, 11, 19, 14, 16, 17, 6, 0, 0, 0,
411 5, 0, 9, 18, 11, 11, 0, 0, 0, 0,
412 11, 0, 0, 0, 0, 11, 1, 0, 0, 0,
413 11, 0, 0, 0, 11, 2, 3, 0, 10, 4,
417 static yyconst flex_int32_t yy_ec[256] =
419 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
420 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 2, 1, 1, 4, 1, 5, 1, 1, 1,
423 1, 1, 1, 6, 1, 1, 7, 8, 9, 10,
424 10, 10, 10, 10, 10, 10, 10, 11, 1, 1,
425 1, 1, 1, 1, 12, 13, 13, 14, 13, 13,
426 13, 13, 15, 13, 13, 16, 13, 17, 13, 13,
427 13, 13, 13, 13, 13, 18, 13, 13, 13, 13,
428 1, 1, 1, 1, 13, 1, 19, 13, 13, 13,
430 20, 21, 13, 13, 22, 13, 23, 13, 24, 25,
431 26, 27, 13, 28, 29, 13, 30, 13, 13, 31,
432 32, 13, 33, 1, 34, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 static yyconst flex_int32_t yy_meta[35] =
451 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
452 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 static yyconst flex_int16_t yy_base[65] =
459 0, 32, 65, 3, 113, 114, 9, 11, 19, 7,
460 78, 16, 114, 114, 18, 20, 114, 114, 114, 114,
461 0, 94, 76, 23, 114, 25, 114, 90, 80, 0,
462 41, 73, 114, 36, 0, 88, 76, 44, 42, 37,
463 49, 37, 38, 37, 31, 40, 114, 33, 32, 28,
464 37, 16, 14, 12, 17, 114, 114, 5, 0, 114,
468 static yyconst flex_int16_t yy_def[65] =
470 62, 62, 61, 3, 61, 61, 61, 61, 61, 61,
471 63, 61, 61, 61, 61, 61, 61, 61, 61, 61,
472 64, 64, 63, 61, 61, 61, 61, 61, 61, 61,
473 61, 63, 61, 61, 64, 64, 61, 61, 61, 61,
474 64, 61, 61, 61, 61, 64, 61, 61, 61, 61,
475 64, 61, 61, 61, 64, 61, 61, 61, 64, 61,
479 static yyconst flex_int16_t yy_nxt[149] =
481 61, 7, 8, 35, 9, 24, 25, 10, 10, 10,
482 26, 26, 26, 26, 31, 31, 31, 26, 26, 34,
483 34, 34, 34, 27, 34, 34, 26, 26, 60, 39,
484 59, 40, 11, 7, 12, 13, 9, 34, 34, 10,
485 10, 10, 28, 58, 57, 29, 56, 30, 31, 31,
486 31, 55, 54, 53, 52, 51, 50, 49, 48, 47,
487 46, 45, 44, 43, 11, 14, 15, 16, 14, 14,
488 17, 14, 18, 19, 14, 20, 21, 21, 21, 22,
489 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
490 21, 21, 21, 21, 21, 21, 21, 23, 14, 6,
492 6, 6, 32, 32, 42, 41, 33, 38, 37, 33,
493 36, 33, 61, 5, 61, 61, 61, 61, 61, 61,
494 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
495 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
496 61, 61, 61, 61, 61, 61, 61, 61
499 static yyconst flex_int16_t yy_chk[149] =
501 0, 1, 1, 64, 1, 4, 4, 1, 1, 1,
502 7, 7, 8, 8, 10, 10, 10, 12, 12, 15,
503 15, 16, 16, 9, 24, 24, 26, 26, 58, 30,
504 55, 30, 1, 2, 2, 2, 2, 34, 34, 2,
505 2, 2, 9, 54, 53, 9, 52, 9, 31, 31,
506 31, 51, 50, 49, 48, 46, 45, 44, 43, 42,
507 41, 40, 39, 38, 2, 3, 3, 3, 3, 3,
508 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
509 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
510 3, 3, 3, 3, 3, 3, 3, 3, 3, 62,
512 62, 62, 63, 63, 37, 36, 32, 29, 28, 23,
513 22, 11, 5, 61, 61, 61, 61, 61, 61, 61,
514 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
515 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
516 61, 61, 61, 61, 61, 61, 61, 61
519 /* Table of booleans, true if rule could match eol. */
520 static yyconst flex_int32_t yy_rule_can_match_eol[22] =
522 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,
525 static yy_state_type yy_last_accepting_state;
526 static char *yy_last_accepting_cpos;
528 extern int i386__flex_debug;
529 int i386__flex_debug = 0;
531 /* The intent behind this definition is that it'll catch
532 * any uses of REJECT which flex missed.
534 #define REJECT reject_used_but_not_detected
535 #define yymore() yymore_used_but_not_detected
536 #define YY_MORE_ADJ 0
537 #define YY_RESTORE_YY_MORE_OFFSET
541 /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc.
542 Written by Ulrich Drepper <drepper@redhat.com>, 2004.
544 Red Hat elfutils is free software; you can redistribute it and/or modify
545 it under the terms of the GNU General Public License as published by the
546 Free Software Foundation; version 2 of the License.
548 Red Hat elfutils is distributed in the hope that it will be useful, but
549 WITHOUT ANY WARRANTY; without even the implied warranty of
550 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
551 General Public License for more details.
553 You should have received a copy of the GNU General Public License along
554 with Red Hat elfutils; if not, write to the Free Software Foundation,
555 Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
557 Red Hat elfutils is an included package of the Open Invention Network.
558 An included package of the Open Invention Network is a package for which
559 Open Invention Network licensees cross-license their patents. No patent
560 license is granted, either expressly or impliedly, by designation as an
561 included package. Should you wish to participate in the Open Invention
562 Network licensing program, please visit www.openinventionnetwork.com
563 <http://www.openinventionnetwork.com>. */
574 #include "i386_parse.h"
577 static void eat_to_eol (void);
578 static void invalid_char (int ch);
580 #line 581 "i386_lex.c"
585 #ifndef YY_NO_UNISTD_H
586 /* Special case for "unistd.h", since it is non-ANSI. We include it way
587 * down here because we want the user's section 1 to have been scanned first.
588 * The user has a chance to override it with an option.
593 #ifndef YY_EXTRA_TYPE
594 #define YY_EXTRA_TYPE void *
597 static int yy_init_globals (void );
599 /* Accessor methods to globals.
600 These are made visible to non-reentrant scanners for convenience. */
602 int i386_lex_destroy (void );
604 int i386_get_debug (void );
606 void i386_set_debug (int debug_flag );
608 YY_EXTRA_TYPE i386_get_extra (void );
610 void i386_set_extra (YY_EXTRA_TYPE user_defined );
612 FILE *i386_get_in (void );
614 void i386_set_in (FILE * in_str );
616 FILE *i386_get_out (void );
618 void i386_set_out (FILE * out_str );
620 int i386_get_leng (void );
622 char *i386_get_text (void );
624 int i386_get_lineno (void );
626 void i386_set_lineno (int line_number );
628 /* Macros after this point can all be overridden by user definitions in
632 #ifndef YY_SKIP_YYWRAP
634 extern "C" int i386_wrap (void );
636 extern int i386_wrap (void );
640 static void yyunput (int c,char *buf_ptr );
643 static void yy_flex_strncpy (char *,yyconst char *,int );
646 #ifdef YY_NEED_STRLEN
647 static int yy_flex_strlen (yyconst char * );
653 static int yyinput (void );
655 static int input (void );
660 /* Amount of stuff to slurp up with each read. */
661 #ifndef YY_READ_BUF_SIZE
662 #define YY_READ_BUF_SIZE 8192
665 /* Copy whatever the last rule matched to the standard output. */
667 /* This used to be an fputs(), but since the string might contain NUL's,
668 * we now use fwrite().
670 #define ECHO do { if (fwrite( i386_text, i386_leng, 1, i386_out )) {} } while (0)
673 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
674 * is returned in "result".
677 #define YY_INPUT(buf,result,max_size) \
678 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
682 for ( n = 0; n < max_size && \
683 (c = getc( i386_in )) != EOF && c != '\n'; ++n ) \
686 buf[n++] = (char) c; \
687 if ( c == EOF && ferror( i386_in ) ) \
688 YY_FATAL_ERROR( "input in flex scanner failed" ); \
694 while ( (result = fread(buf, 1, max_size, i386_in))==0 && ferror(i386_in)) \
696 if( errno != EINTR) \
698 YY_FATAL_ERROR( "input in flex scanner failed" ); \
709 /* No semi-colon after return; correct usage is to write "yyterminate();" -
710 * we don't want an extra ';' after the "return" because that will cause
711 * some compilers to complain about unreachable statements.
714 #define yyterminate() return YY_NULL
717 /* Number of entries by which start-condition stack grows. */
718 #ifndef YY_START_STACK_INCR
719 #define YY_START_STACK_INCR 25
722 /* Report a fatal error. */
723 #ifndef YY_FATAL_ERROR
724 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
727 /* end tables serialization structures and prototypes */
729 /* Default declaration of generated scanner - a define so the user can
730 * easily add parameters.
733 #define YY_DECL_IS_OURS 1
735 extern int i386_lex (void);
737 #define YY_DECL int i386_lex (void)
738 #endif /* !YY_DECL */
740 /* Code executed at the beginning of each rule, after i386_text and i386_leng
743 #ifndef YY_USER_ACTION
744 #define YY_USER_ACTION
747 /* Code executed at the end of each rule. */
749 #define YY_BREAK break;
752 #define YY_RULE_SETUP \
753 if ( i386_leng > 0 ) \
754 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
755 (i386_text[i386_leng - 1] == '\n'); \
758 /** The main scanner function which does all the work.
762 register yy_state_type yy_current_state;
763 register char *yy_cp, *yy_bp;
766 #line 54 "i386_lex.l"
769 #line 770 "i386_lex.c"
780 (yy_start) = 1; /* first start state */
788 if ( ! YY_CURRENT_BUFFER ) {
789 i386_ensure_buffer_stack ();
790 YY_CURRENT_BUFFER_LVALUE =
791 i386__create_buffer(i386_in,YY_BUF_SIZE );
794 i386__load_buffer_state( );
797 while ( 1 ) /* loops until end-of-file is reached */
799 yy_cp = (yy_c_buf_p);
801 /* Support of i386_text. */
802 *yy_cp = (yy_hold_char);
804 /* yy_bp points to the position in yy_ch_buf of the start of
809 yy_current_state = (yy_start);
810 yy_current_state += YY_AT_BOL();
814 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
815 if ( yy_accept[yy_current_state] )
817 (yy_last_accepting_state) = yy_current_state;
818 (yy_last_accepting_cpos) = yy_cp;
820 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
822 yy_current_state = (int) yy_def[yy_current_state];
823 if ( yy_current_state >= 62 )
824 yy_c = yy_meta[(unsigned int) yy_c];
826 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
829 while ( yy_current_state != 61 );
830 yy_cp = (yy_last_accepting_cpos);
831 yy_current_state = (yy_last_accepting_state);
834 yy_act = yy_accept[yy_current_state];
838 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
841 for ( yyl = 0; yyl < i386_leng; ++yyl )
842 if ( i386_text[yyl] == '\n' )
848 do_action: /* This label is used only to access EOF actions. */
851 { /* beginning of action switch */
852 case 0: /* must back up */
853 /* undo the effects of YY_DO_BEFORE_ACTION */
854 *yy_cp = (yy_hold_char);
855 yy_cp = (yy_last_accepting_cpos);
856 yy_current_state = (yy_last_accepting_state);
861 #line 56 "i386_lex.l"
866 #line 58 "i386_lex.l"
871 #line 59 "i386_lex.l"
876 #line 61 "i386_lex.l"
881 #line 63 "i386_lex.l"
882 { i386_lval.num = strtoul (i386_text, NULL, 10);
887 #line 66 "i386_lex.l"
888 { BEGIN (MAIN); return kPERCPERC; }
892 #line 69 "i386_lex.l"
897 #line 70 "i386_lex.l"
902 #line 72 "i386_lex.l"
903 { i386_lval.str = xstrndup (i386_text + 1,
909 #line 76 "i386_lex.l"
910 { i386_lval.str = (void *) -1l;
915 #line 79 "i386_lex.l"
916 { i386_lval.str = xstrndup (i386_text, i386_leng);
921 #line 82 "i386_lex.l"
926 #line 84 "i386_lex.l"
930 /* rule 14 can match eol */
932 #line 86 "i386_lex.l"
936 /* rule 15 can match eol */
938 #line 88 "i386_lex.l"
943 #line 90 "i386_lex.l"
947 /* rule 17 can match eol */
949 #line 92 "i386_lex.l"
953 /* rule 18 can match eol */
955 #line 94 "i386_lex.l"
960 #line 96 "i386_lex.l"
961 { i386_lval.ch = *i386_text; return kCHAR; }
965 #line 98 "i386_lex.l"
966 { invalid_char (*i386_text); }
970 #line 101 "i386_lex.l"
973 #line 974 "i386_lex.c"
974 case YY_STATE_EOF(INITIAL):
975 case YY_STATE_EOF(MAIN):
978 case YY_END_OF_BUFFER:
980 /* Amount of text matched not including the EOB char. */
981 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
983 /* Undo the effects of YY_DO_BEFORE_ACTION. */
984 *yy_cp = (yy_hold_char);
985 YY_RESTORE_YY_MORE_OFFSET
987 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
989 /* We're scanning a new file or input source. It's
990 * possible that this happened because the user
991 * just pointed i386_in at a new source and called
992 * i386_lex(). If so, then we have to assure
993 * consistency between YY_CURRENT_BUFFER and our
994 * globals. Here is the right place to do so, because
995 * this is the first action (other than possibly a
996 * back-up) that will match for the new input source.
998 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
999 YY_CURRENT_BUFFER_LVALUE->yy_input_file = i386_in;
1000 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1003 /* Note that here we test for yy_c_buf_p "<=" to the position
1004 * of the first EOB in the buffer, since yy_c_buf_p will
1005 * already have been incremented past the NUL character
1006 * (since all states make transitions on EOB to the
1007 * end-of-buffer state). Contrast this with the test
1010 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1011 { /* This was really a NUL. */
1012 yy_state_type yy_next_state;
1014 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1016 yy_current_state = yy_get_previous_state( );
1018 /* Okay, we're now positioned to make the NUL
1019 * transition. We couldn't have
1020 * yy_get_previous_state() go ahead and do it
1021 * for us because it doesn't know how to deal
1022 * with the possibility of jamming (and we don't
1023 * want to build jamming into it because then it
1024 * will run more slowly).
1027 yy_next_state = yy_try_NUL_trans( yy_current_state );
1029 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1031 if ( yy_next_state )
1033 /* Consume the NUL. */
1034 yy_cp = ++(yy_c_buf_p);
1035 yy_current_state = yy_next_state;
1041 yy_cp = (yy_last_accepting_cpos);
1042 yy_current_state = (yy_last_accepting_state);
1043 goto yy_find_action;
1047 else switch ( yy_get_next_buffer( ) )
1049 case EOB_ACT_END_OF_FILE:
1051 (yy_did_buffer_switch_on_eof) = 0;
1055 /* Note: because we've taken care in
1056 * yy_get_next_buffer() to have set up
1057 * i386_text, we can now set up
1058 * yy_c_buf_p so that if some total
1059 * hoser (like flex itself) wants to
1060 * call the scanner after we return the
1061 * YY_NULL, it'll still work - another
1062 * YY_NULL will get returned.
1064 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1066 yy_act = YY_STATE_EOF(YY_START);
1072 if ( ! (yy_did_buffer_switch_on_eof) )
1078 case EOB_ACT_CONTINUE_SCAN:
1080 (yytext_ptr) + yy_amount_of_matched_text;
1082 yy_current_state = yy_get_previous_state( );
1084 yy_cp = (yy_c_buf_p);
1085 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1088 case EOB_ACT_LAST_MATCH:
1090 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1092 yy_current_state = yy_get_previous_state( );
1094 yy_cp = (yy_c_buf_p);
1095 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1096 goto yy_find_action;
1103 "fatal flex scanner internal error--no action found" );
1104 } /* end of action switch */
1105 } /* end of scanning one token */
1106 } /* end of i386_lex */
1108 /* yy_get_next_buffer - try to read in a new buffer
1110 * Returns a code representing an action:
1111 * EOB_ACT_LAST_MATCH -
1112 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1113 * EOB_ACT_END_OF_FILE - end of file
1115 static int yy_get_next_buffer (void)
1117 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1118 register char *source = (yytext_ptr);
1119 register int number_to_move, i;
1122 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1124 "fatal flex scanner internal error--end of buffer missed" );
1126 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1127 { /* Don't try to fill the buffer, so this is an EOF. */
1128 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1130 /* We matched a single character, the EOB, so
1131 * treat this as a final EOF.
1133 return EOB_ACT_END_OF_FILE;
1138 /* We matched some text prior to the EOB, first
1141 return EOB_ACT_LAST_MATCH;
1145 /* Try to read more data. */
1147 /* First move last chars to start of buffer. */
1148 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1150 for ( i = 0; i < number_to_move; ++i )
1151 *(dest++) = *(source++);
1153 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1154 /* don't do the read, it's not guaranteed to return an EOF,
1157 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1162 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1164 while ( num_to_read <= 0 )
1165 { /* Not enough room in the buffer - grow it. */
1167 /* just a shorter name for the current buffer */
1168 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1170 int yy_c_buf_p_offset =
1171 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1173 if ( b->yy_is_our_buffer )
1175 int new_size = b->yy_buf_size * 2;
1177 if ( new_size <= 0 )
1178 b->yy_buf_size += b->yy_buf_size / 8;
1180 b->yy_buf_size *= 2;
1182 b->yy_ch_buf = (char *)
1183 /* Include room in for 2 EOB chars. */
1184 i386_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1187 /* Can't grow it, we don't own it. */
1190 if ( ! b->yy_ch_buf )
1192 "fatal error - scanner input buffer overflow" );
1194 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1196 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1201 if ( num_to_read > YY_READ_BUF_SIZE )
1202 num_to_read = YY_READ_BUF_SIZE;
1204 /* Read in more data. */
1205 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1206 (yy_n_chars), (size_t) num_to_read );
1208 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1211 if ( (yy_n_chars) == 0 )
1213 if ( number_to_move == YY_MORE_ADJ )
1215 ret_val = EOB_ACT_END_OF_FILE;
1216 i386_restart(i386_in );
1221 ret_val = EOB_ACT_LAST_MATCH;
1222 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1223 YY_BUFFER_EOF_PENDING;
1228 ret_val = EOB_ACT_CONTINUE_SCAN;
1230 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1231 /* Extend the array by 50%, plus the number we really need. */
1232 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1233 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) i386_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1234 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1235 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1238 (yy_n_chars) += number_to_move;
1239 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1240 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1242 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1247 /* yy_get_previous_state - get the state just before the EOB char was reached */
1249 static yy_state_type yy_get_previous_state (void)
1251 register yy_state_type yy_current_state;
1252 register char *yy_cp;
1254 yy_current_state = (yy_start);
1255 yy_current_state += YY_AT_BOL();
1257 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1259 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1260 if ( yy_accept[yy_current_state] )
1262 (yy_last_accepting_state) = yy_current_state;
1263 (yy_last_accepting_cpos) = yy_cp;
1265 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1267 yy_current_state = (int) yy_def[yy_current_state];
1268 if ( yy_current_state >= 62 )
1269 yy_c = yy_meta[(unsigned int) yy_c];
1271 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1274 return yy_current_state;
1277 /* yy_try_NUL_trans - try to make a transition on the NUL character
1280 * next_state = yy_try_NUL_trans( current_state );
1282 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1284 register int yy_is_jam;
1285 register char *yy_cp = (yy_c_buf_p);
1287 register YY_CHAR yy_c = 1;
1288 if ( yy_accept[yy_current_state] )
1290 (yy_last_accepting_state) = yy_current_state;
1291 (yy_last_accepting_cpos) = yy_cp;
1293 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1295 yy_current_state = (int) yy_def[yy_current_state];
1296 if ( yy_current_state >= 62 )
1297 yy_c = yy_meta[(unsigned int) yy_c];
1299 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1300 yy_is_jam = (yy_current_state == 61);
1302 return yy_is_jam ? 0 : yy_current_state;
1305 static void yyunput (int c, register char * yy_bp )
1307 register char *yy_cp;
1309 yy_cp = (yy_c_buf_p);
1311 /* undo effects of setting up i386_text */
1312 *yy_cp = (yy_hold_char);
1314 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1315 { /* need to shift things up to make room */
1316 /* +2 for EOB chars. */
1317 register int number_to_move = (yy_n_chars) + 2;
1318 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1319 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1320 register char *source =
1321 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1323 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1324 *--dest = *--source;
1326 yy_cp += (int) (dest - source);
1327 yy_bp += (int) (dest - source);
1328 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1329 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1331 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1332 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1335 *--yy_cp = (char) c;
1341 (yytext_ptr) = yy_bp;
1342 (yy_hold_char) = *yy_cp;
1343 (yy_c_buf_p) = yy_cp;
1348 static int yyinput (void)
1350 static int input (void)
1356 *(yy_c_buf_p) = (yy_hold_char);
1358 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1360 /* yy_c_buf_p now points to the character we want to return.
1361 * If this occurs *before* the EOB characters, then it's a
1362 * valid NUL; if not, then we've hit the end of the buffer.
1364 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1365 /* This was really a NUL. */
1366 *(yy_c_buf_p) = '\0';
1369 { /* need more input */
1370 int offset = (yy_c_buf_p) - (yytext_ptr);
1373 switch ( yy_get_next_buffer( ) )
1375 case EOB_ACT_LAST_MATCH:
1376 /* This happens because yy_g_n_b()
1377 * sees that we've accumulated a
1378 * token and flags that we need to
1379 * try matching the token before
1380 * proceeding. But for input(),
1381 * there's no matching to consider.
1382 * So convert the EOB_ACT_LAST_MATCH
1383 * to EOB_ACT_END_OF_FILE.
1386 /* Reset buffer status. */
1387 i386_restart(i386_in );
1391 case EOB_ACT_END_OF_FILE:
1396 if ( ! (yy_did_buffer_switch_on_eof) )
1405 case EOB_ACT_CONTINUE_SCAN:
1406 (yy_c_buf_p) = (yytext_ptr) + offset;
1412 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1413 *(yy_c_buf_p) = '\0'; /* preserve i386_text */
1414 (yy_hold_char) = *++(yy_c_buf_p);
1416 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1417 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1424 #endif /* ifndef YY_NO_INPUT */
1426 /** Immediately switch to a different input stream.
1427 * @param input_file A readable stream.
1429 * @note This function does not reset the start condition to @c INITIAL .
1431 void i386_restart (FILE * input_file )
1434 if ( ! YY_CURRENT_BUFFER ){
1435 i386_ensure_buffer_stack ();
1436 YY_CURRENT_BUFFER_LVALUE =
1437 i386__create_buffer(i386_in,YY_BUF_SIZE );
1440 i386__init_buffer(YY_CURRENT_BUFFER,input_file );
1441 i386__load_buffer_state( );
1444 /** Switch to a different input buffer.
1445 * @param new_buffer The new input buffer.
1448 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1451 /* TODO. We should be able to replace this entire function body
1453 * i386_pop_buffer_state();
1454 * i386_push_buffer_state(new_buffer);
1456 i386_ensure_buffer_stack ();
1457 if ( YY_CURRENT_BUFFER == new_buffer )
1460 if ( YY_CURRENT_BUFFER )
1462 /* Flush out information for old buffer. */
1463 *(yy_c_buf_p) = (yy_hold_char);
1464 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1465 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1468 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1469 i386__load_buffer_state( );
1471 /* We don't actually know whether we did this switch during
1472 * EOF (i386_wrap()) processing, but the only time this flag
1473 * is looked at is after i386_wrap() is called, so it's safe
1474 * to go ahead and always set it.
1476 (yy_did_buffer_switch_on_eof) = 1;
1479 static void i386__load_buffer_state (void)
1481 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1482 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1483 i386_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1484 (yy_hold_char) = *(yy_c_buf_p);
1487 /** Allocate and initialize an input buffer state.
1488 * @param file A readable stream.
1489 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1491 * @return the allocated buffer state.
1493 YY_BUFFER_STATE i386__create_buffer (FILE * file, int size )
1497 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1499 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1501 b->yy_buf_size = size;
1503 /* yy_ch_buf has to be 2 characters longer than the size given because
1504 * we need to put in 2 end-of-buffer characters.
1506 b->yy_ch_buf = (char *) i386_alloc(b->yy_buf_size + 2 );
1507 if ( ! b->yy_ch_buf )
1508 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1510 b->yy_is_our_buffer = 1;
1512 i386__init_buffer(b,file );
1517 /** Destroy the buffer.
1518 * @param b a buffer created with i386__create_buffer()
1521 void i386__delete_buffer (YY_BUFFER_STATE b )
1527 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1528 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1530 if ( b->yy_is_our_buffer )
1531 i386_free((void *) b->yy_ch_buf );
1533 i386_free((void *) b );
1536 /* Initializes or reinitializes a buffer.
1537 * This function is sometimes called more than once on the same buffer,
1538 * such as during a i386_restart() or at EOF.
1540 static void i386__init_buffer (YY_BUFFER_STATE b, FILE * file )
1545 i386__flush_buffer(b );
1547 b->yy_input_file = file;
1548 b->yy_fill_buffer = 1;
1550 /* If b is the current buffer, then i386__init_buffer was _probably_
1551 * called from i386_restart() or through yy_get_next_buffer.
1552 * In that case, we don't want to reset the lineno or column.
1554 if (b != YY_CURRENT_BUFFER){
1555 b->yy_bs_lineno = 1;
1556 b->yy_bs_column = 0;
1559 b->yy_is_interactive = 0;
1564 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1565 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1568 void i386__flush_buffer (YY_BUFFER_STATE b )
1575 /* We always need two end-of-buffer characters. The first causes
1576 * a transition to the end-of-buffer state. The second causes
1577 * a jam in that state.
1579 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1580 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1582 b->yy_buf_pos = &b->yy_ch_buf[0];
1585 b->yy_buffer_status = YY_BUFFER_NEW;
1587 if ( b == YY_CURRENT_BUFFER )
1588 i386__load_buffer_state( );
1591 /** Pushes the new state onto the stack. The new state becomes
1592 * the current state. This function will allocate the stack
1594 * @param new_buffer The new state.
1597 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer )
1599 if (new_buffer == NULL)
1602 i386_ensure_buffer_stack();
1604 /* This block is copied from i386__switch_to_buffer. */
1605 if ( YY_CURRENT_BUFFER )
1607 /* Flush out information for old buffer. */
1608 *(yy_c_buf_p) = (yy_hold_char);
1609 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1610 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1613 /* Only push if top exists. Otherwise, replace top. */
1614 if (YY_CURRENT_BUFFER)
1615 (yy_buffer_stack_top)++;
1616 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1618 /* copied from i386__switch_to_buffer. */
1619 i386__load_buffer_state( );
1620 (yy_did_buffer_switch_on_eof) = 1;
1623 /** Removes and deletes the top of the stack, if present.
1624 * The next element becomes the new top.
1627 void i386_pop_buffer_state (void)
1629 if (!YY_CURRENT_BUFFER)
1632 i386__delete_buffer(YY_CURRENT_BUFFER );
1633 YY_CURRENT_BUFFER_LVALUE = NULL;
1634 if ((yy_buffer_stack_top) > 0)
1635 --(yy_buffer_stack_top);
1637 if (YY_CURRENT_BUFFER) {
1638 i386__load_buffer_state( );
1639 (yy_did_buffer_switch_on_eof) = 1;
1643 /* Allocates the stack if it does not exist.
1644 * Guarantees space for at least one push.
1646 static void i386_ensure_buffer_stack (void)
1650 if (!(yy_buffer_stack)) {
1652 /* First allocation is just for 2 elements, since we don't know if this
1653 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1654 * immediate realloc on the next call.
1657 (yy_buffer_stack) = (struct yy_buffer_state**)i386_alloc
1658 (num_to_alloc * sizeof(struct yy_buffer_state*)
1660 if ( ! (yy_buffer_stack) )
1661 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1663 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1665 (yy_buffer_stack_max) = num_to_alloc;
1666 (yy_buffer_stack_top) = 0;
1670 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1672 /* Increase the buffer to prepare for a possible push. */
1673 int grow_size = 8 /* arbitrary grow size */;
1675 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1676 (yy_buffer_stack) = (struct yy_buffer_state**)i386_realloc
1678 num_to_alloc * sizeof(struct yy_buffer_state*)
1680 if ( ! (yy_buffer_stack) )
1681 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1683 /* zero only the new slots.*/
1684 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1685 (yy_buffer_stack_max) = num_to_alloc;
1689 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1690 * @param base the character buffer
1691 * @param size the size in bytes of the character buffer
1693 * @return the newly allocated buffer state object.
1695 YY_BUFFER_STATE i386__scan_buffer (char * base, yy_size_t size )
1700 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1701 base[size-1] != YY_END_OF_BUFFER_CHAR )
1702 /* They forgot to leave room for the EOB's. */
1705 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1707 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_buffer()" );
1709 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1710 b->yy_buf_pos = b->yy_ch_buf = base;
1711 b->yy_is_our_buffer = 0;
1712 b->yy_input_file = 0;
1713 b->yy_n_chars = b->yy_buf_size;
1714 b->yy_is_interactive = 0;
1716 b->yy_fill_buffer = 0;
1717 b->yy_buffer_status = YY_BUFFER_NEW;
1719 i386__switch_to_buffer(b );
1724 /** Setup the input buffer state to scan a string. The next call to i386_lex() will
1725 * scan from a @e copy of @a str.
1726 * @param yystr a NUL-terminated string to scan
1728 * @return the newly allocated buffer state object.
1729 * @note If you want to scan bytes that may contain NUL values, then use
1730 * i386__scan_bytes() instead.
1732 YY_BUFFER_STATE i386__scan_string (yyconst char * yystr )
1735 return i386__scan_bytes(yystr,strlen(yystr) );
1738 /** Setup the input buffer state to scan the given bytes. The next call to i386_lex() will
1739 * scan from a @e copy of @a bytes.
1740 * @param bytes the byte buffer to scan
1741 * @param len the number of bytes in the buffer pointed to by @a bytes.
1743 * @return the newly allocated buffer state object.
1745 YY_BUFFER_STATE i386__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1752 /* Get memory for full buffer, including space for trailing EOB's. */
1753 n = _yybytes_len + 2;
1754 buf = (char *) i386_alloc(n );
1756 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_bytes()" );
1758 for ( i = 0; i < _yybytes_len; ++i )
1759 buf[i] = yybytes[i];
1761 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1763 b = i386__scan_buffer(buf,n );
1765 YY_FATAL_ERROR( "bad buffer in i386__scan_bytes()" );
1767 /* It's okay to grow etc. this buffer, and we should throw it
1768 * away when we're done.
1770 b->yy_is_our_buffer = 1;
1775 #ifndef YY_EXIT_FAILURE
1776 #define YY_EXIT_FAILURE 2
1779 static void yy_fatal_error (yyconst char* msg )
1781 (void) fprintf( stderr, "%s\n", msg );
1782 exit( YY_EXIT_FAILURE );
1785 /* Redefine yyless() so it works in section 3 code. */
1791 /* Undo effects of setting up i386_text. */ \
1792 int yyless_macro_arg = (n); \
1793 YY_LESS_LINENO(yyless_macro_arg);\
1794 i386_text[i386_leng] = (yy_hold_char); \
1795 (yy_c_buf_p) = i386_text + yyless_macro_arg; \
1796 (yy_hold_char) = *(yy_c_buf_p); \
1797 *(yy_c_buf_p) = '\0'; \
1798 i386_leng = yyless_macro_arg; \
1802 /* Accessor methods (get/set functions) to struct members. */
1804 /** Get the current line number.
1807 int i386_get_lineno (void)
1813 /** Get the input stream.
1816 FILE *i386_get_in (void)
1821 /** Get the output stream.
1824 FILE *i386_get_out (void)
1829 /** Get the length of the current token.
1832 int i386_get_leng (void)
1837 /** Get the current token.
1841 char *i386_get_text (void)
1846 /** Set the current line number.
1847 * @param line_number
1850 void i386_set_lineno (int line_number )
1853 i386_lineno = line_number;
1856 /** Set the input stream. This does not discard the current
1858 * @param in_str A readable stream.
1860 * @see i386__switch_to_buffer
1862 void i386_set_in (FILE * in_str )
1867 void i386_set_out (FILE * out_str )
1869 i386_out = out_str ;
1872 int i386_get_debug (void)
1874 return i386__flex_debug;
1877 void i386_set_debug (int bdebug )
1879 i386__flex_debug = bdebug ;
1882 static int yy_init_globals (void)
1884 /* Initialization is the same as for the non-reentrant scanner.
1885 * This function is called from i386_lex_destroy(), so don't allocate here.
1888 /* We do not touch i386_lineno unless the option is enabled. */
1891 (yy_buffer_stack) = 0;
1892 (yy_buffer_stack_top) = 0;
1893 (yy_buffer_stack_max) = 0;
1894 (yy_c_buf_p) = (char *) 0;
1898 /* Defined in main.c */
1903 i386_in = (FILE *) 0;
1904 i386_out = (FILE *) 0;
1907 /* For future reference: Set errno on error, since we are called by
1913 /* i386_lex_destroy is for both reentrant and non-reentrant scanners. */
1914 int i386_lex_destroy (void)
1917 /* Pop the buffer stack, destroying each element. */
1918 while(YY_CURRENT_BUFFER){
1919 i386__delete_buffer(YY_CURRENT_BUFFER );
1920 YY_CURRENT_BUFFER_LVALUE = NULL;
1921 i386_pop_buffer_state();
1924 /* Destroy the stack itself. */
1925 i386_free((yy_buffer_stack) );
1926 (yy_buffer_stack) = NULL;
1928 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1929 * i386_lex() is called, initialization will occur. */
1936 * Internal utility routines.
1940 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1943 for ( i = 0; i < n; ++i )
1948 #ifdef YY_NEED_STRLEN
1949 static int yy_flex_strlen (yyconst char * s )
1952 for ( n = 0; s[n]; ++n )
1959 void *i386_alloc (yy_size_t size )
1961 return (void *) malloc( size );
1964 void *i386_realloc (void * ptr, yy_size_t size )
1966 /* The cast to (char *) in the following accommodates both
1967 * implementations that use char* generic pointers, and those
1968 * that use void* generic pointers. It works with the latter
1969 * because both ANSI C and C++ allow castless assignment from
1970 * any pointer type to void*, and deal with argument conversions
1971 * as though doing an assignment.
1973 return (void *) realloc( (char *) ptr, size );
1976 void i386_free (void * ptr )
1978 free( (char *) ptr ); /* see i386_realloc() for (char *) cast */
1981 #define YYTABLES_NAME "yytables"
1983 #line 101 "i386_lex.l"
1994 if (c == EOF || c == '\n')
2000 invalid_char (int ch)
2002 error (0, 0, (isascii (ch)
2003 ? gettext ("invalid character '%c' at line %d; ignored")
2004 : gettext ("invalid character '\\%o' at line %d; ignored")),