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