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