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 37
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;
76 /* Limits of integral types. */
78 #define INT8_MIN (-128)
81 #define INT16_MIN (-32767-1)
84 #define INT32_MIN (-2147483647-1)
87 #define INT8_MAX (127)
90 #define INT16_MAX (32767)
93 #define INT32_MAX (2147483647)
96 #define UINT8_MAX (255U)
99 #define UINT16_MAX (65535U)
102 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE i386_restart(i386_in )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
163 #define YY_BUF_SIZE 16384
166 /* The state buf must be large enough to hold one state per character in the main buffer.
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
180 extern yy_size_t i386_leng;
182 extern FILE *i386_in, *i386_out;
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
188 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
189 * access to the local variable yy_act. Since yyless() is a macro, it would break
190 * existing scanners that call yyless() from OUTSIDE i386_lex.
191 * One obvious solution it to make yy_act a global. I tried that, and saw
192 * a 5% performance hit in a non-i386_lineno scanner, because yy_act is
193 * normally declared as a register variable-- so it is not worth it.
195 #define YY_LESS_LINENO(n) \
198 for ( yyl = n; yyl < i386_leng; ++yyl )\
199 if ( i386_text[yyl] == '\n' )\
203 /* Return all but the first "n" matched characters back to the input stream. */
207 /* Undo effects of setting up i386_text. */ \
208 int yyless_macro_arg = (n); \
209 YY_LESS_LINENO(yyless_macro_arg);\
210 *yy_cp = (yy_hold_char); \
211 YY_RESTORE_YY_MORE_OFFSET \
212 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
213 YY_DO_BEFORE_ACTION; /* set up i386_text again */ \
217 #define unput(c) yyunput( c, (yytext_ptr) )
219 #ifndef YY_STRUCT_YY_BUFFER_STATE
220 #define YY_STRUCT_YY_BUFFER_STATE
221 struct yy_buffer_state
225 char *yy_ch_buf; /* input buffer */
226 char *yy_buf_pos; /* current position in input buffer */
228 /* Size of input buffer in bytes, not including room for EOB
231 yy_size_t yy_buf_size;
233 /* Number of characters read into yy_ch_buf, not including EOB
236 yy_size_t yy_n_chars;
238 /* Whether we "own" the buffer - i.e., we know we created it,
239 * and can realloc() it to grow it, and should free() it to
242 int yy_is_our_buffer;
244 /* Whether this is an "interactive" input source; if so, and
245 * if we're using stdio for input, then we want to use getc()
246 * instead of fread(), to make sure we stop fetching input after
249 int yy_is_interactive;
251 /* Whether we're considered to be at the beginning of a line.
252 * If so, '^' rules will be active on the next match, otherwise
257 int yy_bs_lineno; /**< The line count. */
258 int yy_bs_column; /**< The column count. */
260 /* Whether to try to fill the input buffer when we reach the
265 int yy_buffer_status;
267 #define YY_BUFFER_NEW 0
268 #define YY_BUFFER_NORMAL 1
269 /* When an EOF's been seen but there's still some text to process
270 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
271 * shouldn't try reading from the input source any more. We might
272 * still have a bunch of tokens to match, though, because of
273 * possible backing-up.
275 * When we actually see the EOF, we change the status to "new"
276 * (via i386_restart()), so that the user can continue scanning by
277 * just pointing i386_in at a new input file.
279 #define YY_BUFFER_EOF_PENDING 2
282 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
284 /* Stack of input buffers. */
285 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
286 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
287 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
289 /* We provide macros for accessing buffer states in case in the
290 * future we want to put the buffer states in a more general
293 * Returns the top of the stack, or NULL.
295 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
296 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
299 /* Same as previous macro, but useful when we know that the buffer stack is not
300 * NULL or when we need an lvalue. For internal use only.
302 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
304 /* yy_hold_char holds the character lost when i386_text is formed. */
305 static char yy_hold_char;
306 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
309 /* Points to current character in buffer. */
310 static char *yy_c_buf_p = (char *) 0;
311 static int yy_init = 0; /* whether we need to initialize */
312 static int yy_start = 0; /* start state number */
314 /* Flag which is used to allow i386_wrap()'s to do buffer switches
315 * instead of setting up a fresh i386_in. A bit of a hack ...
317 static int yy_did_buffer_switch_on_eof;
319 void i386_restart (FILE *input_file );
320 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer );
321 YY_BUFFER_STATE i386__create_buffer (FILE *file,int size );
322 void i386__delete_buffer (YY_BUFFER_STATE b );
323 void i386__flush_buffer (YY_BUFFER_STATE b );
324 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer );
325 void i386_pop_buffer_state (void );
327 static void i386_ensure_buffer_stack (void );
328 static void i386__load_buffer_state (void );
329 static void i386__init_buffer (YY_BUFFER_STATE b,FILE *file );
331 #define YY_FLUSH_BUFFER i386__flush_buffer(YY_CURRENT_BUFFER )
333 YY_BUFFER_STATE i386__scan_buffer (char *base,yy_size_t size );
334 YY_BUFFER_STATE i386__scan_string (yyconst char *yy_str );
335 YY_BUFFER_STATE i386__scan_bytes (yyconst char *bytes,yy_size_t len );
337 void *i386_alloc (yy_size_t );
338 void *i386_realloc (void *,yy_size_t );
339 void i386_free (void * );
341 #define yy_new_buffer i386__create_buffer
343 #define yy_set_interactive(is_interactive) \
345 if ( ! YY_CURRENT_BUFFER ){ \
346 i386_ensure_buffer_stack (); \
347 YY_CURRENT_BUFFER_LVALUE = \
348 i386__create_buffer(i386_in,YY_BUF_SIZE ); \
350 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
353 #define yy_set_bol(at_bol) \
355 if ( ! YY_CURRENT_BUFFER ){\
356 i386_ensure_buffer_stack (); \
357 YY_CURRENT_BUFFER_LVALUE = \
358 i386__create_buffer(i386_in,YY_BUF_SIZE ); \
360 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
363 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
365 /* Begin user sect3 */
367 #define i386_wrap() 1
368 #define YY_SKIP_YYWRAP
370 typedef unsigned char YY_CHAR;
372 FILE *i386_in = (FILE *) 0, *i386_out = (FILE *) 0;
374 typedef int yy_state_type;
376 extern int i386_lineno;
380 extern char *i386_text;
381 #define yytext_ptr i386_text
383 static yy_state_type yy_get_previous_state (void );
384 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
385 static int yy_get_next_buffer (void );
386 static void yy_fatal_error (yyconst char msg[] );
388 /* Done after the current pattern has been matched and before the
389 * corresponding action - sets up i386_text.
391 #define YY_DO_BEFORE_ACTION \
392 (yytext_ptr) = yy_bp; \
393 i386_leng = (size_t) (yy_cp - yy_bp); \
394 (yy_hold_char) = *yy_cp; \
396 (yy_c_buf_p) = yy_cp;
398 #define YY_NUM_RULES 21
399 #define YY_END_OF_BUFFER 22
400 /* This struct is not used in this scanner,
401 but its presence is necessary. */
404 flex_int32_t yy_verify;
407 static yyconst flex_int16_t yy_accept[62] =
409 0, 0, 0, 0, 22, 20, 17, 15, 20, 5,
410 20, 14, 16, 19, 18, 15, 12, 7, 8, 13,
411 11, 11, 19, 14, 16, 17, 6, 0, 0, 0,
412 5, 0, 9, 18, 11, 11, 0, 0, 0, 0,
413 11, 0, 0, 0, 0, 11, 1, 0, 0, 0,
414 11, 0, 0, 0, 11, 2, 3, 0, 10, 4,
418 static yyconst flex_int32_t yy_ec[256] =
420 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
421 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 2, 1, 1, 4, 1, 5, 1, 1, 1,
424 1, 1, 1, 6, 1, 1, 7, 8, 9, 10,
425 10, 10, 10, 10, 10, 10, 10, 11, 1, 1,
426 1, 1, 1, 1, 12, 13, 13, 14, 13, 13,
427 13, 13, 15, 13, 13, 16, 13, 17, 13, 13,
428 13, 13, 13, 13, 13, 18, 13, 13, 13, 13,
429 1, 1, 1, 1, 13, 1, 19, 13, 13, 13,
431 20, 21, 13, 13, 22, 13, 23, 13, 24, 25,
432 26, 27, 13, 28, 29, 13, 30, 13, 13, 31,
433 32, 13, 33, 1, 34, 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,
440 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,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 static yyconst flex_int32_t yy_meta[35] =
452 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
453 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 static yyconst flex_int16_t yy_base[65] =
460 0, 32, 65, 3, 113, 114, 9, 11, 19, 7,
461 78, 16, 114, 114, 18, 20, 114, 114, 114, 114,
462 0, 94, 76, 23, 114, 25, 114, 90, 80, 0,
463 41, 73, 114, 36, 0, 88, 76, 44, 42, 37,
464 49, 37, 38, 37, 31, 40, 114, 33, 32, 28,
465 37, 16, 14, 12, 17, 114, 114, 5, 0, 114,
469 static yyconst flex_int16_t yy_def[65] =
471 62, 62, 61, 3, 61, 61, 61, 61, 61, 61,
472 63, 61, 61, 61, 61, 61, 61, 61, 61, 61,
473 64, 64, 63, 61, 61, 61, 61, 61, 61, 61,
474 61, 63, 61, 61, 64, 64, 61, 61, 61, 61,
475 64, 61, 61, 61, 61, 64, 61, 61, 61, 61,
476 64, 61, 61, 61, 64, 61, 61, 61, 64, 61,
480 static yyconst flex_int16_t yy_nxt[149] =
482 61, 7, 8, 35, 9, 24, 25, 10, 10, 10,
483 26, 26, 26, 26, 31, 31, 31, 26, 26, 34,
484 34, 34, 34, 27, 34, 34, 26, 26, 60, 39,
485 59, 40, 11, 7, 12, 13, 9, 34, 34, 10,
486 10, 10, 28, 58, 57, 29, 56, 30, 31, 31,
487 31, 55, 54, 53, 52, 51, 50, 49, 48, 47,
488 46, 45, 44, 43, 11, 14, 15, 16, 14, 14,
489 17, 14, 18, 19, 14, 20, 21, 21, 21, 22,
490 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
491 21, 21, 21, 21, 21, 21, 21, 23, 14, 6,
493 6, 6, 32, 32, 42, 41, 33, 38, 37, 33,
494 36, 33, 61, 5, 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, 61, 61,
497 61, 61, 61, 61, 61, 61, 61, 61
500 static yyconst flex_int16_t yy_chk[149] =
502 0, 1, 1, 64, 1, 4, 4, 1, 1, 1,
503 7, 7, 8, 8, 10, 10, 10, 12, 12, 15,
504 15, 16, 16, 9, 24, 24, 26, 26, 58, 30,
505 55, 30, 1, 2, 2, 2, 2, 34, 34, 2,
506 2, 2, 9, 54, 53, 9, 52, 9, 31, 31,
507 31, 51, 50, 49, 48, 46, 45, 44, 43, 42,
508 41, 40, 39, 38, 2, 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, 3,
511 3, 3, 3, 3, 3, 3, 3, 3, 3, 62,
513 62, 62, 63, 63, 37, 36, 32, 29, 28, 23,
514 22, 11, 5, 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, 61, 61,
517 61, 61, 61, 61, 61, 61, 61, 61
520 /* Table of booleans, true if rule could match eol. */
521 static yyconst flex_int32_t yy_rule_can_match_eol[22] =
523 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0,
526 static yy_state_type yy_last_accepting_state;
527 static char *yy_last_accepting_cpos;
529 extern int i386__flex_debug;
530 int i386__flex_debug = 0;
532 /* The intent behind this definition is that it'll catch
533 * any uses of REJECT which flex missed.
535 #define REJECT reject_used_but_not_detected
536 #define yymore() yymore_used_but_not_detected
537 #define YY_MORE_ADJ 0
538 #define YY_RESTORE_YY_MORE_OFFSET
542 /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc.
543 Written by Ulrich Drepper <drepper@redhat.com>, 2004.
545 This file is free software; you can redistribute it and/or modify
546 it under the terms of either
548 * the GNU Lesser General Public License as published by the Free
549 Software Foundation; either version 3 of the License, or (at
550 your option) any later version
554 * the GNU General Public License as published by the Free
555 Software Foundation; either version 2 of the License, or (at
556 your option) any later version
558 or both in parallel, as here.
560 elfutils is distributed in the hope that it will be useful, but
561 WITHOUT ANY WARRANTY; without even the implied warranty of
562 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
563 General Public License for more details.
565 You should have received copies of the GNU General Public License and
566 the GNU Lesser General Public License along with this program. If
567 not, see <http://www.gnu.org/licenses/>. */
578 #include "i386_parse.h"
581 static void eat_to_eol (void);
582 static void invalid_char (int ch);
584 #line 585 "i386_lex.c"
589 #ifndef YY_NO_UNISTD_H
590 /* Special case for "unistd.h", since it is non-ANSI. We include it way
591 * down here because we want the user's section 1 to have been scanned first.
592 * The user has a chance to override it with an option.
597 #ifndef YY_EXTRA_TYPE
598 #define YY_EXTRA_TYPE void *
601 static int yy_init_globals (void );
603 /* Accessor methods to globals.
604 These are made visible to non-reentrant scanners for convenience. */
606 int i386_lex_destroy (void );
608 int i386_get_debug (void );
610 void i386_set_debug (int debug_flag );
612 YY_EXTRA_TYPE i386_get_extra (void );
614 void i386_set_extra (YY_EXTRA_TYPE user_defined );
616 FILE *i386_get_in (void );
618 void i386_set_in (FILE * in_str );
620 FILE *i386_get_out (void );
622 void i386_set_out (FILE * out_str );
624 yy_size_t i386_get_leng (void );
626 char *i386_get_text (void );
628 int i386_get_lineno (void );
630 void i386_set_lineno (int line_number );
632 /* Macros after this point can all be overridden by user definitions in
636 #ifndef YY_SKIP_YYWRAP
638 extern "C" int i386_wrap (void );
640 extern int i386_wrap (void );
644 static void yyunput (int c,char *buf_ptr );
647 static void yy_flex_strncpy (char *,yyconst char *,int );
650 #ifdef YY_NEED_STRLEN
651 static int yy_flex_strlen (yyconst char * );
657 static int yyinput (void );
659 static int input (void );
664 /* Amount of stuff to slurp up with each read. */
665 #ifndef YY_READ_BUF_SIZE
666 #define YY_READ_BUF_SIZE 8192
669 /* Copy whatever the last rule matched to the standard output. */
671 /* This used to be an fputs(), but since the string might contain NUL's,
672 * we now use fwrite().
674 #define ECHO do { if (fwrite( i386_text, i386_leng, 1, i386_out )) {} } while (0)
677 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
678 * is returned in "result".
681 #define YY_INPUT(buf,result,max_size) \
682 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
686 for ( n = 0; n < max_size && \
687 (c = getc( i386_in )) != EOF && c != '\n'; ++n ) \
690 buf[n++] = (char) c; \
691 if ( c == EOF && ferror( i386_in ) ) \
692 YY_FATAL_ERROR( "input in flex scanner failed" ); \
698 while ( (result = fread(buf, 1, max_size, i386_in))==0 && ferror(i386_in)) \
700 if( errno != EINTR) \
702 YY_FATAL_ERROR( "input in flex scanner failed" ); \
713 /* No semi-colon after return; correct usage is to write "yyterminate();" -
714 * we don't want an extra ';' after the "return" because that will cause
715 * some compilers to complain about unreachable statements.
718 #define yyterminate() return YY_NULL
721 /* Number of entries by which start-condition stack grows. */
722 #ifndef YY_START_STACK_INCR
723 #define YY_START_STACK_INCR 25
726 /* Report a fatal error. */
727 #ifndef YY_FATAL_ERROR
728 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
731 /* end tables serialization structures and prototypes */
733 /* Default declaration of generated scanner - a define so the user can
734 * easily add parameters.
737 #define YY_DECL_IS_OURS 1
739 extern int i386_lex (void);
741 #define YY_DECL int i386_lex (void)
742 #endif /* !YY_DECL */
744 /* Code executed at the beginning of each rule, after i386_text and i386_leng
747 #ifndef YY_USER_ACTION
748 #define YY_USER_ACTION
751 /* Code executed at the end of each rule. */
753 #define YY_BREAK break;
756 #define YY_RULE_SETUP \
757 if ( i386_leng > 0 ) \
758 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
759 (i386_text[i386_leng - 1] == '\n'); \
762 /** The main scanner function which does all the work.
766 register yy_state_type yy_current_state;
767 register char *yy_cp, *yy_bp;
770 #line 57 "i386_lex.l"
773 #line 774 "i386_lex.c"
784 (yy_start) = 1; /* first start state */
792 if ( ! YY_CURRENT_BUFFER ) {
793 i386_ensure_buffer_stack ();
794 YY_CURRENT_BUFFER_LVALUE =
795 i386__create_buffer(i386_in,YY_BUF_SIZE );
798 i386__load_buffer_state( );
801 while ( 1 ) /* loops until end-of-file is reached */
803 yy_cp = (yy_c_buf_p);
805 /* Support of i386_text. */
806 *yy_cp = (yy_hold_char);
808 /* yy_bp points to the position in yy_ch_buf of the start of
813 yy_current_state = (yy_start);
814 yy_current_state += YY_AT_BOL();
818 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
819 if ( yy_accept[yy_current_state] )
821 (yy_last_accepting_state) = yy_current_state;
822 (yy_last_accepting_cpos) = yy_cp;
824 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
826 yy_current_state = (int) yy_def[yy_current_state];
827 if ( yy_current_state >= 62 )
828 yy_c = yy_meta[(unsigned int) yy_c];
830 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
833 while ( yy_current_state != 61 );
834 yy_cp = (yy_last_accepting_cpos);
835 yy_current_state = (yy_last_accepting_state);
838 yy_act = yy_accept[yy_current_state];
842 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
845 for ( yyl = 0; yyl < i386_leng; ++yyl )
846 if ( i386_text[yyl] == '\n' )
852 do_action: /* This label is used only to access EOF actions. */
855 { /* beginning of action switch */
856 case 0: /* must back up */
857 /* undo the effects of YY_DO_BEFORE_ACTION */
858 *yy_cp = (yy_hold_char);
859 yy_cp = (yy_last_accepting_cpos);
860 yy_current_state = (yy_last_accepting_state);
865 #line 59 "i386_lex.l"
870 #line 61 "i386_lex.l"
875 #line 62 "i386_lex.l"
880 #line 64 "i386_lex.l"
885 #line 66 "i386_lex.l"
886 { i386_lval.num = strtoul (i386_text, NULL, 10);
891 #line 69 "i386_lex.l"
892 { BEGIN (MAIN); return kPERCPERC; }
896 #line 72 "i386_lex.l"
901 #line 73 "i386_lex.l"
906 #line 75 "i386_lex.l"
907 { i386_lval.str = xstrndup (i386_text + 1,
913 #line 79 "i386_lex.l"
914 { i386_lval.str = (void *) -1l;
919 #line 82 "i386_lex.l"
920 { i386_lval.str = xstrndup (i386_text, i386_leng);
925 #line 85 "i386_lex.l"
930 #line 87 "i386_lex.l"
934 /* rule 14 can match eol */
936 #line 89 "i386_lex.l"
940 /* rule 15 can match eol */
942 #line 91 "i386_lex.l"
947 #line 93 "i386_lex.l"
951 /* rule 17 can match eol */
953 #line 95 "i386_lex.l"
957 /* rule 18 can match eol */
959 #line 97 "i386_lex.l"
964 #line 99 "i386_lex.l"
965 { i386_lval.ch = *i386_text; return kCHAR; }
969 #line 101 "i386_lex.l"
970 { invalid_char (*i386_text); }
974 #line 104 "i386_lex.l"
977 #line 978 "i386_lex.c"
978 case YY_STATE_EOF(INITIAL):
979 case YY_STATE_EOF(MAIN):
982 case YY_END_OF_BUFFER:
984 /* Amount of text matched not including the EOB char. */
985 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
987 /* Undo the effects of YY_DO_BEFORE_ACTION. */
988 *yy_cp = (yy_hold_char);
989 YY_RESTORE_YY_MORE_OFFSET
991 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
993 /* We're scanning a new file or input source. It's
994 * possible that this happened because the user
995 * just pointed i386_in at a new source and called
996 * i386_lex(). If so, then we have to assure
997 * consistency between YY_CURRENT_BUFFER and our
998 * globals. Here is the right place to do so, because
999 * this is the first action (other than possibly a
1000 * back-up) that will match for the new input source.
1002 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1003 YY_CURRENT_BUFFER_LVALUE->yy_input_file = i386_in;
1004 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1007 /* Note that here we test for yy_c_buf_p "<=" to the position
1008 * of the first EOB in the buffer, since yy_c_buf_p will
1009 * already have been incremented past the NUL character
1010 * (since all states make transitions on EOB to the
1011 * end-of-buffer state). Contrast this with the test
1014 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1015 { /* This was really a NUL. */
1016 yy_state_type yy_next_state;
1018 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1020 yy_current_state = yy_get_previous_state( );
1022 /* Okay, we're now positioned to make the NUL
1023 * transition. We couldn't have
1024 * yy_get_previous_state() go ahead and do it
1025 * for us because it doesn't know how to deal
1026 * with the possibility of jamming (and we don't
1027 * want to build jamming into it because then it
1028 * will run more slowly).
1031 yy_next_state = yy_try_NUL_trans( yy_current_state );
1033 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1035 if ( yy_next_state )
1037 /* Consume the NUL. */
1038 yy_cp = ++(yy_c_buf_p);
1039 yy_current_state = yy_next_state;
1045 yy_cp = (yy_last_accepting_cpos);
1046 yy_current_state = (yy_last_accepting_state);
1047 goto yy_find_action;
1051 else switch ( yy_get_next_buffer( ) )
1053 case EOB_ACT_END_OF_FILE:
1055 (yy_did_buffer_switch_on_eof) = 0;
1059 /* Note: because we've taken care in
1060 * yy_get_next_buffer() to have set up
1061 * i386_text, we can now set up
1062 * yy_c_buf_p so that if some total
1063 * hoser (like flex itself) wants to
1064 * call the scanner after we return the
1065 * YY_NULL, it'll still work - another
1066 * YY_NULL will get returned.
1068 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1070 yy_act = YY_STATE_EOF(YY_START);
1076 if ( ! (yy_did_buffer_switch_on_eof) )
1082 case EOB_ACT_CONTINUE_SCAN:
1084 (yytext_ptr) + yy_amount_of_matched_text;
1086 yy_current_state = yy_get_previous_state( );
1088 yy_cp = (yy_c_buf_p);
1089 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1092 case EOB_ACT_LAST_MATCH:
1094 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1096 yy_current_state = yy_get_previous_state( );
1098 yy_cp = (yy_c_buf_p);
1099 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1100 goto yy_find_action;
1107 "fatal flex scanner internal error--no action found" );
1108 } /* end of action switch */
1109 } /* end of scanning one token */
1110 } /* end of i386_lex */
1112 /* yy_get_next_buffer - try to read in a new buffer
1114 * Returns a code representing an action:
1115 * EOB_ACT_LAST_MATCH -
1116 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1117 * EOB_ACT_END_OF_FILE - end of file
1119 static int yy_get_next_buffer (void)
1121 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1122 register char *source = (yytext_ptr);
1123 register int number_to_move, i;
1126 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1128 "fatal flex scanner internal error--end of buffer missed" );
1130 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1131 { /* Don't try to fill the buffer, so this is an EOF. */
1132 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1134 /* We matched a single character, the EOB, so
1135 * treat this as a final EOF.
1137 return EOB_ACT_END_OF_FILE;
1142 /* We matched some text prior to the EOB, first
1145 return EOB_ACT_LAST_MATCH;
1149 /* Try to read more data. */
1151 /* First move last chars to start of buffer. */
1152 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1154 for ( i = 0; i < number_to_move; ++i )
1155 *(dest++) = *(source++);
1157 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1158 /* don't do the read, it's not guaranteed to return an EOF,
1161 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1165 yy_size_t num_to_read =
1166 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1168 while ( num_to_read <= 0 )
1169 { /* Not enough room in the buffer - grow it. */
1171 /* just a shorter name for the current buffer */
1172 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1174 int yy_c_buf_p_offset =
1175 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1177 if ( b->yy_is_our_buffer )
1179 yy_size_t new_size = b->yy_buf_size * 2;
1181 if ( new_size <= 0 )
1182 b->yy_buf_size += b->yy_buf_size / 8;
1184 b->yy_buf_size *= 2;
1186 b->yy_ch_buf = (char *)
1187 /* Include room in for 2 EOB chars. */
1188 i386_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1191 /* Can't grow it, we don't own it. */
1194 if ( ! b->yy_ch_buf )
1196 "fatal error - scanner input buffer overflow" );
1198 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1200 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1205 if ( num_to_read > YY_READ_BUF_SIZE )
1206 num_to_read = YY_READ_BUF_SIZE;
1208 /* Read in more data. */
1209 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1210 (yy_n_chars), num_to_read );
1212 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1215 if ( (yy_n_chars) == 0 )
1217 if ( number_to_move == YY_MORE_ADJ )
1219 ret_val = EOB_ACT_END_OF_FILE;
1220 i386_restart(i386_in );
1225 ret_val = EOB_ACT_LAST_MATCH;
1226 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1227 YY_BUFFER_EOF_PENDING;
1232 ret_val = EOB_ACT_CONTINUE_SCAN;
1234 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1235 /* Extend the array by 50%, plus the number we really need. */
1236 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1237 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) i386_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1238 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1239 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1242 (yy_n_chars) += number_to_move;
1243 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1244 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1246 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1251 /* yy_get_previous_state - get the state just before the EOB char was reached */
1253 static yy_state_type yy_get_previous_state (void)
1255 register yy_state_type yy_current_state;
1256 register char *yy_cp;
1258 yy_current_state = (yy_start);
1259 yy_current_state += YY_AT_BOL();
1261 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1263 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1264 if ( yy_accept[yy_current_state] )
1266 (yy_last_accepting_state) = yy_current_state;
1267 (yy_last_accepting_cpos) = yy_cp;
1269 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1271 yy_current_state = (int) yy_def[yy_current_state];
1272 if ( yy_current_state >= 62 )
1273 yy_c = yy_meta[(unsigned int) yy_c];
1275 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1278 return yy_current_state;
1281 /* yy_try_NUL_trans - try to make a transition on the NUL character
1284 * next_state = yy_try_NUL_trans( current_state );
1286 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1288 register int yy_is_jam;
1289 register char *yy_cp = (yy_c_buf_p);
1291 register YY_CHAR yy_c = 1;
1292 if ( yy_accept[yy_current_state] )
1294 (yy_last_accepting_state) = yy_current_state;
1295 (yy_last_accepting_cpos) = yy_cp;
1297 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1299 yy_current_state = (int) yy_def[yy_current_state];
1300 if ( yy_current_state >= 62 )
1301 yy_c = yy_meta[(unsigned int) yy_c];
1303 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1304 yy_is_jam = (yy_current_state == 61);
1306 return yy_is_jam ? 0 : yy_current_state;
1309 static void yyunput (int c, register char * yy_bp )
1311 register char *yy_cp;
1313 yy_cp = (yy_c_buf_p);
1315 /* undo effects of setting up i386_text */
1316 *yy_cp = (yy_hold_char);
1318 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1319 { /* need to shift things up to make room */
1320 /* +2 for EOB chars. */
1321 register yy_size_t number_to_move = (yy_n_chars) + 2;
1322 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1323 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1324 register char *source =
1325 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1327 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1328 *--dest = *--source;
1330 yy_cp += (int) (dest - source);
1331 yy_bp += (int) (dest - source);
1332 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1333 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1335 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1336 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1339 *--yy_cp = (char) c;
1345 (yytext_ptr) = yy_bp;
1346 (yy_hold_char) = *yy_cp;
1347 (yy_c_buf_p) = yy_cp;
1352 static int yyinput (void)
1354 static int input (void)
1360 *(yy_c_buf_p) = (yy_hold_char);
1362 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1364 /* yy_c_buf_p now points to the character we want to return.
1365 * If this occurs *before* the EOB characters, then it's a
1366 * valid NUL; if not, then we've hit the end of the buffer.
1368 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1369 /* This was really a NUL. */
1370 *(yy_c_buf_p) = '\0';
1373 { /* need more input */
1374 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1377 switch ( yy_get_next_buffer( ) )
1379 case EOB_ACT_LAST_MATCH:
1380 /* This happens because yy_g_n_b()
1381 * sees that we've accumulated a
1382 * token and flags that we need to
1383 * try matching the token before
1384 * proceeding. But for input(),
1385 * there's no matching to consider.
1386 * So convert the EOB_ACT_LAST_MATCH
1387 * to EOB_ACT_END_OF_FILE.
1390 /* Reset buffer status. */
1391 i386_restart(i386_in );
1395 case EOB_ACT_END_OF_FILE:
1400 if ( ! (yy_did_buffer_switch_on_eof) )
1409 case EOB_ACT_CONTINUE_SCAN:
1410 (yy_c_buf_p) = (yytext_ptr) + offset;
1416 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1417 *(yy_c_buf_p) = '\0'; /* preserve i386_text */
1418 (yy_hold_char) = *++(yy_c_buf_p);
1420 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1421 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1428 #endif /* ifndef YY_NO_INPUT */
1430 /** Immediately switch to a different input stream.
1431 * @param input_file A readable stream.
1433 * @note This function does not reset the start condition to @c INITIAL .
1435 void i386_restart (FILE * input_file )
1438 if ( ! YY_CURRENT_BUFFER ){
1439 i386_ensure_buffer_stack ();
1440 YY_CURRENT_BUFFER_LVALUE =
1441 i386__create_buffer(i386_in,YY_BUF_SIZE );
1444 i386__init_buffer(YY_CURRENT_BUFFER,input_file );
1445 i386__load_buffer_state( );
1448 /** Switch to a different input buffer.
1449 * @param new_buffer The new input buffer.
1452 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1455 /* TODO. We should be able to replace this entire function body
1457 * i386_pop_buffer_state();
1458 * i386_push_buffer_state(new_buffer);
1460 i386_ensure_buffer_stack ();
1461 if ( YY_CURRENT_BUFFER == new_buffer )
1464 if ( YY_CURRENT_BUFFER )
1466 /* Flush out information for old buffer. */
1467 *(yy_c_buf_p) = (yy_hold_char);
1468 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1469 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1472 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1473 i386__load_buffer_state( );
1475 /* We don't actually know whether we did this switch during
1476 * EOF (i386_wrap()) processing, but the only time this flag
1477 * is looked at is after i386_wrap() is called, so it's safe
1478 * to go ahead and always set it.
1480 (yy_did_buffer_switch_on_eof) = 1;
1483 static void i386__load_buffer_state (void)
1485 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1486 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1487 i386_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1488 (yy_hold_char) = *(yy_c_buf_p);
1491 /** Allocate and initialize an input buffer state.
1492 * @param file A readable stream.
1493 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1495 * @return the allocated buffer state.
1497 YY_BUFFER_STATE i386__create_buffer (FILE * file, int size )
1501 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1503 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1505 b->yy_buf_size = size;
1507 /* yy_ch_buf has to be 2 characters longer than the size given because
1508 * we need to put in 2 end-of-buffer characters.
1510 b->yy_ch_buf = (char *) i386_alloc(b->yy_buf_size + 2 );
1511 if ( ! b->yy_ch_buf )
1512 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1514 b->yy_is_our_buffer = 1;
1516 i386__init_buffer(b,file );
1521 /** Destroy the buffer.
1522 * @param b a buffer created with i386__create_buffer()
1525 void i386__delete_buffer (YY_BUFFER_STATE b )
1531 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1532 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1534 if ( b->yy_is_our_buffer )
1535 i386_free((void *) b->yy_ch_buf );
1537 i386_free((void *) b );
1540 /* Initializes or reinitializes a buffer.
1541 * This function is sometimes called more than once on the same buffer,
1542 * such as during a i386_restart() or at EOF.
1544 static void i386__init_buffer (YY_BUFFER_STATE b, FILE * file )
1549 i386__flush_buffer(b );
1551 b->yy_input_file = file;
1552 b->yy_fill_buffer = 1;
1554 /* If b is the current buffer, then i386__init_buffer was _probably_
1555 * called from i386_restart() or through yy_get_next_buffer.
1556 * In that case, we don't want to reset the lineno or column.
1558 if (b != YY_CURRENT_BUFFER){
1559 b->yy_bs_lineno = 1;
1560 b->yy_bs_column = 0;
1563 b->yy_is_interactive = 0;
1568 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1569 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1572 void i386__flush_buffer (YY_BUFFER_STATE b )
1579 /* We always need two end-of-buffer characters. The first causes
1580 * a transition to the end-of-buffer state. The second causes
1581 * a jam in that state.
1583 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1584 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1586 b->yy_buf_pos = &b->yy_ch_buf[0];
1589 b->yy_buffer_status = YY_BUFFER_NEW;
1591 if ( b == YY_CURRENT_BUFFER )
1592 i386__load_buffer_state( );
1595 /** Pushes the new state onto the stack. The new state becomes
1596 * the current state. This function will allocate the stack
1598 * @param new_buffer The new state.
1601 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer )
1603 if (new_buffer == NULL)
1606 i386_ensure_buffer_stack();
1608 /* This block is copied from i386__switch_to_buffer. */
1609 if ( YY_CURRENT_BUFFER )
1611 /* Flush out information for old buffer. */
1612 *(yy_c_buf_p) = (yy_hold_char);
1613 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1614 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1617 /* Only push if top exists. Otherwise, replace top. */
1618 if (YY_CURRENT_BUFFER)
1619 (yy_buffer_stack_top)++;
1620 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1622 /* copied from i386__switch_to_buffer. */
1623 i386__load_buffer_state( );
1624 (yy_did_buffer_switch_on_eof) = 1;
1627 /** Removes and deletes the top of the stack, if present.
1628 * The next element becomes the new top.
1631 void i386_pop_buffer_state (void)
1633 if (!YY_CURRENT_BUFFER)
1636 i386__delete_buffer(YY_CURRENT_BUFFER );
1637 YY_CURRENT_BUFFER_LVALUE = NULL;
1638 if ((yy_buffer_stack_top) > 0)
1639 --(yy_buffer_stack_top);
1641 if (YY_CURRENT_BUFFER) {
1642 i386__load_buffer_state( );
1643 (yy_did_buffer_switch_on_eof) = 1;
1647 /* Allocates the stack if it does not exist.
1648 * Guarantees space for at least one push.
1650 static void i386_ensure_buffer_stack (void)
1652 yy_size_t num_to_alloc;
1654 if (!(yy_buffer_stack)) {
1656 /* First allocation is just for 2 elements, since we don't know if this
1657 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1658 * immediate realloc on the next call.
1661 (yy_buffer_stack) = (struct yy_buffer_state**)i386_alloc
1662 (num_to_alloc * sizeof(struct yy_buffer_state*)
1664 if ( ! (yy_buffer_stack) )
1665 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1667 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1669 (yy_buffer_stack_max) = num_to_alloc;
1670 (yy_buffer_stack_top) = 0;
1674 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1676 /* Increase the buffer to prepare for a possible push. */
1677 int grow_size = 8 /* arbitrary grow size */;
1679 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1680 (yy_buffer_stack) = (struct yy_buffer_state**)i386_realloc
1682 num_to_alloc * sizeof(struct yy_buffer_state*)
1684 if ( ! (yy_buffer_stack) )
1685 YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1687 /* zero only the new slots.*/
1688 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1689 (yy_buffer_stack_max) = num_to_alloc;
1693 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1694 * @param base the character buffer
1695 * @param size the size in bytes of the character buffer
1697 * @return the newly allocated buffer state object.
1699 YY_BUFFER_STATE i386__scan_buffer (char * base, yy_size_t size )
1704 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1705 base[size-1] != YY_END_OF_BUFFER_CHAR )
1706 /* They forgot to leave room for the EOB's. */
1709 b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state ) );
1711 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_buffer()" );
1713 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1714 b->yy_buf_pos = b->yy_ch_buf = base;
1715 b->yy_is_our_buffer = 0;
1716 b->yy_input_file = 0;
1717 b->yy_n_chars = b->yy_buf_size;
1718 b->yy_is_interactive = 0;
1720 b->yy_fill_buffer = 0;
1721 b->yy_buffer_status = YY_BUFFER_NEW;
1723 i386__switch_to_buffer(b );
1728 /** Setup the input buffer state to scan a string. The next call to i386_lex() will
1729 * scan from a @e copy of @a str.
1730 * @param yystr a NUL-terminated string to scan
1732 * @return the newly allocated buffer state object.
1733 * @note If you want to scan bytes that may contain NUL values, then use
1734 * i386__scan_bytes() instead.
1736 YY_BUFFER_STATE i386__scan_string (yyconst char * yystr )
1739 return i386__scan_bytes(yystr,strlen(yystr) );
1742 /** Setup the input buffer state to scan the given bytes. The next call to i386_lex() will
1743 * scan from a @e copy of @a bytes.
1744 * @param yybytes the byte buffer to scan
1745 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1747 * @return the newly allocated buffer state object.
1749 YY_BUFFER_STATE i386__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
1756 /* Get memory for full buffer, including space for trailing EOB's. */
1757 n = _yybytes_len + 2;
1758 buf = (char *) i386_alloc(n );
1760 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_bytes()" );
1762 for ( i = 0; i < _yybytes_len; ++i )
1763 buf[i] = yybytes[i];
1765 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1767 b = i386__scan_buffer(buf,n );
1769 YY_FATAL_ERROR( "bad buffer in i386__scan_bytes()" );
1771 /* It's okay to grow etc. this buffer, and we should throw it
1772 * away when we're done.
1774 b->yy_is_our_buffer = 1;
1779 #ifndef YY_EXIT_FAILURE
1780 #define YY_EXIT_FAILURE 2
1783 static void yy_fatal_error (yyconst char* msg )
1785 (void) fprintf( stderr, "%s\n", msg );
1786 exit( YY_EXIT_FAILURE );
1789 /* Redefine yyless() so it works in section 3 code. */
1795 /* Undo effects of setting up i386_text. */ \
1796 int yyless_macro_arg = (n); \
1797 YY_LESS_LINENO(yyless_macro_arg);\
1798 i386_text[i386_leng] = (yy_hold_char); \
1799 (yy_c_buf_p) = i386_text + yyless_macro_arg; \
1800 (yy_hold_char) = *(yy_c_buf_p); \
1801 *(yy_c_buf_p) = '\0'; \
1802 i386_leng = yyless_macro_arg; \
1806 /* Accessor methods (get/set functions) to struct members. */
1808 /** Get the current line number.
1811 int i386_get_lineno (void)
1817 /** Get the input stream.
1820 FILE *i386_get_in (void)
1825 /** Get the output stream.
1828 FILE *i386_get_out (void)
1833 /** Get the length of the current token.
1836 yy_size_t i386_get_leng (void)
1841 /** Get the current token.
1845 char *i386_get_text (void)
1850 /** Set the current line number.
1851 * @param line_number
1854 void i386_set_lineno (int line_number )
1857 i386_lineno = line_number;
1860 /** Set the input stream. This does not discard the current
1862 * @param in_str A readable stream.
1864 * @see i386__switch_to_buffer
1866 void i386_set_in (FILE * in_str )
1871 void i386_set_out (FILE * out_str )
1873 i386_out = out_str ;
1876 int i386_get_debug (void)
1878 return i386__flex_debug;
1881 void i386_set_debug (int bdebug )
1883 i386__flex_debug = bdebug ;
1886 static int yy_init_globals (void)
1888 /* Initialization is the same as for the non-reentrant scanner.
1889 * This function is called from i386_lex_destroy(), so don't allocate here.
1892 /* We do not touch i386_lineno unless the option is enabled. */
1895 (yy_buffer_stack) = 0;
1896 (yy_buffer_stack_top) = 0;
1897 (yy_buffer_stack_max) = 0;
1898 (yy_c_buf_p) = (char *) 0;
1902 /* Defined in main.c */
1907 i386_in = (FILE *) 0;
1908 i386_out = (FILE *) 0;
1911 /* For future reference: Set errno on error, since we are called by
1917 /* i386_lex_destroy is for both reentrant and non-reentrant scanners. */
1918 int i386_lex_destroy (void)
1921 /* Pop the buffer stack, destroying each element. */
1922 while(YY_CURRENT_BUFFER){
1923 i386__delete_buffer(YY_CURRENT_BUFFER );
1924 YY_CURRENT_BUFFER_LVALUE = NULL;
1925 i386_pop_buffer_state();
1928 /* Destroy the stack itself. */
1929 i386_free((yy_buffer_stack) );
1930 (yy_buffer_stack) = NULL;
1932 /* Reset the globals. This is important in a non-reentrant scanner so the next time
1933 * i386_lex() is called, initialization will occur. */
1940 * Internal utility routines.
1944 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1947 for ( i = 0; i < n; ++i )
1952 #ifdef YY_NEED_STRLEN
1953 static int yy_flex_strlen (yyconst char * s )
1956 for ( n = 0; s[n]; ++n )
1963 void *i386_alloc (yy_size_t size )
1965 return (void *) malloc( size );
1968 void *i386_realloc (void * ptr, yy_size_t size )
1970 /* The cast to (char *) in the following accommodates both
1971 * implementations that use char* generic pointers, and those
1972 * that use void* generic pointers. It works with the latter
1973 * because both ANSI C and C++ allow castless assignment from
1974 * any pointer type to void*, and deal with argument conversions
1975 * as though doing an assignment.
1977 return (void *) realloc( (char *) ptr, size );
1980 void i386_free (void * ptr )
1982 free( (char *) ptr ); /* see i386_realloc() for (char *) cast */
1985 #define YYTABLES_NAME "yytables"
1987 #line 104 "i386_lex.l"
1998 if (c == EOF || c == '\n')
2004 invalid_char (int ch)
2006 error (0, 0, (isascii (ch)
2007 ? gettext ("invalid character '%c' at line %d; ignored")
2008 : gettext ("invalid character '\\%o' at line %d; ignored")),