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 35
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 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 typedef uint64_t flex_uint64_t;
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
59 /* Limits of integral types. */
61 #define INT8_MIN (-128)
64 #define INT16_MIN (-32767-1)
67 #define INT32_MIN (-2147483647-1)
70 #define INT8_MAX (127)
73 #define INT16_MAX (32767)
76 #define INT32_MAX (2147483647)
79 #define UINT8_MAX (255U)
82 #define UINT16_MAX (65535U)
85 #define UINT32_MAX (4294967295U)
88 #endif /* ! FLEXINT_H */
92 /* The "const" storage-class-modifier is valid. */
95 #else /* ! __cplusplus */
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
102 #endif /* defined (__STDC__) */
103 #endif /* ! __cplusplus */
106 #define yyconst const
111 /* Returned upon end-of-file. */
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115 * integer for use as an array index. If the signed char is negative,
116 * we want to instead treat it as an 8-bit unsigned char, hence the
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121 /* Enter a start condition. This macro really ought to take a parameter,
122 * but we do it the disgusting crufty way forced on us by the ()-less
123 * definition of BEGIN.
125 #define BEGIN (yy_start) = 1 + 2 *
127 /* Translate the current start state into a value that can be later handed
128 * to BEGIN to return to the state. The YYSTATE alias is for lex
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin )
140 #define YY_END_OF_BUFFER_CHAR 0
142 /* Size of default input buffer. */
144 #define YY_BUF_SIZE 16384
147 /* The state buf must be large enough to hold one state per character in the main buffer.
149 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
151 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
152 #define YY_TYPEDEF_YY_BUFFER_STATE
153 typedef struct yy_buffer_state *YY_BUFFER_STATE;
156 #ifndef YY_TYPEDEF_YY_SIZE_T
157 #define YY_TYPEDEF_YY_SIZE_T
158 typedef size_t yy_size_t;
161 extern yy_size_t yyleng;
163 extern FILE *yyin, *yyout;
165 #define EOB_ACT_CONTINUE_SCAN 0
166 #define EOB_ACT_END_OF_FILE 1
167 #define EOB_ACT_LAST_MATCH 2
169 #define YY_LESS_LINENO(n)
171 /* Return all but the first "n" matched characters back to the input stream. */
175 /* Undo effects of setting up yytext. */ \
176 int yyless_macro_arg = (n); \
177 YY_LESS_LINENO(yyless_macro_arg);\
178 *yy_cp = (yy_hold_char); \
179 YY_RESTORE_YY_MORE_OFFSET \
180 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
181 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
185 #define unput(c) yyunput( c, (yytext_ptr) )
187 #ifndef YY_STRUCT_YY_BUFFER_STATE
188 #define YY_STRUCT_YY_BUFFER_STATE
189 struct yy_buffer_state
193 char *yy_ch_buf; /* input buffer */
194 char *yy_buf_pos; /* current position in input buffer */
196 /* Size of input buffer in bytes, not including room for EOB
199 yy_size_t yy_buf_size;
201 /* Number of characters read into yy_ch_buf, not including EOB
204 yy_size_t yy_n_chars;
206 /* Whether we "own" the buffer - i.e., we know we created it,
207 * and can realloc() it to grow it, and should free() it to
210 int yy_is_our_buffer;
212 /* Whether this is an "interactive" input source; if so, and
213 * if we're using stdio for input, then we want to use getc()
214 * instead of fread(), to make sure we stop fetching input after
217 int yy_is_interactive;
219 /* Whether we're considered to be at the beginning of a line.
220 * If so, '^' rules will be active on the next match, otherwise
225 int yy_bs_lineno; /**< The line count. */
226 int yy_bs_column; /**< The column count. */
228 /* Whether to try to fill the input buffer when we reach the
233 int yy_buffer_status;
235 #define YY_BUFFER_NEW 0
236 #define YY_BUFFER_NORMAL 1
237 /* When an EOF's been seen but there's still some text to process
238 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
239 * shouldn't try reading from the input source any more. We might
240 * still have a bunch of tokens to match, though, because of
241 * possible backing-up.
243 * When we actually see the EOF, we change the status to "new"
244 * (via yyrestart()), so that the user can continue scanning by
245 * just pointing yyin at a new input file.
247 #define YY_BUFFER_EOF_PENDING 2
250 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
252 /* Stack of input buffers. */
253 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
254 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
255 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
257 /* We provide macros for accessing buffer states in case in the
258 * future we want to put the buffer states in a more general
261 * Returns the top of the stack, or NULL.
263 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
264 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
267 /* Same as previous macro, but useful when we know that the buffer stack is not
268 * NULL or when we need an lvalue. For internal use only.
270 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
272 /* yy_hold_char holds the character lost when yytext is formed. */
273 static char yy_hold_char;
274 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
277 /* Points to current character in buffer. */
278 static char *yy_c_buf_p = (char *) 0;
279 static int yy_init = 0; /* whether we need to initialize */
280 static int yy_start = 0; /* start state number */
282 /* Flag which is used to allow yywrap()'s to do buffer switches
283 * instead of setting up a fresh yyin. A bit of a hack ...
285 static int yy_did_buffer_switch_on_eof;
287 void yyrestart (FILE *input_file );
288 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
289 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
290 void yy_delete_buffer (YY_BUFFER_STATE b );
291 void yy_flush_buffer (YY_BUFFER_STATE b );
292 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
293 void yypop_buffer_state (void );
295 static void yyensure_buffer_stack (void );
296 static void yy_load_buffer_state (void );
297 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
299 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
301 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
302 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
303 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
305 void *yyalloc (yy_size_t );
306 void *yyrealloc (void *,yy_size_t );
307 void yyfree (void * );
309 #define yy_new_buffer yy_create_buffer
311 #define yy_set_interactive(is_interactive) \
313 if ( ! YY_CURRENT_BUFFER ){ \
314 yyensure_buffer_stack (); \
315 YY_CURRENT_BUFFER_LVALUE = \
316 yy_create_buffer(yyin,YY_BUF_SIZE ); \
318 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
321 #define yy_set_bol(at_bol) \
323 if ( ! YY_CURRENT_BUFFER ){\
324 yyensure_buffer_stack (); \
325 YY_CURRENT_BUFFER_LVALUE = \
326 yy_create_buffer(yyin,YY_BUF_SIZE ); \
328 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
333 /* Begin user sect3 */
335 typedef unsigned char YY_CHAR;
337 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
339 typedef int yy_state_type;
346 #define yytext_ptr yytext
348 static yy_state_type yy_get_previous_state (void );
349 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
350 static int yy_get_next_buffer (void );
351 static void yy_fatal_error (yyconst char msg[] );
353 /* Done after the current pattern has been matched and before the
354 * corresponding action - sets up yytext.
356 #define YY_DO_BEFORE_ACTION \
357 (yytext_ptr) = yy_bp; \
358 yyleng = (yy_size_t) (yy_cp - yy_bp); \
359 (yy_hold_char) = *yy_cp; \
361 (yy_c_buf_p) = yy_cp;
363 #define YY_NUM_RULES 239
364 #define YY_END_OF_BUFFER 240
365 /* This struct is not used in this scanner,
366 but its presence is necessary. */
369 flex_int32_t yy_verify;
372 static yyconst flex_int16_t yy_accept[571] =
374 0, 0, 0, 0, 0, 0, 240, 238, 236, 236,
375 221, 234, 220, 219, 201, 202, 217, 215, 212, 211,
376 204, 233, 233, 203, 222, 200, 196, 238, 225, 234,
377 147, 234, 234, 234, 234, 234, 234, 234, 234, 234,
378 234, 234, 234, 234, 54, 234, 234, 234, 12, 10,
379 190, 189, 188, 186, 184, 234, 234, 234, 234, 234,
380 70, 19, 18, 8, 7, 234, 218, 216, 214, 213,
381 0, 210, 205, 0, 0, 0, 233, 235, 0, 199,
382 197, 223, 195, 194, 179, 176, 234, 234, 234, 149,
383 152, 234, 234, 148, 0, 146, 234, 139, 234, 234,
385 135, 234, 125, 234, 123, 234, 234, 234, 234, 234,
386 234, 234, 103, 102, 101, 234, 100, 99, 234, 234,
387 97, 234, 95, 94, 93, 91, 234, 85, 234, 234,
388 77, 86, 234, 71, 69, 234, 234, 234, 234, 65,
389 234, 234, 234, 59, 234, 56, 234, 234, 53, 234,
390 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
391 234, 25, 234, 234, 234, 234, 234, 15, 14, 234,
392 234, 159, 234, 234, 187, 185, 224, 234, 234, 95,
393 234, 234, 234, 206, 208, 207, 209, 0, 0, 233,
394 233, 198, 192, 193, 234, 234, 234, 172, 153, 154,
396 234, 234, 163, 164, 234, 155, 157, 233, 234, 234,
397 234, 234, 234, 234, 124, 234, 234, 119, 234, 234,
398 234, 234, 234, 234, 234, 234, 234, 180, 98, 234,
399 234, 234, 234, 234, 234, 80, 83, 78, 81, 234,
400 234, 234, 79, 82, 234, 67, 66, 234, 63, 62,
401 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
402 44, 39, 38, 37, 36, 35, 34, 234, 32, 31,
403 234, 234, 234, 234, 234, 234, 234, 21, 234, 234,
404 16, 13, 234, 234, 9, 234, 234, 234, 234, 234,
405 234, 237, 191, 171, 169, 178, 177, 170, 168, 175,
407 174, 234, 234, 234, 234, 234, 156, 158, 145, 234,
408 234, 234, 234, 138, 137, 234, 127, 234, 234, 118,
409 234, 234, 234, 234, 111, 110, 234, 234, 234, 234,
410 234, 234, 234, 105, 104, 234, 234, 234, 96, 234,
411 92, 89, 84, 74, 234, 234, 68, 64, 234, 61,
412 60, 58, 57, 234, 55, 45, 234, 50, 47, 49,
413 46, 48, 234, 234, 43, 42, 234, 234, 234, 234,
414 234, 234, 27, 24, 23, 234, 234, 234, 234, 234,
415 234, 229, 234, 228, 234, 234, 173, 234, 234, 234,
416 161, 234, 234, 234, 234, 234, 234, 234, 234, 234,
418 234, 122, 234, 117, 116, 234, 234, 234, 234, 234,
419 234, 234, 234, 108, 234, 234, 234, 234, 234, 234,
420 234, 234, 234, 234, 2, 183, 52, 41, 40, 234,
421 33, 234, 234, 234, 30, 234, 22, 234, 234, 234,
422 234, 232, 234, 234, 234, 234, 234, 234, 165, 162,
423 144, 143, 142, 141, 140, 234, 234, 234, 234, 126,
424 121, 234, 234, 234, 234, 234, 51, 234, 234, 107,
425 234, 234, 234, 234, 234, 88, 87, 90, 234, 234,
426 73, 72, 234, 29, 234, 234, 234, 20, 234, 234,
427 151, 234, 230, 234, 227, 234, 166, 167, 234, 234,
429 234, 234, 234, 234, 120, 234, 114, 113, 234, 234,
430 234, 5, 106, 234, 181, 234, 234, 234, 234, 160,
431 28, 234, 234, 17, 11, 234, 234, 150, 234, 234,
432 134, 133, 132, 129, 234, 115, 234, 6, 109, 234,
433 234, 3, 234, 76, 1, 26, 231, 226, 136, 130,
434 131, 234, 234, 234, 234, 234, 128, 234, 234, 4,
435 75, 234, 234, 112, 234, 234, 234, 234, 182, 0
438 static yyconst flex_int32_t yy_ec[256] =
440 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 2, 4, 1, 5, 6, 7, 8, 1, 9,
444 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
445 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
446 30, 31, 1, 32, 33, 34, 35, 36, 37, 38,
447 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
448 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
449 59, 1, 60, 61, 62, 1, 33, 34, 35, 36,
451 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
452 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
453 57, 58, 1, 63, 1, 64, 1, 6, 6, 6,
454 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
455 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
456 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
457 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
458 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
459 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
460 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
462 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
463 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
464 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
465 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
466 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
470 static yyconst flex_int32_t yy_meta[65] =
472 1, 1, 2, 1, 1, 3, 1, 1, 1, 1,
473 1, 1, 1, 1, 4, 1, 5, 5, 5, 5,
474 5, 5, 5, 5, 5, 5, 1, 1, 1, 1,
475 1, 1, 6, 7, 6, 6, 6, 7, 3, 3,
476 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
477 3, 3, 3, 3, 3, 4, 3, 3, 1, 1,
481 static yyconst flex_int16_t yy_base[577] =
483 0, 0, 27, 28, 32, 40, 666, 667, 667, 667,
484 667, 0, 667, 635, 667, 667, 634, 67, 667, 56,
485 652, 67, 72, 667, 667, 44, 63, 631, 667, 114,
486 168, 67, 99, 33, 89, 70, 111, 157, 608, 209,
487 161, 48, 98, 245, 279, 313, 101, 609, 84, 639,
488 667, 667, 628, 90, 667, 152, 77, 616, 606, 75,
489 235, 0, 175, 0, 0, 0, 667, 667, 667, 667,
490 115, 667, 667, 142, 644, 0, 74, 667, 0, 624,
491 667, 667, 667, 131, 638, 637, 120, 152, 610, 0,
492 0, 190, 165, 0, 0, 635, 597, 0, 611, 600,
494 594, 601, 0, 603, 0, 586, 607, 602, 592, 96,
495 586, 169, 623, 591, 0, 584, 0, 0, 583, 597,
496 618, 588, 0, 0, 580, 0, 585, 614, 172, 174,
497 0, 581, 161, 205, 612, 570, 579, 577, 151, 0,
498 576, 585, 569, 605, 584, 0, 566, 571, 601, 574,
499 562, 577, 560, 236, 561, 577, 562, 187, 556, 566,
500 567, 590, 547, 562, 551, 550, 547, 0, 0, 551,
501 546, 0, 562, 577, 667, 667, 667, 542, 550, 549,
502 546, 195, 547, 667, 667, 667, 667, 579, 148, 0,
503 0, 667, 667, 559, 193, 195, 538, 0, 525, 0,
505 547, 544, 0, 0, 551, 532, 531, 0, 230, 234,
506 527, 530, 542, 534, 0, 531, 532, 271, 528, 541,
507 196, 222, 242, 540, 522, 244, 536, 552, 0, 519,
508 265, 531, 548, 518, 270, 0, 0, 0, 0, 517,
509 512, 522, 0, 0, 273, 0, 0, 514, 0, 0,
510 525, 509, 524, 275, 515, 509, 504, 284, 504, 293,
511 318, 0, 0, 0, 0, 0, 0, 508, 0, 0,
512 503, 501, 501, 512, 503, 283, 502, 0, 512, 494,
513 0, 0, 483, 497, 0, 492, 505, 488, 497, 501,
514 497, 526, 667, 0, 0, 0, 0, 0, 0, 0,
516 0, 484, 500, 488, 495, 480, 0, 0, 0, 487,
517 477, 492, 232, 0, 477, 294, 512, 491, 488, 289,
518 479, 490, 471, 477, 0, 0, 487, 486, 462, 464,
519 464, 479, 481, 0, 0, 477, 488, 461, 0, 448,
520 0, 494, 0, 446, 454, 468, 0, 0, 468, 0,
521 0, 0, 0, 469, 0, 0, 466, 0, 0, 0,
522 0, 0, 483, 484, 0, 0, 455, 463, 463, 445,
523 459, 443, 460, 0, 0, 458, 454, 440, 445, 441,
524 448, 425, 435, 0, 448, 438, 0, 436, 338, 430,
525 0, 431, 424, 427, 434, 425, 436, 427, 441, 427,
527 416, 0, 420, 0, 0, 422, 425, 427, 428, 413,
528 413, 429, 412, 0, 420, 426, 423, 414, 423, 407,
529 315, 177, 408, 403, 0, 0, 0, 0, 0, 407,
530 0, 413, 419, 400, 0, 409, 0, 410, 411, 414,
531 389, 404, 404, 391, 399, 393, 417, 418, 0, 0,
532 0, 0, 0, 0, 0, 397, 302, 402, 388, 0,
533 416, 390, 381, 380, 385, 379, 0, 381, 391, 0,
534 375, 375, 404, 391, 386, 0, 0, 0, 385, 375,
535 0, 0, 384, 0, 367, 381, 365, 0, 364, 359,
536 0, 368, 0, 378, 0, 355, 0, 0, 373, 86,
538 362, 361, 365, 374, 0, 350, 0, 0, 368, 367,
539 351, 0, 0, 356, 0, 335, 330, 339, 341, 0,
540 0, 324, 324, 0, 0, 320, 333, 0, 320, 246,
541 0, 0, 0, 0, 334, 0, 312, 0, 0, 305,
542 309, 0, 314, 0, 0, 0, 0, 0, 0, 0,
543 0, 309, 310, 304, 303, 292, 0, 287, 261, 0,
544 0, 255, 241, 0, 254, 214, 186, 185, 0, 667,
545 378, 382, 389, 179, 392, 395
548 static yyconst flex_int16_t yy_def[577] =
550 570, 1, 1, 1, 1, 1, 570, 570, 570, 570,
551 570, 571, 570, 570, 570, 570, 570, 570, 570, 570,
552 570, 572, 572, 570, 570, 570, 570, 570, 570, 571,
553 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
554 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
555 570, 570, 570, 570, 570, 571, 38, 40, 44, 571,
556 571, 46, 571, 571, 571, 571, 570, 570, 570, 570,
557 570, 570, 570, 570, 573, 574, 23, 570, 575, 570,
558 570, 570, 570, 570, 571, 571, 571, 571, 571, 571,
559 571, 571, 571, 571, 576, 571, 571, 571, 571, 571,
561 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
562 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
563 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
564 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
565 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
566 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
567 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
568 571, 571, 571, 571, 570, 570, 570, 571, 571, 571,
569 571, 571, 571, 570, 570, 570, 570, 573, 573, 574,
570 575, 570, 570, 570, 571, 571, 571, 571, 571, 571,
572 571, 571, 571, 571, 571, 571, 571, 576, 571, 571,
573 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
574 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
575 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
576 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
577 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
578 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
579 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
580 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
581 571, 573, 570, 571, 571, 571, 571, 571, 571, 571,
583 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
584 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
585 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
586 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
587 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
588 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
589 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
590 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
591 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
592 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
594 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
595 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
596 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
597 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
598 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
599 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
600 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
601 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
602 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
603 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
605 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
606 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
607 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
608 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
609 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
610 571, 571, 571, 571, 571, 571, 571, 571, 571, 571,
611 571, 571, 571, 571, 571, 571, 571, 571, 571, 0,
612 570, 570, 570, 570, 570, 570
615 static yyconst flex_int16_t yy_nxt[732] =
617 8, 9, 10, 11, 8, 12, 13, 14, 15, 16,
618 17, 18, 19, 20, 12, 21, 22, 23, 23, 23,
619 23, 23, 23, 23, 23, 23, 24, 25, 26, 27,
620 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
621 38, 39, 12, 40, 41, 42, 43, 44, 12, 45,
622 46, 47, 48, 49, 50, 12, 12, 12, 51, 52,
623 53, 12, 54, 55, 56, 56, 82, 57, 57, 72,
624 58, 58, 80, 81, 59, 59, 61, 111, 69, 60,
625 60, 76, 62, 63, 61, 73, 570, 64, 112, 65,
626 62, 63, 83, 95, 139, 64, 70, 65, 140, 102,
628 78, 103, 95, 95, 78, 78, 115, 570, 530, 78,
629 104, 570, 179, 105, 180, 95, 116, 106, 74, 176,
630 183, 117, 79, 107, 171, 170, 184, 570, 185, 71,
631 85, 86, 108, 531, 172, 109, 113, 166, 167, 110,
632 168, 114, 141, 142, 169, 173, 220, 87, 88, 221,
633 143, 118, 177, 186, 119, 187, 95, 89, 189, 90,
634 193, 194, 91, 292, 92, 120, 197, 93, 199, 200,
635 198, 94, 95, 121, 121, 121, 121, 135, 135, 135,
636 135, 206, 207, 190, 96, 96, 96, 96, 236, 237,
637 238, 239, 122, 136, 123, 178, 124, 241, 249, 113,
639 242, 137, 250, 223, 114, 569, 138, 125, 97, 126,
640 479, 166, 167, 480, 168, 98, 224, 99, 169, 271,
641 225, 243, 244, 100, 101, 128, 128, 128, 128, 202,
642 568, 290, 294, 203, 298, 272, 295, 567, 299, 204,
643 257, 205, 129, 130, 325, 131, 326, 296, 297, 300,
644 301, 135, 135, 135, 135, 132, 327, 328, 329, 133,
645 134, 144, 144, 144, 144, 144, 144, 136, 310, 309,
646 395, 566, 263, 309, 330, 137, 264, 145, 311, 146,
647 138, 265, 396, 334, 312, 313, 266, 335, 147, 331,
648 550, 267, 565, 551, 148, 149, 149, 149, 149, 149,
650 149, 149, 149, 320, 339, 321, 564, 563, 339, 343,
651 322, 150, 347, 343, 352, 151, 347, 356, 352, 500,
652 501, 502, 374, 356, 152, 153, 375, 356, 404, 358,
653 154, 155, 405, 359, 562, 363, 364, 561, 360, 560,
654 398, 399, 559, 361, 558, 156, 400, 157, 362, 158,
655 159, 557, 160, 161, 556, 447, 448, 365, 476, 555,
656 162, 366, 449, 163, 164, 477, 554, 553, 552, 165,
657 478, 549, 548, 547, 546, 545, 544, 543, 542, 367,
658 66, 66, 66, 66, 66, 77, 77, 541, 77, 188,
659 540, 188, 188, 188, 188, 188, 191, 191, 191, 208,
661 208, 208, 539, 538, 537, 536, 535, 534, 533, 532,
662 529, 528, 527, 526, 525, 524, 523, 522, 521, 520,
663 519, 518, 517, 516, 515, 514, 513, 512, 511, 510,
664 509, 508, 507, 506, 505, 504, 503, 499, 498, 497,
665 496, 495, 494, 493, 492, 491, 490, 489, 488, 487,
666 486, 485, 484, 483, 482, 481, 475, 474, 473, 472,
667 471, 470, 469, 468, 467, 466, 465, 464, 463, 462,
668 461, 460, 459, 458, 457, 456, 455, 454, 453, 452,
669 451, 450, 446, 445, 444, 443, 420, 442, 441, 440,
670 439, 438, 437, 436, 435, 434, 433, 432, 431, 430,
672 429, 428, 427, 426, 425, 424, 423, 422, 421, 420,
673 419, 418, 417, 416, 415, 414, 413, 412, 411, 410,
674 409, 408, 407, 406, 403, 402, 401, 397, 394, 393,
675 392, 391, 390, 389, 388, 387, 189, 386, 385, 384,
676 383, 382, 381, 380, 379, 378, 377, 376, 373, 372,
677 371, 370, 369, 368, 357, 355, 354, 353, 351, 350,
678 349, 348, 346, 345, 344, 342, 341, 340, 338, 337,
679 336, 333, 332, 324, 323, 319, 318, 317, 316, 315,
680 314, 308, 307, 306, 305, 304, 303, 302, 293, 189,
681 291, 289, 288, 287, 286, 285, 284, 283, 282, 281,
683 280, 279, 278, 277, 276, 275, 274, 273, 270, 269,
684 268, 262, 261, 260, 259, 258, 257, 256, 255, 254,
685 253, 252, 251, 248, 247, 246, 245, 240, 235, 234,
686 233, 232, 231, 230, 229, 228, 227, 226, 222, 219,
687 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,
688 201, 196, 195, 192, 189, 182, 181, 175, 174, 170,
689 127, 84, 75, 68, 67, 570, 7, 570, 570, 570,
690 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
691 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
692 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
694 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
695 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
696 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
700 static yyconst flex_int16_t yy_chk[732] =
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, 1,
706 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
707 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
708 1, 1, 1, 1, 3, 4, 27, 3, 4, 20,
709 3, 4, 26, 26, 3, 4, 5, 34, 18, 3,
710 4, 22, 5, 5, 6, 20, 23, 5, 34, 5,
711 6, 6, 27, 35, 42, 6, 18, 6, 42, 32,
713 22, 32, 43, 33, 22, 23, 36, 77, 500, 23,
714 32, 77, 57, 32, 57, 37, 36, 32, 20, 54,
715 60, 36, 22, 32, 49, 60, 71, 23, 71, 18,
716 30, 30, 33, 500, 49, 33, 35, 47, 47, 33,
717 47, 35, 43, 43, 47, 49, 110, 30, 30, 110,
718 43, 37, 54, 74, 37, 74, 56, 30, 189, 30,
719 84, 84, 30, 189, 30, 37, 87, 30, 88, 88,
720 87, 30, 31, 38, 38, 38, 38, 41, 41, 41,
721 41, 93, 93, 574, 31, 31, 31, 31, 129, 129,
722 130, 130, 38, 41, 38, 56, 38, 133, 139, 56,
724 133, 41, 139, 112, 56, 568, 41, 38, 31, 38,
725 422, 63, 63, 422, 63, 31, 112, 31, 63, 158,
726 112, 134, 134, 31, 31, 40, 40, 40, 40, 92,
727 567, 182, 195, 92, 196, 158, 195, 566, 196, 92,
728 182, 92, 40, 40, 221, 40, 221, 195, 195, 196,
729 196, 61, 61, 61, 61, 40, 222, 222, 222, 40,
730 40, 44, 44, 44, 44, 44, 44, 61, 210, 209,
731 313, 565, 154, 209, 223, 61, 154, 44, 210, 44,
732 61, 154, 313, 226, 210, 210, 154, 226, 44, 223,
733 530, 154, 563, 530, 44, 45, 45, 45, 45, 45,
735 45, 45, 45, 218, 231, 218, 562, 559, 231, 235,
736 218, 45, 245, 235, 254, 45, 245, 258, 254, 457,
737 457, 457, 276, 258, 45, 45, 276, 258, 320, 260,
738 45, 46, 320, 260, 558, 261, 261, 556, 260, 555,
739 316, 316, 554, 260, 553, 46, 316, 46, 260, 46,
740 46, 552, 46, 46, 543, 389, 389, 261, 421, 541,
741 46, 261, 389, 46, 46, 421, 540, 537, 535, 46,
742 421, 529, 527, 526, 523, 522, 519, 518, 517, 261,
743 571, 571, 571, 571, 571, 572, 572, 516, 572, 573,
744 514, 573, 573, 573, 573, 573, 575, 575, 575, 576,
746 576, 576, 511, 510, 509, 506, 504, 503, 502, 501,
747 499, 496, 494, 492, 490, 489, 487, 486, 485, 483,
748 480, 479, 475, 474, 473, 472, 471, 469, 468, 466,
749 465, 464, 463, 462, 461, 459, 458, 456, 448, 447,
750 446, 445, 444, 443, 442, 441, 440, 439, 438, 436,
751 434, 433, 432, 430, 424, 423, 420, 419, 418, 417,
752 416, 415, 413, 412, 411, 410, 409, 408, 407, 406,
753 403, 401, 400, 399, 398, 397, 396, 395, 394, 393,
754 392, 390, 388, 386, 385, 383, 382, 381, 380, 379,
755 378, 377, 376, 373, 372, 371, 370, 369, 368, 367,
757 364, 363, 357, 354, 349, 346, 345, 344, 342, 340,
758 338, 337, 336, 333, 332, 331, 330, 329, 328, 327,
759 324, 323, 322, 321, 319, 318, 317, 315, 312, 311,
760 310, 306, 305, 304, 303, 302, 292, 291, 290, 289,
761 288, 287, 286, 284, 283, 280, 279, 277, 275, 274,
762 273, 272, 271, 268, 259, 257, 256, 255, 253, 252,
763 251, 248, 242, 241, 240, 234, 233, 232, 230, 228,
764 227, 225, 224, 220, 219, 217, 216, 214, 213, 212,
765 211, 207, 206, 205, 202, 201, 199, 197, 194, 188,
766 183, 181, 180, 179, 178, 174, 173, 171, 170, 167,
768 166, 165, 164, 163, 162, 161, 160, 159, 157, 156,
769 155, 153, 152, 151, 150, 149, 148, 147, 145, 144,
770 143, 142, 141, 138, 137, 136, 135, 132, 128, 127,
771 125, 122, 121, 120, 119, 116, 114, 113, 111, 109,
772 108, 107, 106, 104, 102, 101, 100, 99, 97, 96,
773 89, 86, 85, 80, 75, 59, 58, 53, 50, 48,
774 39, 28, 21, 17, 14, 7, 570, 570, 570, 570,
775 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
776 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
777 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
779 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
780 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
781 570, 570, 570, 570, 570, 570, 570, 570, 570, 570,
785 static yy_state_type yy_last_accepting_state;
786 static char *yy_last_accepting_cpos;
788 extern int yy_flex_debug;
789 int yy_flex_debug = 0;
791 /* The intent behind this definition is that it'll catch
792 * any uses of REJECT which flex missed.
794 #define REJECT reject_used_but_not_detected
795 #define yymore() yymore_used_but_not_detected
796 #define YY_MORE_ADJ 0
797 #define YY_RESTORE_YY_MORE_OFFSET
800 /* bfin-lex.l ADI Blackfin lexer
801 Copyright (C) 2005-2014 Free Software Foundation, Inc.
803 This file is part of GAS, the GNU Assembler.
805 GAS is free software; you can redistribute it and/or modify
806 it under the terms of the GNU General Public License as published by
807 the Free Software Foundation; either version 3, or (at your option)
810 GAS is distributed in the hope that it will be useful,
811 but WITHOUT ANY WARRANTY; without even the implied warranty of
812 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
813 GNU General Public License for more details.
815 You should have received a copy of the GNU General Public License
816 along with GAS; see the file COPYING. If not, write to the Free
817 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
819 #line 21 "bfin-lex.l"
822 #include "bfin-defs.h"
823 #include "bfin-parse.h"
825 static long parse_int (char **end);
826 static int parse_halfreg (Register *r, int cl, char *hr);
827 static int parse_reg (Register *r, int type, char *rt);
830 #define _REG yylval.reg
833 /* Define Start States ... Actually we will use exclusion.
834 If no start state is specified it should match any state
835 and <INITIAL> would match some keyword rules only with
839 #line 840 "bfin-lex.c"
845 #ifndef YY_NO_UNISTD_H
846 /* Special case for "unistd.h", since it is non-ANSI. We include it way
847 * down here because we want the user's section 1 to have been scanned first.
848 * The user has a chance to override it with an option.
853 #ifndef YY_EXTRA_TYPE
854 #define YY_EXTRA_TYPE void *
857 static int yy_init_globals (void );
859 /* Accessor methods to globals.
860 These are made visible to non-reentrant scanners for convenience. */
862 int yylex_destroy (void );
864 int yyget_debug (void );
866 void yyset_debug (int debug_flag );
868 YY_EXTRA_TYPE yyget_extra (void );
870 void yyset_extra (YY_EXTRA_TYPE user_defined );
872 FILE *yyget_in (void );
874 void yyset_in (FILE * in_str );
876 FILE *yyget_out (void );
878 void yyset_out (FILE * out_str );
880 yy_size_t yyget_leng (void );
882 char *yyget_text (void );
884 int yyget_lineno (void );
886 void yyset_lineno (int line_number );
888 /* Macros after this point can all be overridden by user definitions in
892 #ifndef YY_SKIP_YYWRAP
894 extern "C" int yywrap (void );
896 extern int yywrap (void );
900 static void yyunput (int c,char *buf_ptr );
903 static void yy_flex_strncpy (char *,yyconst char *,int );
906 #ifdef YY_NEED_STRLEN
907 static int yy_flex_strlen (yyconst char * );
913 static int yyinput (void );
915 static int input (void );
920 /* Amount of stuff to slurp up with each read. */
921 #ifndef YY_READ_BUF_SIZE
922 #define YY_READ_BUF_SIZE 8192
925 /* Copy whatever the last rule matched to the standard output. */
927 /* This used to be an fputs(), but since the string might contain NUL's,
928 * we now use fwrite().
930 #define ECHO fwrite( yytext, yyleng, 1, yyout )
933 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
934 * is returned in "result".
937 #define YY_INPUT(buf,result,max_size) \
938 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
942 for ( n = 0; n < max_size && \
943 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
946 buf[n++] = (char) c; \
947 if ( c == EOF && ferror( yyin ) ) \
948 YY_FATAL_ERROR( "input in flex scanner failed" ); \
954 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
956 if( errno != EINTR) \
958 YY_FATAL_ERROR( "input in flex scanner failed" ); \
969 /* No semi-colon after return; correct usage is to write "yyterminate();" -
970 * we don't want an extra ';' after the "return" because that will cause
971 * some compilers to complain about unreachable statements.
974 #define yyterminate() return YY_NULL
977 /* Number of entries by which start-condition stack grows. */
978 #ifndef YY_START_STACK_INCR
979 #define YY_START_STACK_INCR 25
982 /* Report a fatal error. */
983 #ifndef YY_FATAL_ERROR
984 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
987 /* end tables serialization structures and prototypes */
989 /* Default declaration of generated scanner - a define so the user can
990 * easily add parameters.
993 #define YY_DECL_IS_OURS 1
995 extern int yylex (void);
997 #define YY_DECL int yylex (void)
998 #endif /* !YY_DECL */
1000 /* Code executed at the beginning of each rule, after yytext and yyleng
1003 #ifndef YY_USER_ACTION
1004 #define YY_USER_ACTION
1007 /* Code executed at the end of each rule. */
1009 #define YY_BREAK break;
1012 #define YY_RULE_SETUP \
1015 /** The main scanner function which does all the work.
1019 register yy_state_type yy_current_state;
1020 register char *yy_cp, *yy_bp;
1021 register int yy_act;
1023 #line 43 "bfin-lex.l"
1025 #line 1026 "bfin-lex.c"
1036 (yy_start) = 1; /* first start state */
1044 if ( ! YY_CURRENT_BUFFER ) {
1045 yyensure_buffer_stack ();
1046 YY_CURRENT_BUFFER_LVALUE =
1047 yy_create_buffer(yyin,YY_BUF_SIZE );
1050 yy_load_buffer_state( );
1053 while ( 1 ) /* loops until end-of-file is reached */
1055 yy_cp = (yy_c_buf_p);
1057 /* Support of yytext. */
1058 *yy_cp = (yy_hold_char);
1060 /* yy_bp points to the position in yy_ch_buf of the start of
1065 yy_current_state = (yy_start);
1069 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1070 if ( yy_accept[yy_current_state] )
1072 (yy_last_accepting_state) = yy_current_state;
1073 (yy_last_accepting_cpos) = yy_cp;
1075 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1077 yy_current_state = (int) yy_def[yy_current_state];
1078 if ( yy_current_state >= 571 )
1079 yy_c = yy_meta[(unsigned int) yy_c];
1081 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1084 while ( yy_base[yy_current_state] != 667 );
1087 yy_act = yy_accept[yy_current_state];
1089 { /* have to back up */
1090 yy_cp = (yy_last_accepting_cpos);
1091 yy_current_state = (yy_last_accepting_state);
1092 yy_act = yy_accept[yy_current_state];
1095 YY_DO_BEFORE_ACTION;
1097 do_action: /* This label is used only to access EOF actions. */
1100 { /* beginning of action switch */
1101 case 0: /* must back up */
1102 /* undo the effects of YY_DO_BEFORE_ACTION */
1103 *yy_cp = (yy_hold_char);
1104 yy_cp = (yy_last_accepting_cpos);
1105 yy_current_state = (yy_last_accepting_state);
1106 goto yy_find_action;
1110 #line 44 "bfin-lex.l"
1111 _REG.regno = REG_sftreset; return REG;
1115 #line 45 "bfin-lex.l"
1116 _REG.regno = REG_omode; return REG;
1120 #line 46 "bfin-lex.l"
1121 _REG.regno = REG_idle_req; return REG;
1125 #line 47 "bfin-lex.l"
1126 _REG.regno = REG_hwerrcause; return REG;
1130 #line 48 "bfin-lex.l"
1131 _REG.regno = REG_excause; return REG;
1135 #line 49 "bfin-lex.l"
1136 _REG.regno = REG_emucause; return REG;
1140 #line 50 "bfin-lex.l"
1145 #line 51 "bfin-lex.l"
1150 #line 52 "bfin-lex.l"
1151 yylval.value = M_W32; return MMOD;
1155 #line 53 "bfin-lex.l"
1160 #line 54 "bfin-lex.l"
1165 #line 55 "bfin-lex.l"
1166 return V; /* Special: V is a statflag and a modifier. */
1170 #line 56 "bfin-lex.l"
1171 _REG.regno = REG_USP; return REG;
1175 #line 57 "bfin-lex.l"
1180 #line 58 "bfin-lex.l"
1185 #line 59 "bfin-lex.l"
1186 yylval.value = M_TFU; return MMOD;
1190 #line 60 "bfin-lex.l"
1195 #line 61 "bfin-lex.l"
1196 yylval.value = M_T; return MMOD;
1200 #line 62 "bfin-lex.l"
1205 #line 63 "bfin-lex.l"
1206 _REG.regno = REG_SYSCFG; return REG;
1210 #line 64 "bfin-lex.l"
1215 #line 65 "bfin-lex.l"
1220 #line 66 "bfin-lex.l"
1221 _REG.regno = REG_SP; _REG.flags = F_REG_LOW; return HALF_REG;
1225 #line 67 "bfin-lex.l"
1226 _REG.regno = REG_SP; _REG.flags = F_REG_HIGH; return HALF_REG;
1230 #line 68 "bfin-lex.l"
1231 _REG.regno = REG_SP; return REG;
1235 #line 69 "bfin-lex.l"
1240 #line 70 "bfin-lex.l"
1245 #line 71 "bfin-lex.l"
1246 _REG.regno = REG_SEQSTAT; return REG;
1250 #line 72 "bfin-lex.l"
1255 #line 73 "bfin-lex.l"
1260 #line 74 "bfin-lex.l"
1265 #line 76 "bfin-lex.l"
1270 #line 77 "bfin-lex.l"
1271 yylval.value = M_S2RND; return MMOD;
1275 #line 78 "bfin-lex.l"
1280 #line 79 "bfin-lex.l"
1285 #line 80 "bfin-lex.l"
1290 #line 81 "bfin-lex.l"
1295 #line 82 "bfin-lex.l"
1300 #line 83 "bfin-lex.l"
1305 #line 84 "bfin-lex.l"
1310 #line 85 "bfin-lex.l"
1315 #line 86 "bfin-lex.l"
1320 #line 87 "bfin-lex.l"
1325 #line 88 "bfin-lex.l"
1330 #line 90 "bfin-lex.l"
1331 return parse_halfreg(&yylval.reg, T_REG_R, yytext);
1335 #line 92 "bfin-lex.l"
1336 _REG.regno = REG_RETS; return REG;
1340 #line 93 "bfin-lex.l"
1341 _REG.regno = REG_RETI; return REG;
1345 #line 94 "bfin-lex.l"
1346 _REG.regno = REG_RETX; return REG;
1350 #line 95 "bfin-lex.l"
1351 _REG.regno = REG_RETN; return REG;
1355 #line 96 "bfin-lex.l"
1356 _REG.regno = REG_RETE; return REG;
1360 #line 97 "bfin-lex.l"
1361 _REG.regno = REG_EMUDAT; return REG;
1365 #line 98 "bfin-lex.l"
1370 #line 100 "bfin-lex.l"
1371 return parse_reg (&yylval.reg, T_REG_R, yytext);
1375 #line 102 "bfin-lex.l"
1380 #line 103 "bfin-lex.l"
1385 #line 104 "bfin-lex.l"
1390 #line 105 "bfin-lex.l"
1395 #line 107 "bfin-lex.l"
1396 return parse_halfreg (&yylval.reg, T_REG_P, yytext);
1400 #line 108 "bfin-lex.l"
1401 return parse_reg (&yylval.reg, T_REG_P, yytext);
1405 #line 110 "bfin-lex.l"
1410 #line 111 "bfin-lex.l"
1415 #line 113 "bfin-lex.l"
1420 #line 114 "bfin-lex.l"
1425 #line 115 "bfin-lex.l"
1430 #line 116 "bfin-lex.l"
1435 #line 119 "bfin-lex.l"
1440 #line 120 "bfin-lex.l"
1445 #line 122 "bfin-lex.l"
1446 return parse_halfreg (&yylval.reg, T_REG_M, yytext);
1450 #line 123 "bfin-lex.l"
1451 return parse_reg (&yylval.reg, T_REG_M, yytext);
1455 #line 125 "bfin-lex.l"
1460 #line 126 "bfin-lex.l"
1465 #line 127 "bfin-lex.l"
1470 #line 128 "bfin-lex.l"
1475 #line 129 "bfin-lex.l"
1480 #line 130 "bfin-lex.l"
1485 #line 131 "bfin-lex.l"
1490 #line 133 "bfin-lex.l"
1495 #line 134 "bfin-lex.l"
1496 _REG.regno = REG_LC0; return REG;
1500 #line 135 "bfin-lex.l"
1501 _REG.regno = REG_LT0; return REG;
1505 #line 136 "bfin-lex.l"
1506 _REG.regno = REG_LB0; return REG;
1510 #line 137 "bfin-lex.l"
1511 _REG.regno = REG_LC1; return REG;
1515 #line 138 "bfin-lex.l"
1516 _REG.regno = REG_LT1; return REG;
1520 #line 139 "bfin-lex.l"
1521 _REG.regno = REG_LB1; return REG;
1525 #line 141 "bfin-lex.l"
1526 return parse_halfreg (&yylval.reg, T_REG_L, yytext);
1530 #line 142 "bfin-lex.l"
1531 return parse_reg (&yylval.reg, T_REG_L, yytext);
1535 #line 143 "bfin-lex.l"
1540 #line 144 "bfin-lex.l"
1541 { BEGIN 0; return JUMP_DOT_S;}
1545 #line 145 "bfin-lex.l"
1546 { BEGIN 0; return JUMP_DOT_L;}
1550 #line 146 "bfin-lex.l"
1551 { BEGIN 0; return JUMP;}
1555 #line 147 "bfin-lex.l"
1556 { BEGIN 0; return JUMP_DOT_L; }
1560 #line 148 "bfin-lex.l"
1561 yylval.value = M_IU; return MMOD;
1565 #line 149 "bfin-lex.l"
1566 yylval.value = M_ISS2; return MMOD;
1570 #line 150 "bfin-lex.l"
1571 yylval.value = M_IS; return MMOD;
1575 #line 151 "bfin-lex.l"
1576 yylval.value = M_IH; return MMOD;
1580 #line 152 "bfin-lex.l"
1585 #line 153 "bfin-lex.l"
1586 return parse_halfreg (&yylval.reg, T_REG_I, yytext);
1590 #line 154 "bfin-lex.l"
1591 return parse_reg (&yylval.reg, T_REG_I, yytext);
1595 #line 155 "bfin-lex.l"
1600 #line 156 "bfin-lex.l"
1605 #line 157 "bfin-lex.l"
1610 #line 158 "bfin-lex.l"
1615 #line 159 "bfin-lex.l"
1616 yylval.value = M_FU; return MMOD;
1620 #line 160 "bfin-lex.l"
1621 _REG.regno = REG_FP; return REG;
1625 #line 161 "bfin-lex.l"
1626 _REG.regno = REG_FP; _REG.flags = F_REG_LOW; return HALF_REG;
1630 #line 162 "bfin-lex.l"
1631 _REG.regno = REG_FP; _REG.flags = F_REG_HIGH; return HALF_REG;
1635 #line 164 "bfin-lex.l"
1640 #line 165 "bfin-lex.l"
1645 #line 166 "bfin-lex.l"
1650 #line 167 "bfin-lex.l"
1655 #line 168 "bfin-lex.l"
1660 #line 169 "bfin-lex.l"
1665 #line 170 "bfin-lex.l"
1666 return DISALGNEXCPT;
1670 #line 171 "bfin-lex.l"
1675 #line 172 "bfin-lex.l"
1680 #line 173 "bfin-lex.l"
1685 #line 174 "bfin-lex.l"
1690 #line 175 "bfin-lex.l"
1695 #line 176 "bfin-lex.l"
1700 #line 177 "bfin-lex.l"
1705 #line 178 "bfin-lex.l"
1706 { _REG.regno = REG_CYCLES2; return REG; }
1710 #line 179 "bfin-lex.l"
1711 { _REG.regno = REG_CYCLES; return REG; }
1715 #line 180 "bfin-lex.l"
1720 #line 181 "bfin-lex.l"
1725 #line 182 "bfin-lex.l"
1730 #line 184 "bfin-lex.l"
1731 _REG.regno = REG_CC; return CCREG;
1735 #line 185 "bfin-lex.l"
1736 { BEGIN 0; return CALL;}
1740 #line 186 "bfin-lex.l"
1741 { BEGIN 0; return CALL;}
1745 #line 187 "bfin-lex.l"
1750 #line 188 "bfin-lex.l"
1755 #line 189 "bfin-lex.l"
1760 #line 190 "bfin-lex.l"
1765 #line 191 "bfin-lex.l"
1770 #line 192 "bfin-lex.l"
1775 #line 193 "bfin-lex.l"
1780 #line 194 "bfin-lex.l"
1785 #line 195 "bfin-lex.l"
1790 #line 196 "bfin-lex.l"
1795 #line 198 "bfin-lex.l"
1800 #line 199 "bfin-lex.l"
1805 #line 200 "bfin-lex.l"
1810 #line 201 "bfin-lex.l"
1815 #line 202 "bfin-lex.l"
1820 #line 203 "bfin-lex.l"
1825 #line 204 "bfin-lex.l"
1830 #line 205 "bfin-lex.l"
1831 return parse_halfreg (&yylval.reg, T_REG_B, yytext);
1835 #line 206 "bfin-lex.l"
1836 return parse_reg (&yylval.reg, T_REG_B, yytext);
1840 #line 207 "bfin-lex.l"
1845 #line 208 "bfin-lex.l"
1846 _REG.regno = S_AZ; return STATUS_REG;
1850 #line 209 "bfin-lex.l"
1851 _REG.regno = S_AN; return STATUS_REG;
1855 #line 210 "bfin-lex.l"
1856 _REG.regno = S_AC0_COPY; return STATUS_REG;
1860 #line 211 "bfin-lex.l"
1861 _REG.regno = S_V_COPY; return STATUS_REG;
1865 #line 212 "bfin-lex.l"
1866 _REG.regno = S_AQ; return STATUS_REG;
1870 #line 213 "bfin-lex.l"
1871 _REG.regno = S_AC0; return STATUS_REG;
1875 #line 214 "bfin-lex.l"
1876 _REG.regno = S_AC1; return STATUS_REG;
1880 #line 215 "bfin-lex.l"
1881 _REG.regno = S_AV0; return STATUS_REG;
1885 #line 216 "bfin-lex.l"
1886 _REG.regno = S_AV0S; return STATUS_REG;
1890 #line 217 "bfin-lex.l"
1891 _REG.regno = S_AV1; return STATUS_REG;
1895 #line 218 "bfin-lex.l"
1896 _REG.regno = S_AV1S; return STATUS_REG;
1900 #line 219 "bfin-lex.l"
1901 _REG.regno = S_VS; return STATUS_REG;
1905 #line 220 "bfin-lex.l"
1906 _REG.regno = S_RND_MOD; return STATUS_REG;
1910 #line 223 "bfin-lex.l"
1911 _REG.regno = REG_ASTAT; return REG;
1915 #line 224 "bfin-lex.l"
1920 #line 225 "bfin-lex.l"
1925 #line 226 "bfin-lex.l"
1930 #line 227 "bfin-lex.l"
1935 #line 228 "bfin-lex.l"
1940 #line 229 "bfin-lex.l"
1945 #line 230 "bfin-lex.l"
1950 #line 231 "bfin-lex.l"
1951 return A_ZERO_DOT_L;
1955 #line 232 "bfin-lex.l"
1960 #line 233 "bfin-lex.l"
1961 return A_ZERO_DOT_H;
1965 #line 234 "bfin-lex.l"
1970 #line 235 "bfin-lex.l"
1975 #line 236 "bfin-lex.l"
1976 _REG.regno = REG_A1x; return REG;
1980 #line 237 "bfin-lex.l"
1981 _REG.regno = REG_A1w; return REG;
1985 #line 238 "bfin-lex.l"
1986 _REG.regno = REG_A1; return REG_A_DOUBLE_ONE;
1990 #line 239 "bfin-lex.l"
1991 _REG.regno = REG_A0x; return REG;
1995 #line 240 "bfin-lex.l"
1996 _REG.regno = REG_A0w; return REG;
2000 #line 241 "bfin-lex.l"
2001 _REG.regno = REG_A0; return REG_A_DOUBLE_ZERO;
2005 #line 242 "bfin-lex.l"
2010 #line 243 "bfin-lex.l"
2015 #line 244 "bfin-lex.l"
2016 return FUNCDESC_GOT17M4;
2020 #line 245 "bfin-lex.l"
2025 #line 248 "bfin-lex.l"
2030 #line 249 "bfin-lex.l"
2035 #line 250 "bfin-lex.l"
2040 #line 251 "bfin-lex.l"
2041 return _CARET_ASSIGN;
2045 #line 252 "bfin-lex.l"
2050 #line 253 "bfin-lex.l"
2055 #line 254 "bfin-lex.l"
2060 #line 255 "bfin-lex.l"
2061 return _GREATER_GREATER_GREATER_THAN_ASSIGN;
2065 #line 256 "bfin-lex.l"
2066 return _GREATER_GREATER_ASSIGN;
2070 #line 257 "bfin-lex.l"
2071 return _GREATER_GREATER_GREATER;
2075 #line 258 "bfin-lex.l"
2076 return GREATER_GREATER;
2080 #line 259 "bfin-lex.l"
2081 return _ASSIGN_ASSIGN;
2085 #line 260 "bfin-lex.l"
2090 #line 261 "bfin-lex.l"
2091 return _LESS_THAN_ASSIGN;
2095 #line 262 "bfin-lex.l"
2096 return _LESS_LESS_ASSIGN;
2100 #line 263 "bfin-lex.l"
2105 #line 264 "bfin-lex.l"
2110 #line 265 "bfin-lex.l"
2111 BEGIN(FLAGS); return LPAREN;
2115 #line 266 "bfin-lex.l"
2116 BEGIN(INITIAL); return RPAREN;
2120 #line 267 "bfin-lex.l"
2125 #line 268 "bfin-lex.l"
2130 #line 269 "bfin-lex.l"
2131 return _MINUS_ASSIGN;
2135 #line 270 "bfin-lex.l"
2136 return _PLUS_BAR_PLUS;
2140 #line 271 "bfin-lex.l"
2141 return _MINUS_BAR_PLUS;
2145 #line 272 "bfin-lex.l"
2146 return _PLUS_BAR_MINUS;
2150 #line 273 "bfin-lex.l"
2151 return _MINUS_BAR_MINUS;
2155 #line 274 "bfin-lex.l"
2156 return _MINUS_MINUS;
2160 #line 275 "bfin-lex.l"
2165 #line 276 "bfin-lex.l"
2170 #line 277 "bfin-lex.l"
2171 return _PLUS_ASSIGN;
2175 #line 278 "bfin-lex.l"
2180 #line 279 "bfin-lex.l"
2185 #line 280 "bfin-lex.l"
2186 return _STAR_ASSIGN;
2190 #line 281 "bfin-lex.l"
2195 #line 282 "bfin-lex.l"
2196 return _AMPERSAND_ASSIGN;
2200 #line 283 "bfin-lex.l"
2205 #line 284 "bfin-lex.l"
2210 #line 285 "bfin-lex.l"
2215 #line 286 "bfin-lex.l"
2220 #line 287 "bfin-lex.l"
2221 return _ASSIGN_BANG;
2225 #line 288 "bfin-lex.l"
2230 #line 289 "bfin-lex.l"
2235 #line 290 "bfin-lex.l"
2240 #line 291 "bfin-lex.l"
2245 #line 292 "bfin-lex.l"
2250 #line 293 "bfin-lex.l"
2255 #line 294 "bfin-lex.l"
2260 #line 295 "bfin-lex.l"
2265 #line 296 "bfin-lex.l"
2270 #line 297 "bfin-lex.l"
2272 yylval.value = parse_int (&yytext);
2278 #line 301 "bfin-lex.l"
2280 yylval.symbol = symbol_find_or_make (yytext);
2281 symbol_mark_used (yylval.symbol);
2287 #line 306 "bfin-lex.l"
2290 char *ref = strdup (yytext);
2291 if (ref[1] == 'b' || ref[1] == 'B')
2293 name = fb_label_name ((int) (ref[0] - '0'), 0);
2294 yylval.symbol = symbol_find (name);
2296 if ((yylval.symbol != NULL)
2297 && (S_IS_DEFINED (yylval.symbol)))
2299 as_bad ("backward reference to unknown label %d:",
2300 (int) (ref[0] - '0'));
2302 else if (ref[1] == 'f' || ref[1] == 'F')
2304 /* Forward reference. Expect symbol to be undefined or
2305 unknown. undefined: seen it before. unknown: never seen
2308 Construct a local label name, then an undefined symbol.
2309 Just return it as never seen before. */
2311 name = fb_label_name ((int) (ref[0] - '0'), 1);
2312 yylval.symbol = symbol_find_or_make (name);
2313 /* We have no need to check symbol properties. */
2319 /* rule 236 can match eol */
2321 #line 335 "bfin-lex.l"
2326 #line 336 "bfin-lex.l"
2331 #line 337 "bfin-lex.l"
2336 #line 338 "bfin-lex.l"
2339 #line 2340 "bfin-lex.c"
2340 case YY_STATE_EOF(INITIAL):
2341 case YY_STATE_EOF(KEYWORD):
2342 case YY_STATE_EOF(FLAGS):
2345 case YY_END_OF_BUFFER:
2347 /* Amount of text matched not including the EOB char. */
2348 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2350 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2351 *yy_cp = (yy_hold_char);
2352 YY_RESTORE_YY_MORE_OFFSET
2354 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2356 /* We're scanning a new file or input source. It's
2357 * possible that this happened because the user
2358 * just pointed yyin at a new source and called
2359 * yylex(). If so, then we have to assure
2360 * consistency between YY_CURRENT_BUFFER and our
2361 * globals. Here is the right place to do so, because
2362 * this is the first action (other than possibly a
2363 * back-up) that will match for the new input source.
2365 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2366 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2367 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2370 /* Note that here we test for yy_c_buf_p "<=" to the position
2371 * of the first EOB in the buffer, since yy_c_buf_p will
2372 * already have been incremented past the NUL character
2373 * (since all states make transitions on EOB to the
2374 * end-of-buffer state). Contrast this with the test
2377 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2378 { /* This was really a NUL. */
2379 yy_state_type yy_next_state;
2381 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2383 yy_current_state = yy_get_previous_state( );
2385 /* Okay, we're now positioned to make the NUL
2386 * transition. We couldn't have
2387 * yy_get_previous_state() go ahead and do it
2388 * for us because it doesn't know how to deal
2389 * with the possibility of jamming (and we don't
2390 * want to build jamming into it because then it
2391 * will run more slowly).
2394 yy_next_state = yy_try_NUL_trans( yy_current_state );
2396 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2398 if ( yy_next_state )
2400 /* Consume the NUL. */
2401 yy_cp = ++(yy_c_buf_p);
2402 yy_current_state = yy_next_state;
2408 yy_cp = (yy_c_buf_p);
2409 goto yy_find_action;
2413 else switch ( yy_get_next_buffer( ) )
2415 case EOB_ACT_END_OF_FILE:
2417 (yy_did_buffer_switch_on_eof) = 0;
2421 /* Note: because we've taken care in
2422 * yy_get_next_buffer() to have set up
2423 * yytext, we can now set up
2424 * yy_c_buf_p so that if some total
2425 * hoser (like flex itself) wants to
2426 * call the scanner after we return the
2427 * YY_NULL, it'll still work - another
2428 * YY_NULL will get returned.
2430 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2432 yy_act = YY_STATE_EOF(YY_START);
2438 if ( ! (yy_did_buffer_switch_on_eof) )
2444 case EOB_ACT_CONTINUE_SCAN:
2446 (yytext_ptr) + yy_amount_of_matched_text;
2448 yy_current_state = yy_get_previous_state( );
2450 yy_cp = (yy_c_buf_p);
2451 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2454 case EOB_ACT_LAST_MATCH:
2456 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2458 yy_current_state = yy_get_previous_state( );
2460 yy_cp = (yy_c_buf_p);
2461 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2462 goto yy_find_action;
2469 "fatal flex scanner internal error--no action found" );
2470 } /* end of action switch */
2471 } /* end of scanning one token */
2472 } /* end of yylex */
2474 /* yy_get_next_buffer - try to read in a new buffer
2476 * Returns a code representing an action:
2477 * EOB_ACT_LAST_MATCH -
2478 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2479 * EOB_ACT_END_OF_FILE - end of file
2481 static int yy_get_next_buffer (void)
2483 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2484 register char *source = (yytext_ptr);
2485 register int number_to_move, i;
2488 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2490 "fatal flex scanner internal error--end of buffer missed" );
2492 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2493 { /* Don't try to fill the buffer, so this is an EOF. */
2494 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2496 /* We matched a single character, the EOB, so
2497 * treat this as a final EOF.
2499 return EOB_ACT_END_OF_FILE;
2504 /* We matched some text prior to the EOB, first
2507 return EOB_ACT_LAST_MATCH;
2511 /* Try to read more data. */
2513 /* First move last chars to start of buffer. */
2514 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2516 for ( i = 0; i < number_to_move; ++i )
2517 *(dest++) = *(source++);
2519 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2520 /* don't do the read, it's not guaranteed to return an EOF,
2523 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2527 yy_size_t num_to_read =
2528 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2530 while ( num_to_read <= 0 )
2531 { /* Not enough room in the buffer - grow it. */
2533 /* just a shorter name for the current buffer */
2534 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2536 int yy_c_buf_p_offset =
2537 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2539 if ( b->yy_is_our_buffer )
2541 yy_size_t new_size = b->yy_buf_size * 2;
2543 if ( new_size <= 0 )
2544 b->yy_buf_size += b->yy_buf_size / 8;
2546 b->yy_buf_size *= 2;
2548 b->yy_ch_buf = (char *)
2549 /* Include room in for 2 EOB chars. */
2550 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2553 /* Can't grow it, we don't own it. */
2556 if ( ! b->yy_ch_buf )
2558 "fatal error - scanner input buffer overflow" );
2560 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2562 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2567 if ( num_to_read > YY_READ_BUF_SIZE )
2568 num_to_read = YY_READ_BUF_SIZE;
2570 /* Read in more data. */
2571 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2572 (yy_n_chars), num_to_read );
2574 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2577 if ( (yy_n_chars) == 0 )
2579 if ( number_to_move == YY_MORE_ADJ )
2581 ret_val = EOB_ACT_END_OF_FILE;
2587 ret_val = EOB_ACT_LAST_MATCH;
2588 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2589 YY_BUFFER_EOF_PENDING;
2594 ret_val = EOB_ACT_CONTINUE_SCAN;
2596 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2597 /* Extend the array by 50%, plus the number we really need. */
2598 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2599 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2600 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2601 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2604 (yy_n_chars) += number_to_move;
2605 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2606 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2608 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2613 /* yy_get_previous_state - get the state just before the EOB char was reached */
2615 static yy_state_type yy_get_previous_state (void)
2617 register yy_state_type yy_current_state;
2618 register char *yy_cp;
2620 yy_current_state = (yy_start);
2622 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2624 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2625 if ( yy_accept[yy_current_state] )
2627 (yy_last_accepting_state) = yy_current_state;
2628 (yy_last_accepting_cpos) = yy_cp;
2630 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2632 yy_current_state = (int) yy_def[yy_current_state];
2633 if ( yy_current_state >= 571 )
2634 yy_c = yy_meta[(unsigned int) yy_c];
2636 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2639 return yy_current_state;
2642 /* yy_try_NUL_trans - try to make a transition on the NUL character
2645 * next_state = yy_try_NUL_trans( current_state );
2647 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2649 register int yy_is_jam;
2650 register char *yy_cp = (yy_c_buf_p);
2652 register YY_CHAR yy_c = 1;
2653 if ( yy_accept[yy_current_state] )
2655 (yy_last_accepting_state) = yy_current_state;
2656 (yy_last_accepting_cpos) = yy_cp;
2658 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2660 yy_current_state = (int) yy_def[yy_current_state];
2661 if ( yy_current_state >= 571 )
2662 yy_c = yy_meta[(unsigned int) yy_c];
2664 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2665 yy_is_jam = (yy_current_state == 570);
2667 return yy_is_jam ? 0 : yy_current_state;
2670 static void yyunput (int c, register char * yy_bp )
2672 register char *yy_cp;
2674 yy_cp = (yy_c_buf_p);
2676 /* undo effects of setting up yytext */
2677 *yy_cp = (yy_hold_char);
2679 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2680 { /* need to shift things up to make room */
2681 /* +2 for EOB chars. */
2682 register yy_size_t number_to_move = (yy_n_chars) + 2;
2683 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2684 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2685 register char *source =
2686 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2688 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2689 *--dest = *--source;
2691 yy_cp += (int) (dest - source);
2692 yy_bp += (int) (dest - source);
2693 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2694 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2696 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2697 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2700 *--yy_cp = (char) c;
2702 (yytext_ptr) = yy_bp;
2703 (yy_hold_char) = *yy_cp;
2704 (yy_c_buf_p) = yy_cp;
2709 static int yyinput (void)
2711 static int input (void)
2717 *(yy_c_buf_p) = (yy_hold_char);
2719 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2721 /* yy_c_buf_p now points to the character we want to return.
2722 * If this occurs *before* the EOB characters, then it's a
2723 * valid NUL; if not, then we've hit the end of the buffer.
2725 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2726 /* This was really a NUL. */
2727 *(yy_c_buf_p) = '\0';
2730 { /* need more input */
2731 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2734 switch ( yy_get_next_buffer( ) )
2736 case EOB_ACT_LAST_MATCH:
2737 /* This happens because yy_g_n_b()
2738 * sees that we've accumulated a
2739 * token and flags that we need to
2740 * try matching the token before
2741 * proceeding. But for input(),
2742 * there's no matching to consider.
2743 * So convert the EOB_ACT_LAST_MATCH
2744 * to EOB_ACT_END_OF_FILE.
2747 /* Reset buffer status. */
2752 case EOB_ACT_END_OF_FILE:
2757 if ( ! (yy_did_buffer_switch_on_eof) )
2766 case EOB_ACT_CONTINUE_SCAN:
2767 (yy_c_buf_p) = (yytext_ptr) + offset;
2773 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2774 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2775 (yy_hold_char) = *++(yy_c_buf_p);
2779 #endif /* ifndef YY_NO_INPUT */
2781 /** Immediately switch to a different input stream.
2782 * @param input_file A readable stream.
2784 * @note This function does not reset the start condition to @c INITIAL .
2786 void yyrestart (FILE * input_file )
2789 if ( ! YY_CURRENT_BUFFER ){
2790 yyensure_buffer_stack ();
2791 YY_CURRENT_BUFFER_LVALUE =
2792 yy_create_buffer(yyin,YY_BUF_SIZE );
2795 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2796 yy_load_buffer_state( );
2799 /** Switch to a different input buffer.
2800 * @param new_buffer The new input buffer.
2803 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2806 /* TODO. We should be able to replace this entire function body
2808 * yypop_buffer_state();
2809 * yypush_buffer_state(new_buffer);
2811 yyensure_buffer_stack ();
2812 if ( YY_CURRENT_BUFFER == new_buffer )
2815 if ( YY_CURRENT_BUFFER )
2817 /* Flush out information for old buffer. */
2818 *(yy_c_buf_p) = (yy_hold_char);
2819 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2820 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2823 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2824 yy_load_buffer_state( );
2826 /* We don't actually know whether we did this switch during
2827 * EOF (yywrap()) processing, but the only time this flag
2828 * is looked at is after yywrap() is called, so it's safe
2829 * to go ahead and always set it.
2831 (yy_did_buffer_switch_on_eof) = 1;
2834 static void yy_load_buffer_state (void)
2836 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2837 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2838 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2839 (yy_hold_char) = *(yy_c_buf_p);
2842 /** Allocate and initialize an input buffer state.
2843 * @param file A readable stream.
2844 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2846 * @return the allocated buffer state.
2848 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2852 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2854 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2856 b->yy_buf_size = size;
2858 /* yy_ch_buf has to be 2 characters longer than the size given because
2859 * we need to put in 2 end-of-buffer characters.
2861 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2862 if ( ! b->yy_ch_buf )
2863 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2865 b->yy_is_our_buffer = 1;
2867 yy_init_buffer(b,file );
2872 /** Destroy the buffer.
2873 * @param b a buffer created with yy_create_buffer()
2876 void yy_delete_buffer (YY_BUFFER_STATE b )
2882 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2883 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2885 if ( b->yy_is_our_buffer )
2886 yyfree((void *) b->yy_ch_buf );
2888 yyfree((void *) b );
2892 extern int isatty (int );
2893 #endif /* __cplusplus */
2895 /* Initializes or reinitializes a buffer.
2896 * This function is sometimes called more than once on the same buffer,
2897 * such as during a yyrestart() or at EOF.
2899 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2904 yy_flush_buffer(b );
2906 b->yy_input_file = file;
2907 b->yy_fill_buffer = 1;
2909 /* If b is the current buffer, then yy_init_buffer was _probably_
2910 * called from yyrestart() or through yy_get_next_buffer.
2911 * In that case, we don't want to reset the lineno or column.
2913 if (b != YY_CURRENT_BUFFER){
2914 b->yy_bs_lineno = 1;
2915 b->yy_bs_column = 0;
2918 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2923 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2924 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2927 void yy_flush_buffer (YY_BUFFER_STATE b )
2934 /* We always need two end-of-buffer characters. The first causes
2935 * a transition to the end-of-buffer state. The second causes
2936 * a jam in that state.
2938 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2939 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2941 b->yy_buf_pos = &b->yy_ch_buf[0];
2944 b->yy_buffer_status = YY_BUFFER_NEW;
2946 if ( b == YY_CURRENT_BUFFER )
2947 yy_load_buffer_state( );
2950 /** Pushes the new state onto the stack. The new state becomes
2951 * the current state. This function will allocate the stack
2953 * @param new_buffer The new state.
2956 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2958 if (new_buffer == NULL)
2961 yyensure_buffer_stack();
2963 /* This block is copied from yy_switch_to_buffer. */
2964 if ( YY_CURRENT_BUFFER )
2966 /* Flush out information for old buffer. */
2967 *(yy_c_buf_p) = (yy_hold_char);
2968 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2969 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2972 /* Only push if top exists. Otherwise, replace top. */
2973 if (YY_CURRENT_BUFFER)
2974 (yy_buffer_stack_top)++;
2975 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2977 /* copied from yy_switch_to_buffer. */
2978 yy_load_buffer_state( );
2979 (yy_did_buffer_switch_on_eof) = 1;
2982 /** Removes and deletes the top of the stack, if present.
2983 * The next element becomes the new top.
2986 void yypop_buffer_state (void)
2988 if (!YY_CURRENT_BUFFER)
2991 yy_delete_buffer(YY_CURRENT_BUFFER );
2992 YY_CURRENT_BUFFER_LVALUE = NULL;
2993 if ((yy_buffer_stack_top) > 0)
2994 --(yy_buffer_stack_top);
2996 if (YY_CURRENT_BUFFER) {
2997 yy_load_buffer_state( );
2998 (yy_did_buffer_switch_on_eof) = 1;
3002 /* Allocates the stack if it does not exist.
3003 * Guarantees space for at least one push.
3005 static void yyensure_buffer_stack (void)
3007 yy_size_t num_to_alloc;
3009 if (!(yy_buffer_stack)) {
3011 /* First allocation is just for 2 elements, since we don't know if this
3012 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3013 * immediate realloc on the next call.
3016 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3017 (num_to_alloc * sizeof(struct yy_buffer_state*)
3019 if ( ! (yy_buffer_stack) )
3020 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3022 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3024 (yy_buffer_stack_max) = num_to_alloc;
3025 (yy_buffer_stack_top) = 0;
3029 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3031 /* Increase the buffer to prepare for a possible push. */
3032 int grow_size = 8 /* arbitrary grow size */;
3034 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3035 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3037 num_to_alloc * sizeof(struct yy_buffer_state*)
3039 if ( ! (yy_buffer_stack) )
3040 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3042 /* zero only the new slots.*/
3043 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3044 (yy_buffer_stack_max) = num_to_alloc;
3048 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3049 * @param base the character buffer
3050 * @param size the size in bytes of the character buffer
3052 * @return the newly allocated buffer state object.
3054 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3059 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3060 base[size-1] != YY_END_OF_BUFFER_CHAR )
3061 /* They forgot to leave room for the EOB's. */
3064 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3066 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3068 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3069 b->yy_buf_pos = b->yy_ch_buf = base;
3070 b->yy_is_our_buffer = 0;
3071 b->yy_input_file = 0;
3072 b->yy_n_chars = b->yy_buf_size;
3073 b->yy_is_interactive = 0;
3075 b->yy_fill_buffer = 0;
3076 b->yy_buffer_status = YY_BUFFER_NEW;
3078 yy_switch_to_buffer(b );
3083 /** Setup the input buffer state to scan a string. The next call to yylex() will
3084 * scan from a @e copy of @a str.
3085 * @param yystr a NUL-terminated string to scan
3087 * @return the newly allocated buffer state object.
3088 * @note If you want to scan bytes that may contain NUL values, then use
3089 * yy_scan_bytes() instead.
3091 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
3094 return yy_scan_bytes(yystr,strlen(yystr) );
3097 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3098 * scan from a @e copy of @a bytes.
3099 * @param bytes the byte buffer to scan
3100 * @param len the number of bytes in the buffer pointed to by @a bytes.
3102 * @return the newly allocated buffer state object.
3104 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
3110 /* Get memory for full buffer, including space for trailing EOB's. */
3111 n = _yybytes_len + 2;
3112 buf = (char *) yyalloc(n );
3114 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3116 for ( i = 0; i < _yybytes_len; ++i )
3117 buf[i] = yybytes[i];
3119 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3121 b = yy_scan_buffer(buf,n );
3123 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3125 /* It's okay to grow etc. this buffer, and we should throw it
3126 * away when we're done.
3128 b->yy_is_our_buffer = 1;
3133 #ifndef YY_EXIT_FAILURE
3134 #define YY_EXIT_FAILURE 2
3137 static void yy_fatal_error (yyconst char* msg )
3139 (void) fprintf( stderr, "%s\n", msg );
3140 exit( YY_EXIT_FAILURE );
3143 /* Redefine yyless() so it works in section 3 code. */
3149 /* Undo effects of setting up yytext. */ \
3150 int yyless_macro_arg = (n); \
3151 YY_LESS_LINENO(yyless_macro_arg);\
3152 yytext[yyleng] = (yy_hold_char); \
3153 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3154 (yy_hold_char) = *(yy_c_buf_p); \
3155 *(yy_c_buf_p) = '\0'; \
3156 yyleng = yyless_macro_arg; \
3160 /* Accessor methods (get/set functions) to struct members. */
3162 /** Get the current line number.
3165 int yyget_lineno (void)
3171 /** Get the input stream.
3174 FILE *yyget_in (void)
3179 /** Get the output stream.
3182 FILE *yyget_out (void)
3187 /** Get the length of the current token.
3190 yy_size_t yyget_leng (void)
3195 /** Get the current token.
3199 char *yyget_text (void)
3204 /** Set the current line number.
3205 * @param line_number
3208 void yyset_lineno (int line_number )
3211 yylineno = line_number;
3214 /** Set the input stream. This does not discard the current
3216 * @param in_str A readable stream.
3218 * @see yy_switch_to_buffer
3220 void yyset_in (FILE * in_str )
3225 void yyset_out (FILE * out_str )
3230 int yyget_debug (void)
3232 return yy_flex_debug;
3235 void yyset_debug (int bdebug )
3237 yy_flex_debug = bdebug ;
3240 static int yy_init_globals (void)
3242 /* Initialization is the same as for the non-reentrant scanner.
3243 * This function is called from yylex_destroy(), so don't allocate here.
3246 (yy_buffer_stack) = 0;
3247 (yy_buffer_stack_top) = 0;
3248 (yy_buffer_stack_max) = 0;
3249 (yy_c_buf_p) = (char *) 0;
3253 /* Defined in main.c */
3262 /* For future reference: Set errno on error, since we are called by
3268 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3269 int yylex_destroy (void)
3272 /* Pop the buffer stack, destroying each element. */
3273 while(YY_CURRENT_BUFFER){
3274 yy_delete_buffer(YY_CURRENT_BUFFER );
3275 YY_CURRENT_BUFFER_LVALUE = NULL;
3276 yypop_buffer_state();
3279 /* Destroy the stack itself. */
3280 yyfree((yy_buffer_stack) );
3281 (yy_buffer_stack) = NULL;
3283 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3284 * yylex() is called, initialization will occur. */
3291 * Internal utility routines.
3295 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3298 for ( i = 0; i < n; ++i )
3303 #ifdef YY_NEED_STRLEN
3304 static int yy_flex_strlen (yyconst char * s )
3307 for ( n = 0; s[n]; ++n )
3314 void *yyalloc (yy_size_t size )
3316 return (void *) malloc( size );
3319 void *yyrealloc (void * ptr, yy_size_t size )
3321 /* The cast to (char *) in the following accommodates both
3322 * implementations that use char* generic pointers, and those
3323 * that use void* generic pointers. It works with the latter
3324 * because both ANSI C and C++ allow castless assignment from
3325 * any pointer type to void*, and deal with argument conversions
3326 * as though doing an assignment.
3328 return (void *) realloc( (char *) ptr, size );
3331 void yyfree (void * ptr )
3333 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3336 #define YYTABLES_NAME "yytables"
3338 #line 338 "bfin-lex.l"
3341 static long parse_int (char **end)
3350 while (*arg && *arg == ' ')
3367 case '0': /* Accept different formated integers hex octal and binary. */
3371 if (c == 'x' || c == 'X') /* Hex input. */
3373 else if (c == 'b' || c == 'B')
3407 char_bag = "0123456789ABCDEFabcdef";
3413 char_bag = "01234567";
3422 /* The assembler allows for fractional constants to be created
3423 by either the 0.xxxx or the f#xxxx format
3425 i.e. 0.5 would result in 0x4000
3427 note .5 would result in the identifier .5.
3429 The assembler converts to fractional format 1.15 by the simple rule:
3431 value = (short) (finput * (1 << 15)). */
3443 if (c >= '0' && c <= '9')
3445 float digit = (c - '0') / pos;
3446 fval = fval + digit;
3452 value = (short) (fval * (1 << 15));
3468 if (c >= '0' && c <= '9')
3469 value = (value * 10) + (c - '0');
3472 /* Constants that are suffixed with k|K are multiplied by 1024
3473 This suffix is only allowed on decimal constants. */
3474 if (c == 'k' || c == 'K')
3490 if (c == 0 || !strchr (char_bag, c))
3497 if (c >= 'a' && c <= 'z')
3498 c = c - ('a' - '9') + 1;
3499 else if (c >= 'A' && c <= 'Z')
3500 c = c - ('A' - '9') + 1;
3503 value = (value << shiftvalue) + c;
3511 static int parse_reg (Register *r, int cl, char *rt)
3513 r->regno = cl | (rt[1] - '0');
3514 r->flags = F_REG_NONE;
3518 static int parse_halfreg (Register *r, int cl, char *rt)
3520 r->regno = cl | (rt[1] - '0');
3530 r->flags = F_REG_LOW;
3535 r->flags = F_REG_HIGH;
3542 /* Our start state is KEYWORD as we have
3543 command keywords such as PREFETCH. */
3546 set_start_state (void)