Imported Upstream version 0.165
[platform/upstream/elfutils.git] / libcpu / i386_lex.c
1
2 #line 3 "i386_lex.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
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
15 #define yyin i386_in
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
26
27 #define FLEX_SCANNER
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 39
31 #if YY_FLEX_SUBMINOR_VERSION > 0
32 #define FLEX_BETA
33 #endif
34
35 /* First, we deal with  platform-specific or compiler-specific issues. */
36
37 /* begin standard C headers. */
38 #include <stdio.h>
39 #include <string.h>
40 #include <errno.h>
41 #include <stdlib.h>
42
43 /* end standard C headers. */
44
45 /* flex integer type definitions */
46
47 #ifndef FLEXINT_H
48 #define FLEXINT_H
49
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
51
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
53
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55  * if you want the limit (max/min) macros for int types. 
56  */
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
59 #endif
60
61 #include <inttypes.h>
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;
68 #else
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;
75
76 /* Limits of integral types. */
77 #ifndef INT8_MIN
78 #define INT8_MIN               (-128)
79 #endif
80 #ifndef INT16_MIN
81 #define INT16_MIN              (-32767-1)
82 #endif
83 #ifndef INT32_MIN
84 #define INT32_MIN              (-2147483647-1)
85 #endif
86 #ifndef INT8_MAX
87 #define INT8_MAX               (127)
88 #endif
89 #ifndef INT16_MAX
90 #define INT16_MAX              (32767)
91 #endif
92 #ifndef INT32_MAX
93 #define INT32_MAX              (2147483647)
94 #endif
95 #ifndef UINT8_MAX
96 #define UINT8_MAX              (255U)
97 #endif
98 #ifndef UINT16_MAX
99 #define UINT16_MAX             (65535U)
100 #endif
101 #ifndef UINT32_MAX
102 #define UINT32_MAX             (4294967295U)
103 #endif
104
105 #endif /* ! C99 */
106
107 #endif /* ! FLEXINT_H */
108
109 #ifdef __cplusplus
110
111 /* The "const" storage-class-modifier is valid. */
112 #define YY_USE_CONST
113
114 #else   /* ! __cplusplus */
115
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
118
119 #define YY_USE_CONST
120
121 #endif  /* defined (__STDC__) */
122 #endif  /* ! __cplusplus */
123
124 #ifdef YY_USE_CONST
125 #define yyconst const
126 #else
127 #define yyconst
128 #endif
129
130 /* Returned upon end-of-file. */
131 #define YY_NULL 0
132
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
136  * double cast.
137  */
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
139
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.
143  */
144 #define BEGIN (yy_start) = 1 + 2 *
145
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
148  * compatibility.
149  */
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
152
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE i386_restart(i386_in  )
158
159 #define YY_END_OF_BUFFER_CHAR 0
160
161 /* Size of default input buffer. */
162 #ifndef YY_BUF_SIZE
163 #define YY_BUF_SIZE 16384
164 #endif
165
166 /* The state buf must be large enough to hold one state per character in the main buffer.
167  */
168 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 #endif
174
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
178 #endif
179
180 extern yy_size_t i386_leng;
181
182 extern FILE *i386_in, *i386_out;
183
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
187
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.
194      */
195     #define  YY_LESS_LINENO(n) \
196             do { \
197                 int yyl;\
198                 for ( yyl = n; yyl < i386_leng; ++yyl )\
199                     if ( i386_text[yyl] == '\n' )\
200                         --i386_lineno;\
201             }while(0)
202     #define YY_LINENO_REWIND_TO(dst) \
203             do {\
204                 const char *p;\
205                 for ( p = yy_cp-1; p >= (dst); --p)\
206                     if ( *p == '\n' )\
207                         --i386_lineno;\
208             }while(0)
209     
210 /* Return all but the first "n" matched characters back to the input stream. */
211 #define yyless(n) \
212         do \
213                 { \
214                 /* Undo effects of setting up i386_text. */ \
215         int yyless_macro_arg = (n); \
216         YY_LESS_LINENO(yyless_macro_arg);\
217                 *yy_cp = (yy_hold_char); \
218                 YY_RESTORE_YY_MORE_OFFSET \
219                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
220                 YY_DO_BEFORE_ACTION; /* set up i386_text again */ \
221                 } \
222         while ( 0 )
223
224 #define unput(c) yyunput( c, (yytext_ptr)  )
225
226 #ifndef YY_STRUCT_YY_BUFFER_STATE
227 #define YY_STRUCT_YY_BUFFER_STATE
228 struct yy_buffer_state
229         {
230         FILE *yy_input_file;
231
232         char *yy_ch_buf;                /* input buffer */
233         char *yy_buf_pos;               /* current position in input buffer */
234
235         /* Size of input buffer in bytes, not including room for EOB
236          * characters.
237          */
238         yy_size_t yy_buf_size;
239
240         /* Number of characters read into yy_ch_buf, not including EOB
241          * characters.
242          */
243         yy_size_t yy_n_chars;
244
245         /* Whether we "own" the buffer - i.e., we know we created it,
246          * and can realloc() it to grow it, and should free() it to
247          * delete it.
248          */
249         int yy_is_our_buffer;
250
251         /* Whether this is an "interactive" input source; if so, and
252          * if we're using stdio for input, then we want to use getc()
253          * instead of fread(), to make sure we stop fetching input after
254          * each newline.
255          */
256         int yy_is_interactive;
257
258         /* Whether we're considered to be at the beginning of a line.
259          * If so, '^' rules will be active on the next match, otherwise
260          * not.
261          */
262         int yy_at_bol;
263
264     int yy_bs_lineno; /**< The line count. */
265     int yy_bs_column; /**< The column count. */
266     
267         /* Whether to try to fill the input buffer when we reach the
268          * end of it.
269          */
270         int yy_fill_buffer;
271
272         int yy_buffer_status;
273
274 #define YY_BUFFER_NEW 0
275 #define YY_BUFFER_NORMAL 1
276         /* When an EOF's been seen but there's still some text to process
277          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
278          * shouldn't try reading from the input source any more.  We might
279          * still have a bunch of tokens to match, though, because of
280          * possible backing-up.
281          *
282          * When we actually see the EOF, we change the status to "new"
283          * (via i386_restart()), so that the user can continue scanning by
284          * just pointing i386_in at a new input file.
285          */
286 #define YY_BUFFER_EOF_PENDING 2
287
288         };
289 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
290
291 /* Stack of input buffers. */
292 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
293 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
294 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
295
296 /* We provide macros for accessing buffer states in case in the
297  * future we want to put the buffer states in a more general
298  * "scanner state".
299  *
300  * Returns the top of the stack, or NULL.
301  */
302 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
303                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
304                           : NULL)
305
306 /* Same as previous macro, but useful when we know that the buffer stack is not
307  * NULL or when we need an lvalue. For internal use only.
308  */
309 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
310
311 /* yy_hold_char holds the character lost when i386_text is formed. */
312 static char yy_hold_char;
313 static yy_size_t yy_n_chars;            /* number of characters read into yy_ch_buf */
314 yy_size_t i386_leng;
315
316 /* Points to current character in buffer. */
317 static char *yy_c_buf_p = (char *) 0;
318 static int yy_init = 0;         /* whether we need to initialize */
319 static int yy_start = 0;        /* start state number */
320
321 /* Flag which is used to allow i386_wrap()'s to do buffer switches
322  * instead of setting up a fresh i386_in.  A bit of a hack ...
323  */
324 static int yy_did_buffer_switch_on_eof;
325
326 void i386_restart (FILE *input_file  );
327 void i386__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
328 YY_BUFFER_STATE i386__create_buffer (FILE *file,int size  );
329 void i386__delete_buffer (YY_BUFFER_STATE b  );
330 void i386__flush_buffer (YY_BUFFER_STATE b  );
331 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer  );
332 void i386_pop_buffer_state (void );
333
334 static void i386_ensure_buffer_stack (void );
335 static void i386__load_buffer_state (void );
336 static void i386__init_buffer (YY_BUFFER_STATE b,FILE *file  );
337
338 #define YY_FLUSH_BUFFER i386__flush_buffer(YY_CURRENT_BUFFER )
339
340 YY_BUFFER_STATE i386__scan_buffer (char *base,yy_size_t size  );
341 YY_BUFFER_STATE i386__scan_string (yyconst char *yy_str  );
342 YY_BUFFER_STATE i386__scan_bytes (yyconst char *bytes,yy_size_t len  );
343
344 void *i386_alloc (yy_size_t  );
345 void *i386_realloc (void *,yy_size_t  );
346 void i386_free (void *  );
347
348 #define yy_new_buffer i386__create_buffer
349
350 #define yy_set_interactive(is_interactive) \
351         { \
352         if ( ! YY_CURRENT_BUFFER ){ \
353         i386_ensure_buffer_stack (); \
354                 YY_CURRENT_BUFFER_LVALUE =    \
355             i386__create_buffer(i386_in,YY_BUF_SIZE ); \
356         } \
357         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
358         }
359
360 #define yy_set_bol(at_bol) \
361         { \
362         if ( ! YY_CURRENT_BUFFER ){\
363         i386_ensure_buffer_stack (); \
364                 YY_CURRENT_BUFFER_LVALUE =    \
365             i386__create_buffer(i386_in,YY_BUF_SIZE ); \
366         } \
367         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
368         }
369
370 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
371
372 /* Begin user sect3 */
373
374 #define i386_wrap() 1
375 #define YY_SKIP_YYWRAP
376
377 typedef unsigned char YY_CHAR;
378
379 FILE *i386_in = (FILE *) 0, *i386_out = (FILE *) 0;
380
381 typedef int yy_state_type;
382
383 extern int i386_lineno;
384
385 int i386_lineno = 1;
386
387 extern char *i386_text;
388 #define yytext_ptr i386_text
389
390 static yy_state_type yy_get_previous_state (void );
391 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
392 static int yy_get_next_buffer (void );
393 static void yy_fatal_error (yyconst char msg[]  );
394
395 /* Done after the current pattern has been matched and before the
396  * corresponding action - sets up i386_text.
397  */
398 #define YY_DO_BEFORE_ACTION \
399         (yytext_ptr) = yy_bp; \
400         i386_leng = (size_t) (yy_cp - yy_bp); \
401         (yy_hold_char) = *yy_cp; \
402         *yy_cp = '\0'; \
403         (yy_c_buf_p) = yy_cp;
404
405 #define YY_NUM_RULES 21
406 #define YY_END_OF_BUFFER 22
407 /* This struct is not used in this scanner,
408    but its presence is necessary. */
409 struct yy_trans_info
410         {
411         flex_int32_t yy_verify;
412         flex_int32_t yy_nxt;
413         };
414 static yyconst flex_int16_t yy_accept[62] =
415     {   0,
416         0,    0,    0,    0,   22,   20,   17,   15,   20,    5,
417        20,   14,   16,   19,   18,   15,   12,    7,    8,   13,
418        11,   11,   19,   14,   16,   17,    6,    0,    0,    0,
419         5,    0,    9,   18,   11,   11,    0,    0,    0,    0,
420        11,    0,    0,    0,    0,   11,    1,    0,    0,    0,
421        11,    0,    0,    0,   11,    2,    3,    0,   10,    4,
422         0
423     } ;
424
425 static yyconst flex_int32_t yy_ec[256] =
426     {   0,
427         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
428         2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
429         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
430         1,    2,    1,    1,    4,    1,    5,    1,    1,    1,
431         1,    1,    1,    6,    1,    1,    7,    8,    9,   10,
432        10,   10,   10,   10,   10,   10,   10,   11,    1,    1,
433         1,    1,    1,    1,   12,   13,   13,   14,   13,   13,
434        13,   13,   15,   13,   13,   16,   13,   17,   13,   13,
435        13,   13,   13,   13,   13,   18,   13,   13,   13,   13,
436         1,    1,    1,    1,   13,    1,   19,   13,   13,   13,
437
438        20,   21,   13,   13,   22,   13,   23,   13,   24,   25,
439        26,   27,   13,   28,   29,   13,   30,   13,   13,   31,
440        32,   13,   33,    1,   34,    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,
446         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
447         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
448
449         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
452         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
454         1,    1,    1,    1,    1
455     } ;
456
457 static yyconst flex_int32_t yy_meta[35] =
458     {   0,
459         1,    1,    1,    1,    1,    1,    2,    2,    2,    2,
460         3,    2,    2,    2,    2,    2,    2,    2,    2,    2,
461         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
462         2,    2,    1,    3
463     } ;
464
465 static yyconst flex_int16_t yy_base[65] =
466     {   0,
467         0,   32,   65,    3,  113,  114,    9,   11,   19,    7,
468        78,   16,  114,  114,   18,   20,  114,  114,  114,  114,
469         0,   94,   76,   23,  114,   25,  114,   90,   80,    0,
470        41,   73,  114,   36,    0,   88,   76,   44,   42,   37,
471        49,   37,   38,   37,   31,   40,  114,   33,   32,   28,
472        37,   16,   14,   12,   17,  114,  114,    5,    0,  114,
473       114,   99,  101,    2
474     } ;
475
476 static yyconst flex_int16_t yy_def[65] =
477     {   0,
478        62,   62,   61,    3,   61,   61,   61,   61,   61,   61,
479        63,   61,   61,   61,   61,   61,   61,   61,   61,   61,
480        64,   64,   63,   61,   61,   61,   61,   61,   61,   61,
481        61,   63,   61,   61,   64,   64,   61,   61,   61,   61,
482        64,   61,   61,   61,   61,   64,   61,   61,   61,   61,
483        64,   61,   61,   61,   64,   61,   61,   61,   64,   61,
484         0,   61,   61,   61
485     } ;
486
487 static yyconst flex_int16_t yy_nxt[149] =
488     {   0,
489        61,    7,    8,   35,    9,   24,   25,   10,   10,   10,
490        26,   26,   26,   26,   31,   31,   31,   26,   26,   34,
491        34,   34,   34,   27,   34,   34,   26,   26,   60,   39,
492        59,   40,   11,    7,   12,   13,    9,   34,   34,   10,
493        10,   10,   28,   58,   57,   29,   56,   30,   31,   31,
494        31,   55,   54,   53,   52,   51,   50,   49,   48,   47,
495        46,   45,   44,   43,   11,   14,   15,   16,   14,   14,
496        17,   14,   18,   19,   14,   20,   21,   21,   21,   22,
497        21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
498        21,   21,   21,   21,   21,   21,   21,   23,   14,    6,
499
500         6,    6,   32,   32,   42,   41,   33,   38,   37,   33,
501        36,   33,   61,    5,   61,   61,   61,   61,   61,   61,
502        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
503        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
504        61,   61,   61,   61,   61,   61,   61,   61
505     } ;
506
507 static yyconst flex_int16_t yy_chk[149] =
508     {   0,
509         0,    1,    1,   64,    1,    4,    4,    1,    1,    1,
510         7,    7,    8,    8,   10,   10,   10,   12,   12,   15,
511        15,   16,   16,    9,   24,   24,   26,   26,   58,   30,
512        55,   30,    1,    2,    2,    2,    2,   34,   34,    2,
513         2,    2,    9,   54,   53,    9,   52,    9,   31,   31,
514        31,   51,   50,   49,   48,   46,   45,   44,   43,   42,
515        41,   40,   39,   38,    2,    3,    3,    3,    3,    3,
516         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
517         3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
518         3,    3,    3,    3,    3,    3,    3,    3,    3,   62,
519
520        62,   62,   63,   63,   37,   36,   32,   29,   28,   23,
521        22,   11,    5,   61,   61,   61,   61,   61,   61,   61,
522        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
523        61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
524        61,   61,   61,   61,   61,   61,   61,   61
525     } ;
526
527 /* Table of booleans, true if rule could match eol. */
528 static yyconst flex_int32_t yy_rule_can_match_eol[22] =
529     {   0,
530 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 
531     0, 0,     };
532
533 static yy_state_type yy_last_accepting_state;
534 static char *yy_last_accepting_cpos;
535
536 extern int i386__flex_debug;
537 int i386__flex_debug = 0;
538
539 /* The intent behind this definition is that it'll catch
540  * any uses of REJECT which flex missed.
541  */
542 #define REJECT reject_used_but_not_detected
543 #define yymore() yymore_used_but_not_detected
544 #define YY_MORE_ADJ 0
545 #define YY_RESTORE_YY_MORE_OFFSET
546 char *i386_text;
547 #line 1 "/home/mark/src/elfutils/libcpu/i386_lex.l"
548 #line 2 "/home/mark/src/elfutils/libcpu/i386_lex.l"
549 /* Copyright (C) 2004, 2005, 2007, 2008 Red Hat, Inc.
550    Written by Ulrich Drepper <drepper@redhat.com>, 2004.
551
552    This file is free software; you can redistribute it and/or modify
553    it under the terms of either
554
555      * the GNU Lesser General Public License as published by the Free
556        Software Foundation; either version 3 of the License, or (at
557        your option) any later version
558
559    or
560
561      * the GNU General Public License as published by the Free
562        Software Foundation; either version 2 of the License, or (at
563        your option) any later version
564
565    or both in parallel, as here.
566
567    elfutils is distributed in the hope that it will be useful, but
568    WITHOUT ANY WARRANTY; without even the implied warranty of
569    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
570    General Public License for more details.
571
572    You should have received copies of the GNU General Public License and
573    the GNU Lesser General Public License along with this program.  If
574    not, see <http://www.gnu.org/licenses/>.  */
575
576 #ifdef HAVE_CONFIG_H
577 # include <config.h>
578 #endif
579
580 #include <ctype.h>
581 #include <error.h>
582 #include <libintl.h>
583
584 #include <system.h>
585 #include "i386_parse.h"
586
587
588 static void eat_to_eol (void);
589 static void invalid_char (int ch);
590
591 #line 592 "i386_lex.c"
592
593 #define INITIAL 0
594 #define MAIN 1
595
596 #ifndef YY_NO_UNISTD_H
597 /* Special case for "unistd.h", since it is non-ANSI. We include it way
598  * down here because we want the user's section 1 to have been scanned first.
599  * The user has a chance to override it with an option.
600  */
601 #include <unistd.h>
602 #endif
603
604 #ifndef YY_EXTRA_TYPE
605 #define YY_EXTRA_TYPE void *
606 #endif
607
608 static int yy_init_globals (void );
609
610 /* Accessor methods to globals.
611    These are made visible to non-reentrant scanners for convenience. */
612
613 int i386_lex_destroy (void );
614
615 int i386_get_debug (void );
616
617 void i386_set_debug (int debug_flag  );
618
619 YY_EXTRA_TYPE i386_get_extra (void );
620
621 void i386_set_extra (YY_EXTRA_TYPE user_defined  );
622
623 FILE *i386_get_in (void );
624
625 void i386_set_in  (FILE * in_str  );
626
627 FILE *i386_get_out (void );
628
629 void i386_set_out  (FILE * out_str  );
630
631 yy_size_t i386_get_leng (void );
632
633 char *i386_get_text (void );
634
635 int i386_get_lineno (void );
636
637 void i386_set_lineno (int line_number  );
638
639 /* Macros after this point can all be overridden by user definitions in
640  * section 1.
641  */
642
643 #ifndef YY_SKIP_YYWRAP
644 #ifdef __cplusplus
645 extern "C" int i386_wrap (void );
646 #else
647 extern int i386_wrap (void );
648 #endif
649 #endif
650
651     static void yyunput (int c,char *buf_ptr  );
652     
653 #ifndef yytext_ptr
654 static void yy_flex_strncpy (char *,yyconst char *,int );
655 #endif
656
657 #ifdef YY_NEED_STRLEN
658 static int yy_flex_strlen (yyconst char * );
659 #endif
660
661 #ifndef YY_NO_INPUT
662
663 #ifdef __cplusplus
664 static int yyinput (void );
665 #else
666 static int input (void );
667 #endif
668
669 #endif
670
671 /* Amount of stuff to slurp up with each read. */
672 #ifndef YY_READ_BUF_SIZE
673 #define YY_READ_BUF_SIZE 8192
674 #endif
675
676 /* Copy whatever the last rule matched to the standard output. */
677 #ifndef ECHO
678 /* This used to be an fputs(), but since the string might contain NUL's,
679  * we now use fwrite().
680  */
681 #define ECHO do { if (fwrite( i386_text, i386_leng, 1, i386_out )) {} } while (0)
682 #endif
683
684 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
685  * is returned in "result".
686  */
687 #ifndef YY_INPUT
688 #define YY_INPUT(buf,result,max_size) \
689         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
690                 { \
691                 int c = '*'; \
692                 size_t n; \
693                 for ( n = 0; n < max_size && \
694                              (c = getc( i386_in )) != EOF && c != '\n'; ++n ) \
695                         buf[n] = (char) c; \
696                 if ( c == '\n' ) \
697                         buf[n++] = (char) c; \
698                 if ( c == EOF && ferror( i386_in ) ) \
699                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
700                 result = n; \
701                 } \
702         else \
703                 { \
704                 errno=0; \
705                 while ( (result = fread(buf, 1, max_size, i386_in))==0 && ferror(i386_in)) \
706                         { \
707                         if( errno != EINTR) \
708                                 { \
709                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
710                                 break; \
711                                 } \
712                         errno=0; \
713                         clearerr(i386_in); \
714                         } \
715                 }\
716 \
717
718 #endif
719
720 /* No semi-colon after return; correct usage is to write "yyterminate();" -
721  * we don't want an extra ';' after the "return" because that will cause
722  * some compilers to complain about unreachable statements.
723  */
724 #ifndef yyterminate
725 #define yyterminate() return YY_NULL
726 #endif
727
728 /* Number of entries by which start-condition stack grows. */
729 #ifndef YY_START_STACK_INCR
730 #define YY_START_STACK_INCR 25
731 #endif
732
733 /* Report a fatal error. */
734 #ifndef YY_FATAL_ERROR
735 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
736 #endif
737
738 /* end tables serialization structures and prototypes */
739
740 /* Default declaration of generated scanner - a define so the user can
741  * easily add parameters.
742  */
743 #ifndef YY_DECL
744 #define YY_DECL_IS_OURS 1
745
746 extern int i386_lex (void);
747
748 #define YY_DECL int i386_lex (void)
749 #endif /* !YY_DECL */
750
751 /* Code executed at the beginning of each rule, after i386_text and i386_leng
752  * have been set up.
753  */
754 #ifndef YY_USER_ACTION
755 #define YY_USER_ACTION
756 #endif
757
758 /* Code executed at the end of each rule. */
759 #ifndef YY_BREAK
760 #define YY_BREAK break;
761 #endif
762
763 #define YY_RULE_SETUP \
764         if ( i386_leng > 0 ) \
765                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
766                                 (i386_text[i386_leng - 1] == '\n'); \
767         YY_USER_ACTION
768
769 /** The main scanner function which does all the work.
770  */
771 YY_DECL
772 {
773         register yy_state_type yy_current_state;
774         register char *yy_cp, *yy_bp;
775         register int yy_act;
776     
777         if ( !(yy_init) )
778                 {
779                 (yy_init) = 1;
780
781 #ifdef YY_USER_INIT
782                 YY_USER_INIT;
783 #endif
784
785                 if ( ! (yy_start) )
786                         (yy_start) = 1; /* first start state */
787
788                 if ( ! i386_in )
789                         i386_in = stdin;
790
791                 if ( ! i386_out )
792                         i386_out = stdout;
793
794                 if ( ! YY_CURRENT_BUFFER ) {
795                         i386_ensure_buffer_stack ();
796                         YY_CURRENT_BUFFER_LVALUE =
797                                 i386__create_buffer(i386_in,YY_BUF_SIZE );
798                 }
799
800                 i386__load_buffer_state( );
801                 }
802
803         {
804 #line 57 "/home/mark/src/elfutils/libcpu/i386_lex.l"
805
806
807 #line 808 "i386_lex.c"
808
809         while ( 1 )             /* loops until end-of-file is reached */
810                 {
811                 yy_cp = (yy_c_buf_p);
812
813                 /* Support of i386_text. */
814                 *yy_cp = (yy_hold_char);
815
816                 /* yy_bp points to the position in yy_ch_buf of the start of
817                  * the current run.
818                  */
819                 yy_bp = yy_cp;
820
821                 yy_current_state = (yy_start);
822                 yy_current_state += YY_AT_BOL();
823 yy_match:
824                 do
825                         {
826                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
827                         if ( yy_accept[yy_current_state] )
828                                 {
829                                 (yy_last_accepting_state) = yy_current_state;
830                                 (yy_last_accepting_cpos) = yy_cp;
831                                 }
832                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
833                                 {
834                                 yy_current_state = (int) yy_def[yy_current_state];
835                                 if ( yy_current_state >= 62 )
836                                         yy_c = yy_meta[(unsigned int) yy_c];
837                                 }
838                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
839                         ++yy_cp;
840                         }
841                 while ( yy_current_state != 61 );
842                 yy_cp = (yy_last_accepting_cpos);
843                 yy_current_state = (yy_last_accepting_state);
844
845 yy_find_action:
846                 yy_act = yy_accept[yy_current_state];
847
848                 YY_DO_BEFORE_ACTION;
849
850                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
851                         {
852                         yy_size_t yyl;
853                         for ( yyl = 0; yyl < i386_leng; ++yyl )
854                                 if ( i386_text[yyl] == '\n' )
855                                            
856     i386_lineno++;
857 ;
858                         }
859
860 do_action:      /* This label is used only to access EOF actions. */
861
862                 switch ( yy_act )
863         { /* beginning of action switch */
864                         case 0: /* must back up */
865                         /* undo the effects of YY_DO_BEFORE_ACTION */
866                         *yy_cp = (yy_hold_char);
867                         yy_cp = (yy_last_accepting_cpos);
868                         yy_current_state = (yy_last_accepting_state);
869                         goto yy_find_action;
870
871 case 1:
872 YY_RULE_SETUP
873 #line 59 "/home/mark/src/elfutils/libcpu/i386_lex.l"
874 { return kMASK; }
875         YY_BREAK
876 case 2:
877 YY_RULE_SETUP
878 #line 61 "/home/mark/src/elfutils/libcpu/i386_lex.l"
879 { return kPREFIX; }
880         YY_BREAK
881 case 3:
882 YY_RULE_SETUP
883 #line 62 "/home/mark/src/elfutils/libcpu/i386_lex.l"
884 { return kSUFFIX; }
885         YY_BREAK
886 case 4:
887 YY_RULE_SETUP
888 #line 64 "/home/mark/src/elfutils/libcpu/i386_lex.l"
889 { return kSYNONYM; }
890         YY_BREAK
891 case 5:
892 YY_RULE_SETUP
893 #line 66 "/home/mark/src/elfutils/libcpu/i386_lex.l"
894 { i386_lval.num = strtoul (i386_text, NULL, 10);
895                                   return kNUMBER; }
896         YY_BREAK
897 case 6:
898 YY_RULE_SETUP
899 #line 69 "/home/mark/src/elfutils/libcpu/i386_lex.l"
900 { BEGIN (MAIN); return kPERCPERC; }
901         YY_BREAK
902 case 7:
903 YY_RULE_SETUP
904 #line 72 "/home/mark/src/elfutils/libcpu/i386_lex.l"
905 { return '0'; }
906         YY_BREAK
907 case 8:
908 YY_RULE_SETUP
909 #line 73 "/home/mark/src/elfutils/libcpu/i386_lex.l"
910 { return '1'; }
911         YY_BREAK
912 case 9:
913 YY_RULE_SETUP
914 #line 75 "/home/mark/src/elfutils/libcpu/i386_lex.l"
915 { i386_lval.str = xstrndup (i386_text + 1,
916                                                             i386_leng - 2);
917                                   return kBITFIELD; }
918         YY_BREAK
919 case 10:
920 YY_RULE_SETUP
921 #line 79 "/home/mark/src/elfutils/libcpu/i386_lex.l"
922 { i386_lval.str = (void *) -1l;
923                                   return kID; }
924         YY_BREAK
925 case 11:
926 YY_RULE_SETUP
927 #line 82 "/home/mark/src/elfutils/libcpu/i386_lex.l"
928 { i386_lval.str = xstrndup (i386_text, i386_leng);
929                                   return kID; }
930         YY_BREAK
931 case 12:
932 YY_RULE_SETUP
933 #line 85 "/home/mark/src/elfutils/libcpu/i386_lex.l"
934 { return ','; }
935         YY_BREAK
936 case 13:
937 YY_RULE_SETUP
938 #line 87 "/home/mark/src/elfutils/libcpu/i386_lex.l"
939 { return ':'; }
940         YY_BREAK
941 case 14:
942 /* rule 14 can match eol */
943 YY_RULE_SETUP
944 #line 89 "/home/mark/src/elfutils/libcpu/i386_lex.l"
945 { /* IGNORE */ }
946         YY_BREAK
947 case 15:
948 /* rule 15 can match eol */
949 YY_RULE_SETUP
950 #line 91 "/home/mark/src/elfutils/libcpu/i386_lex.l"
951 { return '\n'; }
952         YY_BREAK
953 case 16:
954 YY_RULE_SETUP
955 #line 93 "/home/mark/src/elfutils/libcpu/i386_lex.l"
956 { eat_to_eol (); }
957         YY_BREAK
958 case 17:
959 /* rule 17 can match eol */
960 YY_RULE_SETUP
961 #line 95 "/home/mark/src/elfutils/libcpu/i386_lex.l"
962 { /* IGNORE */ }
963         YY_BREAK
964 case 18:
965 /* rule 18 can match eol */
966 YY_RULE_SETUP
967 #line 97 "/home/mark/src/elfutils/libcpu/i386_lex.l"
968 { return kSPACE; }
969         YY_BREAK
970 case 19:
971 YY_RULE_SETUP
972 #line 99 "/home/mark/src/elfutils/libcpu/i386_lex.l"
973 { i386_lval.ch = *i386_text; return kCHAR; }
974         YY_BREAK
975 case 20:
976 YY_RULE_SETUP
977 #line 101 "/home/mark/src/elfutils/libcpu/i386_lex.l"
978 { invalid_char (*i386_text); }
979         YY_BREAK
980 case 21:
981 YY_RULE_SETUP
982 #line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l"
983 ECHO;
984         YY_BREAK
985 #line 986 "i386_lex.c"
986 case YY_STATE_EOF(INITIAL):
987 case YY_STATE_EOF(MAIN):
988         yyterminate();
989
990         case YY_END_OF_BUFFER:
991                 {
992                 /* Amount of text matched not including the EOB char. */
993                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
994
995                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
996                 *yy_cp = (yy_hold_char);
997                 YY_RESTORE_YY_MORE_OFFSET
998
999                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1000                         {
1001                         /* We're scanning a new file or input source.  It's
1002                          * possible that this happened because the user
1003                          * just pointed i386_in at a new source and called
1004                          * i386_lex().  If so, then we have to assure
1005                          * consistency between YY_CURRENT_BUFFER and our
1006                          * globals.  Here is the right place to do so, because
1007                          * this is the first action (other than possibly a
1008                          * back-up) that will match for the new input source.
1009                          */
1010                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1011                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = i386_in;
1012                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1013                         }
1014
1015                 /* Note that here we test for yy_c_buf_p "<=" to the position
1016                  * of the first EOB in the buffer, since yy_c_buf_p will
1017                  * already have been incremented past the NUL character
1018                  * (since all states make transitions on EOB to the
1019                  * end-of-buffer state).  Contrast this with the test
1020                  * in input().
1021                  */
1022                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1023                         { /* This was really a NUL. */
1024                         yy_state_type yy_next_state;
1025
1026                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1027
1028                         yy_current_state = yy_get_previous_state(  );
1029
1030                         /* Okay, we're now positioned to make the NUL
1031                          * transition.  We couldn't have
1032                          * yy_get_previous_state() go ahead and do it
1033                          * for us because it doesn't know how to deal
1034                          * with the possibility of jamming (and we don't
1035                          * want to build jamming into it because then it
1036                          * will run more slowly).
1037                          */
1038
1039                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1040
1041                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1042
1043                         if ( yy_next_state )
1044                                 {
1045                                 /* Consume the NUL. */
1046                                 yy_cp = ++(yy_c_buf_p);
1047                                 yy_current_state = yy_next_state;
1048                                 goto yy_match;
1049                                 }
1050
1051                         else
1052                                 {
1053                                 yy_cp = (yy_last_accepting_cpos);
1054                                 yy_current_state = (yy_last_accepting_state);
1055                                 goto yy_find_action;
1056                                 }
1057                         }
1058
1059                 else switch ( yy_get_next_buffer(  ) )
1060                         {
1061                         case EOB_ACT_END_OF_FILE:
1062                                 {
1063                                 (yy_did_buffer_switch_on_eof) = 0;
1064
1065                                 if ( i386_wrap( ) )
1066                                         {
1067                                         /* Note: because we've taken care in
1068                                          * yy_get_next_buffer() to have set up
1069                                          * i386_text, we can now set up
1070                                          * yy_c_buf_p so that if some total
1071                                          * hoser (like flex itself) wants to
1072                                          * call the scanner after we return the
1073                                          * YY_NULL, it'll still work - another
1074                                          * YY_NULL will get returned.
1075                                          */
1076                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1077
1078                                         yy_act = YY_STATE_EOF(YY_START);
1079                                         goto do_action;
1080                                         }
1081
1082                                 else
1083                                         {
1084                                         if ( ! (yy_did_buffer_switch_on_eof) )
1085                                                 YY_NEW_FILE;
1086                                         }
1087                                 break;
1088                                 }
1089
1090                         case EOB_ACT_CONTINUE_SCAN:
1091                                 (yy_c_buf_p) =
1092                                         (yytext_ptr) + yy_amount_of_matched_text;
1093
1094                                 yy_current_state = yy_get_previous_state(  );
1095
1096                                 yy_cp = (yy_c_buf_p);
1097                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1098                                 goto yy_match;
1099
1100                         case EOB_ACT_LAST_MATCH:
1101                                 (yy_c_buf_p) =
1102                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1103
1104                                 yy_current_state = yy_get_previous_state(  );
1105
1106                                 yy_cp = (yy_c_buf_p);
1107                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1108                                 goto yy_find_action;
1109                         }
1110                 break;
1111                 }
1112
1113         default:
1114                 YY_FATAL_ERROR(
1115                         "fatal flex scanner internal error--no action found" );
1116         } /* end of action switch */
1117                 } /* end of scanning one token */
1118         } /* end of user's declarations */
1119 } /* end of i386_lex */
1120
1121 /* yy_get_next_buffer - try to read in a new buffer
1122  *
1123  * Returns a code representing an action:
1124  *      EOB_ACT_LAST_MATCH -
1125  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1126  *      EOB_ACT_END_OF_FILE - end of file
1127  */
1128 static int yy_get_next_buffer (void)
1129 {
1130         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1131         register char *source = (yytext_ptr);
1132         register int number_to_move, i;
1133         int ret_val;
1134
1135         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1136                 YY_FATAL_ERROR(
1137                 "fatal flex scanner internal error--end of buffer missed" );
1138
1139         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1140                 { /* Don't try to fill the buffer, so this is an EOF. */
1141                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1142                         {
1143                         /* We matched a single character, the EOB, so
1144                          * treat this as a final EOF.
1145                          */
1146                         return EOB_ACT_END_OF_FILE;
1147                         }
1148
1149                 else
1150                         {
1151                         /* We matched some text prior to the EOB, first
1152                          * process it.
1153                          */
1154                         return EOB_ACT_LAST_MATCH;
1155                         }
1156                 }
1157
1158         /* Try to read more data. */
1159
1160         /* First move last chars to start of buffer. */
1161         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1162
1163         for ( i = 0; i < number_to_move; ++i )
1164                 *(dest++) = *(source++);
1165
1166         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1167                 /* don't do the read, it's not guaranteed to return an EOF,
1168                  * just force an EOF
1169                  */
1170                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1171
1172         else
1173                 {
1174                         yy_size_t num_to_read =
1175                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1176
1177                 while ( num_to_read <= 0 )
1178                         { /* Not enough room in the buffer - grow it. */
1179
1180                         /* just a shorter name for the current buffer */
1181                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1182
1183                         int yy_c_buf_p_offset =
1184                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1185
1186                         if ( b->yy_is_our_buffer )
1187                                 {
1188                                 yy_size_t new_size = b->yy_buf_size * 2;
1189
1190                                 if ( new_size <= 0 )
1191                                         b->yy_buf_size += b->yy_buf_size / 8;
1192                                 else
1193                                         b->yy_buf_size *= 2;
1194
1195                                 b->yy_ch_buf = (char *)
1196                                         /* Include room in for 2 EOB chars. */
1197                                         i386_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1198                                 }
1199                         else
1200                                 /* Can't grow it, we don't own it. */
1201                                 b->yy_ch_buf = 0;
1202
1203                         if ( ! b->yy_ch_buf )
1204                                 YY_FATAL_ERROR(
1205                                 "fatal error - scanner input buffer overflow" );
1206
1207                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1208
1209                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1210                                                 number_to_move - 1;
1211
1212                         }
1213
1214                 if ( num_to_read > YY_READ_BUF_SIZE )
1215                         num_to_read = YY_READ_BUF_SIZE;
1216
1217                 /* Read in more data. */
1218                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1219                         (yy_n_chars), num_to_read );
1220
1221                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1222                 }
1223
1224         if ( (yy_n_chars) == 0 )
1225                 {
1226                 if ( number_to_move == YY_MORE_ADJ )
1227                         {
1228                         ret_val = EOB_ACT_END_OF_FILE;
1229                         i386_restart(i386_in  );
1230                         }
1231
1232                 else
1233                         {
1234                         ret_val = EOB_ACT_LAST_MATCH;
1235                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1236                                 YY_BUFFER_EOF_PENDING;
1237                         }
1238                 }
1239
1240         else
1241                 ret_val = EOB_ACT_CONTINUE_SCAN;
1242
1243         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1244                 /* Extend the array by 50%, plus the number we really need. */
1245                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1246                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) i386_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1247                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1248                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1249         }
1250
1251         (yy_n_chars) += number_to_move;
1252         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1253         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1254
1255         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1256
1257         return ret_val;
1258 }
1259
1260 /* yy_get_previous_state - get the state just before the EOB char was reached */
1261
1262     static yy_state_type yy_get_previous_state (void)
1263 {
1264         register yy_state_type yy_current_state;
1265         register char *yy_cp;
1266     
1267         yy_current_state = (yy_start);
1268         yy_current_state += YY_AT_BOL();
1269
1270         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1271                 {
1272                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1273                 if ( yy_accept[yy_current_state] )
1274                         {
1275                         (yy_last_accepting_state) = yy_current_state;
1276                         (yy_last_accepting_cpos) = yy_cp;
1277                         }
1278                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1279                         {
1280                         yy_current_state = (int) yy_def[yy_current_state];
1281                         if ( yy_current_state >= 62 )
1282                                 yy_c = yy_meta[(unsigned int) yy_c];
1283                         }
1284                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1285                 }
1286
1287         return yy_current_state;
1288 }
1289
1290 /* yy_try_NUL_trans - try to make a transition on the NUL character
1291  *
1292  * synopsis
1293  *      next_state = yy_try_NUL_trans( current_state );
1294  */
1295     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1296 {
1297         register int yy_is_jam;
1298         register char *yy_cp = (yy_c_buf_p);
1299
1300         register YY_CHAR yy_c = 1;
1301         if ( yy_accept[yy_current_state] )
1302                 {
1303                 (yy_last_accepting_state) = yy_current_state;
1304                 (yy_last_accepting_cpos) = yy_cp;
1305                 }
1306         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1307                 {
1308                 yy_current_state = (int) yy_def[yy_current_state];
1309                 if ( yy_current_state >= 62 )
1310                         yy_c = yy_meta[(unsigned int) yy_c];
1311                 }
1312         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1313         yy_is_jam = (yy_current_state == 61);
1314
1315                 return yy_is_jam ? 0 : yy_current_state;
1316 }
1317
1318     static void yyunput (int c, register char * yy_bp )
1319 {
1320         register char *yy_cp;
1321     
1322     yy_cp = (yy_c_buf_p);
1323
1324         /* undo effects of setting up i386_text */
1325         *yy_cp = (yy_hold_char);
1326
1327         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1328                 { /* need to shift things up to make room */
1329                 /* +2 for EOB chars. */
1330                 register yy_size_t number_to_move = (yy_n_chars) + 2;
1331                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1332                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1333                 register char *source =
1334                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1335
1336                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1337                         *--dest = *--source;
1338
1339                 yy_cp += (int) (dest - source);
1340                 yy_bp += (int) (dest - source);
1341                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1342                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1343
1344                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1345                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1346                 }
1347
1348         *--yy_cp = (char) c;
1349
1350     if ( c == '\n' ){
1351         --i386_lineno;
1352     }
1353
1354         (yytext_ptr) = yy_bp;
1355         (yy_hold_char) = *yy_cp;
1356         (yy_c_buf_p) = yy_cp;
1357 }
1358
1359 #ifndef YY_NO_INPUT
1360 #ifdef __cplusplus
1361     static int yyinput (void)
1362 #else
1363     static int input  (void)
1364 #endif
1365
1366 {
1367         int c;
1368     
1369         *(yy_c_buf_p) = (yy_hold_char);
1370
1371         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1372                 {
1373                 /* yy_c_buf_p now points to the character we want to return.
1374                  * If this occurs *before* the EOB characters, then it's a
1375                  * valid NUL; if not, then we've hit the end of the buffer.
1376                  */
1377                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1378                         /* This was really a NUL. */
1379                         *(yy_c_buf_p) = '\0';
1380
1381                 else
1382                         { /* need more input */
1383                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1384                         ++(yy_c_buf_p);
1385
1386                         switch ( yy_get_next_buffer(  ) )
1387                                 {
1388                                 case EOB_ACT_LAST_MATCH:
1389                                         /* This happens because yy_g_n_b()
1390                                          * sees that we've accumulated a
1391                                          * token and flags that we need to
1392                                          * try matching the token before
1393                                          * proceeding.  But for input(),
1394                                          * there's no matching to consider.
1395                                          * So convert the EOB_ACT_LAST_MATCH
1396                                          * to EOB_ACT_END_OF_FILE.
1397                                          */
1398
1399                                         /* Reset buffer status. */
1400                                         i386_restart(i386_in );
1401
1402                                         /*FALLTHROUGH*/
1403
1404                                 case EOB_ACT_END_OF_FILE:
1405                                         {
1406                                         if ( i386_wrap( ) )
1407                                                 return EOF;
1408
1409                                         if ( ! (yy_did_buffer_switch_on_eof) )
1410                                                 YY_NEW_FILE;
1411 #ifdef __cplusplus
1412                                         return yyinput();
1413 #else
1414                                         return input();
1415 #endif
1416                                         }
1417
1418                                 case EOB_ACT_CONTINUE_SCAN:
1419                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1420                                         break;
1421                                 }
1422                         }
1423                 }
1424
1425         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1426         *(yy_c_buf_p) = '\0';   /* preserve i386_text */
1427         (yy_hold_char) = *++(yy_c_buf_p);
1428
1429         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1430         if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1431                    
1432     i386_lineno++;
1433 ;
1434
1435         return c;
1436 }
1437 #endif  /* ifndef YY_NO_INPUT */
1438
1439 /** Immediately switch to a different input stream.
1440  * @param input_file A readable stream.
1441  * 
1442  * @note This function does not reset the start condition to @c INITIAL .
1443  */
1444     void i386_restart  (FILE * input_file )
1445 {
1446     
1447         if ( ! YY_CURRENT_BUFFER ){
1448         i386_ensure_buffer_stack ();
1449                 YY_CURRENT_BUFFER_LVALUE =
1450             i386__create_buffer(i386_in,YY_BUF_SIZE );
1451         }
1452
1453         i386__init_buffer(YY_CURRENT_BUFFER,input_file );
1454         i386__load_buffer_state( );
1455 }
1456
1457 /** Switch to a different input buffer.
1458  * @param new_buffer The new input buffer.
1459  * 
1460  */
1461     void i386__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1462 {
1463     
1464         /* TODO. We should be able to replace this entire function body
1465          * with
1466          *              i386_pop_buffer_state();
1467          *              i386_push_buffer_state(new_buffer);
1468      */
1469         i386_ensure_buffer_stack ();
1470         if ( YY_CURRENT_BUFFER == new_buffer )
1471                 return;
1472
1473         if ( YY_CURRENT_BUFFER )
1474                 {
1475                 /* Flush out information for old buffer. */
1476                 *(yy_c_buf_p) = (yy_hold_char);
1477                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1478                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1479                 }
1480
1481         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1482         i386__load_buffer_state( );
1483
1484         /* We don't actually know whether we did this switch during
1485          * EOF (i386_wrap()) processing, but the only time this flag
1486          * is looked at is after i386_wrap() is called, so it's safe
1487          * to go ahead and always set it.
1488          */
1489         (yy_did_buffer_switch_on_eof) = 1;
1490 }
1491
1492 static void i386__load_buffer_state  (void)
1493 {
1494         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1495         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1496         i386_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1497         (yy_hold_char) = *(yy_c_buf_p);
1498 }
1499
1500 /** Allocate and initialize an input buffer state.
1501  * @param file A readable stream.
1502  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1503  * 
1504  * @return the allocated buffer state.
1505  */
1506     YY_BUFFER_STATE i386__create_buffer  (FILE * file, int  size )
1507 {
1508         YY_BUFFER_STATE b;
1509     
1510         b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state )  );
1511         if ( ! b )
1512                 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1513
1514         b->yy_buf_size = size;
1515
1516         /* yy_ch_buf has to be 2 characters longer than the size given because
1517          * we need to put in 2 end-of-buffer characters.
1518          */
1519         b->yy_ch_buf = (char *) i386_alloc(b->yy_buf_size + 2  );
1520         if ( ! b->yy_ch_buf )
1521                 YY_FATAL_ERROR( "out of dynamic memory in i386__create_buffer()" );
1522
1523         b->yy_is_our_buffer = 1;
1524
1525         i386__init_buffer(b,file );
1526
1527         return b;
1528 }
1529
1530 /** Destroy the buffer.
1531  * @param b a buffer created with i386__create_buffer()
1532  * 
1533  */
1534     void i386__delete_buffer (YY_BUFFER_STATE  b )
1535 {
1536     
1537         if ( ! b )
1538                 return;
1539
1540         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1541                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1542
1543         if ( b->yy_is_our_buffer )
1544                 i386_free((void *) b->yy_ch_buf  );
1545
1546         i386_free((void *) b  );
1547 }
1548
1549 /* Initializes or reinitializes a buffer.
1550  * This function is sometimes called more than once on the same buffer,
1551  * such as during a i386_restart() or at EOF.
1552  */
1553     static void i386__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1554
1555 {
1556         int oerrno = errno;
1557     
1558         i386__flush_buffer(b );
1559
1560         b->yy_input_file = file;
1561         b->yy_fill_buffer = 1;
1562
1563     /* If b is the current buffer, then i386__init_buffer was _probably_
1564      * called from i386_restart() or through yy_get_next_buffer.
1565      * In that case, we don't want to reset the lineno or column.
1566      */
1567     if (b != YY_CURRENT_BUFFER){
1568         b->yy_bs_lineno = 1;
1569         b->yy_bs_column = 0;
1570     }
1571
1572         b->yy_is_interactive = 0;
1573     
1574         errno = oerrno;
1575 }
1576
1577 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1578  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1579  * 
1580  */
1581     void i386__flush_buffer (YY_BUFFER_STATE  b )
1582 {
1583         if ( ! b )
1584                 return;
1585
1586         b->yy_n_chars = 0;
1587
1588         /* We always need two end-of-buffer characters.  The first causes
1589          * a transition to the end-of-buffer state.  The second causes
1590          * a jam in that state.
1591          */
1592         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1593         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1594
1595         b->yy_buf_pos = &b->yy_ch_buf[0];
1596
1597         b->yy_at_bol = 1;
1598         b->yy_buffer_status = YY_BUFFER_NEW;
1599
1600         if ( b == YY_CURRENT_BUFFER )
1601                 i386__load_buffer_state( );
1602 }
1603
1604 /** Pushes the new state onto the stack. The new state becomes
1605  *  the current state. This function will allocate the stack
1606  *  if necessary.
1607  *  @param new_buffer The new state.
1608  *  
1609  */
1610 void i386_push_buffer_state (YY_BUFFER_STATE new_buffer )
1611 {
1612         if (new_buffer == NULL)
1613                 return;
1614
1615         i386_ensure_buffer_stack();
1616
1617         /* This block is copied from i386__switch_to_buffer. */
1618         if ( YY_CURRENT_BUFFER )
1619                 {
1620                 /* Flush out information for old buffer. */
1621                 *(yy_c_buf_p) = (yy_hold_char);
1622                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1623                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1624                 }
1625
1626         /* Only push if top exists. Otherwise, replace top. */
1627         if (YY_CURRENT_BUFFER)
1628                 (yy_buffer_stack_top)++;
1629         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1630
1631         /* copied from i386__switch_to_buffer. */
1632         i386__load_buffer_state( );
1633         (yy_did_buffer_switch_on_eof) = 1;
1634 }
1635
1636 /** Removes and deletes the top of the stack, if present.
1637  *  The next element becomes the new top.
1638  *  
1639  */
1640 void i386_pop_buffer_state (void)
1641 {
1642         if (!YY_CURRENT_BUFFER)
1643                 return;
1644
1645         i386__delete_buffer(YY_CURRENT_BUFFER );
1646         YY_CURRENT_BUFFER_LVALUE = NULL;
1647         if ((yy_buffer_stack_top) > 0)
1648                 --(yy_buffer_stack_top);
1649
1650         if (YY_CURRENT_BUFFER) {
1651                 i386__load_buffer_state( );
1652                 (yy_did_buffer_switch_on_eof) = 1;
1653         }
1654 }
1655
1656 /* Allocates the stack if it does not exist.
1657  *  Guarantees space for at least one push.
1658  */
1659 static void i386_ensure_buffer_stack (void)
1660 {
1661         yy_size_t num_to_alloc;
1662     
1663         if (!(yy_buffer_stack)) {
1664
1665                 /* First allocation is just for 2 elements, since we don't know if this
1666                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1667                  * immediate realloc on the next call.
1668          */
1669                 num_to_alloc = 1;
1670                 (yy_buffer_stack) = (struct yy_buffer_state**)i386_alloc
1671                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1672                                                                 );
1673                 if ( ! (yy_buffer_stack) )
1674                         YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1675                                                                   
1676                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1677                                 
1678                 (yy_buffer_stack_max) = num_to_alloc;
1679                 (yy_buffer_stack_top) = 0;
1680                 return;
1681         }
1682
1683         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1684
1685                 /* Increase the buffer to prepare for a possible push. */
1686                 int grow_size = 8 /* arbitrary grow size */;
1687
1688                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1689                 (yy_buffer_stack) = (struct yy_buffer_state**)i386_realloc
1690                                                                 ((yy_buffer_stack),
1691                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1692                                                                 );
1693                 if ( ! (yy_buffer_stack) )
1694                         YY_FATAL_ERROR( "out of dynamic memory in i386_ensure_buffer_stack()" );
1695
1696                 /* zero only the new slots.*/
1697                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1698                 (yy_buffer_stack_max) = num_to_alloc;
1699         }
1700 }
1701
1702 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1703  * @param base the character buffer
1704  * @param size the size in bytes of the character buffer
1705  * 
1706  * @return the newly allocated buffer state object. 
1707  */
1708 YY_BUFFER_STATE i386__scan_buffer  (char * base, yy_size_t  size )
1709 {
1710         YY_BUFFER_STATE b;
1711     
1712         if ( size < 2 ||
1713              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1714              base[size-1] != YY_END_OF_BUFFER_CHAR )
1715                 /* They forgot to leave room for the EOB's. */
1716                 return 0;
1717
1718         b = (YY_BUFFER_STATE) i386_alloc(sizeof( struct yy_buffer_state )  );
1719         if ( ! b )
1720                 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_buffer()" );
1721
1722         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1723         b->yy_buf_pos = b->yy_ch_buf = base;
1724         b->yy_is_our_buffer = 0;
1725         b->yy_input_file = 0;
1726         b->yy_n_chars = b->yy_buf_size;
1727         b->yy_is_interactive = 0;
1728         b->yy_at_bol = 1;
1729         b->yy_fill_buffer = 0;
1730         b->yy_buffer_status = YY_BUFFER_NEW;
1731
1732         i386__switch_to_buffer(b  );
1733
1734         return b;
1735 }
1736
1737 /** Setup the input buffer state to scan a string. The next call to i386_lex() will
1738  * scan from a @e copy of @a str.
1739  * @param yystr a NUL-terminated string to scan
1740  * 
1741  * @return the newly allocated buffer state object.
1742  * @note If you want to scan bytes that may contain NUL values, then use
1743  *       i386__scan_bytes() instead.
1744  */
1745 YY_BUFFER_STATE i386__scan_string (yyconst char * yystr )
1746 {
1747     
1748         return i386__scan_bytes(yystr,strlen(yystr) );
1749 }
1750
1751 /** Setup the input buffer state to scan the given bytes. The next call to i386_lex() will
1752  * scan from a @e copy of @a bytes.
1753  * @param yybytes the byte buffer to scan
1754  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1755  * 
1756  * @return the newly allocated buffer state object.
1757  */
1758 YY_BUFFER_STATE i386__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1759 {
1760         YY_BUFFER_STATE b;
1761         char *buf;
1762         yy_size_t n;
1763         yy_size_t i;
1764     
1765         /* Get memory for full buffer, including space for trailing EOB's. */
1766         n = _yybytes_len + 2;
1767         buf = (char *) i386_alloc(n  );
1768         if ( ! buf )
1769                 YY_FATAL_ERROR( "out of dynamic memory in i386__scan_bytes()" );
1770
1771         for ( i = 0; i < _yybytes_len; ++i )
1772                 buf[i] = yybytes[i];
1773
1774         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1775
1776         b = i386__scan_buffer(buf,n );
1777         if ( ! b )
1778                 YY_FATAL_ERROR( "bad buffer in i386__scan_bytes()" );
1779
1780         /* It's okay to grow etc. this buffer, and we should throw it
1781          * away when we're done.
1782          */
1783         b->yy_is_our_buffer = 1;
1784
1785         return b;
1786 }
1787
1788 #ifndef YY_EXIT_FAILURE
1789 #define YY_EXIT_FAILURE 2
1790 #endif
1791
1792 static void yy_fatal_error (yyconst char* msg )
1793 {
1794         (void) fprintf( stderr, "%s\n", msg );
1795         exit( YY_EXIT_FAILURE );
1796 }
1797
1798 /* Redefine yyless() so it works in section 3 code. */
1799
1800 #undef yyless
1801 #define yyless(n) \
1802         do \
1803                 { \
1804                 /* Undo effects of setting up i386_text. */ \
1805         int yyless_macro_arg = (n); \
1806         YY_LESS_LINENO(yyless_macro_arg);\
1807                 i386_text[i386_leng] = (yy_hold_char); \
1808                 (yy_c_buf_p) = i386_text + yyless_macro_arg; \
1809                 (yy_hold_char) = *(yy_c_buf_p); \
1810                 *(yy_c_buf_p) = '\0'; \
1811                 i386_leng = yyless_macro_arg; \
1812                 } \
1813         while ( 0 )
1814
1815 /* Accessor  methods (get/set functions) to struct members. */
1816
1817 /** Get the current line number.
1818  * 
1819  */
1820 int i386_get_lineno  (void)
1821 {
1822         
1823     return i386_lineno;
1824 }
1825
1826 /** Get the input stream.
1827  * 
1828  */
1829 FILE *i386_get_in  (void)
1830 {
1831         return i386_in;
1832 }
1833
1834 /** Get the output stream.
1835  * 
1836  */
1837 FILE *i386_get_out  (void)
1838 {
1839         return i386_out;
1840 }
1841
1842 /** Get the length of the current token.
1843  * 
1844  */
1845 yy_size_t i386_get_leng  (void)
1846 {
1847         return i386_leng;
1848 }
1849
1850 /** Get the current token.
1851  * 
1852  */
1853
1854 char *i386_get_text  (void)
1855 {
1856         return i386_text;
1857 }
1858
1859 /** Set the current line number.
1860  * @param line_number
1861  * 
1862  */
1863 void i386_set_lineno (int  line_number )
1864 {
1865     
1866     i386_lineno = line_number;
1867 }
1868
1869 /** Set the input stream. This does not discard the current
1870  * input buffer.
1871  * @param in_str A readable stream.
1872  * 
1873  * @see i386__switch_to_buffer
1874  */
1875 void i386_set_in (FILE *  in_str )
1876 {
1877         i386_in = in_str ;
1878 }
1879
1880 void i386_set_out (FILE *  out_str )
1881 {
1882         i386_out = out_str ;
1883 }
1884
1885 int i386_get_debug  (void)
1886 {
1887         return i386__flex_debug;
1888 }
1889
1890 void i386_set_debug (int  bdebug )
1891 {
1892         i386__flex_debug = bdebug ;
1893 }
1894
1895 static int yy_init_globals (void)
1896 {
1897         /* Initialization is the same as for the non-reentrant scanner.
1898      * This function is called from i386_lex_destroy(), so don't allocate here.
1899      */
1900
1901     /* We do not touch i386_lineno unless the option is enabled. */
1902     i386_lineno =  1;
1903     
1904     (yy_buffer_stack) = 0;
1905     (yy_buffer_stack_top) = 0;
1906     (yy_buffer_stack_max) = 0;
1907     (yy_c_buf_p) = (char *) 0;
1908     (yy_init) = 0;
1909     (yy_start) = 0;
1910
1911 /* Defined in main.c */
1912 #ifdef YY_STDINIT
1913     i386_in = stdin;
1914     i386_out = stdout;
1915 #else
1916     i386_in = (FILE *) 0;
1917     i386_out = (FILE *) 0;
1918 #endif
1919
1920     /* For future reference: Set errno on error, since we are called by
1921      * i386_lex_init()
1922      */
1923     return 0;
1924 }
1925
1926 /* i386_lex_destroy is for both reentrant and non-reentrant scanners. */
1927 int i386_lex_destroy  (void)
1928 {
1929     
1930     /* Pop the buffer stack, destroying each element. */
1931         while(YY_CURRENT_BUFFER){
1932                 i386__delete_buffer(YY_CURRENT_BUFFER  );
1933                 YY_CURRENT_BUFFER_LVALUE = NULL;
1934                 i386_pop_buffer_state();
1935         }
1936
1937         /* Destroy the stack itself. */
1938         i386_free((yy_buffer_stack) );
1939         (yy_buffer_stack) = NULL;
1940
1941     /* Reset the globals. This is important in a non-reentrant scanner so the next time
1942      * i386_lex() is called, initialization will occur. */
1943     yy_init_globals( );
1944
1945     return 0;
1946 }
1947
1948 /*
1949  * Internal utility routines.
1950  */
1951
1952 #ifndef yytext_ptr
1953 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1954 {
1955         register int i;
1956         for ( i = 0; i < n; ++i )
1957                 s1[i] = s2[i];
1958 }
1959 #endif
1960
1961 #ifdef YY_NEED_STRLEN
1962 static int yy_flex_strlen (yyconst char * s )
1963 {
1964         register int n;
1965         for ( n = 0; s[n]; ++n )
1966                 ;
1967
1968         return n;
1969 }
1970 #endif
1971
1972 void *i386_alloc (yy_size_t  size )
1973 {
1974         return (void *) malloc( size );
1975 }
1976
1977 void *i386_realloc  (void * ptr, yy_size_t  size )
1978 {
1979         /* The cast to (char *) in the following accommodates both
1980          * implementations that use char* generic pointers, and those
1981          * that use void* generic pointers.  It works with the latter
1982          * because both ANSI C and C++ allow castless assignment from
1983          * any pointer type to void*, and deal with argument conversions
1984          * as though doing an assignment.
1985          */
1986         return (void *) realloc( (char *) ptr, size );
1987 }
1988
1989 void i386_free (void * ptr )
1990 {
1991         free( (char *) ptr );   /* see i386_realloc() for (char *) cast */
1992 }
1993
1994 #define YYTABLES_NAME "yytables"
1995
1996 #line 104 "/home/mark/src/elfutils/libcpu/i386_lex.l"
1997
1998
1999
2000 static void
2001 eat_to_eol (void)
2002 {
2003   while (1)
2004     {
2005       int c = input ();
2006
2007       if (c == EOF || c == '\n')
2008         break;
2009     }
2010 }
2011
2012 static void
2013 invalid_char (int ch)
2014 {
2015   error (0, 0, (isascii (ch)
2016                 ? gettext ("invalid character '%c' at line %d; ignored")
2017                 : gettext ("invalid character '\\%o' at line %d; ignored")),
2018          ch, i386_lineno);
2019 }
2020
2021 // Local Variables:
2022 // mode: C
2023 // End:
2024