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 This file is free software; you can redistribute it and/or modify
545 it under the terms of either
547 * the GNU Lesser General Public License as published by the Free
548 Software Foundation; either version 3 of the License, or (at
549 your option) any later version
553 * the GNU General Public License as published by the Free
554 Software Foundation; either version 2 of the License, or (at
555 your option) any later version
557 or both in parallel, as here.
559 elfutils is distributed in the hope that it will be useful, but
560 WITHOUT ANY WARRANTY; without even the implied warranty of
561 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
562 General Public License for more details.
564 You should have received copies of the GNU General Public License and
565 the GNU Lesser General Public License along with this program. If
566 not, see <http://www.gnu.org/licenses/>. */
577 #include "i386_parse.h"
580 static void eat_to_eol (void);
581 static void invalid_char (int ch);
583 #line 584 "i386_lex.c"
588 #ifndef YY_NO_UNISTD_H
589 /* Special case for "unistd.h", since it is non-ANSI. We include it way
590 * down here because we want the user's section 1 to have been scanned first.
591 * The user has a chance to override it with an option.
596 #ifndef YY_EXTRA_TYPE
597 #define YY_EXTRA_TYPE void *
600 static int yy_init_globals (void );
602 /* Accessor methods to globals.
603 These are made visible to non-reentrant scanners for convenience. */
605 int i386_lex_destroy (void );
607 int i386_get_debug (void );
609 void i386_set_debug (int debug_flag );
611 YY_EXTRA_TYPE i386_get_extra (void );
613 void i386_set_extra (YY_EXTRA_TYPE user_defined );
615 FILE *i386_get_in (void );
617 void i386_set_in (FILE * in_str );
619 FILE *i386_get_out (void );
621 void i386_set_out (FILE * out_str );
623 int i386_get_leng (void );
625 char *i386_get_text (void );
627 int i386_get_lineno (void );
629 void i386_set_lineno (int line_number );
631 /* Macros after this point can all be overridden by user definitions in
635 #ifndef YY_SKIP_YYWRAP
637 extern "C" int i386_wrap (void );
639 extern int i386_wrap (void );
643 static void yyunput (int c,char *buf_ptr );
646 static void yy_flex_strncpy (char *,yyconst char *,int );
649 #ifdef YY_NEED_STRLEN
650 static int yy_flex_strlen (yyconst char * );
656 static int yyinput (void );
658 static int input (void );
663 /* Amount of stuff to slurp up with each read. */
664 #ifndef YY_READ_BUF_SIZE
665 #define YY_READ_BUF_SIZE 8192
668 /* Copy whatever the last rule matched to the standard output. */
670 /* This used to be an fputs(), but since the string might contain NUL's,
671 * we now use fwrite().
673 #define ECHO do { if (fwrite( i386_text, i386_leng, 1, i386_out )) {} } while (0)
676 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
677 * is returned in "result".
680 #define YY_INPUT(buf,result,max_size) \
681 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
685 for ( n = 0; n < max_size && \
686 (c = getc( i386_in )) != EOF && c != '\n'; ++n ) \
689 buf[n++] = (char) c; \
690 if ( c == EOF && ferror( i386_in ) ) \
691 YY_FATAL_ERROR( "input in flex scanner failed" ); \
697 while ( (result = fread(buf, 1, max_size, i386_in))==0 && ferror(i386_in)) \
699 if( errno != EINTR) \
701 YY_FATAL_ERROR( "input in flex scanner failed" ); \
712 /* No semi-colon after return; correct usage is to write "yyterminate();" -
713 * we don't want an extra ';' after the "return" because that will cause
714 * some compilers to complain about unreachable statements.
717 #define yyterminate() return YY_NULL
720 /* Number of entries by which start-condition stack grows. */
721 #ifndef YY_START_STACK_INCR
722 #define YY_START_STACK_INCR 25
725 /* Report a fatal error. */
726 #ifndef YY_FATAL_ERROR
727 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
730 /* end tables serialization structures and prototypes */
732 /* Default declaration of generated scanner - a define so the user can
733 * easily add parameters.
736 #define YY_DECL_IS_OURS 1
738 extern int i386_lex (void);
740 #define YY_DECL int i386_lex (void)
741 #endif /* !YY_DECL */
743 /* Code executed at the beginning of each rule, after i386_text and i386_leng
746 #ifndef YY_USER_ACTION
747 #define YY_USER_ACTION
750 /* Code executed at the end of each rule. */
752 #define YY_BREAK break;
755 #define YY_RULE_SETUP \
756 if ( i386_leng > 0 ) \
757 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
758 (i386_text[i386_leng - 1] == '\n'); \
761 /** The main scanner function which does all the work.
765 register yy_state_type yy_current_state;
766 register char *yy_cp, *yy_bp;
769 #line 57 "i386_lex.l"
772 #line 773 "i386_lex.c"
783 (yy_start) = 1; /* first start state */
791 if ( ! YY_CURRENT_BUFFER ) {
792 i386_ensure_buffer_stack ();
793 YY_CURRENT_BUFFER_LVALUE =
794 i386__create_buffer(i386_in,YY_BUF_SIZE );
797 i386__load_buffer_state( );
800 while ( 1 ) /* loops until end-of-file is reached */
802 yy_cp = (yy_c_buf_p);
804 /* Support of i386_text. */
805 *yy_cp = (yy_hold_char);
807 /* yy_bp points to the position in yy_ch_buf of the start of
812 yy_current_state = (yy_start);
813 yy_current_state += YY_AT_BOL();
817 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
818 if ( yy_accept[yy_current_state] )
820 (yy_last_accepting_state) = yy_current_state;
821 (yy_last_accepting_cpos) = yy_cp;
823 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
825 yy_current_state = (int) yy_def[yy_current_state];
826 if ( yy_current_state >= 62 )
827 yy_c = yy_meta[(unsigned int) yy_c];
829 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
832 while ( yy_current_state != 61 );
833 yy_cp = (yy_last_accepting_cpos);
834 yy_current_state = (yy_last_accepting_state);
837 yy_act = yy_accept[yy_current_state];
841 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
844 for ( yyl = 0; yyl < i386_leng; ++yyl )
845 if ( i386_text[yyl] == '\n' )
851 do_action: /* This label is used only to access EOF actions. */
854 { /* beginning of action switch */
855 case 0: /* must back up */
856 /* undo the effects of YY_DO_BEFORE_ACTION */
857 *yy_cp = (yy_hold_char);
858 yy_cp = (yy_last_accepting_cpos);
859 yy_current_state = (yy_last_accepting_state);
864 #line 59 "i386_lex.l"
869 #line 61 "i386_lex.l"
874 #line 62 "i386_lex.l"
879 #line 64 "i386_lex.l"
884 #line 66 "i386_lex.l"
885 { i386_lval.num = strtoul (i386_text, NULL, 10);
890 #line 69 "i386_lex.l"
891 { BEGIN (MAIN); return kPERCPERC; }
895 #line 72 "i386_lex.l"
900 #line 73 "i386_lex.l"
905 #line 75 "i386_lex.l"
906 { i386_lval.str = xstrndup (i386_text + 1,
912 #line 79 "i386_lex.l"
913 { i386_lval.str = (void *) -1l;
918 #line 82 "i386_lex.l"
919 { i386_lval.str = xstrndup (i386_text, i386_leng);
924 #line 85 "i386_lex.l"
929 #line 87 "i386_lex.l"
933 /* rule 14 can match eol */
935 #line 89 "i386_lex.l"
939 /* rule 15 can match eol */
941 #line 91 "i386_lex.l"
946 #line 93 "i386_lex.l"
950 /* rule 17 can match eol */
952 #line 95 "i386_lex.l"
956 /* rule 18 can match eol */
958 #line 97 "i386_lex.l"
963 #line 99 "i386_lex.l"
964 { i386_lval.ch = *i386_text; return kCHAR; }
968 #line 101 "i386_lex.l"
969 { invalid_char (*i386_text); }
973 #line 104 "i386_lex.l"
976 #line 977 "i386_lex.c"
977 case YY_STATE_EOF(INITIAL):
978 case YY_STATE_EOF(MAIN):
981 case YY_END_OF_BUFFER:
983 /* Amount of text matched not including the EOB char. */
984 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
986 /* Undo the effects of YY_DO_BEFORE_ACTION. */
987 *yy_cp = (yy_hold_char);
988 YY_RESTORE_YY_MORE_OFFSET
990 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
992 /* We're scanning a new file or input source. It's
993 * possible that this happened because the user
994 * just pointed i386_in at a new source and called
995 * i386_lex(). If so, then we have to assure
996 * consistency between YY_CURRENT_BUFFER and our
997 * globals. Here is the right place to do so, because
998 * this is the first action (other than possibly a
999 * back-up) that will match for the new input source.
1001 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1002 YY_CURRENT_BUFFER_LVALUE->yy_input_file = i386_in;
1003 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1006 /* Note that here we test for yy_c_buf_p "<=" to the position
1007 * of the first EOB in the buffer, since yy_c_buf_p will
1008 * already have been incremented past the NUL character
1009 * (since all states make transitions on EOB to the
1010 * end-of-buffer state). Contrast this with the test
1013 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1014 { /* This was really a NUL. */
1015 yy_state_type yy_next_state;
1017 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1019 yy_current_state = yy_get_previous_state( );
1021 /* Okay, we're now positioned to make the NUL
1022 * transition. We couldn't have
1023 * yy_get_previous_state() go ahead and do it
1024 * for us because it doesn't know how to deal
1025 * with the possibility of jamming (and we don't
1026 * want to build jamming into it because then it
1027 * will run more slowly).
1030 yy_next_state = yy_try_NUL_trans( yy_current_state );
1032 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1034 if ( yy_next_state )
1036 /* Consume the NUL. */
1037 yy_cp = ++(yy_c_buf_p);
1038 yy_current_state = yy_next_state;
1044 yy_cp = (yy_last_accepting_cpos);
1045 yy_current_state = (yy_last_accepting_state);
1046 goto yy_find_action;
1050 else switch ( yy_get_next_buffer( ) )
1052 case EOB_ACT_END_OF_FILE:
1054 (yy_did_buffer_switch_on_eof) = 0;
1058 /* Note: because we've taken care in
1059 * yy_get_next_buffer() to have set up
1060 * i386_text, we can now set up
1061 * yy_c_buf_p so that if some total
1062 * hoser (like flex itself) wants to
1063 * call the scanner after we return the
1064 * YY_NULL, it'll still work - another
1065 * YY_NULL will get returned.
1067 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1069 yy_act = YY_STATE_EOF(YY_START);
1075 if ( ! (yy_did_buffer_switch_on_eof) )
1081 case EOB_ACT_CONTINUE_SCAN:
1083 (yytext_ptr) + yy_amount_of_matched_text;
1085 yy_current_state = yy_get_previous_state( );
1087 yy_cp = (yy_c_buf_p);
1088 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1091 case EOB_ACT_LAST_MATCH:
1093 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1095 yy_current_state = yy_get_previous_state( );
1097 yy_cp = (yy_c_buf_p);
1098 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1099 goto yy_find_action;
1106 "fatal flex scanner internal error--no action found" );
1107 } /* end of action switch */
1108 } /* end of scanning one token */
1109 } /* end of i386_lex */
1111 /* yy_get_next_buffer - try to read in a new buffer
1113 * Returns a code representing an action:
1114 * EOB_ACT_LAST_MATCH -
1115 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1116 * EOB_ACT_END_OF_FILE - end of file
1118 static int yy_get_next_buffer (void)
1120 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1121 register char *source = (yytext_ptr);
1122 register int number_to_move, i;
1125 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1127 "fatal flex scanner internal error--end of buffer missed" );
1129 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1130 { /* Don't try to fill the buffer, so this is an EOF. */
1131 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1133 /* We matched a single character, the EOB, so
1134 * treat this as a final EOF.
1136 return EOB_ACT_END_OF_FILE;
1141 /* We matched some text prior to the EOB, first
1144 return EOB_ACT_LAST_MATCH;
1148 /* Try to read more data. */
1150 /* First move last chars to start of buffer. */
1151 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1153 for ( i = 0; i < number_to_move; ++i )
1154 *(dest++) = *(source++);
1156 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1157 /* don't do the read, it's not guaranteed to return an EOF,
1160 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1165 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1167 while ( num_to_read <= 0 )
1168 { /* Not enough room in the buffer - grow it. */
1170 /* just a shorter name for the current buffer */
1171 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1173 int yy_c_buf_p_offset =
1174 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1176 if ( b->yy_is_our_buffer )
1178 int new_size = b->yy_buf_size * 2;
1180 if ( new_size <= 0 )
1181 b->yy_buf_size += b->yy_buf_size / 8;
1183 b->yy_buf_size *= 2;
1185 b->yy_ch_buf = (char *)
1186 /* Include room in for 2 EOB chars. */
1187 i386_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1190 /* Can't grow it, we don't own it. */
1193 if ( ! b->yy_ch_buf )
1195 "fatal error - scanner input buffer overflow" );
1197 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1199 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1204 if ( num_to_read > YY_READ_BUF_SIZE )
1205 num_to_read = YY_READ_BUF_SIZE;
1207 /* Read in more data. */
1208 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1209 (yy_n_chars), (size_t) num_to_read );
1211 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1214 if ( (yy_n_chars) == 0 )
1216 if ( number_to_move == YY_MORE_ADJ )
1218 ret_val = EOB_ACT_END_OF_FILE;
1219 i386_restart(i386_in );
1224 ret_val = EOB_ACT_LAST_MATCH;
1225 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1226 YY_BUFFER_EOF_PENDING;
1231 ret_val = EOB_ACT_CONTINUE_SCAN;
1233 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1234 /* Extend the array by 50%, plus the number we really need. */
1235 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1236 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) i386_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1237 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1238 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1241 (yy_n_chars) += number_to_move;
1242 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1243 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1245 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1250 /* yy_get_previous_state - get the state just before the EOB char was reached */
1252 static yy_state_type yy_get_previous_state (void)
1254 register yy_state_type yy_current_state;
1255 register char *yy_cp;
1257 yy_current_state = (yy_start);
1258 yy_current_state += YY_AT_BOL();
1260 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1262 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1263 if ( yy_accept[yy_current_state] )
1265 (yy_last_accepting_state) = yy_current_state;
1266 (yy_last_accepting_cpos) = yy_cp;
1268 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1270 yy_current_state = (int) yy_def[yy_current_state];
1271 if ( yy_current_state >= 62 )
1272 yy_c = yy_meta[(unsigned int) yy_c];
1274 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1277 return yy_current_state;
1280 /* yy_try_NUL_trans - try to make a transition on the NUL character
1283 * next_state = yy_try_NUL_trans( current_state );
1285 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1287 register int yy_is_jam;
1288 register char *yy_cp = (yy_c_buf_p);
1290 register YY_CHAR yy_c = 1;
1291 if ( yy_accept[yy_current_state] )
1293 (yy_last_accepting_state) = yy_current_state;
1294 (yy_last_accepting_cpos) = yy_cp;
1296 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1298 yy_current_state = (int) yy_def[yy_current_state];
1299 if ( yy_current_state >= 62 )
1300 yy_c = yy_meta[(unsigned int) yy_c];
1302 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1303 yy_is_jam = (yy_current_state == 61);
1305 return yy_is_jam ? 0 : yy_current_state;
1308 static void yyunput (int c, register char * yy_bp )
1310 register char *yy_cp;
1312 yy_cp = (yy_c_buf_p);
1314 /* undo effects of setting up i386_text */
1315 *yy_cp = (yy_hold_char);
1317 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1318 { /* need to shift things up to make room */
1319 /* +2 for EOB chars. */
1320 register int number_to_move = (yy_n_chars) + 2;
1321 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1322 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1323 register char *source =
1324 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1326 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1327 *--dest = *--source;
1329 yy_cp += (int) (dest - source);
1330 yy_bp += (int) (dest - source);
1331 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1332 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1334 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1335 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1338 *--yy_cp = (char) c;
1344 (yytext_ptr) = yy_bp;
1345 (yy_hold_char) = *yy_cp;
1346 (yy_c_buf_p) = yy_cp;
1351 static int yyinput (void)
1353 static int input (void)
1359 *(yy_c_buf_p) = (yy_hold_char);
1361 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1363 /* yy_c_buf_p now points to the character we want to return.
1364 * If this occurs *before* the EOB characters, then it's a
1365 * valid NUL; if not, then we've hit the end of the buffer.
1367 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1368 /* This was really a NUL. */
1369 *(yy_c_buf_p) = '\0';
1372 { /* need more input */
1373 int offset = (yy_c_buf_p) - (yytext_ptr);
1376 switch ( yy_get_next_buffer( ) )
1378 case EOB_ACT_LAST_MATCH:
1379 /* This happens because yy_g_n_b()
1380 * sees that we've accumulated a
1381 * token and flags that we need to
1382 * try matching the token before
1383 * proceeding. But for input(),
1384 * there's no matching to consider.
1385 * So convert the EOB_ACT_LAST_MATCH
1386 * to EOB_ACT_END_OF_FILE.
1389 /* Reset buffer status. */
1390 i386_restart(i386_in );
1394 case EOB_ACT_END_OF_FILE:
1399 if ( ! (yy_did_buffer_switch_on_eof) )
1408 case EOB_ACT_CONTINUE_SCAN:
1409 (yy_c_buf_p) = (yytext_ptr) + offset;
1415 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1416 *(yy_c_buf_p) = '\0'; /* preserve i386_text */
1417 (yy_hold_char) = *++(yy_c_buf_p);
1419 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1420 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1427 #endif /* ifndef YY_NO_INPUT */
1429 /** Immediately switch to a different input stream.
1430 * @param input_file A readable stream.
1432 * @note This function does not reset the start condition to @c INITIAL .
1434 void i386_restart (FILE * input_file )
1437 if ( ! YY_CURRENT_BUFFER ){
1438 i386_ensure_buffer_stack ();
1439 YY_CURRENT_BUFFER_LVALUE =
1440 i386__create_buffer(i386_in,YY_BUF_SIZE );
1443 i386__init_buffer(YY_CURRENT_BUFFER,input_file );
1444 i386__load_buffer_state( );
1447 /** Switch to a different input buffer.
1448 * @param new_buffer The new input buffer.
1451 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1454 /* TODO. We should be able to replace this entire function body
1456 * i386_pop_buffer_state();
1457 * i386_push_buffer_state(new_buffer);
1459 i386_ensure_buffer_stack ();
1460 if ( YY_CURRENT_BUFFER == new_buffer )
1463 if ( YY_CURRENT_BUFFER )
1465 /* Flush out information for old buffer. */
1466 *(yy_c_buf_p) = (yy_hold_char);
1467 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1468 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1471 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1472 i386__load_buffer_state( );
1474 /* We don't actually know whether we did this switch during
1475 * EOF (i386_wrap()) processing, but the only time this flag
1476 * is looked at is after i386_wrap() is called, so it's safe
1477 * to go ahead and always set it.
1479 (yy_did_buffer_switch_on_eof) = 1;
1482 static void i386__load_buffer_state (void)
1484 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1485 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1486 i386_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1487 (yy_hold_char) = *(yy_c_buf_p);
1490 /** Allocate and initialize an input buffer state.
1491 * @param file A readable stream.
1492 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1494 * @return the allocated buffer state.
1496 YY_BUFFER_STATE i386__create_buffer (FILE * file, int size )
1500 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1502 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1504 b->yy_buf_size = size;
1506 /* yy_ch_buf has to be 2 characters longer than the size given because
1507 * we need to put in 2 end-of-buffer characters.
1509 b->yy_ch_buf = (char *) i386_alloc(b->yy_buf_size + 2 );
1510 if ( ! b->yy_ch_buf )
1511 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1513 b->yy_is_our_buffer = 1;
1515 i386__init_buffer(b,file );
1520 /** Destroy the buffer.
1521 * @param b a buffer created with i386__create_buffer()
1524 void i386__delete_buffer (YY_BUFFER_STATE b )
1530 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1531 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1533 if ( b->yy_is_our_buffer )
1534 i386_free((void *) b->yy_ch_buf );
1536 i386_free((void *) b );
1539 /* Initializes or reinitializes a buffer.
1540 * This function is sometimes called more than once on the same buffer,
1541 * such as during a i386_restart() or at EOF.
1543 static void i386__init_buffer (YY_BUFFER_STATE b, FILE * file )
1548 i386__flush_buffer(b );
1550 b->yy_input_file = file;
1551 b->yy_fill_buffer = 1;
1553 /* If b is the current buffer, then i386__init_buffer was _probably_
1554 * called from i386_restart() or through yy_get_next_buffer.
1555 * In that case, we don't want to reset the lineno or column.
1557 if (b != YY_CURRENT_BUFFER){
1558 b->yy_bs_lineno = 1;
1559 b->yy_bs_column = 0;
1562 b->yy_is_interactive = 0;
1567 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1568 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1571 void i386__flush_buffer (YY_BUFFER_STATE b )
1578 /* We always need two end-of-buffer characters. The first causes
1579 * a transition to the end-of-buffer state. The second causes
1580 * a jam in that state.
1582 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1583 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1585 b->yy_buf_pos = &b->yy_ch_buf[0];
1588 b->yy_buffer_status = YY_BUFFER_NEW;
1590 if ( b == YY_CURRENT_BUFFER )
1591 i386__load_buffer_state( );
1594 /** Pushes the new state onto the stack. The new state becomes
1595 * the current state. This function will allocate the stack
1597 * @param new_buffer The new state.
1600 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer )
1602 if (new_buffer == NULL)
1605 i386_ensure_buffer_stack();
1607 /* This block is copied from i386__switch_to_buffer. */
1608 if ( YY_CURRENT_BUFFER )
1610 /* Flush out information for old buffer. */
1611 *(yy_c_buf_p) = (yy_hold_char);
1612 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1613 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1616 /* Only push if top exists. Otherwise, replace top. */
1617 if (YY_CURRENT_BUFFER)
1618 (yy_buffer_stack_top)++;
1619 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1621 /* copied from i386__switch_to_buffer. */
1622 i386__load_buffer_state( );
1623 (yy_did_buffer_switch_on_eof) = 1;
1626 /** Removes and deletes the top of the stack, if present.
1627 * The next element becomes the new top.
1630 void i386_pop_buffer_state (void)
1632 if (!YY_CURRENT_BUFFER)
1635 i386__delete_buffer(YY_CURRENT_BUFFER );
1636 YY_CURRENT_BUFFER_LVALUE = NULL;
1637 if ((yy_buffer_stack_top) > 0)
1638 --(yy_buffer_stack_top);
1640 if (YY_CURRENT_BUFFER) {
1641 i386__load_buffer_state( );
1642 (yy_did_buffer_switch_on_eof) = 1;
1646 /* Allocates the stack if it does not exist.
1647 * Guarantees space for at least one push.
1649 static void i386_ensure_buffer_stack (void)
1653 if (!(yy_buffer_stack)) {
1655 /* First allocation is just for 2 elements, since we don't know if this
1656 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1657 * immediate realloc on the next call.
1660 (yy_buffer_stack) = (struct yy_buffer_state**)i386_alloc
1661 (num_to_alloc * sizeof(struct yy_buffer_state*)
1663 if ( ! (yy_buffer_stack) )
1664 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1666 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1668 (yy_buffer_stack_max) = num_to_alloc;
1669 (yy_buffer_stack_top) = 0;
1673 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1675 /* Increase the buffer to prepare for a possible push. */
1676 int grow_size = 8 /* arbitrary grow size */;
1678 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1679 (yy_buffer_stack) = (struct yy_buffer_state**)i386_realloc
1681 num_to_alloc * sizeof(struct yy_buffer_state*)
1683 if ( ! (yy_buffer_stack) )
1684 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1686 /* zero only the new slots.*/
1687 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1688 (yy_buffer_stack_max) = num_to_alloc;
1692 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1693 * @param base the character buffer
1694 * @param size the size in bytes of the character buffer
1696 * @return the newly allocated buffer state object.
1698 YY_BUFFER_STATE i386__scan_buffer (char * base, yy_size_t size )
1703 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1704 base[size-1] != YY_END_OF_BUFFER_CHAR )
1705 /* They forgot to leave room for the EOB's. */
1708 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1710 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_buffer()" );
1712 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1713 b->yy_buf_pos = b->yy_ch_buf = base;
1714 b->yy_is_our_buffer = 0;
1715 b->yy_input_file = 0;
1716 b->yy_n_chars = b->yy_buf_size;
1717 b->yy_is_interactive = 0;
1719 b->yy_fill_buffer = 0;
1720 b->yy_buffer_status = YY_BUFFER_NEW;
1722 i386__switch_to_buffer(b );
1727 /** Setup the input buffer state to scan a string. The next call to i386_lex() will
1728 * scan from a @e copy of @a str.
1729 * @param yystr a NUL-terminated string to scan
1731 * @return the newly allocated buffer state object.
1732 * @note If you want to scan bytes that may contain NUL values, then use
1733 * i386__scan_bytes() instead.
1735 YY_BUFFER_STATE i386__scan_string (yyconst char * yystr )
1738 return i386__scan_bytes(yystr,strlen(yystr) );
1741 /** Setup the input buffer state to scan the given bytes. The next call to i386_lex() will
1742 * scan from a @e copy of @a bytes.
1743 * @param bytes the byte buffer to scan
1744 * @param len the number of bytes in the buffer pointed to by @a bytes.
1746 * @return the newly allocated buffer state object.
1748 YY_BUFFER_STATE i386__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1755 /* Get memory for full buffer, including space for trailing EOB's. */
1756 n = _yybytes_len + 2;
1757 buf = (char *) i386_alloc(n );
1759 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_bytes()" );
1761 for ( i = 0; i < _yybytes_len; ++i )
1762 buf[i] = yybytes[i];
1764 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1766 b = i386__scan_buffer(buf,n );
1768 YY_FATAL_ERROR( "bad buffer in i386__scan_bytes()" );
1770 /* It's okay to grow etc. this buffer, and we should throw it
1771 * away when we're done.
1773 b->yy_is_our_buffer = 1;
1778 #ifndef YY_EXIT_FAILURE
1779 #define YY_EXIT_FAILURE 2
1782 static void yy_fatal_error (yyconst char* msg )
1784 (void) fprintf( stderr, "%s\n", msg );
1785 exit( YY_EXIT_FAILURE );
1788 /* Redefine yyless() so it works in section 3 code. */
1794 /* Undo effects of setting up i386_text. */ \
1795 int yyless_macro_arg = (n); \
1796 YY_LESS_LINENO(yyless_macro_arg);\
1797 i386_text[i386_leng] = (yy_hold_char); \
1798 (yy_c_buf_p) = i386_text + yyless_macro_arg; \
1799 (yy_hold_char) = *(yy_c_buf_p); \
1800 *(yy_c_buf_p) = '\0'; \
1801 i386_leng = yyless_macro_arg; \
1805 /* Accessor methods (get/set functions) to struct members. */
1807 /** Get the current line number.
1810 int i386_get_lineno (void)
1816 /** Get the input stream.
1819 FILE *i386_get_in (void)
1824 /** Get the output stream.
1827 FILE *i386_get_out (void)
1832 /** Get the length of the current token.
1835 int i386_get_leng (void)
1840 /** Get the current token.
1844 char *i386_get_text (void)
1849 /** Set the current line number.
1850 * @param line_number
1853 void i386_set_lineno (int line_number )
1856 i386_lineno = line_number;
1859 /** Set the input stream. This does not discard the current
1861 * @param in_str A readable stream.
1863 * @see i386__switch_to_buffer
1865 void i386_set_in (FILE * in_str )
1870 void i386_set_out (FILE * out_str )
1872 i386_out = out_str ;
1875 int i386_get_debug (void)
1877 return i386__flex_debug;
1880 void i386_set_debug (int bdebug )
1882 i386__flex_debug = bdebug ;
1885 static int yy_init_globals (void)
1887 /* Initialization is the same as for the non-reentrant scanner.
1888 * This function is called from i386_lex_destroy(), so don't allocate here.
1891 /* We do not touch i386_lineno unless the option is enabled. */
1894 (yy_buffer_stack) = 0;
1895 (yy_buffer_stack_top) = 0;
1896 (yy_buffer_stack_max) = 0;
1897 (yy_c_buf_p) = (char *) 0;
1901 /* Defined in main.c */
1906 i386_in = (FILE *) 0;
1907 i386_out = (FILE *) 0;
1910 /* For future reference: Set errno on error, since we are called by
1916 /* i386_lex_destroy is for both reentrant and non-reentrant scanners. */
1917 int i386_lex_destroy (void)
1920 /* Pop the buffer stack, destroying each element. */
1921 while(YY_CURRENT_BUFFER){
1922 i386__delete_buffer(YY_CURRENT_BUFFER );
1923 YY_CURRENT_BUFFER_LVALUE = NULL;
1924 i386_pop_buffer_state();
1927 /* Destroy the stack itself. */
1928 i386_free((yy_buffer_stack) );
1929 (yy_buffer_stack) = NULL;
1931 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1932 * i386_lex() is called, initialization will occur. */
1939 * Internal utility routines.
1943 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1946 for ( i = 0; i < n; ++i )
1951 #ifdef YY_NEED_STRLEN
1952 static int yy_flex_strlen (yyconst char * s )
1955 for ( n = 0; s[n]; ++n )
1962 void *i386_alloc (yy_size_t size )
1964 return (void *) malloc( size );
1967 void *i386_realloc (void * ptr, yy_size_t size )
1969 /* The cast to (char *) in the following accommodates both
1970 * implementations that use char* generic pointers, and those
1971 * that use void* generic pointers. It works with the latter
1972 * because both ANSI C and C++ allow castless assignment from
1973 * any pointer type to void*, and deal with argument conversions
1974 * as though doing an assignment.
1976 return (void *) realloc( (char *) ptr, size );
1979 void i386_free (void * ptr )
1981 free( (char *) ptr ); /* see i386_realloc() for (char *) cast */
1984 #define YYTABLES_NAME "yytables"
1986 #line 104 "i386_lex.l"
1997 if (c == EOF || c == '\n')
2003 invalid_char (int ch)
2005 error (0, 0, (isascii (ch)
2006 ? gettext ("invalid character '%c' at line %d; ignored")
2007 : gettext ("invalid character '\\%o' at line %d; ignored")),