4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 31
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
35 typedef int8_t flex_int8_t
;
36 typedef uint8_t flex_uint8_t
;
37 typedef int16_t flex_int16_t
;
38 typedef uint16_t flex_uint16_t
;
39 typedef int32_t flex_int32_t
;
40 typedef uint32_t flex_uint32_t
;
42 typedef signed char flex_int8_t
;
43 typedef short int flex_int16_t
;
44 typedef int flex_int32_t
;
45 typedef unsigned char flex_uint8_t
;
46 typedef unsigned short int flex_uint16_t
;
47 typedef unsigned int flex_uint32_t
;
50 /* Limits of integral types. */
52 #define INT8_MIN (-128)
55 #define INT16_MIN (-32767-1)
58 #define INT32_MIN (-2147483647-1)
61 #define INT8_MAX (127)
64 #define INT16_MAX (32767)
67 #define INT32_MAX (2147483647)
70 #define UINT8_MAX (255U)
73 #define UINT16_MAX (65535U)
76 #define UINT32_MAX (4294967295U)
79 #endif /* ! FLEXINT_H */
83 /* The "const" storage-class-modifier is valid. */
86 #else /* ! __cplusplus */
93 #endif /* ! __cplusplus */
101 /* Returned upon end-of-file. */
104 /* Promotes a possibly negative, possibly signed char to an unsigned
105 * integer for use as an array index. If the signed char is negative,
106 * we want to instead treat it as an 8-bit unsigned char, hence the
109 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
111 /* Enter a start condition. This macro really ought to take a parameter,
112 * but we do it the disgusting crufty way forced on us by the ()-less
113 * definition of BEGIN.
115 #define BEGIN (yy_start) = 1 + 2 *
117 /* Translate the current start state into a value that can be later handed
118 * to BEGIN to return to the state. The YYSTATE alias is for lex
121 #define YY_START (((yy_start) - 1) / 2)
122 #define YYSTATE YY_START
124 /* Action number for EOF rule of a given start state. */
125 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
127 /* Special action meaning "start processing a new file". */
128 #define YY_NEW_FILE yyrestart(yyin )
130 #define YY_END_OF_BUFFER_CHAR 0
132 /* Size of default input buffer. */
134 #define YY_BUF_SIZE 16384
137 /* The state buf must be large enough to hold one state per character in the main buffer.
139 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
141 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
142 #define YY_TYPEDEF_YY_BUFFER_STATE
143 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
148 extern FILE *yyin
, *yyout
;
150 #define EOB_ACT_CONTINUE_SCAN 0
151 #define EOB_ACT_END_OF_FILE 1
152 #define EOB_ACT_LAST_MATCH 2
154 #define YY_LESS_LINENO(n)
156 /* Return all but the first "n" matched characters back to the input stream. */
160 /* Undo effects of setting up yytext. */ \
161 int yyless_macro_arg = (n); \
162 YY_LESS_LINENO(yyless_macro_arg);\
163 *yy_cp = (yy_hold_char); \
164 YY_RESTORE_YY_MORE_OFFSET \
165 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
166 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
170 #define unput(c) yyunput( c, (yytext_ptr) )
172 /* The following is because we cannot portably get our hands on size_t
173 * (without autoconf's help, which isn't available because we want
174 * flex-generated scanners to compile on their own).
177 #ifndef YY_TYPEDEF_YY_SIZE_T
178 #define YY_TYPEDEF_YY_SIZE_T
179 typedef unsigned int yy_size_t
;
182 #ifndef YY_STRUCT_YY_BUFFER_STATE
183 #define YY_STRUCT_YY_BUFFER_STATE
184 struct yy_buffer_state
188 char *yy_ch_buf
; /* input buffer */
189 char *yy_buf_pos
; /* current position in input buffer */
191 /* Size of input buffer in bytes, not including room for EOB
194 yy_size_t yy_buf_size
;
196 /* Number of characters read into yy_ch_buf, not including EOB
201 /* Whether we "own" the buffer - i.e., we know we created it,
202 * and can realloc() it to grow it, and should free() it to
205 int yy_is_our_buffer
;
207 /* Whether this is an "interactive" input source; if so, and
208 * if we're using stdio for input, then we want to use getc()
209 * instead of fread(), to make sure we stop fetching input after
212 int yy_is_interactive
;
214 /* Whether we're considered to be at the beginning of a line.
215 * If so, '^' rules will be active on the next match, otherwise
220 int yy_bs_lineno
; /**< The line count. */
221 int yy_bs_column
; /**< The column count. */
223 /* Whether to try to fill the input buffer when we reach the
228 int yy_buffer_status
;
230 #define YY_BUFFER_NEW 0
231 #define YY_BUFFER_NORMAL 1
232 /* When an EOF's been seen but there's still some text to process
233 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
234 * shouldn't try reading from the input source any more. We might
235 * still have a bunch of tokens to match, though, because of
236 * possible backing-up.
238 * When we actually see the EOF, we change the status to "new"
239 * (via yyrestart()), so that the user can continue scanning by
240 * just pointing yyin at a new input file.
242 #define YY_BUFFER_EOF_PENDING 2
245 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
247 /* Stack of input buffers. */
248 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
249 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
250 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
252 /* We provide macros for accessing buffer states in case in the
253 * future we want to put the buffer states in a more general
256 * Returns the top of the stack, or NULL.
258 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
259 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
262 /* Same as previous macro, but useful when we know that the buffer stack is not
263 * NULL or when we need an lvalue. For internal use only.
265 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
267 /* yy_hold_char holds the character lost when yytext is formed. */
268 static char yy_hold_char
;
269 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
272 /* Points to current character in buffer. */
273 static char *yy_c_buf_p
= (char *) 0;
274 static int yy_init
= 1; /* whether we need to initialize */
275 static int yy_start
= 0; /* start state number */
277 /* Flag which is used to allow yywrap()'s to do buffer switches
278 * instead of setting up a fresh yyin. A bit of a hack ...
280 static int yy_did_buffer_switch_on_eof
;
282 void yyrestart (FILE *input_file
);
283 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
);
284 YY_BUFFER_STATE
yy_create_buffer (FILE *file
,int size
);
285 void yy_delete_buffer (YY_BUFFER_STATE b
);
286 void yy_flush_buffer (YY_BUFFER_STATE b
);
287 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
);
288 void yypop_buffer_state (void );
290 static void yyensure_buffer_stack (void );
291 static void yy_load_buffer_state (void );
292 static void yy_init_buffer (YY_BUFFER_STATE b
,FILE *file
);
294 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
296 YY_BUFFER_STATE
yy_scan_buffer (char *base
,yy_size_t size
);
297 YY_BUFFER_STATE
yy_scan_string (yyconst
char *yy_str
);
298 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char *bytes
,int len
);
300 void *yyalloc (yy_size_t
);
301 void *yyrealloc (void *,yy_size_t
);
302 void yyfree (void * );
304 #define yy_new_buffer yy_create_buffer
306 #define yy_set_interactive(is_interactive) \
308 if ( ! YY_CURRENT_BUFFER ){ \
309 yyensure_buffer_stack (); \
310 YY_CURRENT_BUFFER_LVALUE = \
311 yy_create_buffer(yyin,YY_BUF_SIZE ); \
313 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
316 #define yy_set_bol(at_bol) \
318 if ( ! YY_CURRENT_BUFFER ){\
319 yyensure_buffer_stack (); \
320 YY_CURRENT_BUFFER_LVALUE = \
321 yy_create_buffer(yyin,YY_BUF_SIZE ); \
323 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
326 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
328 /* Begin user sect3 */
330 typedef unsigned char YY_CHAR
;
332 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
334 typedef int yy_state_type
;
338 #define yytext_ptr yytext
340 static yy_state_type
yy_get_previous_state (void );
341 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
342 static int yy_get_next_buffer (void );
343 static void yy_fatal_error (yyconst
char msg
[] );
345 /* Done after the current pattern has been matched and before the
346 * corresponding action - sets up yytext.
348 #define YY_DO_BEFORE_ACTION \
349 (yytext_ptr) = yy_bp; \
350 yyleng = (size_t) (yy_cp - yy_bp); \
351 (yy_hold_char) = *yy_cp; \
353 (yy_c_buf_p) = yy_cp;
355 #define YY_NUM_RULES 238
356 #define YY_END_OF_BUFFER 239
357 /* This struct is not used in this scanner,
358 but its presence is necessary. */
361 flex_int32_t yy_verify
;
364 static yyconst flex_int16_t yy_accept
[555] =
366 0, 0, 0, 0, 239, 237, 235, 235, 220, 233,
367 219, 218, 200, 201, 216, 214, 211, 210, 203, 232,
368 232, 202, 221, 199, 195, 237, 224, 233, 148, 233,
369 233, 233, 233, 233, 233, 233, 233, 233, 70, 233,
370 233, 233, 54, 19, 18, 233, 12, 10, 8, 7,
371 189, 188, 187, 233, 185, 183, 233, 233, 233, 233,
372 233, 233, 217, 215, 213, 212, 0, 209, 204, 0,
373 0, 0, 232, 234, 0, 198, 196, 222, 194, 193,
374 178, 175, 233, 233, 233, 150, 151, 233, 233, 149,
375 0, 147, 233, 140, 233, 233, 136, 233, 125, 233,
377 123, 233, 233, 233, 233, 233, 233, 233, 103, 102,
378 101, 233, 100, 99, 233, 233, 97, 233, 95, 94,
379 93, 91, 233, 85, 233, 233, 77, 86, 233, 71,
380 69, 233, 233, 233, 233, 65, 233, 233, 233, 59,
381 233, 56, 233, 233, 53, 233, 233, 233, 233, 233,
382 233, 233, 233, 233, 233, 233, 233, 25, 233, 233,
383 233, 233, 233, 15, 14, 233, 233, 159, 233, 186,
384 233, 184, 223, 233, 233, 95, 233, 233, 233, 205,
385 207, 206, 208, 0, 0, 232, 232, 197, 191, 192,
386 233, 233, 171, 152, 153, 233, 233, 162, 163, 233,
388 154, 156, 232, 233, 233, 233, 233, 233, 233, 124,
389 233, 233, 119, 233, 233, 233, 233, 233, 233, 233,
390 233, 233, 179, 98, 233, 233, 233, 233, 233, 233,
391 80, 83, 78, 81, 233, 233, 233, 79, 82, 233,
392 67, 66, 233, 63, 62, 233, 233, 233, 233, 233,
393 233, 233, 233, 233, 233, 44, 39, 38, 37, 36,
394 35, 34, 233, 32, 31, 233, 233, 233, 233, 233,
395 233, 233, 21, 233, 233, 16, 13, 233, 9, 233,
396 233, 233, 233, 233, 233, 233, 236, 190, 170, 168,
397 177, 176, 169, 167, 174, 173, 233, 233, 233, 155,
399 157, 146, 233, 233, 233, 233, 139, 138, 233, 127,
400 233, 233, 118, 233, 233, 233, 233, 111, 110, 233,
401 233, 233, 233, 233, 233, 233, 105, 104, 233, 233,
402 233, 96, 233, 92, 89, 84, 74, 233, 233, 68,
403 64, 233, 61, 60, 58, 57, 233, 55, 45, 233,
404 50, 47, 49, 46, 48, 233, 233, 43, 42, 233,
405 233, 233, 233, 233, 27, 24, 23, 233, 233, 233,
406 233, 233, 233, 228, 233, 227, 233, 233, 233, 233,
407 160, 233, 233, 233, 233, 233, 233, 233, 233, 233,
408 233, 122, 233, 117, 116, 233, 233, 233, 233, 233,
410 233, 233, 233, 108, 233, 233, 233, 233, 233, 233,
411 233, 233, 233, 233, 2, 182, 52, 41, 40, 33,
412 233, 233, 233, 30, 233, 22, 233, 233, 233, 172,
413 231, 233, 233, 233, 233, 233, 164, 161, 145, 144,
414 143, 142, 141, 233, 233, 233, 233, 126, 121, 233,
415 233, 233, 233, 233, 51, 233, 233, 107, 233, 233,
416 233, 233, 233, 88, 87, 90, 233, 233, 73, 72,
417 29, 233, 233, 233, 20, 233, 233, 233, 229, 233,
418 226, 165, 166, 233, 233, 233, 233, 233, 233, 120,
419 233, 114, 113, 233, 233, 233, 5, 106, 233, 180,
421 233, 233, 233, 233, 28, 233, 233, 17, 11, 233,
422 233, 233, 233, 135, 133, 134, 132, 129, 233, 115,
423 233, 6, 109, 233, 233, 3, 233, 76, 1, 26,
424 230, 225, 137, 130, 131, 233, 233, 233, 233, 233,
425 128, 233, 233, 4, 75, 233, 233, 112, 233, 233,
429 static yyconst flex_int32_t yy_ec
[256] =
431 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 2, 4, 1, 5, 6, 7, 8, 1, 9,
435 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
436 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
437 30, 31, 1, 32, 33, 34, 35, 36, 37, 38,
438 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
439 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
440 59, 1, 60, 61, 62, 1, 63, 64, 35, 36,
442 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
443 65, 48, 49, 66, 51, 67, 53, 54, 55, 56,
444 57, 58, 1, 68, 1, 69, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461 static yyconst flex_int32_t yy_meta
[70] =
463 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
464 1, 1, 1, 1, 4, 1, 5, 5, 5, 5,
465 5, 5, 5, 5, 5, 5, 1, 1, 1, 1,
466 1, 1, 6, 5, 6, 6, 6, 5, 3, 3,
467 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
468 3, 3, 3, 3, 3, 4, 3, 3, 1, 1,
469 1, 3, 6, 5, 3, 3, 3, 1, 1
472 static yyconst flex_int16_t yy_base
[560] =
474 0, 0, 32, 33, 758, 759, 759, 759, 759, 0,
475 759, 727, 759, 759, 726, 60, 759, 61, 744, 63,
476 68, 759, 759, 58, 75, 723, 759, 116, 176, 60,
477 79, 44, 87, 89, 98, 165, 700, 226, 158, 47,
478 113, 277, 327, 376, 108, 701, 58, 731, 0, 0,
479 759, 759, 720, 685, 100, 759, 144, 72, 707, 65,
480 118, 0, 759, 759, 759, 759, 143, 759, 759, 149,
481 736, 189, 230, 759, 0, 716, 759, 759, 759, 91,
482 730, 729, 692, 120, 701, 0, 0, 218, 154, 0,
483 0, 726, 135, 0, 703, 49, 167, 695, 0, 697,
485 0, 680, 701, 696, 686, 93, 680, 234, 717, 685,
486 0, 168, 0, 0, 170, 693, 714, 684, 0, 0,
487 676, 0, 681, 710, 172, 210, 0, 176, 199, 212,
488 709, 667, 676, 210, 235, 0, 224, 684, 173, 705,
489 684, 0, 207, 672, 702, 675, 212, 679, 213, 263,
490 222, 243, 258, 259, 214, 673, 674, 697, 654, 669,
491 658, 657, 654, 0, 0, 658, 251, 0, 686, 759,
492 135, 759, 759, 651, 659, 658, 655, 270, 656, 759,
493 759, 759, 759, 688, 304, 311, 0, 759, 759, 668,
494 298, 312, 0, 0, 0, 658, 655, 0, 0, 278,
496 644, 643, 0, 273, 320, 639, 309, 655, 647, 0,
497 644, 645, 343, 292, 325, 275, 326, 333, 336, 320,
498 340, 653, 669, 0, 327, 345, 649, 666, 636, 357,
499 0, 0, 0, 0, 635, 348, 641, 0, 0, 358,
500 0, 0, 633, 0, 0, 644, 628, 643, 363, 634,
501 628, 352, 378, 624, 384, 413, 0, 0, 0, 0,
502 0, 0, 628, 0, 0, 360, 622, 370, 634, 625,
503 394, 624, 0, 634, 356, 0, 0, 606, 0, 601,
504 615, 628, 611, 620, 624, 620, 649, 759, 0, 0,
505 0, 0, 0, 0, 0, 0, 613, 620, 377, 0,
507 0, 0, 613, 603, 618, 398, 0, 603, 398, 638,
508 617, 614, 408, 605, 408, 598, 604, 0, 0, 414,
509 417, 591, 593, 402, 609, 422, 0, 0, 608, 619,
510 406, 0, 580, 0, 626, 0, 578, 586, 600, 0,
511 0, 600, 0, 0, 0, 0, 601, 0, 0, 598,
512 0, 0, 0, 0, 0, 615, 616, 0, 0, 596,
513 596, 406, 593, 407, 426, 0, 0, 594, 590, 576,
514 581, 558, 584, 561, 571, 0, 584, 574, 443, 412,
515 0, 415, 563, 415, 574, 424, 577, 568, 433, 569,
516 558, 0, 562, 0, 0, 564, 567, 569, 570, 555,
518 426, 572, 555, 0, 563, 569, 566, 557, 566, 420,
519 443, 455, 552, 431, 0, 0, 0, 0, 0, 0,
520 559, 442, 547, 0, 556, 0, 557, 558, 451, 0,
521 553, 553, 436, 549, 568, 569, 0, 0, 0, 0,
522 0, 0, 0, 548, 482, 553, 539, 0, 567, 541,
523 443, 445, 538, 532, 0, 534, 544, 0, 454, 529,
524 558, 471, 541, 0, 0, 0, 540, 530, 0, 0,
525 0, 455, 538, 456, 0, 457, 518, 527, 0, 537,
526 0, 0, 0, 533, 150, 468, 522, 526, 478, 0,
527 512, 0, 0, 530, 529, 463, 0, 0, 530, 0,
529 511, 514, 523, 525, 0, 465, 501, 0, 0, 489,
530 500, 466, 480, 0, 0, 0, 0, 0, 504, 0,
531 481, 0, 0, 474, 484, 0, 490, 0, 0, 0,
532 0, 0, 0, 0, 0, 483, 370, 352, 345, 279,
533 0, 219, 473, 0, 0, 475, 477, 0, 220, 207,
534 134, 61, 0, 759, 542, 545, 550, 552, 554
537 static yyconst flex_int16_t yy_def
[560] =
539 554, 1, 1, 1, 554, 554, 554, 554, 554, 555,
540 554, 554, 554, 554, 554, 554, 554, 554, 554, 556,
541 556, 554, 554, 554, 554, 554, 554, 555, 555, 555,
542 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
543 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
544 554, 554, 554, 28, 554, 554, 555, 36, 38, 42,
545 555, 555, 554, 554, 554, 554, 554, 554, 554, 554,
546 557, 554, 554, 554, 558, 554, 554, 554, 554, 554,
547 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
548 559, 555, 555, 555, 555, 555, 555, 555, 555, 555,
550 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
551 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
552 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
553 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
554 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
555 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
556 555, 555, 555, 555, 555, 555, 555, 555, 555, 554,
557 555, 554, 554, 555, 555, 555, 555, 555, 555, 554,
558 554, 554, 554, 557, 557, 554, 558, 554, 554, 554,
559 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
561 555, 555, 559, 555, 555, 555, 555, 555, 555, 555,
562 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
563 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
564 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
565 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
566 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
567 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
568 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
569 555, 555, 555, 555, 555, 555, 557, 554, 555, 555,
570 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
572 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
573 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
574 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
575 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
576 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
577 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
578 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
579 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
580 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
581 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
583 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
584 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
585 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
586 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
587 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
588 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
589 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
590 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
591 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
592 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
594 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
595 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
596 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
597 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
598 555, 555, 555, 555, 555, 555, 555, 555, 555, 555,
599 555, 555, 555, 0, 554, 554, 554, 554, 554
602 static yyconst flex_int16_t yy_nxt
[829] =
604 6, 7, 8, 9, 6, 10, 11, 12, 13, 14,
605 15, 16, 17, 18, 10, 19, 20, 21, 21, 21,
606 21, 21, 21, 21, 21, 21, 22, 23, 24, 25,
607 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
608 36, 37, 10, 38, 39, 40, 41, 42, 10, 43,
609 44, 45, 46, 47, 48, 49, 10, 50, 51, 52,
610 53, 10, 54, 29, 41, 43, 45, 55, 56, 57,
611 57, 65, 58, 58, 68, 59, 59, 72, 78, 60,
612 60, 553, 554, 91, 61, 61, 76, 77, 107, 66,
613 69, 91, 98, 135, 99, 207, 74, 136, 167, 108,
615 74, 74, 91, 100, 79, 74, 101, 175, 168, 176,
616 102, 135, 104, 207, 178, 105, 103, 91, 75, 106,
617 189, 190, 98, 554, 101, 111, 74, 67, 70, 172,
618 178, 74, 81, 82, 109, 112, 194, 195, 114, 110,
619 113, 115, 104, 215, 162, 163, 216, 164, 91, 83,
620 84, 165, 116, 112, 180, 113, 181, 137, 138, 85,
621 182, 86, 183, 179, 87, 139, 88, 173, 166, 89,
622 201, 202, 513, 90, 131, 131, 131, 131, 552, 83,
623 91, 117, 117, 117, 117, 193, 205, 174, 231, 232,
624 132, 109, 92, 92, 92, 92, 110, 514, 133, 280,
626 118, 205, 119, 134, 120, 186, 186, 186, 186, 186,
627 186, 186, 186, 186, 186, 121, 93, 122, 208, 223,
628 132, 224, 235, 94, 248, 95, 233, 234, 238, 239,
629 551, 96, 97, 208, 223, 236, 224, 550, 237, 248,
630 235, 95, 124, 124, 124, 124, 73, 73, 73, 73,
631 73, 73, 73, 73, 73, 73, 243, 197, 251, 125,
632 126, 198, 127, 255, 257, 268, 546, 199, 218, 200,
633 246, 263, 128, 251, 243, 264, 129, 130, 255, 257,
634 268, 219, 244, 199, 200, 220, 245, 263, 246, 125,
635 128, 266, 130, 140, 140, 140, 140, 140, 140, 258,
637 220, 245, 278, 259, 265, 264, 285, 267, 260, 141,
638 299, 142, 302, 261, 185, 252, 302, 278, 262, 287,
639 143, 266, 265, 318, 545, 319, 144, 186, 186, 186,
640 186, 186, 186, 186, 186, 186, 186, 289, 316, 141,
641 299, 290, 144, 145, 145, 145, 145, 145, 145, 145,
642 145, 293, 291, 292, 303, 294, 316, 317, 308, 146,
643 320, 321, 322, 147, 304, 323, 295, 296, 325, 326,
644 305, 306, 148, 149, 308, 313, 331, 314, 150, 327,
645 324, 544, 315, 328, 332, 326, 306, 317, 332, 146,
646 543, 149, 331, 150, 151, 323, 336, 340, 325, 338,
648 336, 340, 345, 348, 542, 313, 345, 370, 152, 361,
649 153, 349, 154, 155, 338, 156, 157, 349, 348, 363,
650 351, 349, 370, 158, 352, 361, 159, 160, 381, 353,
651 356, 357, 161, 366, 354, 363, 385, 367, 152, 355,
652 397, 349, 160, 381, 388, 389, 400, 394, 386, 401,
653 390, 395, 358, 404, 406, 409, 359, 422, 424, 425,
654 435, 436, 388, 438, 439, 446, 441, 437, 404, 463,
655 397, 409, 422, 424, 472, 443, 400, 455, 438, 401,
656 439, 441, 470, 477, 406, 463, 464, 480, 467, 425,
657 443, 468, 455, 465, 492, 446, 493, 470, 466, 485,
659 486, 487, 480, 501, 472, 498, 505, 507, 508, 492,
660 519, 493, 515, 477, 523, 516, 529, 533, 467, 547,
661 498, 505, 507, 508, 534, 541, 548, 535, 549, 523,
662 540, 529, 533, 501, 539, 538, 537, 547, 536, 532,
663 519, 548, 531, 549, 62, 62, 62, 62, 73, 73,
664 184, 530, 184, 184, 184, 184, 187, 187, 203, 203,
665 528, 527, 526, 525, 524, 522, 521, 520, 518, 517,
666 512, 511, 510, 509, 506, 504, 503, 502, 500, 499,
667 497, 496, 495, 494, 491, 490, 489, 488, 484, 483,
668 482, 481, 479, 478, 476, 475, 474, 473, 471, 469,
670 462, 461, 460, 459, 458, 457, 456, 454, 453, 452,
671 451, 450, 449, 448, 447, 445, 444, 442, 440, 434,
672 433, 432, 410, 431, 430, 429, 428, 427, 426, 423,
673 421, 420, 419, 418, 417, 416, 415, 414, 413, 412,
674 411, 410, 408, 407, 405, 403, 402, 399, 398, 396,
675 393, 392, 391, 387, 384, 383, 382, 380, 379, 185,
676 378, 377, 376, 375, 374, 373, 372, 371, 369, 368,
677 365, 364, 362, 360, 350, 347, 346, 344, 343, 342,
678 341, 339, 337, 335, 334, 333, 330, 329, 312, 311,
679 310, 309, 307, 301, 300, 298, 297, 288, 185, 286,
681 284, 283, 282, 281, 279, 277, 276, 275, 274, 273,
682 272, 271, 270, 269, 256, 254, 253, 252, 250, 249,
683 247, 242, 241, 240, 230, 229, 228, 227, 226, 225,
684 222, 221, 217, 214, 213, 212, 211, 210, 209, 206,
685 204, 196, 193, 192, 191, 188, 185, 177, 171, 170,
686 169, 166, 123, 80, 71, 64, 63, 554, 5, 554,
687 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
688 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
689 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
690 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
692 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
693 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
694 554, 554, 554, 554, 554, 554, 554, 554
697 static yyconst flex_int16_t yy_chk
[829] =
699 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
700 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
704 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
705 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
706 4, 16, 3, 4, 18, 3, 4, 20, 25, 3,
707 4, 552, 21, 31, 3, 4, 24, 24, 32, 16,
708 18, 33, 30, 40, 30, 96, 20, 40, 47, 32,
710 20, 21, 35, 30, 25, 21, 30, 58, 47, 58,
711 30, 40, 31, 96, 60, 31, 30, 41, 20, 31,
712 80, 80, 30, 21, 30, 34, 20, 16, 18, 55,
713 60, 21, 28, 28, 33, 34, 84, 84, 35, 33,
714 34, 35, 31, 106, 45, 45, 106, 45, 57, 28,
715 28, 45, 35, 34, 67, 34, 67, 41, 41, 28,
716 70, 28, 70, 61, 28, 41, 28, 55, 61, 28,
717 89, 89, 485, 28, 39, 39, 39, 39, 551, 28,
718 29, 36, 36, 36, 36, 171, 93, 57, 125, 125,
719 39, 57, 29, 29, 29, 29, 57, 485, 39, 171,
721 36, 93, 36, 39, 36, 72, 72, 72, 72, 72,
722 72, 72, 72, 72, 72, 36, 29, 36, 97, 112,
723 39, 115, 128, 29, 139, 29, 126, 126, 130, 130,
724 550, 29, 29, 97, 112, 129, 115, 549, 129, 139,
725 128, 29, 38, 38, 38, 38, 73, 73, 73, 73,
726 73, 73, 73, 73, 73, 73, 134, 88, 143, 38,
727 38, 88, 38, 147, 149, 155, 542, 88, 108, 88,
728 137, 151, 38, 143, 134, 152, 38, 38, 147, 149,
729 155, 108, 135, 88, 88, 108, 135, 151, 137, 38,
730 38, 154, 38, 42, 42, 42, 42, 42, 42, 150,
732 108, 135, 167, 150, 153, 152, 178, 154, 150, 42,
733 200, 42, 204, 150, 185, 178, 204, 167, 150, 185,
734 42, 154, 153, 216, 540, 216, 42, 186, 186, 186,
735 186, 186, 186, 186, 186, 186, 186, 191, 214, 42,
736 200, 191, 42, 43, 43, 43, 43, 43, 43, 43,
737 43, 192, 191, 191, 205, 192, 214, 215, 207, 43,
738 217, 217, 217, 43, 205, 218, 192, 192, 219, 220,
739 205, 205, 43, 43, 207, 213, 225, 213, 43, 221,
740 218, 539, 213, 221, 226, 220, 205, 215, 226, 43,
741 538, 43, 225, 43, 44, 218, 230, 240, 219, 236,
743 230, 240, 249, 252, 537, 213, 249, 275, 44, 266,
744 44, 253, 44, 44, 236, 44, 44, 253, 252, 268,
745 255, 253, 275, 44, 255, 266, 44, 44, 299, 255,
746 256, 256, 44, 271, 255, 268, 306, 271, 44, 255,
747 315, 253, 44, 299, 309, 309, 320, 313, 306, 321,
748 309, 313, 256, 324, 326, 331, 256, 362, 364, 365,
749 379, 379, 309, 380, 382, 389, 384, 379, 324, 410,
750 315, 331, 362, 364, 422, 386, 320, 401, 380, 321,
751 382, 384, 414, 429, 326, 410, 411, 433, 412, 365,
752 386, 412, 401, 411, 451, 389, 452, 414, 411, 445,
754 445, 445, 433, 462, 422, 459, 472, 474, 476, 451,
755 489, 452, 486, 429, 496, 486, 506, 512, 412, 543,
756 459, 472, 474, 476, 513, 536, 546, 513, 547, 496,
757 527, 506, 512, 462, 525, 524, 521, 543, 519, 511,
758 489, 546, 510, 547, 555, 555, 555, 555, 556, 556,
759 557, 507, 557, 557, 557, 557, 558, 558, 559, 559,
760 504, 503, 502, 501, 499, 495, 494, 491, 488, 487,
761 484, 480, 478, 477, 473, 468, 467, 463, 461, 460,
762 457, 456, 454, 453, 450, 449, 447, 446, 444, 436,
763 435, 434, 432, 431, 428, 427, 425, 423, 421, 413,
765 409, 408, 407, 406, 405, 403, 402, 400, 399, 398,
766 397, 396, 393, 391, 390, 388, 387, 385, 383, 378,
767 377, 375, 374, 373, 372, 371, 370, 369, 368, 363,
768 361, 360, 357, 356, 350, 347, 342, 339, 338, 337,
769 335, 333, 330, 329, 325, 323, 322, 317, 316, 314,
770 312, 311, 310, 308, 305, 304, 303, 298, 297, 287,
771 286, 285, 284, 283, 282, 281, 280, 278, 274, 272,
772 270, 269, 267, 263, 254, 251, 250, 248, 247, 246,
773 243, 237, 235, 229, 228, 227, 223, 222, 212, 211,
774 209, 208, 206, 202, 201, 197, 196, 190, 184, 179,
776 177, 176, 175, 174, 169, 166, 163, 162, 161, 160,
777 159, 158, 157, 156, 148, 146, 145, 144, 141, 140,
778 138, 133, 132, 131, 124, 123, 121, 118, 117, 116,
779 110, 109, 107, 105, 104, 103, 102, 100, 98, 95,
780 92, 85, 83, 82, 81, 76, 71, 59, 54, 53,
781 48, 46, 37, 26, 19, 15, 12, 5, 554, 554,
782 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
783 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
784 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
785 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
787 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
788 554, 554, 554, 554, 554, 554, 554, 554, 554, 554,
789 554, 554, 554, 554, 554, 554, 554, 554
792 static yy_state_type yy_last_accepting_state
;
793 static char *yy_last_accepting_cpos
;
795 extern int yy_flex_debug
;
796 int yy_flex_debug
= 0;
798 /* The intent behind this definition is that it'll catch
799 * any uses of REJECT which flex missed.
801 #define REJECT reject_used_but_not_detected
802 #define yymore() yymore_used_but_not_detected
803 #define YY_MORE_ADJ 0
804 #define YY_RESTORE_YY_MORE_OFFSET
807 /* bfin-lex.l ADI Blackfin lexer
808 Copyright 2005, 2006, 2007
809 Free Software Foundation, Inc.
811 This file is part of GAS, the GNU Assembler.
813 GAS is free software; you can redistribute it and/or modify
814 it under the terms of the GNU General Public License as published by
815 the Free Software Foundation; either version 3, or (at your option)
818 GAS is distributed in the hope that it will be useful,
819 but WITHOUT ANY WARRANTY; without even the implied warranty of
820 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
821 GNU General Public License for more details.
823 You should have received a copy of the GNU General Public License
824 along with GAS; see the file COPYING. If not, write to the Free
825 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
827 #line 22 "bfin-lex.l"
830 #include "bfin-defs.h"
831 #include "bfin-parse.h"
833 static long parse_int (char **end
);
834 static int parse_halfreg (Register
*r
, int cl
, char *hr
);
835 static int parse_reg (Register
*r
, int type
, char *rt
);
838 #define _REG yylval.reg
841 /* Define Start States ... Actually we will use exclusion.
842 If no start state is specified it should match any state
843 and <INITIAL> would match some keyword rules only with
846 #line 847 "bfin-lex.c"
851 /* Special case for "unistd.h", since it is non-ANSI. We include it way
852 * down here because we want the user's section 1 to have been scanned first.
853 * The user has a chance to override it with an option.
857 #ifndef YY_EXTRA_TYPE
858 #define YY_EXTRA_TYPE void *
861 /* Macros after this point can all be overridden by user definitions in
865 #ifndef YY_SKIP_YYWRAP
867 extern "C" int yywrap (void );
869 extern int yywrap (void );
873 static void yyunput (int c
,char *buf_ptr
);
876 static void yy_flex_strncpy (char *,yyconst
char *,int );
879 #ifdef YY_NEED_STRLEN
880 static int yy_flex_strlen (yyconst
char * );
886 static int yyinput (void );
888 static int input (void );
893 /* Amount of stuff to slurp up with each read. */
894 #ifndef YY_READ_BUF_SIZE
895 #define YY_READ_BUF_SIZE 8192
898 /* Copy whatever the last rule matched to the standard output. */
900 /* This used to be an fputs(), but since the string might contain NUL's,
901 * we now use fwrite().
903 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
906 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
907 * is returned in "result".
910 #define YY_INPUT(buf,result,max_size) \
911 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
915 for ( n = 0; n < max_size && \
916 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
919 buf[n++] = (char) c; \
920 if ( c == EOF && ferror( yyin ) ) \
921 YY_FATAL_ERROR( "input in flex scanner failed" ); \
927 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
929 if( errno != EINTR) \
931 YY_FATAL_ERROR( "input in flex scanner failed" ); \
942 /* No semi-colon after return; correct usage is to write "yyterminate();" -
943 * we don't want an extra ';' after the "return" because that will cause
944 * some compilers to complain about unreachable statements.
947 #define yyterminate() return YY_NULL
950 /* Number of entries by which start-condition stack grows. */
951 #ifndef YY_START_STACK_INCR
952 #define YY_START_STACK_INCR 25
955 /* Report a fatal error. */
956 #ifndef YY_FATAL_ERROR
957 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
960 /* end tables serialization structures and prototypes */
962 /* Default declaration of generated scanner - a define so the user can
963 * easily add parameters.
966 #define YY_DECL_IS_OURS 1
968 extern int yylex (void);
970 #define YY_DECL int yylex (void)
971 #endif /* !YY_DECL */
973 /* Code executed at the beginning of each rule, after yytext and yyleng
976 #ifndef YY_USER_ACTION
977 #define YY_USER_ACTION
980 /* Code executed at the end of each rule. */
982 #define YY_BREAK break;
985 #define YY_RULE_SETUP \
988 /** The main scanner function which does all the work.
992 register yy_state_type yy_current_state
;
993 register char *yy_cp
, *yy_bp
;
996 #line 43 "bfin-lex.l"
998 #line 999 "bfin-lex.c"
1009 (yy_start
) = 1; /* first start state */
1017 if ( ! YY_CURRENT_BUFFER
) {
1018 yyensure_buffer_stack ();
1019 YY_CURRENT_BUFFER_LVALUE
=
1020 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1023 yy_load_buffer_state( );
1026 while ( 1 ) /* loops until end-of-file is reached */
1028 yy_cp
= (yy_c_buf_p
);
1030 /* Support of yytext. */
1031 *yy_cp
= (yy_hold_char
);
1033 /* yy_bp points to the position in yy_ch_buf of the start of
1038 yy_current_state
= (yy_start
);
1042 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
1043 if ( yy_accept
[yy_current_state
] )
1045 (yy_last_accepting_state
) = yy_current_state
;
1046 (yy_last_accepting_cpos
) = yy_cp
;
1048 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1050 yy_current_state
= (int) yy_def
[yy_current_state
];
1051 if ( yy_current_state
>= 555 )
1052 yy_c
= yy_meta
[(unsigned int) yy_c
];
1054 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1057 while ( yy_base
[yy_current_state
] != 759 );
1060 yy_act
= yy_accept
[yy_current_state
];
1062 { /* have to back up */
1063 yy_cp
= (yy_last_accepting_cpos
);
1064 yy_current_state
= (yy_last_accepting_state
);
1065 yy_act
= yy_accept
[yy_current_state
];
1068 YY_DO_BEFORE_ACTION
;
1070 do_action
: /* This label is used only to access EOF actions. */
1073 { /* beginning of action switch */
1074 case 0: /* must back up */
1075 /* undo the effects of YY_DO_BEFORE_ACTION */
1076 *yy_cp
= (yy_hold_char
);
1077 yy_cp
= (yy_last_accepting_cpos
);
1078 yy_current_state
= (yy_last_accepting_state
);
1079 goto yy_find_action
;
1083 #line 44 "bfin-lex.l"
1084 _REG
.regno
= REG_sftreset
; return REG
;
1088 #line 45 "bfin-lex.l"
1089 _REG
.regno
= REG_omode
; return REG
;
1093 #line 46 "bfin-lex.l"
1094 _REG
.regno
= REG_idle_req
; return REG
;
1098 #line 47 "bfin-lex.l"
1099 _REG
.regno
= REG_hwerrcause
; return REG
;
1103 #line 48 "bfin-lex.l"
1104 _REG
.regno
= REG_excause
; return REG
;
1108 #line 49 "bfin-lex.l"
1109 _REG
.regno
= REG_emucause
; return REG
;
1113 #line 50 "bfin-lex.l"
1118 #line 51 "bfin-lex.l"
1123 #line 52 "bfin-lex.l"
1124 yylval
.value
= M_W32
; return MMOD
;
1128 #line 53 "bfin-lex.l"
1133 #line 54 "bfin-lex.l"
1138 #line 55 "bfin-lex.l"
1139 return V
; /* Special: V is a statflag and a modifier. */
1143 #line 56 "bfin-lex.l"
1144 _REG
.regno
= REG_USP
; return REG
;
1148 #line 57 "bfin-lex.l"
1153 #line 58 "bfin-lex.l"
1158 #line 59 "bfin-lex.l"
1159 yylval
.value
= M_TFU
; return MMOD
;
1163 #line 60 "bfin-lex.l"
1168 #line 61 "bfin-lex.l"
1169 yylval
.value
= M_T
; return MMOD
;
1173 #line 62 "bfin-lex.l"
1178 #line 63 "bfin-lex.l"
1179 _REG
.regno
= REG_SYSCFG
; return REG
;
1183 #line 64 "bfin-lex.l"
1188 #line 65 "bfin-lex.l"
1193 #line 66 "bfin-lex.l"
1194 _REG
.regno
= REG_SP
; return HALF_REG
;
1198 #line 67 "bfin-lex.l"
1199 _REG
.regno
= REG_SP
| F_REG_HIGH
; return HALF_REG
;
1203 #line 68 "bfin-lex.l"
1204 _REG
.regno
= REG_SP
; return REG
;
1208 #line 69 "bfin-lex.l"
1213 #line 70 "bfin-lex.l"
1218 #line 71 "bfin-lex.l"
1219 _REG
.regno
= REG_SEQSTAT
; return REG
;
1223 #line 72 "bfin-lex.l"
1228 #line 73 "bfin-lex.l"
1233 #line 74 "bfin-lex.l"
1238 #line 76 "bfin-lex.l"
1243 #line 77 "bfin-lex.l"
1244 yylval
.value
= M_S2RND
; return MMOD
;
1248 #line 78 "bfin-lex.l"
1253 #line 79 "bfin-lex.l"
1258 #line 80 "bfin-lex.l"
1263 #line 81 "bfin-lex.l"
1268 #line 82 "bfin-lex.l"
1273 #line 83 "bfin-lex.l"
1278 #line 84 "bfin-lex.l"
1283 #line 85 "bfin-lex.l"
1288 #line 86 "bfin-lex.l"
1293 #line 87 "bfin-lex.l"
1298 #line 88 "bfin-lex.l"
1303 #line 90 "bfin-lex.l"
1304 return parse_halfreg(&yylval
.reg
, T_REG_R
, yytext
);
1308 #line 92 "bfin-lex.l"
1309 _REG
.regno
= REG_RETS
; return REG
;
1313 #line 93 "bfin-lex.l"
1314 _REG
.regno
= REG_RETI
; return REG
;
1318 #line 94 "bfin-lex.l"
1319 _REG
.regno
= REG_RETX
; return REG
;
1323 #line 95 "bfin-lex.l"
1324 _REG
.regno
= REG_RETN
; return REG
;
1328 #line 96 "bfin-lex.l"
1329 _REG
.regno
= REG_RETE
; return REG
;
1333 #line 97 "bfin-lex.l"
1334 _REG
.regno
= REG_EMUDAT
; return REG
;
1338 #line 98 "bfin-lex.l"
1343 #line 100 "bfin-lex.l"
1344 return parse_reg (&yylval
.reg
, T_REG_R
, yytext
);
1348 #line 102 "bfin-lex.l"
1353 #line 103 "bfin-lex.l"
1358 #line 104 "bfin-lex.l"
1363 #line 105 "bfin-lex.l"
1368 #line 107 "bfin-lex.l"
1369 return parse_halfreg (&yylval
.reg
, T_REG_P
, yytext
);
1373 #line 108 "bfin-lex.l"
1374 return parse_reg (&yylval
.reg
, T_REG_P
, yytext
);
1378 #line 110 "bfin-lex.l"
1383 #line 111 "bfin-lex.l"
1388 #line 113 "bfin-lex.l"
1393 #line 114 "bfin-lex.l"
1398 #line 115 "bfin-lex.l"
1403 #line 116 "bfin-lex.l"
1408 #line 119 "bfin-lex.l"
1413 #line 120 "bfin-lex.l"
1418 #line 122 "bfin-lex.l"
1419 return parse_halfreg (&yylval
.reg
, T_REG_M
, yytext
);
1423 #line 123 "bfin-lex.l"
1424 return parse_reg (&yylval
.reg
, T_REG_M
, yytext
);
1428 #line 125 "bfin-lex.l"
1433 #line 126 "bfin-lex.l"
1438 #line 127 "bfin-lex.l"
1443 #line 128 "bfin-lex.l"
1448 #line 129 "bfin-lex.l"
1453 #line 130 "bfin-lex.l"
1458 #line 131 "bfin-lex.l"
1463 #line 133 "bfin-lex.l"
1468 #line 134 "bfin-lex.l"
1469 _REG
.regno
= REG_LC0
; return REG
;
1473 #line 135 "bfin-lex.l"
1474 _REG
.regno
= REG_LT0
; return REG
;
1478 #line 136 "bfin-lex.l"
1479 _REG
.regno
= REG_LB0
; return REG
;
1483 #line 137 "bfin-lex.l"
1484 _REG
.regno
= REG_LC1
; return REG
;
1488 #line 138 "bfin-lex.l"
1489 _REG
.regno
= REG_LT1
; return REG
;
1493 #line 139 "bfin-lex.l"
1494 _REG
.regno
= REG_LB1
; return REG
;
1498 #line 141 "bfin-lex.l"
1499 return parse_halfreg (&yylval
.reg
, T_REG_L
, yytext
);
1503 #line 142 "bfin-lex.l"
1504 return parse_reg (&yylval
.reg
, T_REG_L
, yytext
);
1508 #line 143 "bfin-lex.l"
1513 #line 144 "bfin-lex.l"
1514 { BEGIN
0; return JUMP_DOT_S
;}
1518 #line 145 "bfin-lex.l"
1519 { BEGIN
0; return JUMP_DOT_L
;}
1523 #line 146 "bfin-lex.l"
1524 { BEGIN
0; return JUMP
;}
1528 #line 147 "bfin-lex.l"
1529 { BEGIN
0; return JUMP_DOT_L
; }
1533 #line 148 "bfin-lex.l"
1534 yylval
.value
= M_IU
; return MMOD
;
1538 #line 149 "bfin-lex.l"
1539 yylval
.value
= M_ISS2
; return MMOD
;
1543 #line 150 "bfin-lex.l"
1544 yylval
.value
= M_IS
; return MMOD
;
1548 #line 151 "bfin-lex.l"
1549 yylval
.value
= M_IH
; return MMOD
;
1553 #line 152 "bfin-lex.l"
1558 #line 153 "bfin-lex.l"
1559 return parse_halfreg (&yylval
.reg
, T_REG_I
, yytext
);
1563 #line 154 "bfin-lex.l"
1564 return parse_reg (&yylval
.reg
, T_REG_I
, yytext
);
1568 #line 155 "bfin-lex.l"
1573 #line 156 "bfin-lex.l"
1578 #line 157 "bfin-lex.l"
1583 #line 158 "bfin-lex.l"
1588 #line 159 "bfin-lex.l"
1589 yylval
.value
= M_FU
; return MMOD
;
1593 #line 160 "bfin-lex.l"
1594 _REG
.regno
= REG_FP
; return REG
;
1598 #line 161 "bfin-lex.l"
1599 _REG
.regno
= REG_FP
; return HALF_REG
;
1603 #line 162 "bfin-lex.l"
1604 _REG
.regno
= REG_FP
| F_REG_HIGH
; return HALF_REG
;
1608 #line 164 "bfin-lex.l"
1613 #line 165 "bfin-lex.l"
1618 #line 166 "bfin-lex.l"
1623 #line 167 "bfin-lex.l"
1628 #line 168 "bfin-lex.l"
1633 #line 169 "bfin-lex.l"
1638 #line 170 "bfin-lex.l"
1639 return DISALGNEXCPT
;
1643 #line 171 "bfin-lex.l"
1648 #line 172 "bfin-lex.l"
1653 #line 173 "bfin-lex.l"
1658 #line 174 "bfin-lex.l"
1663 #line 175 "bfin-lex.l"
1668 #line 176 "bfin-lex.l"
1673 #line 177 "bfin-lex.l"
1678 #line 178 "bfin-lex.l"
1679 { _REG
.regno
= REG_CYCLES2
; return REG
; }
1683 #line 179 "bfin-lex.l"
1684 { _REG
.regno
= REG_CYCLES
; return REG
; }
1688 #line 180 "bfin-lex.l"
1693 #line 181 "bfin-lex.l"
1698 #line 182 "bfin-lex.l"
1703 #line 184 "bfin-lex.l"
1704 _REG
.regno
= REG_CC
; return CCREG
;
1708 #line 185 "bfin-lex.l"
1709 { BEGIN
0; return CALL
;}
1713 #line 186 "bfin-lex.l"
1714 { BEGIN
0; return CALL
;}
1718 #line 187 "bfin-lex.l"
1723 #line 188 "bfin-lex.l"
1728 #line 189 "bfin-lex.l"
1733 #line 190 "bfin-lex.l"
1738 #line 191 "bfin-lex.l"
1743 #line 192 "bfin-lex.l"
1748 #line 193 "bfin-lex.l"
1753 #line 194 "bfin-lex.l"
1758 #line 195 "bfin-lex.l"
1763 #line 196 "bfin-lex.l"
1768 #line 197 "bfin-lex.l"
1773 #line 199 "bfin-lex.l"
1778 #line 200 "bfin-lex.l"
1783 #line 201 "bfin-lex.l"
1788 #line 202 "bfin-lex.l"
1793 #line 203 "bfin-lex.l"
1798 #line 204 "bfin-lex.l"
1803 #line 205 "bfin-lex.l"
1808 #line 206 "bfin-lex.l"
1809 return parse_halfreg (&yylval
.reg
, T_REG_B
, yytext
);
1813 #line 207 "bfin-lex.l"
1814 return parse_reg (&yylval
.reg
, T_REG_B
, yytext
);
1818 #line 208 "bfin-lex.l"
1823 #line 209 "bfin-lex.l"
1824 _REG
.regno
= S_AZ
; return STATUS_REG
;
1828 #line 210 "bfin-lex.l"
1829 _REG
.regno
= S_AN
; return STATUS_REG
;
1833 #line 211 "bfin-lex.l"
1834 _REG
.regno
= S_AQ
; return STATUS_REG
;
1838 #line 212 "bfin-lex.l"
1839 _REG
.regno
= S_AC0
; return STATUS_REG
;
1843 #line 213 "bfin-lex.l"
1844 _REG
.regno
= S_AC1
; return STATUS_REG
;
1848 #line 214 "bfin-lex.l"
1849 _REG
.regno
= S_AV0
; return STATUS_REG
;
1853 #line 215 "bfin-lex.l"
1854 _REG
.regno
= S_AV0S
; return STATUS_REG
;
1858 #line 216 "bfin-lex.l"
1859 _REG
.regno
= S_AV1
; return STATUS_REG
;
1863 #line 217 "bfin-lex.l"
1864 _REG
.regno
= S_AV1S
; return STATUS_REG
;
1868 #line 218 "bfin-lex.l"
1869 _REG
.regno
= S_V
; return STATUS_REG
;
1873 #line 219 "bfin-lex.l"
1874 _REG
.regno
= S_VS
; return STATUS_REG
;
1878 #line 222 "bfin-lex.l"
1879 _REG
.regno
= REG_ASTAT
; return REG
;
1883 #line 223 "bfin-lex.l"
1888 #line 224 "bfin-lex.l"
1893 #line 225 "bfin-lex.l"
1898 #line 226 "bfin-lex.l"
1903 #line 227 "bfin-lex.l"
1908 #line 228 "bfin-lex.l"
1913 #line 229 "bfin-lex.l"
1918 #line 230 "bfin-lex.l"
1919 return A_ZERO_DOT_L
;
1923 #line 231 "bfin-lex.l"
1928 #line 232 "bfin-lex.l"
1929 return A_ZERO_DOT_H
;
1933 #line 233 "bfin-lex.l"
1938 #line 234 "bfin-lex.l"
1943 #line 235 "bfin-lex.l"
1944 _REG
.regno
= REG_A1x
; return REG
;
1948 #line 236 "bfin-lex.l"
1949 _REG
.regno
= REG_A1w
; return REG
;
1953 #line 237 "bfin-lex.l"
1954 _REG
.regno
= REG_A1
; return REG_A_DOUBLE_ONE
;
1958 #line 238 "bfin-lex.l"
1959 _REG
.regno
= REG_A0x
; return REG
;
1963 #line 239 "bfin-lex.l"
1964 _REG
.regno
= REG_A0w
; return REG
;
1968 #line 240 "bfin-lex.l"
1969 _REG
.regno
= REG_A0
; return REG_A_DOUBLE_ZERO
;
1973 #line 241 "bfin-lex.l"
1978 #line 242 "bfin-lex.l"
1983 #line 243 "bfin-lex.l"
1984 return FUNCDESC_GOT17M4
;
1988 #line 244 "bfin-lex.l"
1993 #line 247 "bfin-lex.l"
1998 #line 248 "bfin-lex.l"
2003 #line 249 "bfin-lex.l"
2008 #line 250 "bfin-lex.l"
2009 return _CARET_ASSIGN
;
2013 #line 251 "bfin-lex.l"
2018 #line 252 "bfin-lex.l"
2023 #line 253 "bfin-lex.l"
2028 #line 254 "bfin-lex.l"
2029 return _GREATER_GREATER_GREATER_THAN_ASSIGN
;
2033 #line 255 "bfin-lex.l"
2034 return _GREATER_GREATER_ASSIGN
;
2038 #line 256 "bfin-lex.l"
2039 return _GREATER_GREATER_GREATER
;
2043 #line 257 "bfin-lex.l"
2044 return GREATER_GREATER
;
2048 #line 258 "bfin-lex.l"
2049 return _ASSIGN_ASSIGN
;
2053 #line 259 "bfin-lex.l"
2058 #line 260 "bfin-lex.l"
2059 return _LESS_THAN_ASSIGN
;
2063 #line 261 "bfin-lex.l"
2064 return _LESS_LESS_ASSIGN
;
2068 #line 262 "bfin-lex.l"
2073 #line 263 "bfin-lex.l"
2078 #line 264 "bfin-lex.l"
2083 #line 265 "bfin-lex.l"
2088 #line 266 "bfin-lex.l"
2093 #line 267 "bfin-lex.l"
2098 #line 268 "bfin-lex.l"
2099 return _MINUS_ASSIGN
;
2103 #line 269 "bfin-lex.l"
2104 return _PLUS_BAR_PLUS
;
2108 #line 270 "bfin-lex.l"
2109 return _MINUS_BAR_PLUS
;
2113 #line 271 "bfin-lex.l"
2114 return _PLUS_BAR_MINUS
;
2118 #line 272 "bfin-lex.l"
2119 return _MINUS_BAR_MINUS
;
2123 #line 273 "bfin-lex.l"
2124 return _MINUS_MINUS
;
2128 #line 274 "bfin-lex.l"
2133 #line 275 "bfin-lex.l"
2138 #line 276 "bfin-lex.l"
2139 return _PLUS_ASSIGN
;
2143 #line 277 "bfin-lex.l"
2148 #line 278 "bfin-lex.l"
2153 #line 279 "bfin-lex.l"
2154 return _STAR_ASSIGN
;
2158 #line 280 "bfin-lex.l"
2163 #line 281 "bfin-lex.l"
2164 return _AMPERSAND_ASSIGN
;
2168 #line 282 "bfin-lex.l"
2173 #line 283 "bfin-lex.l"
2178 #line 284 "bfin-lex.l"
2183 #line 285 "bfin-lex.l"
2188 #line 286 "bfin-lex.l"
2189 return _ASSIGN_BANG
;
2193 #line 287 "bfin-lex.l"
2198 #line 288 "bfin-lex.l"
2203 #line 289 "bfin-lex.l"
2208 #line 290 "bfin-lex.l"
2213 #line 291 "bfin-lex.l"
2218 #line 292 "bfin-lex.l"
2223 #line 293 "bfin-lex.l"
2228 #line 294 "bfin-lex.l"
2233 #line 295 "bfin-lex.l"
2238 #line 296 "bfin-lex.l"
2240 yylval
.value
= parse_int (&yytext
);
2246 #line 300 "bfin-lex.l"
2248 yylval
.symbol
= symbol_find_or_make (yytext
);
2249 symbol_mark_used (yylval
.symbol
);
2255 #line 305 "bfin-lex.l"
2258 char *ref
= strdup (yytext
);
2259 if (ref
[1] == 'b' || ref
[1] == 'B')
2261 name
= fb_label_name ((int) (ref
[0] - '0'), 0);
2262 yylval
.symbol
= symbol_find (name
);
2264 if ((yylval
.symbol
!= NULL
)
2265 && (S_IS_DEFINED (yylval
.symbol
)))
2267 as_bad ("backward reference to unknown label %d:",
2268 (int) (ref
[0] - '0'));
2270 else if (ref
[1] == 'f' || ref
[1] == 'F')
2272 /* Forward reference. Expect symbol to be undefined or
2273 unknown. undefined: seen it before. unknown: never seen
2276 Construct a local label name, then an undefined symbol.
2277 Just return it as never seen before. */
2279 name
= fb_label_name ((int) (ref
[0] - '0'), 1);
2280 yylval
.symbol
= symbol_find_or_make (name
);
2281 /* We have no need to check symbol properties. */
2287 /* rule 235 can match eol */
2289 #line 334 "bfin-lex.l"
2294 #line 335 "bfin-lex.l"
2299 #line 336 "bfin-lex.l"
2304 #line 337 "bfin-lex.l"
2307 #line 2308 "bfin-lex.c"
2308 case YY_STATE_EOF(INITIAL
):
2309 case YY_STATE_EOF(KEYWORD
):
2312 case YY_END_OF_BUFFER
:
2314 /* Amount of text matched not including the EOB char. */
2315 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
2317 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2318 *yy_cp
= (yy_hold_char
);
2319 YY_RESTORE_YY_MORE_OFFSET
2321 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2323 /* We're scanning a new file or input source. It's
2324 * possible that this happened because the user
2325 * just pointed yyin at a new source and called
2326 * yylex(). If so, then we have to assure
2327 * consistency between YY_CURRENT_BUFFER and our
2328 * globals. Here is the right place to do so, because
2329 * this is the first action (other than possibly a
2330 * back-up) that will match for the new input source.
2332 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2333 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
2334 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2337 /* Note that here we test for yy_c_buf_p "<=" to the position
2338 * of the first EOB in the buffer, since yy_c_buf_p will
2339 * already have been incremented past the NUL character
2340 * (since all states make transitions on EOB to the
2341 * end-of-buffer state). Contrast this with the test
2344 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2345 { /* This was really a NUL. */
2346 yy_state_type yy_next_state
;
2348 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
2350 yy_current_state
= yy_get_previous_state( );
2352 /* Okay, we're now positioned to make the NUL
2353 * transition. We couldn't have
2354 * yy_get_previous_state() go ahead and do it
2355 * for us because it doesn't know how to deal
2356 * with the possibility of jamming (and we don't
2357 * want to build jamming into it because then it
2358 * will run more slowly).
2361 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
2363 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2365 if ( yy_next_state
)
2367 /* Consume the NUL. */
2368 yy_cp
= ++(yy_c_buf_p
);
2369 yy_current_state
= yy_next_state
;
2375 yy_cp
= (yy_c_buf_p
);
2376 goto yy_find_action
;
2380 else switch ( yy_get_next_buffer( ) )
2382 case EOB_ACT_END_OF_FILE
:
2384 (yy_did_buffer_switch_on_eof
) = 0;
2388 /* Note: because we've taken care in
2389 * yy_get_next_buffer() to have set up
2390 * yytext, we can now set up
2391 * yy_c_buf_p so that if some total
2392 * hoser (like flex itself) wants to
2393 * call the scanner after we return the
2394 * YY_NULL, it'll still work - another
2395 * YY_NULL will get returned.
2397 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
2399 yy_act
= YY_STATE_EOF(YY_START
);
2405 if ( ! (yy_did_buffer_switch_on_eof
) )
2411 case EOB_ACT_CONTINUE_SCAN
:
2413 (yytext_ptr
) + yy_amount_of_matched_text
;
2415 yy_current_state
= yy_get_previous_state( );
2417 yy_cp
= (yy_c_buf_p
);
2418 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2421 case EOB_ACT_LAST_MATCH
:
2423 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
2425 yy_current_state
= yy_get_previous_state( );
2427 yy_cp
= (yy_c_buf_p
);
2428 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2429 goto yy_find_action
;
2436 "fatal flex scanner internal error--no action found" );
2437 } /* end of action switch */
2438 } /* end of scanning one token */
2439 } /* end of yylex */
2441 /* yy_get_next_buffer - try to read in a new buffer
2443 * Returns a code representing an action:
2444 * EOB_ACT_LAST_MATCH -
2445 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2446 * EOB_ACT_END_OF_FILE - end of file
2448 static int yy_get_next_buffer (void)
2450 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2451 register char *source
= (yytext_ptr
);
2452 register int number_to_move
, i
;
2455 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
2457 "fatal flex scanner internal error--end of buffer missed" );
2459 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
2460 { /* Don't try to fill the buffer, so this is an EOF. */
2461 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
2463 /* We matched a single character, the EOB, so
2464 * treat this as a final EOF.
2466 return EOB_ACT_END_OF_FILE
;
2471 /* We matched some text prior to the EOB, first
2474 return EOB_ACT_LAST_MATCH
;
2478 /* Try to read more data. */
2480 /* First move last chars to start of buffer. */
2481 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
2483 for ( i
= 0; i
< number_to_move
; ++i
)
2484 *(dest
++) = *(source
++);
2486 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
2487 /* don't do the read, it's not guaranteed to return an EOF,
2490 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
2494 size_t num_to_read
=
2495 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
2497 while ( num_to_read
<= 0 )
2498 { /* Not enough room in the buffer - grow it. */
2500 /* just a shorter name for the current buffer */
2501 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
2503 int yy_c_buf_p_offset
=
2504 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
2506 if ( b
->yy_is_our_buffer
)
2508 int new_size
= b
->yy_buf_size
* 2;
2510 if ( new_size
<= 0 )
2511 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
2513 b
->yy_buf_size
*= 2;
2515 b
->yy_ch_buf
= (char *)
2516 /* Include room in for 2 EOB chars. */
2517 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
2520 /* Can't grow it, we don't own it. */
2523 if ( ! b
->yy_ch_buf
)
2525 "fatal error - scanner input buffer overflow" );
2527 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2529 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
2534 if ( num_to_read
> YY_READ_BUF_SIZE
)
2535 num_to_read
= YY_READ_BUF_SIZE
;
2537 /* Read in more data. */
2538 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2539 (yy_n_chars
), num_to_read
);
2541 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2544 if ( (yy_n_chars
) == 0 )
2546 if ( number_to_move
== YY_MORE_ADJ
)
2548 ret_val
= EOB_ACT_END_OF_FILE
;
2554 ret_val
= EOB_ACT_LAST_MATCH
;
2555 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
2556 YY_BUFFER_EOF_PENDING
;
2561 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2563 (yy_n_chars
) += number_to_move
;
2564 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
2565 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
2567 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2572 /* yy_get_previous_state - get the state just before the EOB char was reached */
2574 static yy_state_type
yy_get_previous_state (void)
2576 register yy_state_type yy_current_state
;
2577 register char *yy_cp
;
2579 yy_current_state
= (yy_start
);
2581 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
2583 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2584 if ( yy_accept
[yy_current_state
] )
2586 (yy_last_accepting_state
) = yy_current_state
;
2587 (yy_last_accepting_cpos
) = yy_cp
;
2589 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2591 yy_current_state
= (int) yy_def
[yy_current_state
];
2592 if ( yy_current_state
>= 555 )
2593 yy_c
= yy_meta
[(unsigned int) yy_c
];
2595 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2598 return yy_current_state
;
2601 /* yy_try_NUL_trans - try to make a transition on the NUL character
2604 * next_state = yy_try_NUL_trans( current_state );
2606 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
2608 register int yy_is_jam
;
2609 register char *yy_cp
= (yy_c_buf_p
);
2611 register YY_CHAR yy_c
= 1;
2612 if ( yy_accept
[yy_current_state
] )
2614 (yy_last_accepting_state
) = yy_current_state
;
2615 (yy_last_accepting_cpos
) = yy_cp
;
2617 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2619 yy_current_state
= (int) yy_def
[yy_current_state
];
2620 if ( yy_current_state
>= 555 )
2621 yy_c
= yy_meta
[(unsigned int) yy_c
];
2623 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2624 yy_is_jam
= (yy_current_state
== 554);
2626 return yy_is_jam
? 0 : yy_current_state
;
2629 static void yyunput (int c
, register char * yy_bp
)
2631 register char *yy_cp
;
2633 yy_cp
= (yy_c_buf_p
);
2635 /* undo effects of setting up yytext */
2636 *yy_cp
= (yy_hold_char
);
2638 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2639 { /* need to shift things up to make room */
2640 /* +2 for EOB chars. */
2641 register int number_to_move
= (yy_n_chars
) + 2;
2642 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
2643 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
2644 register char *source
=
2645 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
2647 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2648 *--dest
= *--source
;
2650 yy_cp
+= (int) (dest
- source
);
2651 yy_bp
+= (int) (dest
- source
);
2652 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
2653 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
2655 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2656 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2659 *--yy_cp
= (char) c
;
2661 (yytext_ptr
) = yy_bp
;
2662 (yy_hold_char
) = *yy_cp
;
2663 (yy_c_buf_p
) = yy_cp
;
2668 static int yyinput (void)
2670 static int input (void)
2676 *(yy_c_buf_p
) = (yy_hold_char
);
2678 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
2680 /* yy_c_buf_p now points to the character we want to return.
2681 * If this occurs *before* the EOB characters, then it's a
2682 * valid NUL; if not, then we've hit the end of the buffer.
2684 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2685 /* This was really a NUL. */
2686 *(yy_c_buf_p
) = '\0';
2689 { /* need more input */
2690 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
2693 switch ( yy_get_next_buffer( ) )
2695 case EOB_ACT_LAST_MATCH
:
2696 /* This happens because yy_g_n_b()
2697 * sees that we've accumulated a
2698 * token and flags that we need to
2699 * try matching the token before
2700 * proceeding. But for input(),
2701 * there's no matching to consider.
2702 * So convert the EOB_ACT_LAST_MATCH
2703 * to EOB_ACT_END_OF_FILE.
2706 /* Reset buffer status. */
2711 case EOB_ACT_END_OF_FILE
:
2716 if ( ! (yy_did_buffer_switch_on_eof
) )
2725 case EOB_ACT_CONTINUE_SCAN
:
2726 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
2732 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
2733 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
2734 (yy_hold_char
) = *++(yy_c_buf_p
);
2738 #endif /* ifndef YY_NO_INPUT */
2740 /** Immediately switch to a different input stream.
2741 * @param input_file A readable stream.
2743 * @note This function does not reset the start condition to @c INITIAL .
2745 void yyrestart (FILE * input_file
)
2748 if ( ! YY_CURRENT_BUFFER
){
2749 yyensure_buffer_stack ();
2750 YY_CURRENT_BUFFER_LVALUE
=
2751 yy_create_buffer(yyin
,YY_BUF_SIZE
);
2754 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
2755 yy_load_buffer_state( );
2758 /** Switch to a different input buffer.
2759 * @param new_buffer The new input buffer.
2762 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
2765 /* TODO. We should be able to replace this entire function body
2767 * yypop_buffer_state();
2768 * yypush_buffer_state(new_buffer);
2770 yyensure_buffer_stack ();
2771 if ( YY_CURRENT_BUFFER
== new_buffer
)
2774 if ( YY_CURRENT_BUFFER
)
2776 /* Flush out information for old buffer. */
2777 *(yy_c_buf_p
) = (yy_hold_char
);
2778 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2779 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2782 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2783 yy_load_buffer_state( );
2785 /* We don't actually know whether we did this switch during
2786 * EOF (yywrap()) processing, but the only time this flag
2787 * is looked at is after yywrap() is called, so it's safe
2788 * to go ahead and always set it.
2790 (yy_did_buffer_switch_on_eof
) = 1;
2793 static void yy_load_buffer_state (void)
2795 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2796 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2797 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2798 (yy_hold_char
) = *(yy_c_buf_p
);
2801 /** Allocate and initialize an input buffer state.
2802 * @param file A readable stream.
2803 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2805 * @return the allocated buffer state.
2807 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
2811 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2813 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2815 b
->yy_buf_size
= size
;
2817 /* yy_ch_buf has to be 2 characters longer than the size given because
2818 * we need to put in 2 end-of-buffer characters.
2820 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 );
2821 if ( ! b
->yy_ch_buf
)
2822 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2824 b
->yy_is_our_buffer
= 1;
2826 yy_init_buffer(b
,file
);
2831 /** Destroy the buffer.
2832 * @param b a buffer created with yy_create_buffer()
2835 void yy_delete_buffer (YY_BUFFER_STATE b
)
2841 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2842 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2844 if ( b
->yy_is_our_buffer
)
2845 yyfree((void *) b
->yy_ch_buf
);
2847 yyfree((void *) b
);
2851 extern int isatty (int );
2852 #endif /* __cplusplus */
2854 /* Initializes or reinitializes a buffer.
2855 * This function is sometimes called more than once on the same buffer,
2856 * such as during a yyrestart() or at EOF.
2858 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
2863 yy_flush_buffer(b
);
2865 b
->yy_input_file
= file
;
2866 b
->yy_fill_buffer
= 1;
2868 /* If b is the current buffer, then yy_init_buffer was _probably_
2869 * called from yyrestart() or through yy_get_next_buffer.
2870 * In that case, we don't want to reset the lineno or column.
2872 if (b
!= YY_CURRENT_BUFFER
){
2873 b
->yy_bs_lineno
= 1;
2874 b
->yy_bs_column
= 0;
2877 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
2882 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2883 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2886 void yy_flush_buffer (YY_BUFFER_STATE b
)
2893 /* We always need two end-of-buffer characters. The first causes
2894 * a transition to the end-of-buffer state. The second causes
2895 * a jam in that state.
2897 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2898 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2900 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2903 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2905 if ( b
== YY_CURRENT_BUFFER
)
2906 yy_load_buffer_state( );
2909 /** Pushes the new state onto the stack. The new state becomes
2910 * the current state. This function will allocate the stack
2912 * @param new_buffer The new state.
2915 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
2917 if (new_buffer
== NULL
)
2920 yyensure_buffer_stack();
2922 /* This block is copied from yy_switch_to_buffer. */
2923 if ( YY_CURRENT_BUFFER
)
2925 /* Flush out information for old buffer. */
2926 *(yy_c_buf_p
) = (yy_hold_char
);
2927 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2928 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2931 /* Only push if top exists. Otherwise, replace top. */
2932 if (YY_CURRENT_BUFFER
)
2933 (yy_buffer_stack_top
)++;
2934 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2936 /* copied from yy_switch_to_buffer. */
2937 yy_load_buffer_state( );
2938 (yy_did_buffer_switch_on_eof
) = 1;
2941 /** Removes and deletes the top of the stack, if present.
2942 * The next element becomes the new top.
2945 void yypop_buffer_state (void)
2947 if (!YY_CURRENT_BUFFER
)
2950 yy_delete_buffer(YY_CURRENT_BUFFER
);
2951 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2952 if ((yy_buffer_stack_top
) > 0)
2953 --(yy_buffer_stack_top
);
2955 if (YY_CURRENT_BUFFER
) {
2956 yy_load_buffer_state( );
2957 (yy_did_buffer_switch_on_eof
) = 1;
2961 /* Allocates the stack if it does not exist.
2962 * Guarantees space for at least one push.
2964 static void yyensure_buffer_stack (void)
2968 if (!(yy_buffer_stack
)) {
2970 /* First allocation is just for 2 elements, since we don't know if this
2971 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2972 * immediate realloc on the next call.
2975 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
2976 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
2979 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
2981 (yy_buffer_stack_max
) = num_to_alloc
;
2982 (yy_buffer_stack_top
) = 0;
2986 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
2988 /* Increase the buffer to prepare for a possible push. */
2989 int grow_size
= 8 /* arbitrary grow size */;
2991 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2992 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
2994 num_to_alloc
* sizeof(struct yy_buffer_state
*)
2997 /* zero only the new slots.*/
2998 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
2999 (yy_buffer_stack_max
) = num_to_alloc
;
3003 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3004 * @param base the character buffer
3005 * @param size the size in bytes of the character buffer
3007 * @return the newly allocated buffer state object.
3009 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
3014 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
3015 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
3016 /* They forgot to leave room for the EOB's. */
3019 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
3021 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3023 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
3024 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
3025 b
->yy_is_our_buffer
= 0;
3026 b
->yy_input_file
= 0;
3027 b
->yy_n_chars
= b
->yy_buf_size
;
3028 b
->yy_is_interactive
= 0;
3030 b
->yy_fill_buffer
= 0;
3031 b
->yy_buffer_status
= YY_BUFFER_NEW
;
3033 yy_switch_to_buffer(b
);
3038 /** Setup the input buffer state to scan a string. The next call to yylex() will
3039 * scan from a @e copy of @a str.
3040 * @param str a NUL-terminated string to scan
3042 * @return the newly allocated buffer state object.
3043 * @note If you want to scan bytes that may contain NUL values, then use
3044 * yy_scan_bytes() instead.
3046 YY_BUFFER_STATE
yy_scan_string (yyconst
char * str
)
3049 return yy_scan_bytes(str
,strlen(str
) );
3052 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3053 * scan from a @e copy of @a bytes.
3054 * @param bytes the byte buffer to scan
3055 * @param len the number of bytes in the buffer pointed to by @a bytes.
3057 * @return the newly allocated buffer state object.
3059 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * bytes
, int len
)
3066 /* Get memory for full buffer, including space for trailing EOB's. */
3068 buf
= (char *) yyalloc(n
);
3070 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3072 for ( i
= 0; i
< len
; ++i
)
3075 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
3077 b
= yy_scan_buffer(buf
,n
);
3079 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3081 /* It's okay to grow etc. this buffer, and we should throw it
3082 * away when we're done.
3084 b
->yy_is_our_buffer
= 1;
3089 #ifndef YY_EXIT_FAILURE
3090 #define YY_EXIT_FAILURE 2
3093 static void yy_fatal_error (yyconst
char* msg
)
3095 (void) fprintf( stderr
, "%s\n", msg
);
3096 exit( YY_EXIT_FAILURE
);
3099 /* Redefine yyless() so it works in section 3 code. */
3105 /* Undo effects of setting up yytext. */ \
3106 int yyless_macro_arg = (n); \
3107 YY_LESS_LINENO(yyless_macro_arg);\
3108 yytext[yyleng] = (yy_hold_char); \
3109 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3110 (yy_hold_char) = *(yy_c_buf_p); \
3111 *(yy_c_buf_p) = '\0'; \
3112 yyleng = yyless_macro_arg; \
3116 /* Accessor methods (get/set functions) to struct members. */
3118 /** Get the input stream.
3121 FILE *yyget_in (void)
3126 /** Get the output stream.
3129 FILE *yyget_out (void)
3134 /** Get the length of the current token.
3137 int yyget_leng (void)
3142 /** Get the current token.
3146 char *yyget_text (void)
3151 /** Set the input stream. This does not discard the current
3153 * @param in_str A readable stream.
3155 * @see yy_switch_to_buffer
3157 void yyset_in (FILE * in_str
)
3162 void yyset_out (FILE * out_str
)
3167 int yyget_debug (void)
3169 return yy_flex_debug
;
3172 void yyset_debug (int bdebug
)
3174 yy_flex_debug
= bdebug
;
3177 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3178 int yylex_destroy (void)
3181 /* Pop the buffer stack, destroying each element. */
3182 while(YY_CURRENT_BUFFER
){
3183 yy_delete_buffer(YY_CURRENT_BUFFER
);
3184 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3185 yypop_buffer_state();
3188 /* Destroy the stack itself. */
3189 yyfree((yy_buffer_stack
) );
3190 (yy_buffer_stack
) = NULL
;
3196 * Internal utility routines.
3200 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
3203 for ( i
= 0; i
< n
; ++i
)
3208 #ifdef YY_NEED_STRLEN
3209 static int yy_flex_strlen (yyconst
char * s
)
3212 for ( n
= 0; s
[n
]; ++n
)
3219 void *yyalloc (yy_size_t size
)
3221 return (void *) malloc( size
);
3224 void *yyrealloc (void * ptr
, yy_size_t size
)
3226 /* The cast to (char *) in the following accommodates both
3227 * implementations that use char* generic pointers, and those
3228 * that use void* generic pointers. It works with the latter
3229 * because both ANSI C and C++ allow castless assignment from
3230 * any pointer type to void*, and deal with argument conversions
3231 * as though doing an assignment.
3233 return (void *) realloc( (char *) ptr
, size
);
3236 void yyfree (void * ptr
)
3238 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
3241 #define YYTABLES_NAME "yytables"
3243 #line 337 "bfin-lex.l"
3246 static long parse_int (char **end
)
3256 while (*arg
&& *arg
== ' ')
3273 case '0': /* Accept different formated integers hex octal and binary. */
3277 if (c
== 'x' || c
== 'X') /* Hex input. */
3279 else if (c
== 'b' || c
== 'B')
3313 char_bag
= "0123456789ABCDEFabcdef";
3319 char_bag
= "01234567";
3328 /* The assembler allows for fractional constants to be created
3329 by either the 0.xxxx or the f#xxxx format
3331 i.e. 0.5 would result in 0x4000
3333 note .5 would result in the identifier .5.
3335 The assembler converts to fractional format 1.15 by the simple rule:
3337 value = (short) (finput * (1 << 15)). */
3349 if (c
>= '0' && c
<= '9')
3351 float digit
= (c
- '0') / pos
;
3352 fval
= fval
+ digit
;
3358 value
= (short) (fval
* (1 << 15));
3374 if (c
>= '0' && c
<= '9')
3375 value
= (value
* 10) + (c
- '0');
3378 /* Constants that are suffixed with k|K are multiplied by 1024
3379 This suffix is only allowed on decimal constants. */
3380 if (c
== 'k' || c
== 'K')
3396 if (c
== 0 || !index (char_bag
, c
))
3403 if (c
>= 'a' && c
<= 'z')
3404 c
= c
- ('a' - '9') + 1;
3405 else if (c
>= 'A' && c
<= 'Z')
3406 c
= c
- ('A' - '9') + 1;
3409 value
= (value
<< shiftvalue
) + c
;
3417 static int parse_reg (Register
*r
, int cl
, char *rt
)
3419 r
->regno
= cl
| (rt
[1] - '0');
3423 static int parse_halfreg (Register
*r
, int cl
, char *rt
)
3425 r
->regno
= cl
| (rt
[1] - '0');
3439 r
->regno
|= F_REG_HIGH
;
3446 /* Our start state is KEYWORD as we have
3447 command keywords such as PREFETCH. */
3450 set_start_state (void)