5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 33
13 #if YY_FLEX_SUBMINOR_VERSION > 0
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
25 /* end standard C headers. */
27 /* flex integer type definitions */
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_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 */
101 #endif /* __STDC__ */
102 #endif /* ! __cplusplus */
105 #define yyconst const
110 /* Returned upon end-of-file. */
113 /* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 /* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
124 #define BEGIN (yy_start) = 1 + 2 *
126 /* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
130 #define YY_START (((yy_start) - 1) / 2)
131 #define YYSTATE YY_START
133 /* Action number for EOF rule of a given start state. */
134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136 /* Special action meaning "start processing a new file". */
137 #define YY_NEW_FILE llvmAsmrestart(llvmAsmin )
139 #define YY_END_OF_BUFFER_CHAR 0
141 /* Size of default input buffer. */
143 #define YY_BUF_SIZE (16384*64)
146 /* The state buf must be large enough to hold one state per character in the main buffer.
148 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151 #define YY_TYPEDEF_YY_BUFFER_STATE
152 typedef struct yy_buffer_state *YY_BUFFER_STATE;
155 extern int llvmAsmleng;
157 extern FILE *llvmAsmin, *llvmAsmout;
159 #define EOB_ACT_CONTINUE_SCAN 0
160 #define EOB_ACT_END_OF_FILE 1
161 #define EOB_ACT_LAST_MATCH 2
163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE llvmAsmlex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
170 #define YY_LESS_LINENO(n) \
173 for ( yyl = n; yyl < llvmAsmleng; ++yyl )\
174 if ( llvmAsmtext[yyl] == '\n' )\
178 /* Return all but the first "n" matched characters back to the input stream. */
182 /* Undo effects of setting up llvmAsmtext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
186 YY_RESTORE_YY_MORE_OFFSET \
187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \
192 #define unput(c) yyunput( c, (yytext_ptr) )
194 /* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
199 #ifndef YY_TYPEDEF_YY_SIZE_T
200 #define YY_TYPEDEF_YY_SIZE_T
201 typedef unsigned int yy_size_t;
204 #ifndef YY_STRUCT_YY_BUFFER_STATE
205 #define YY_STRUCT_YY_BUFFER_STATE
206 struct yy_buffer_state
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
213 /* Size of input buffer in bytes, not including room for EOB
216 yy_size_t yy_buf_size;
218 /* Number of characters read into yy_ch_buf, not including EOB
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
227 int yy_is_our_buffer;
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
234 int yy_is_interactive;
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
245 /* Whether to try to fill the input buffer when we reach the
250 int yy_buffer_status;
252 #define YY_BUFFER_NEW 0
253 #define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
260 * When we actually see the EOF, we change the status to "new"
261 * (via llvmAsmrestart()), so that the user can continue scanning by
262 * just pointing llvmAsmin at a new input file.
264 #define YY_BUFFER_EOF_PENDING 2
267 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
269 /* Stack of input buffers. */
270 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
274 /* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
278 * Returns the top of the stack, or NULL.
280 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
284 /* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
287 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
289 /* yy_hold_char holds the character lost when llvmAsmtext is formed. */
290 static char yy_hold_char;
291 static int yy_n_chars; /* number of characters read into yy_ch_buf */
294 /* Points to current character in buffer. */
295 static char *yy_c_buf_p = (char *) 0;
296 static int yy_init = 0; /* whether we need to initialize */
297 static int yy_start = 0; /* start state number */
299 /* Flag which is used to allow llvmAsmwrap()'s to do buffer switches
300 * instead of setting up a fresh llvmAsmin. A bit of a hack ...
302 static int yy_did_buffer_switch_on_eof;
304 void llvmAsmrestart (FILE *input_file );
305 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306 YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size );
307 void llvmAsm_delete_buffer (YY_BUFFER_STATE b );
308 void llvmAsm_flush_buffer (YY_BUFFER_STATE b );
309 void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer );
310 void llvmAsmpop_buffer_state (void );
312 static void llvmAsmensure_buffer_stack (void );
313 static void llvmAsm_load_buffer_state (void );
314 static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file );
316 #define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
318 YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size );
319 YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str );
320 YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len );
322 void *llvmAsmalloc (yy_size_t );
323 void *llvmAsmrealloc (void *,yy_size_t );
324 void llvmAsmfree (void * );
326 #define yy_new_buffer llvmAsm_create_buffer
328 #define yy_set_interactive(is_interactive) \
330 if ( ! YY_CURRENT_BUFFER ){ \
331 llvmAsmensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
338 #define yy_set_bol(at_bol) \
340 if ( ! YY_CURRENT_BUFFER ){\
341 llvmAsmensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
350 /* Begin user sect3 */
352 #define llvmAsmwrap(n) 1
353 #define YY_SKIP_YYWRAP
355 typedef unsigned char YY_CHAR;
357 FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0;
359 typedef int yy_state_type;
361 extern int llvmAsmlineno;
363 int llvmAsmlineno = 1;
365 extern char *llvmAsmtext;
366 #define yytext_ptr llvmAsmtext
368 static yy_state_type yy_get_previous_state (void );
369 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
370 static int yy_get_next_buffer (void );
371 static void yy_fatal_error (yyconst char msg[] );
373 /* Done after the current pattern has been matched and before the
374 * corresponding action - sets up llvmAsmtext.
376 #define YY_DO_BEFORE_ACTION \
377 (yytext_ptr) = yy_bp; \
378 llvmAsmleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
381 (yy_c_buf_p) = yy_cp;
383 #define YY_NUM_RULES 137
384 #define YY_END_OF_BUFFER 138
385 /* This struct is not used in this scanner,
386 but its presence is necessary. */
389 flex_int32_t yy_verify;
392 static yyconst flex_int16_t yy_accept[552] =
394 0, 0, 138, 136, 135, 135, 136, 136, 136, 136,
395 136, 136, 128, 128, 1, 136, 136, 136, 136, 136,
396 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
397 136, 136, 136, 136, 136, 136, 136, 136, 0, 126,
398 0, 124, 122, 131, 0, 129, 0, 133, 128, 0,
399 1, 0, 123, 132, 0, 0, 0, 0, 0, 0,
400 0, 108, 0, 37, 0, 0, 0, 0, 0, 0,
401 71, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
403 0, 72, 0, 0, 0, 0, 0, 0, 0, 67,
405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 24, 0, 0, 0,
407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
408 0, 0, 126, 122, 133, 21, 133, 0, 134, 0,
409 127, 123, 54, 0, 0, 66, 0, 0, 35, 0,
410 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
411 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
413 0, 0, 0, 0, 0, 56, 0, 0, 0, 81,
414 86, 84, 85, 83, 82, 0, 87, 91, 0, 107,
416 0, 0, 0, 0, 0, 76, 74, 63, 0, 0,
417 0, 75, 73, 0, 0, 55, 0, 0, 0, 0,
418 0, 0, 0, 0, 89, 80, 78, 0, 79, 77,
419 0, 90, 88, 0, 0, 0, 0, 0, 0, 0,
420 0, 68, 0, 0, 125, 133, 0, 0, 0, 133,
421 0, 0, 0, 0, 65, 0, 0, 92, 0, 0,
422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
423 0, 70, 59, 0, 0, 0, 0, 115, 62, 0,
424 0, 0, 69, 0, 0, 0, 0, 0, 0, 0,
425 116, 64, 0, 0, 0, 0, 23, 0, 0, 130,
427 58, 0, 0, 95, 0, 0, 0, 61, 44, 0,
428 0, 25, 0, 0, 0, 4, 0, 51, 57, 0,
429 0, 0, 0, 60, 0, 47, 0, 12, 0, 0,
430 94, 133, 33, 31, 0, 0, 2, 0, 0, 0,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
432 0, 48, 97, 0, 0, 0, 0, 0, 0, 43,
433 0, 0, 0, 0, 50, 0, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 117, 0, 0,
435 0, 0, 93, 0, 22, 0, 0, 0, 0, 0,
436 0, 0, 114, 0, 0, 40, 0, 0, 0, 7,
438 0, 0, 0, 49, 0, 0, 39, 101, 100, 0,
439 0, 8, 16, 0, 0, 0, 110, 0, 113, 34,
440 0, 0, 52, 0, 0, 105, 0, 0, 99, 109,
441 26, 0, 27, 98, 0, 111, 106, 0, 0, 0,
442 0, 0, 104, 0, 0, 6, 28, 0, 0, 0,
443 0, 0, 96, 0, 0, 0, 0, 0, 0, 0,
444 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,
445 0, 9, 0, 0, 0, 0, 18, 0, 0, 0,
446 10, 102, 11, 46, 45, 103, 0, 0, 0, 0,
447 30, 0, 0, 0, 13, 0, 15, 14, 0, 0,
449 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
450 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
451 0, 17, 0, 0, 0, 0, 0, 112, 0, 0,
452 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
453 118, 120, 121, 0, 41, 0, 119, 42, 0, 20,
457 static yyconst flex_int32_t yy_ec[256] =
459 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
460 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
463 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
464 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
465 1, 1, 1, 16, 17, 17, 17, 17, 18, 17,
466 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
467 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
468 1, 1, 1, 1, 19, 1, 20, 21, 22, 23,
470 24, 25, 26, 27, 28, 5, 29, 30, 31, 32,
471 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
472 43, 44, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 static yyconst flex_int32_t yy_meta[45] =
491 1, 1, 2, 3, 4, 1, 1, 4, 4, 4,
492 4, 4, 4, 5, 1, 1, 4, 4, 4, 4,
493 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
494 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
498 static yyconst flex_int16_t yy_base[560] =
500 0, 0, 1201, 1202, 1202, 1202, 1196, 1185, 35, 39,
501 43, 49, 55, 61, 0, 72, 64, 67, 66, 86,
502 76, 106, 91, 65, 133, 121, 117, 99, 152, 95,
503 78, 179, 137, 211, 139, 90, 148, 93, 1194, 1202,
504 1183, 1202, 0, 49, 185, 217, 116, 238, 254, 259,
505 0, 1192, 0, 200, 125, 149, 146, 153, 177, 63,
506 154, 1181, 160, 161, 208, 185, 264, 171, 113, 210,
507 1180, 222, 260, 228, 186, 261, 271, 110, 273, 274,
508 230, 289, 277, 278, 240, 290, 292, 205, 291, 232,
509 296, 1179, 299, 303, 305, 306, 310, 313, 309, 318,
511 311, 314, 317, 322, 328, 329, 338, 331, 335, 339,
512 333, 332, 346, 340, 352, 355, 1178, 358, 360, 361,
513 364, 368, 365, 369, 381, 376, 382, 388, 367, 396,
514 384, 395, 1177, 0, 414, 1176, 429, 447, 0, 1185,
515 1202, 0, 1174, 409, 397, 1173, 420, 414, 1172, 405,
516 399, 422, 1171, 442, 431, 449, 432, 450, 437, 452,
517 456, 1170, 457, 435, 459, 460, 461, 465, 370, 469,
518 468, 472, 470, 475, 473, 476, 489, 490, 492, 494,
519 481, 497, 495, 502, 498, 1169, 503, 501, 505, 1168,
520 1167, 1166, 1165, 1164, 1163, 507, 1162, 1161, 508, 1160,
522 537, 512, 515, 510, 525, 1159, 1158, 1157, 516, 542,
523 531, 1156, 1155, 537, 529, 1154, 553, 555, 231, 556,
524 558, 557, 559, 560, 1153, 1152, 1151, 562, 1150, 1149,
525 563, 1148, 1147, 564, 565, 509, 524, 576, 582, 568,
526 584, 1146, 572, 570, 1202, 599, 608, 614, 618, 623,
527 608, 624, 592, 625, 1145, 626, 587, 1144, 627, 628,
528 629, 630, 632, 633, 634, 637, 639, 638, 640, 580,
529 641, 1143, 1142, 648, 651, 653, 656, 1141, 1140, 657,
530 658, 659, 1139, 665, 661, 663, 667, 674, 666, 668,
531 1138, 1137, 671, 679, 670, 680, 1136, 684, 691, 0,
533 1135, 688, 692, 1134, 693, 696, 697, 1133, 1132, 701,
534 705, 1131, 712, 714, 699, 1130, 716, 1129, 1128, 717,
535 718, 719, 703, 1127, 723, 1126, 726, 1125, 730, 732,
536 1124, 737, 1123, 1122, 731, 738, 1121, 739, 740, 743,
537 751, 742, 744, 752, 755, 756, 758, 760, 761, 1120,
538 763, 1119, 1118, 765, 766, 767, 772, 770, 773, 1117,
539 774, 777, 781, 783, 1116, 784, 788, 787, 789, 790,
540 799, 792, 794, 800, 803, 805, 807, 1115, 808, 810,
541 811, 812, 1114, 815, 1113, 817, 823, 818, 826, 831,
542 828, 829, 1112, 836, 833, 1111, 838, 698, 839, 1110,
544 841, 842, 843, 1109, 848, 844, 1108, 1107, 1106, 851,
545 846, 1105, 1104, 845, 860, 858, 1103, 865, 1102, 1101,
546 867, 869, 1100, 870, 872, 1099, 871, 874, 1098, 1097,
547 1096, 875, 1095, 1094, 878, 1093, 1092, 876, 877, 884,
548 883, 886, 1091, 879, 894, 1090, 1089, 895, 896, 898,
549 899, 901, 1088, 902, 905, 906, 907, 909, 908, 914,
550 910, 1087, 916, 920, 924, 927, 928, 931, 935, 932,
551 936, 1086, 937, 939, 941, 944, 1085, 945, 946, 947,
552 1074, 1064, 1063, 1062, 1061, 1060, 949, 950, 951, 953,
553 1059, 966, 967, 968, 1058, 952, 1057, 1056, 969, 971,
555 972, 977, 978, 979, 980, 983, 984, 985, 987, 1055,
556 989, 991, 992, 995, 997, 1053, 1000, 1007, 998, 1002,
557 1009, 1049, 1010, 1011, 1013, 1015, 1016, 1046, 1022, 1019,
558 1023, 1024, 1026, 1028, 1029, 1045, 1033, 1036, 371, 1030,
559 599, 522, 474, 1039, 434, 1040, 282, 279, 1043, 244,
560 1202, 1079, 1081, 212, 1086, 1089, 167, 1093, 108
563 static yyconst flex_int16_t yy_def[560] =
565 551, 1, 551, 551, 551, 551, 552, 553, 554, 551,
566 553, 553, 553, 553, 555, 556, 553, 553, 553, 553,
567 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
568 553, 553, 553, 553, 553, 553, 553, 553, 552, 551,
569 553, 551, 557, 551, 551, 553, 553, 553, 553, 553,
570 555, 558, 559, 551, 553, 553, 553, 553, 553, 553,
571 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
572 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
573 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
574 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
576 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
577 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
578 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
579 553, 553, 551, 557, 551, 553, 553, 553, 50, 558,
580 551, 559, 553, 553, 553, 553, 553, 553, 553, 553,
581 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
582 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
583 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
584 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
585 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
587 50, 553, 553, 553, 553, 553, 553, 553, 553, 553,
588 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
589 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
590 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
591 553, 553, 553, 553, 551, 551, 551, 551, 553, 553,
592 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
593 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
594 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
595 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
596 553, 553, 553, 553, 553, 553, 553, 553, 553, 201,
598 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
599 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
600 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
601 553, 551, 553, 553, 553, 553, 553, 553, 553, 553,
602 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
603 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
604 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
605 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
606 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
607 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
609 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
610 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
611 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
612 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
613 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
614 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
615 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
616 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
617 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
618 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
620 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
621 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
622 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
623 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
624 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
625 0, 551, 551, 551, 551, 551, 551, 551, 551
628 static yyconst flex_int16_t yy_nxt[1247] =
630 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
631 14, 14, 14, 4, 15, 16, 8, 8, 8, 17,
632 18, 19, 20, 21, 22, 23, 24, 25, 8, 26,
633 27, 28, 29, 30, 8, 31, 32, 33, 34, 35,
634 36, 37, 8, 38, 44, 44, 44, 44, 45, 45,
635 45, 45, 46, 46, 46, 46, 42, 47, 44, 44,
636 44, 44, 42, 48, 49, 49, 49, 49, 42, 48,
637 49, 49, 49, 49, 42, 52, 42, 42, 42, 42,
638 42, 54, 54, 54, 54, 63, 55, 64, 150, 42,
639 60, 42, 81, 56, 61, 57, 50, 58, 65, 42,
641 59, 103, 62, 42, 42, 66, 42, 70, 42, 67,
642 71, 142, 42, 129, 79, 68, 132, 72, 69, 42,
643 80, 101, 92, 42, 136, 73, 42, 74, 75, 42,
644 42, 93, 102, 171, 42, 76, 89, 94, 42, 77,
645 85, 78, 82, 82, 82, 82, 42, 143, 86, 90,
646 42, 161, 42, 87, 83, 91, 115, 88, 127, 42,
647 130, 42, 42, 116, 84, 42, 42, 42, 146, 117,
648 134, 128, 118, 42, 42, 95, 144, 96, 145, 119,
649 131, 97, 153, 98, 42, 99, 147, 100, 104, 152,
650 42, 151, 42, 135, 45, 45, 45, 45, 42, 42,
652 160, 105, 106, 148, 107, 108, 109, 149, 110, 54,
653 54, 54, 54, 167, 111, 43, 112, 113, 42, 114,
654 104, 42, 156, 42, 42, 48, 46, 46, 46, 46,
655 42, 183, 162, 120, 121, 42, 122, 154, 123, 155,
656 124, 42, 125, 42, 42, 42, 126, 137, 137, 137,
657 137, 42, 174, 42, 185, 138, 313, 42, 166, 163,
658 180, 138, 48, 49, 49, 49, 49, 42, 139, 139,
659 139, 139, 42, 42, 42, 139, 139, 42, 139, 139,
660 139, 139, 139, 139, 42, 157, 42, 42, 158, 164,
661 42, 42, 42, 168, 169, 42, 165, 159, 82, 82,
663 82, 82, 42, 42, 42, 42, 173, 175, 170, 42,
664 172, 182, 42, 176, 177, 178, 42, 179, 42, 42,
665 184, 181, 42, 42, 42, 186, 42, 42, 196, 191,
666 42, 42, 189, 193, 187, 42, 195, 188, 198, 190,
667 197, 42, 42, 192, 42, 42, 42, 194, 42, 199,
668 203, 42, 42, 42, 200, 202, 214, 210, 204, 42,
669 208, 206, 212, 201, 215, 42, 216, 217, 42, 209,
670 205, 42, 211, 42, 42, 207, 213, 42, 42, 218,
671 42, 42, 42, 42, 42, 221, 240, 219, 224, 42,
672 220, 226, 229, 223, 42, 42, 222, 42, 225, 236,
674 237, 42, 228, 231, 232, 227, 230, 241, 42, 42,
675 42, 275, 42, 233, 546, 238, 234, 239, 42, 242,
676 257, 235, 42, 246, 246, 246, 246, 42, 251, 253,
677 243, 247, 256, 42, 252, 42, 244, 247, 137, 137,
678 137, 137, 42, 254, 42, 42, 138, 42, 42, 255,
679 42, 258, 138, 248, 249, 42, 250, 250, 250, 250,
680 42, 262, 42, 42, 259, 42, 264, 260, 261, 42,
681 42, 270, 42, 42, 42, 265, 267, 263, 42, 266,
682 268, 42, 42, 42, 274, 42, 42, 42, 42, 42,
683 281, 278, 269, 272, 42, 280, 271, 282, 279, 284,
685 273, 276, 42, 42, 277, 42, 283, 42, 42, 290,
686 42, 42, 285, 286, 42, 42, 42, 289, 42, 291,
687 42, 42, 42, 42, 288, 42, 295, 287, 42, 42,
688 292, 293, 296, 303, 297, 42, 294, 42, 42, 324,
689 305, 298, 42, 325, 42, 299, 300, 300, 300, 300,
690 42, 301, 302, 300, 300, 42, 300, 300, 300, 300,
691 300, 300, 304, 307, 310, 306, 42, 308, 42, 42,
692 42, 42, 42, 42, 309, 42, 42, 42, 42, 314,
693 316, 42, 318, 42, 312, 42, 321, 322, 317, 42,
694 311, 315, 323, 42, 320, 42, 328, 42, 326, 319,
696 42, 327, 329, 350, 330, 42, 338, 331, 246, 246,
697 246, 246, 42, 335, 248, 248, 247, 332, 332, 332,
698 332, 42, 247, 332, 332, 332, 332, 250, 250, 250,
699 250, 42, 250, 250, 250, 250, 42, 42, 42, 42,
700 42, 42, 42, 42, 333, 42, 42, 42, 339, 342,
701 42, 42, 42, 42, 42, 334, 336, 337, 341, 349,
702 344, 42, 351, 343, 42, 340, 42, 346, 347, 42,
703 42, 42, 42, 348, 42, 345, 42, 358, 42, 42,
704 42, 42, 359, 42, 42, 352, 357, 42, 353, 354,
705 360, 355, 42, 42, 356, 365, 361, 42, 362, 363,
707 366, 42, 364, 367, 42, 42, 42, 369, 368, 42,
708 42, 42, 42, 374, 42, 373, 42, 375, 42, 376,
709 370, 377, 371, 372, 378, 42, 379, 42, 382, 42,
710 42, 42, 42, 381, 387, 380, 42, 383, 386, 42,
711 445, 384, 385, 42, 42, 42, 332, 332, 332, 332,
712 393, 42, 42, 42, 390, 42, 42, 42, 388, 392,
713 394, 396, 397, 389, 42, 42, 391, 400, 42, 42,
714 398, 42, 401, 42, 42, 395, 42, 399, 42, 42,
715 42, 404, 406, 42, 407, 42, 42, 42, 402, 403,
716 42, 405, 408, 409, 42, 411, 42, 42, 410, 412,
718 42, 42, 42, 42, 413, 42, 417, 42, 415, 419,
719 420, 414, 42, 42, 416, 418, 42, 422, 42, 424,
720 42, 42, 423, 42, 42, 42, 425, 421, 42, 428,
721 42, 42, 427, 432, 430, 433, 42, 426, 435, 42,
722 429, 42, 42, 437, 42, 436, 42, 431, 434, 42,
723 439, 42, 42, 438, 42, 42, 42, 42, 42, 42,
724 441, 42, 446, 442, 42, 440, 450, 451, 455, 444,
725 443, 42, 453, 42, 448, 449, 454, 447, 42, 456,
726 42, 452, 42, 42, 42, 42, 458, 42, 42, 42,
727 42, 42, 42, 465, 463, 457, 42, 42, 464, 42,
729 460, 461, 459, 462, 466, 467, 469, 42, 42, 42,
730 470, 42, 42, 468, 42, 42, 472, 471, 42, 42,
731 42, 42, 42, 42, 478, 479, 473, 42, 477, 42,
732 474, 475, 483, 42, 480, 481, 485, 42, 476, 484,
733 42, 42, 482, 488, 42, 42, 490, 486, 42, 42,
734 42, 491, 42, 489, 42, 487, 493, 42, 42, 42,
735 42, 495, 42, 42, 42, 42, 42, 499, 492, 494,
736 502, 504, 503, 506, 500, 496, 497, 501, 498, 42,
737 42, 42, 42, 505, 42, 42, 508, 507, 511, 510,
738 42, 42, 42, 42, 512, 509, 42, 42, 42, 515,
740 42, 517, 42, 519, 42, 42, 521, 514, 42, 513,
741 42, 42, 518, 42, 520, 42, 516, 522, 525, 527,
742 42, 523, 42, 42, 42, 524, 42, 529, 42, 42,
743 528, 530, 42, 532, 526, 42, 42, 42, 531, 42,
744 538, 42, 42, 42, 534, 536, 42, 535, 533, 42,
745 539, 537, 42, 42, 544, 540, 42, 545, 42, 42,
746 548, 541, 42, 549, 543, 542, 42, 547, 42, 42,
747 42, 42, 42, 42, 42, 42, 42, 42, 550, 39,
748 39, 39, 39, 39, 41, 41, 51, 42, 51, 51,
749 51, 53, 53, 140, 140, 140, 140, 140, 42, 42,
751 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
752 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
753 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
754 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
755 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
756 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
757 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
758 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
759 42, 42, 42, 42, 42, 42, 42, 42, 141, 42,
760 245, 42, 42, 42, 42, 141, 42, 133, 42, 40,
762 551, 3, 551, 551, 551, 551, 551, 551, 551, 551,
763 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
764 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
765 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
766 551, 551, 551, 551, 551, 551
769 static yyconst flex_int16_t yy_chk[1247] =
771 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
772 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
774 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
775 1, 1, 1, 1, 9, 9, 9, 9, 10, 10,
776 10, 10, 11, 11, 11, 11, 11, 12, 44, 44,
777 44, 44, 12, 13, 13, 13, 13, 13, 13, 14,
778 14, 14, 14, 14, 14, 16, 60, 17, 24, 19,
779 18, 16, 16, 16, 16, 19, 17, 19, 60, 21,
780 18, 31, 24, 17, 18, 17, 13, 17, 19, 20,
782 17, 31, 18, 36, 23, 20, 38, 21, 30, 20,
783 21, 559, 28, 36, 23, 20, 38, 21, 20, 22,
784 23, 30, 28, 78, 47, 22, 69, 22, 22, 47,
785 27, 28, 30, 78, 26, 22, 27, 28, 55, 22,
786 26, 22, 25, 25, 25, 25, 25, 55, 26, 27,
787 33, 69, 35, 26, 25, 27, 33, 26, 35, 57,
788 37, 37, 56, 33, 25, 29, 58, 61, 57, 33,
789 557, 35, 33, 63, 64, 29, 56, 29, 56, 33,
790 37, 29, 64, 29, 68, 29, 58, 29, 32, 63,
791 59, 61, 32, 45, 45, 45, 45, 45, 66, 75,
793 68, 32, 32, 59, 32, 32, 32, 59, 32, 54,
794 54, 54, 54, 75, 32, 554, 32, 32, 88, 32,
795 34, 65, 66, 70, 34, 46, 46, 46, 46, 46,
796 46, 88, 70, 34, 34, 72, 34, 65, 34, 65,
797 34, 74, 34, 81, 219, 90, 34, 48, 48, 48,
798 48, 48, 81, 85, 90, 48, 219, 550, 74, 72,
799 85, 48, 49, 49, 49, 49, 49, 49, 50, 50,
800 50, 50, 50, 73, 76, 50, 50, 67, 50, 50,
801 50, 50, 50, 50, 77, 67, 79, 80, 67, 73,
802 83, 84, 548, 76, 77, 547, 73, 67, 82, 82,
804 82, 82, 82, 86, 89, 87, 80, 83, 77, 91,
805 79, 87, 93, 84, 84, 84, 94, 84, 95, 96,
806 89, 86, 99, 97, 101, 91, 98, 102, 99, 96,
807 103, 100, 94, 97, 93, 104, 98, 93, 101, 95,
808 100, 105, 106, 96, 108, 112, 111, 97, 109, 102,
809 106, 107, 110, 114, 103, 105, 111, 109, 106, 113,
810 108, 107, 110, 104, 112, 115, 113, 114, 116, 108,
811 106, 118, 109, 119, 120, 107, 110, 121, 123, 115,
812 129, 122, 124, 169, 539, 118, 129, 115, 120, 126,
813 116, 122, 124, 119, 125, 127, 118, 131, 121, 126,
815 127, 128, 123, 125, 125, 122, 124, 130, 132, 130,
816 145, 169, 151, 125, 539, 128, 125, 128, 150, 131,
817 151, 125, 144, 135, 135, 135, 135, 148, 144, 145,
818 132, 135, 150, 147, 144, 152, 132, 135, 137, 137,
819 137, 137, 137, 147, 155, 157, 137, 545, 164, 148,
820 159, 152, 137, 138, 138, 154, 138, 138, 138, 138,
821 138, 157, 156, 158, 154, 160, 159, 155, 156, 161,
822 163, 164, 165, 166, 167, 160, 161, 158, 168, 160,
823 163, 171, 170, 173, 168, 172, 175, 543, 174, 176,
824 173, 171, 163, 166, 181, 172, 165, 174, 171, 176,
826 167, 170, 177, 178, 170, 179, 175, 180, 183, 181,
827 182, 185, 177, 178, 188, 184, 187, 180, 189, 182,
828 196, 199, 236, 204, 179, 202, 187, 178, 203, 209,
829 183, 184, 188, 204, 189, 542, 185, 237, 205, 236,
830 209, 196, 215, 237, 211, 199, 201, 201, 201, 201,
831 214, 202, 203, 201, 201, 210, 201, 201, 201, 201,
832 201, 201, 205, 211, 215, 210, 217, 214, 218, 220,
833 222, 221, 223, 224, 214, 228, 231, 234, 235, 220,
834 222, 240, 223, 244, 218, 243, 231, 234, 222, 238,
835 217, 221, 235, 270, 228, 239, 240, 241, 238, 224,
837 257, 239, 241, 270, 243, 253, 257, 244, 246, 246,
838 246, 246, 541, 253, 247, 247, 246, 247, 247, 247,
839 247, 251, 246, 248, 248, 248, 248, 249, 249, 249,
840 249, 249, 250, 250, 250, 250, 250, 252, 254, 256,
841 259, 260, 261, 262, 251, 263, 264, 265, 259, 262,
842 266, 268, 267, 269, 271, 252, 254, 256, 261, 269,
843 264, 274, 271, 263, 275, 260, 276, 266, 267, 277,
844 280, 281, 282, 268, 285, 265, 286, 281, 284, 289,
845 287, 290, 282, 295, 293, 274, 280, 288, 275, 276,
846 284, 276, 294, 296, 277, 289, 285, 298, 286, 287,
848 290, 302, 288, 293, 299, 303, 305, 295, 294, 306,
849 307, 398, 315, 303, 310, 302, 323, 305, 311, 306,
850 296, 307, 298, 299, 310, 313, 311, 314, 315, 317,
851 320, 321, 322, 314, 323, 313, 325, 317, 322, 327,
852 398, 320, 321, 329, 335, 330, 332, 332, 332, 332,
853 335, 336, 338, 339, 329, 342, 340, 343, 325, 330,
854 336, 339, 340, 327, 341, 344, 329, 343, 345, 346,
855 341, 347, 344, 348, 349, 338, 351, 342, 354, 355,
856 356, 347, 349, 358, 351, 357, 359, 361, 345, 346,
857 362, 348, 354, 355, 363, 357, 364, 366, 356, 358,
859 368, 367, 369, 370, 359, 372, 364, 373, 362, 367,
860 368, 361, 371, 374, 363, 366, 375, 370, 376, 372,
861 377, 379, 371, 380, 381, 382, 373, 369, 384, 376,
862 386, 388, 375, 381, 379, 382, 387, 374, 386, 389,
863 377, 391, 392, 388, 390, 387, 395, 380, 384, 394,
864 390, 397, 399, 389, 401, 402, 403, 406, 414, 411,
865 392, 405, 399, 394, 410, 391, 405, 405, 414, 397,
866 395, 416, 410, 415, 402, 403, 411, 401, 418, 415,
867 421, 406, 422, 424, 427, 425, 418, 428, 432, 438,
868 439, 435, 444, 432, 427, 416, 441, 440, 428, 442,
870 422, 424, 421, 425, 435, 438, 440, 445, 448, 449,
871 441, 450, 451, 439, 452, 454, 444, 442, 455, 456,
872 457, 459, 458, 461, 452, 454, 445, 460, 451, 463,
873 448, 449, 458, 464, 455, 456, 460, 465, 450, 459,
874 466, 467, 457, 464, 468, 470, 466, 461, 469, 471,
875 473, 467, 474, 465, 475, 463, 469, 476, 478, 479,
876 480, 471, 487, 488, 489, 496, 490, 476, 468, 470,
877 480, 488, 487, 490, 478, 473, 474, 479, 475, 492,
878 493, 494, 499, 489, 500, 501, 493, 492, 499, 496,
879 502, 503, 504, 505, 500, 494, 506, 507, 508, 503,
881 509, 505, 511, 507, 512, 513, 509, 502, 514, 501,
882 515, 519, 506, 517, 508, 520, 504, 511, 514, 517,
883 518, 512, 521, 523, 524, 513, 525, 519, 526, 527,
884 518, 520, 530, 523, 515, 529, 531, 532, 521, 533,
885 530, 534, 535, 540, 525, 527, 537, 526, 524, 538,
886 531, 529, 544, 546, 537, 532, 549, 538, 536, 528,
887 544, 533, 522, 546, 535, 534, 516, 540, 510, 498,
888 497, 495, 491, 486, 485, 484, 483, 482, 549, 552,
889 552, 552, 552, 552, 553, 553, 555, 481, 555, 555,
890 555, 556, 556, 558, 558, 558, 558, 558, 477, 472,
892 462, 453, 447, 446, 443, 437, 436, 434, 433, 431,
893 430, 429, 426, 423, 420, 419, 417, 413, 412, 409,
894 408, 407, 404, 400, 396, 393, 385, 383, 378, 365,
895 360, 353, 352, 350, 337, 334, 333, 331, 328, 326,
896 324, 319, 318, 316, 312, 309, 308, 304, 301, 297,
897 292, 291, 283, 279, 278, 273, 272, 258, 255, 242,
898 233, 232, 230, 229, 227, 226, 225, 216, 213, 212,
899 208, 207, 206, 200, 198, 197, 195, 194, 193, 192,
900 191, 190, 186, 162, 153, 149, 146, 143, 140, 136,
901 133, 117, 92, 71, 62, 52, 41, 39, 8, 7,
903 3, 551, 551, 551, 551, 551, 551, 551, 551, 551,
904 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
905 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
906 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
907 551, 551, 551, 551, 551, 551
910 /* Table of booleans, true if rule could match eol. */
911 static yyconst flex_int32_t yy_rule_can_match_eol[138] =
913 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
919 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
921 static yy_state_type yy_last_accepting_state;
922 static char *yy_last_accepting_cpos;
924 extern int llvmAsm_flex_debug;
925 int llvmAsm_flex_debug = 0;
927 /* The intent behind this definition is that it'll catch
928 * any uses of REJECT which flex missed.
930 #define REJECT reject_used_but_not_detected
931 #define yymore() yymore_used_but_not_detected
932 #define YY_MORE_ADJ 0
933 #define YY_RESTORE_YY_MORE_OFFSET
935 #line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
936 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
938 // The LLVM Compiler Infrastructure
940 // This file was developed by the LLVM research group and is distributed under
941 // the University of Illinois Open Source License. See LICENSE.TXT for details.
943 //===----------------------------------------------------------------------===//
945 // This file implements the flex scanner for LLVM assembly languages files.
947 //===----------------------------------------------------------------------===*/
948 #line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
949 #include "ParserInternals.h"
950 #include "llvm/Module.h"
952 #include "llvmAsmParser.h"
956 void set_scan_file(FILE * F){
957 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
959 void set_scan_string (const char * str) {
960 llvmAsm_scan_string (str);
963 // Construct a token value for a non-obsolete token
964 #define RET_TOK(type, Enum, sym) \
965 llvmAsmlval.type = Instruction::Enum; \
968 // Construct a token value for an obsolete token
969 #define RET_TY(CTYPE, SYM) \
970 llvmAsmlval.PrimType = CTYPE;\
975 // TODO: All of the static identifiers are figured out by the lexer,
976 // these should be hashed to reduce the lexer size
979 // atoull - Convert an ascii string of decimal digits into the unsigned long
980 // long representation... this does not have to do input error checking,
981 // because we know that the input will be matched by a suitable regex...
983 static uint64_t atoull(const char *Buffer) {
985 for (; *Buffer; Buffer++) {
986 uint64_t OldRes = Result;
988 Result += *Buffer-'0';
989 if (Result < OldRes) // Uh, oh, overflow detected!!!
990 GenerateError("constant bigger than 64 bits detected!");
995 static uint64_t HexIntToVal(const char *Buffer) {
997 for (; *Buffer; ++Buffer) {
998 uint64_t OldRes = Result;
1001 if (C >= '0' && C <= '9')
1003 else if (C >= 'A' && C <= 'F')
1005 else if (C >= 'a' && C <= 'f')
1008 if (Result < OldRes) // Uh, oh, overflow detected!!!
1009 GenerateError("constant bigger than 64 bits detected!");
1015 // HexToFP - Convert the ascii string in hexidecimal format to the floating
1016 // point representation of it.
1018 static double HexToFP(const char *Buffer) {
1019 // Behave nicely in the face of C TBAA rules... see:
1020 // http://www.nullstone.com/htmls/category/aliastyp.htm
1025 UIntToFP.UI = HexIntToVal(Buffer);
1027 assert(sizeof(double) == sizeof(uint64_t) &&
1028 "Data sizes incompatible on this target!");
1029 return UIntToFP.FP; // Cast Hex constant to double
1033 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1034 // appropriate character. If AllowNull is set to false, a \00 value will cause
1035 // an exception to be thrown.
1037 // If AllowNull is set to true, the return value of the function points to the
1038 // last character of the string in memory.
1040 char *UnEscapeLexed(char *Buffer, bool AllowNull) {
1041 char *BOut = Buffer;
1042 for (char *BIn = Buffer; *BIn; ) {
1043 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1044 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1045 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1046 if (!AllowNull && !*BOut)
1047 GenerateError("String literal cannot accept \\00 escape!");
1049 BIn[3] = Tmp; // Restore character
1050 BIn += 3; // Skip over handled chars
1060 } // End llvm namespace
1062 using namespace llvm;
1064 #define YY_NEVER_INTERACTIVE 1
1065 /* Comments start with a ; and go till end of line */
1066 /* Local Values and Type identifiers start with a % sign */
1067 /* Global Value identifiers start with an @ sign */
1068 /* Label identifiers end with a colon */
1069 /* Quoted names can contain any character except " and \ */
1070 /* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
1071 /* Integer types are specified with i and a bitwidth */
1072 /* E[PN]Integer: match positive and negative literal integer values. */
1073 /* FPConstant - A Floating point constant.
1075 /* HexFPConstant - Floating point constant represented in IEEE format as a
1076 * hexadecimal number for when exponential notation is not precise enough.
1078 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1079 * it to deal with 64 bit numbers.
1081 #line 1082 "Lexer.cpp"
1085 #ifndef YY_NO_UNISTD_H
1086 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1087 * down here because we want the user's section 1 to have been scanned first.
1088 * The user has a chance to override it with an option.
1093 #ifndef YY_EXTRA_TYPE
1094 #define YY_EXTRA_TYPE void *
1097 static int yy_init_globals (void );
1099 /* Macros after this point can all be overridden by user definitions in
1103 #ifndef YY_SKIP_YYWRAP
1105 extern "C" int llvmAsmwrap (void );
1107 extern int llvmAsmwrap (void );
1111 static inline void yyunput (int c,char *buf_ptr );
1114 static void yy_flex_strncpy (char *,yyconst char *,int );
1117 #ifdef YY_NEED_STRLEN
1118 static int yy_flex_strlen (yyconst char * );
1124 static int yyinput (void );
1126 static int input (void );
1131 /* Amount of stuff to slurp up with each read. */
1132 #ifndef YY_READ_BUF_SIZE
1133 #define YY_READ_BUF_SIZE 8192
1136 /* Copy whatever the last rule matched to the standard output. */
1138 /* This used to be an fputs(), but since the string might contain NUL's,
1139 * we now use fwrite().
1141 #define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
1144 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1145 * is returned in "result".
1148 #define YY_INPUT(buf,result,max_size) \
1149 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1153 for ( n = 0; n < max_size && \
1154 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
1155 buf[n] = (char) c; \
1157 buf[n++] = (char) c; \
1158 if ( c == EOF && ferror( llvmAsmin ) ) \
1159 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1165 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
1167 if( errno != EINTR) \
1169 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1173 clearerr(llvmAsmin); \
1180 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1181 * we don't want an extra ';' after the "return" because that will cause
1182 * some compilers to complain about unreachable statements.
1185 #define yyterminate() return YY_NULL
1188 /* Number of entries by which start-condition stack grows. */
1189 #ifndef YY_START_STACK_INCR
1190 #define YY_START_STACK_INCR 25
1193 /* Report a fatal error. */
1194 #ifndef YY_FATAL_ERROR
1195 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1198 /* end tables serialization structures and prototypes */
1200 /* Default declaration of generated scanner - a define so the user can
1201 * easily add parameters.
1204 #define YY_DECL_IS_OURS 1
1206 extern int llvmAsmlex (void);
1208 #define YY_DECL int llvmAsmlex (void)
1209 #endif /* !YY_DECL */
1211 /* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
1214 #ifndef YY_USER_ACTION
1215 #define YY_USER_ACTION
1218 /* Code executed at the end of each rule. */
1220 #define YY_BREAK break;
1223 #define YY_RULE_SETUP \
1226 /** The main scanner function which does all the work.
1230 register yy_state_type yy_current_state;
1231 register char *yy_cp, *yy_bp;
1232 register int yy_act;
1234 #line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1237 #line 1238 "Lexer.cpp"
1248 (yy_start) = 1; /* first start state */
1254 llvmAsmout = stdout;
1256 if ( ! YY_CURRENT_BUFFER ) {
1257 llvmAsmensure_buffer_stack ();
1258 YY_CURRENT_BUFFER_LVALUE =
1259 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
1262 llvmAsm_load_buffer_state( );
1265 while ( 1 ) /* loops until end-of-file is reached */
1267 yy_cp = (yy_c_buf_p);
1269 /* Support of llvmAsmtext. */
1270 *yy_cp = (yy_hold_char);
1272 /* yy_bp points to the position in yy_ch_buf of the start of
1277 yy_current_state = (yy_start);
1281 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1282 if ( yy_accept[yy_current_state] )
1284 (yy_last_accepting_state) = yy_current_state;
1285 (yy_last_accepting_cpos) = yy_cp;
1287 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1289 yy_current_state = (int) yy_def[yy_current_state];
1290 if ( yy_current_state >= 552 )
1291 yy_c = yy_meta[(unsigned int) yy_c];
1293 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1296 while ( yy_current_state != 551 );
1297 yy_cp = (yy_last_accepting_cpos);
1298 yy_current_state = (yy_last_accepting_state);
1301 yy_act = yy_accept[yy_current_state];
1303 YY_DO_BEFORE_ACTION;
1305 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1308 for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
1309 if ( llvmAsmtext[yyl] == '\n' )
1315 do_action: /* This label is used only to access EOF actions. */
1318 { /* beginning of action switch */
1319 case 0: /* must back up */
1320 /* undo the effects of YY_DO_BEFORE_ACTION */
1321 *yy_cp = (yy_hold_char);
1322 yy_cp = (yy_last_accepting_cpos);
1323 yy_current_state = (yy_last_accepting_state);
1324 goto yy_find_action;
1328 #line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1329 { /* Ignore comments for now */ }
1333 #line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1334 { return BEGINTOK; }
1338 #line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1343 #line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1348 #line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1349 { return FALSETOK; }
1353 #line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1358 #line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1363 #line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1368 #line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1369 { return CONSTANT; }
1373 #line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1374 { return INTERNAL; }
1378 #line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1379 { return LINKONCE; }
1383 #line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1388 #line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1389 { return APPENDING; }
1393 #line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1394 { return DLLIMPORT; }
1398 #line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1399 { return DLLEXPORT; }
1403 #line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1408 #line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1409 { return EXTERN_WEAK; }
1413 #line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1414 { return EXTERNAL; }
1418 #line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1419 { return THREAD_LOCAL; }
1423 #line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1424 { return ZEROINITIALIZER; }
1428 #line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1429 { return DOTDOTDOT; }
1433 #line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1438 #line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1439 { return NULL_TOK; }
1443 #line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1448 #line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1453 #line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1458 #line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1463 #line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1468 #line 221 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1469 { return DATALAYOUT; }
1473 #line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1474 { return VOLATILE; }
1478 #line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1483 #line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1488 #line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1493 #line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1498 #line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1503 #line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1504 { return SIDEEFFECT; }
1508 #line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1513 #line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1518 #line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1519 { return FASTCC_TOK; }
1523 #line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1524 { return COLDCC_TOK; }
1528 #line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1529 { return X86_STDCALLCC_TOK; }
1533 #line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1534 { return X86_FASTCALLCC_TOK; }
1538 #line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1543 #line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1548 #line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1549 { return NOUNWIND; }
1553 #line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1554 { return NORETURN; }
1558 #line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1559 { RET_TY(Type::VoidTy, VOID); }
1563 #line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1564 { RET_TY(Type::FloatTy, FLOAT); }
1568 #line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1569 { RET_TY(Type::DoubleTy,DOUBLE);}
1573 #line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1574 { RET_TY(Type::LabelTy, LABEL); }
1578 #line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1583 #line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1588 #line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1589 { uint64_t NumBits = atoull(llvmAsmtext+1);
1590 if (NumBits < IntegerType::MIN_INT_BITS ||
1591 NumBits > IntegerType::MAX_INT_BITS)
1592 GenerateError("Bitwidth for integer type out of range!");
1593 const Type* Ty = IntegerType::get(NumBits);
1594 RET_TY(Ty, INTTYPE);
1599 #line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1600 { RET_TOK(BinaryOpVal, Add, ADD); }
1604 #line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1605 { RET_TOK(BinaryOpVal, Sub, SUB); }
1609 #line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1610 { RET_TOK(BinaryOpVal, Mul, MUL); }
1614 #line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1615 { RET_TOK(BinaryOpVal, UDiv, UDIV); }
1619 #line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1620 { RET_TOK(BinaryOpVal, SDiv, SDIV); }
1624 #line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1625 { RET_TOK(BinaryOpVal, FDiv, FDIV); }
1629 #line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1630 { RET_TOK(BinaryOpVal, URem, UREM); }
1634 #line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1635 { RET_TOK(BinaryOpVal, SRem, SREM); }
1639 #line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1640 { RET_TOK(BinaryOpVal, FRem, FREM); }
1644 #line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1645 { RET_TOK(BinaryOpVal, Shl, SHL); }
1649 #line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1650 { RET_TOK(BinaryOpVal, LShr, LSHR); }
1654 #line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1655 { RET_TOK(BinaryOpVal, AShr, ASHR); }
1659 #line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1660 { RET_TOK(BinaryOpVal, And, AND); }
1664 #line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1665 { RET_TOK(BinaryOpVal, Or , OR ); }
1669 #line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1670 { RET_TOK(BinaryOpVal, Xor, XOR); }
1674 #line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1675 { RET_TOK(OtherOpVal, ICmp, ICMP); }
1679 #line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1680 { RET_TOK(OtherOpVal, FCmp, FCMP); }
1684 #line 274 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1689 #line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1694 #line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1699 #line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1704 #line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1709 #line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1714 #line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1719 #line 281 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1724 #line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1729 #line 283 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1734 #line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1739 #line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1744 #line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1749 #line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1754 #line 288 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1759 #line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1764 #line 290 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1769 #line 291 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1774 #line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1779 #line 293 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1784 #line 295 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1785 { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
1789 #line 296 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1790 { RET_TOK(OtherOpVal, Call, CALL); }
1794 #line 297 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1795 { RET_TOK(CastOpVal, Trunc, TRUNC); }
1799 #line 298 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1800 { RET_TOK(CastOpVal, ZExt, ZEXT); }
1804 #line 299 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1805 { RET_TOK(CastOpVal, SExt, SEXT); }
1809 #line 300 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1810 { RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
1814 #line 301 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1815 { RET_TOK(CastOpVal, FPExt, FPEXT); }
1819 #line 302 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1820 { RET_TOK(CastOpVal, UIToFP, UITOFP); }
1824 #line 303 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1825 { RET_TOK(CastOpVal, SIToFP, SITOFP); }
1829 #line 304 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1830 { RET_TOK(CastOpVal, FPToUI, FPTOUI); }
1834 #line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1835 { RET_TOK(CastOpVal, FPToSI, FPTOSI); }
1839 #line 306 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1840 { RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
1844 #line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1845 { RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
1849 #line 308 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1850 { RET_TOK(CastOpVal, BitCast, BITCAST); }
1854 #line 309 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1855 { RET_TOK(OtherOpVal, Select, SELECT); }
1859 #line 310 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1860 { RET_TOK(OtherOpVal, VAArg , VAARG); }
1864 #line 311 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1865 { RET_TOK(TermOpVal, Ret, RET); }
1869 #line 312 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1870 { RET_TOK(TermOpVal, Br, BR); }
1874 #line 313 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1875 { RET_TOK(TermOpVal, Switch, SWITCH); }
1879 #line 314 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1880 { RET_TOK(TermOpVal, Invoke, INVOKE); }
1884 #line 315 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1885 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1889 #line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1890 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
1894 #line 318 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1895 { RET_TOK(MemOpVal, Malloc, MALLOC); }
1899 #line 319 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1900 { RET_TOK(MemOpVal, Alloca, ALLOCA); }
1904 #line 320 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1905 { RET_TOK(MemOpVal, Free, FREE); }
1909 #line 321 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1910 { RET_TOK(MemOpVal, Load, LOAD); }
1914 #line 322 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1915 { RET_TOK(MemOpVal, Store, STORE); }
1919 #line 323 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1920 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
1924 #line 325 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1925 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
1929 #line 326 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1930 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1934 #line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1935 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
1939 #line 330 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1941 UnEscapeLexed(llvmAsmtext+1);
1942 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip %
1948 #line 335 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1950 UnEscapeLexed(llvmAsmtext+1);
1951 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip @
1957 #line 340 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1959 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon
1960 UnEscapeLexed(llvmAsmtext);
1961 llvmAsmlval.StrVal = strdup(llvmAsmtext);
1966 /* rule 125 can match eol */
1968 #line 346 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1970 llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote
1971 UnEscapeLexed(llvmAsmtext+1);
1972 llvmAsmlval.StrVal = strdup(llvmAsmtext+1);
1977 /* rule 126 can match eol */
1979 #line 353 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1980 { // Note that we cannot unescape a string constant here! The
1981 // string constant might contain a \00 which would not be
1982 // understood by the string stuff. It is valid to make a
1983 // [sbyte] c"Hello World\00" constant, for example.
1985 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1986 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote
1987 return STRINGCONSTANT;
1991 /* rule 127 can match eol */
1993 #line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1995 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1996 llvmAsmlval.StrVal = strdup(llvmAsmtext+2); // Nuke @, quote
1997 return ATSTRINGCONSTANT;
2002 #line 368 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2003 { int len = strlen(llvmAsmtext);
2004 uint32_t numBits = ((len * 64) / 19) + 1;
2005 APInt Tmp(numBits, llvmAsmtext, len, 10);
2006 uint32_t activeBits = Tmp.getActiveBits();
2007 if (activeBits > 0 && activeBits < numBits)
2008 Tmp.trunc(activeBits);
2009 if (Tmp.getBitWidth() > 64) {
2010 llvmAsmlval.APIntVal = new APInt(Tmp);
2013 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2020 #line 382 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2021 { int len = strlen(llvmAsmtext);
2022 uint32_t numBits = (((len-1) * 64) / 19) + 2;
2023 APInt Tmp(numBits, llvmAsmtext, len, 10);
2024 uint32_t minBits = Tmp.getMinSignedBits();
2025 if (minBits > 0 && minBits < numBits)
2027 if (Tmp.getBitWidth() > 64) {
2028 llvmAsmlval.APIntVal = new APInt(Tmp);
2031 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2038 #line 397 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2039 { int len = strlen(llvmAsmtext+3) - 3;
2040 uint32_t bits = len * 4;
2041 APInt Tmp(bits, llvmAsmtext+3, len, 16);
2042 uint32_t activeBits = Tmp.getActiveBits();
2043 if (activeBits > 0 && activeBits < bits)
2044 Tmp.trunc(activeBits);
2045 if (Tmp.getBitWidth() > 64) {
2046 llvmAsmlval.APIntVal = new APInt(Tmp);
2047 return llvmAsmtext[0] == 's' ? ESAPINTVAL : EUAPINTVAL;
2048 } else if (llvmAsmtext[0] == 's') {
2049 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2052 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2059 #line 415 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2061 uint64_t Val = atoull(llvmAsmtext+1);
2062 if ((unsigned)Val != Val)
2063 GenerateError("Invalid value number (too large)!");
2064 llvmAsmlval.UIntVal = unsigned(Val);
2070 #line 422 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2072 uint64_t Val = atoull(llvmAsmtext+1);
2073 if ((unsigned)Val != Val)
2074 GenerateError("Invalid value number (too large)!");
2075 llvmAsmlval.UIntVal = unsigned(Val);
2076 return GLOBALVAL_ID;
2081 #line 430 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2082 { llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; }
2086 #line 431 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2087 { llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; }
2089 case YY_STATE_EOF(INITIAL):
2090 #line 433 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2092 /* Make sure to free the internal buffers for flex when we are
2093 * done reading our input!
2095 llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
2100 /* rule 135 can match eol */
2102 #line 441 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2103 { /* Ignore whitespace */ }
2107 #line 442 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2108 { return llvmAsmtext[0]; }
2112 #line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2113 YY_FATAL_ERROR( "flex scanner jammed" );
2115 #line 2116 "Lexer.cpp"
2117 case YY_END_OF_BUFFER:
2119 /* Amount of text matched not including the EOB char. */
2120 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2122 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2123 *yy_cp = (yy_hold_char);
2124 YY_RESTORE_YY_MORE_OFFSET
2126 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2128 /* We're scanning a new file or input source. It's
2129 * possible that this happened because the user
2130 * just pointed llvmAsmin at a new source and called
2131 * llvmAsmlex(). If so, then we have to assure
2132 * consistency between YY_CURRENT_BUFFER and our
2133 * globals. Here is the right place to do so, because
2134 * this is the first action (other than possibly a
2135 * back-up) that will match for the new input source.
2137 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2138 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
2139 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2142 /* Note that here we test for yy_c_buf_p "<=" to the position
2143 * of the first EOB in the buffer, since yy_c_buf_p will
2144 * already have been incremented past the NUL character
2145 * (since all states make transitions on EOB to the
2146 * end-of-buffer state). Contrast this with the test
2149 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2150 { /* This was really a NUL. */
2151 yy_state_type yy_next_state;
2153 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2155 yy_current_state = yy_get_previous_state( );
2157 /* Okay, we're now positioned to make the NUL
2158 * transition. We couldn't have
2159 * yy_get_previous_state() go ahead and do it
2160 * for us because it doesn't know how to deal
2161 * with the possibility of jamming (and we don't
2162 * want to build jamming into it because then it
2163 * will run more slowly).
2166 yy_next_state = yy_try_NUL_trans( yy_current_state );
2168 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2170 if ( yy_next_state )
2172 /* Consume the NUL. */
2173 yy_cp = ++(yy_c_buf_p);
2174 yy_current_state = yy_next_state;
2180 yy_cp = (yy_last_accepting_cpos);
2181 yy_current_state = (yy_last_accepting_state);
2182 goto yy_find_action;
2186 else switch ( yy_get_next_buffer( ) )
2188 case EOB_ACT_END_OF_FILE:
2190 (yy_did_buffer_switch_on_eof) = 0;
2192 if ( llvmAsmwrap( ) )
2194 /* Note: because we've taken care in
2195 * yy_get_next_buffer() to have set up
2196 * llvmAsmtext, we can now set up
2197 * yy_c_buf_p so that if some total
2198 * hoser (like flex itself) wants to
2199 * call the scanner after we return the
2200 * YY_NULL, it'll still work - another
2201 * YY_NULL will get returned.
2203 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2205 yy_act = YY_STATE_EOF(YY_START);
2211 if ( ! (yy_did_buffer_switch_on_eof) )
2217 case EOB_ACT_CONTINUE_SCAN:
2219 (yytext_ptr) + yy_amount_of_matched_text;
2221 yy_current_state = yy_get_previous_state( );
2223 yy_cp = (yy_c_buf_p);
2224 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2227 case EOB_ACT_LAST_MATCH:
2229 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2231 yy_current_state = yy_get_previous_state( );
2233 yy_cp = (yy_c_buf_p);
2234 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2235 goto yy_find_action;
2242 "fatal flex scanner internal error--no action found" );
2243 } /* end of action switch */
2244 } /* end of scanning one token */
2245 } /* end of llvmAsmlex */
2247 /* yy_get_next_buffer - try to read in a new buffer
2249 * Returns a code representing an action:
2250 * EOB_ACT_LAST_MATCH -
2251 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2252 * EOB_ACT_END_OF_FILE - end of file
2254 static int yy_get_next_buffer (void)
2256 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2257 register char *source = (yytext_ptr);
2258 register int number_to_move, i;
2261 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2263 "fatal flex scanner internal error--end of buffer missed" );
2265 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2266 { /* Don't try to fill the buffer, so this is an EOF. */
2267 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2269 /* We matched a single character, the EOB, so
2270 * treat this as a final EOF.
2272 return EOB_ACT_END_OF_FILE;
2277 /* We matched some text prior to the EOB, first
2280 return EOB_ACT_LAST_MATCH;
2284 /* Try to read more data. */
2286 /* First move last chars to start of buffer. */
2287 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2289 for ( i = 0; i < number_to_move; ++i )
2290 *(dest++) = *(source++);
2292 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2293 /* don't do the read, it's not guaranteed to return an EOF,
2296 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2301 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2303 while ( num_to_read <= 0 )
2304 { /* Not enough room in the buffer - grow it. */
2306 /* just a shorter name for the current buffer */
2307 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2309 int yy_c_buf_p_offset =
2310 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2312 if ( b->yy_is_our_buffer )
2314 int new_size = b->yy_buf_size * 2;
2316 if ( new_size <= 0 )
2317 b->yy_buf_size += b->yy_buf_size / 8;
2319 b->yy_buf_size *= 2;
2321 b->yy_ch_buf = (char *)
2322 /* Include room in for 2 EOB chars. */
2323 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2326 /* Can't grow it, we don't own it. */
2329 if ( ! b->yy_ch_buf )
2331 "fatal error - scanner input buffer overflow" );
2333 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2335 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2340 if ( num_to_read > YY_READ_BUF_SIZE )
2341 num_to_read = YY_READ_BUF_SIZE;
2343 /* Read in more data. */
2344 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2345 (yy_n_chars), num_to_read );
2347 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2350 if ( (yy_n_chars) == 0 )
2352 if ( number_to_move == YY_MORE_ADJ )
2354 ret_val = EOB_ACT_END_OF_FILE;
2355 llvmAsmrestart(llvmAsmin );
2360 ret_val = EOB_ACT_LAST_MATCH;
2361 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2362 YY_BUFFER_EOF_PENDING;
2367 ret_val = EOB_ACT_CONTINUE_SCAN;
2369 (yy_n_chars) += number_to_move;
2370 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2371 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2373 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2378 /* yy_get_previous_state - get the state just before the EOB char was reached */
2380 static yy_state_type yy_get_previous_state (void)
2382 register yy_state_type yy_current_state;
2383 register char *yy_cp;
2385 yy_current_state = (yy_start);
2387 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2389 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2390 if ( yy_accept[yy_current_state] )
2392 (yy_last_accepting_state) = yy_current_state;
2393 (yy_last_accepting_cpos) = yy_cp;
2395 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2397 yy_current_state = (int) yy_def[yy_current_state];
2398 if ( yy_current_state >= 552 )
2399 yy_c = yy_meta[(unsigned int) yy_c];
2401 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2404 return yy_current_state;
2407 /* yy_try_NUL_trans - try to make a transition on the NUL character
2410 * next_state = yy_try_NUL_trans( current_state );
2412 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2414 register int yy_is_jam;
2415 register char *yy_cp = (yy_c_buf_p);
2417 register YY_CHAR yy_c = 1;
2418 if ( yy_accept[yy_current_state] )
2420 (yy_last_accepting_state) = yy_current_state;
2421 (yy_last_accepting_cpos) = yy_cp;
2423 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2425 yy_current_state = (int) yy_def[yy_current_state];
2426 if ( yy_current_state >= 552 )
2427 yy_c = yy_meta[(unsigned int) yy_c];
2429 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2430 yy_is_jam = (yy_current_state == 551);
2432 return yy_is_jam ? 0 : yy_current_state;
2435 static inline void yyunput (int c, register char * yy_bp )
2437 register char *yy_cp;
2439 yy_cp = (yy_c_buf_p);
2441 /* undo effects of setting up llvmAsmtext */
2442 *yy_cp = (yy_hold_char);
2444 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2445 { /* need to shift things up to make room */
2446 /* +2 for EOB chars. */
2447 register int number_to_move = (yy_n_chars) + 2;
2448 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2449 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2450 register char *source =
2451 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2453 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2454 *--dest = *--source;
2456 yy_cp += (int) (dest - source);
2457 yy_bp += (int) (dest - source);
2458 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2459 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2461 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2462 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2465 *--yy_cp = (char) c;
2471 (yytext_ptr) = yy_bp;
2472 (yy_hold_char) = *yy_cp;
2473 (yy_c_buf_p) = yy_cp;
2478 static int yyinput (void)
2480 static int input (void)
2486 *(yy_c_buf_p) = (yy_hold_char);
2488 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2490 /* yy_c_buf_p now points to the character we want to return.
2491 * If this occurs *before* the EOB characters, then it's a
2492 * valid NUL; if not, then we've hit the end of the buffer.
2494 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2495 /* This was really a NUL. */
2496 *(yy_c_buf_p) = '\0';
2499 { /* need more input */
2500 int offset = (yy_c_buf_p) - (yytext_ptr);
2503 switch ( yy_get_next_buffer( ) )
2505 case EOB_ACT_LAST_MATCH:
2506 /* This happens because yy_g_n_b()
2507 * sees that we've accumulated a
2508 * token and flags that we need to
2509 * try matching the token before
2510 * proceeding. But for input(),
2511 * there's no matching to consider.
2512 * So convert the EOB_ACT_LAST_MATCH
2513 * to EOB_ACT_END_OF_FILE.
2516 /* Reset buffer status. */
2517 llvmAsmrestart(llvmAsmin );
2521 case EOB_ACT_END_OF_FILE:
2523 if ( llvmAsmwrap( ) )
2526 if ( ! (yy_did_buffer_switch_on_eof) )
2535 case EOB_ACT_CONTINUE_SCAN:
2536 (yy_c_buf_p) = (yytext_ptr) + offset;
2542 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2543 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */
2544 (yy_hold_char) = *++(yy_c_buf_p);
2553 #endif /* ifndef YY_NO_INPUT */
2555 /** Immediately switch to a different input stream.
2556 * @param input_file A readable stream.
2558 * @note This function does not reset the start condition to @c INITIAL .
2560 void llvmAsmrestart (FILE * input_file )
2563 if ( ! YY_CURRENT_BUFFER ){
2564 llvmAsmensure_buffer_stack ();
2565 YY_CURRENT_BUFFER_LVALUE =
2566 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
2569 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
2570 llvmAsm_load_buffer_state( );
2573 /** Switch to a different input buffer.
2574 * @param new_buffer The new input buffer.
2577 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2580 /* TODO. We should be able to replace this entire function body
2582 * llvmAsmpop_buffer_state();
2583 * llvmAsmpush_buffer_state(new_buffer);
2585 llvmAsmensure_buffer_stack ();
2586 if ( YY_CURRENT_BUFFER == new_buffer )
2589 if ( YY_CURRENT_BUFFER )
2591 /* Flush out information for old buffer. */
2592 *(yy_c_buf_p) = (yy_hold_char);
2593 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2594 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2597 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2598 llvmAsm_load_buffer_state( );
2600 /* We don't actually know whether we did this switch during
2601 * EOF (llvmAsmwrap()) processing, but the only time this flag
2602 * is looked at is after llvmAsmwrap() is called, so it's safe
2603 * to go ahead and always set it.
2605 (yy_did_buffer_switch_on_eof) = 1;
2608 static void llvmAsm_load_buffer_state (void)
2610 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2611 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2612 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2613 (yy_hold_char) = *(yy_c_buf_p);
2616 /** Allocate and initialize an input buffer state.
2617 * @param file A readable stream.
2618 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2620 * @return the allocated buffer state.
2622 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size )
2626 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
2628 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
2630 b->yy_buf_size = size;
2632 /* yy_ch_buf has to be 2 characters longer than the size given because
2633 * we need to put in 2 end-of-buffer characters.
2635 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 );
2636 if ( ! b->yy_ch_buf )
2637 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
2639 b->yy_is_our_buffer = 1;
2641 llvmAsm_init_buffer(b,file );
2646 /** Destroy the buffer.
2647 * @param b a buffer created with llvmAsm_create_buffer()
2650 void llvmAsm_delete_buffer (YY_BUFFER_STATE b )
2656 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2657 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2659 if ( b->yy_is_our_buffer )
2660 llvmAsmfree((void *) b->yy_ch_buf );
2662 llvmAsmfree((void *) b );
2665 /* Initializes or reinitializes a buffer.
2666 * This function is sometimes called more than once on the same buffer,
2667 * such as during a llvmAsmrestart() or at EOF.
2669 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file )
2674 llvmAsm_flush_buffer(b );
2676 b->yy_input_file = file;
2677 b->yy_fill_buffer = 1;
2679 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
2680 * called from llvmAsmrestart() or through yy_get_next_buffer.
2681 * In that case, we don't want to reset the lineno or column.
2683 if (b != YY_CURRENT_BUFFER){
2684 b->yy_bs_lineno = 1;
2685 b->yy_bs_column = 0;
2688 b->yy_is_interactive = 0;
2693 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2694 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2697 void llvmAsm_flush_buffer (YY_BUFFER_STATE b )
2704 /* We always need two end-of-buffer characters. The first causes
2705 * a transition to the end-of-buffer state. The second causes
2706 * a jam in that state.
2708 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2709 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2711 b->yy_buf_pos = &b->yy_ch_buf[0];
2714 b->yy_buffer_status = YY_BUFFER_NEW;
2716 if ( b == YY_CURRENT_BUFFER )
2717 llvmAsm_load_buffer_state( );
2720 /** Pushes the new state onto the stack. The new state becomes
2721 * the current state. This function will allocate the stack
2723 * @param new_buffer The new state.
2726 void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
2728 if (new_buffer == NULL)
2731 llvmAsmensure_buffer_stack();
2733 /* This block is copied from llvmAsm_switch_to_buffer. */
2734 if ( YY_CURRENT_BUFFER )
2736 /* Flush out information for old buffer. */
2737 *(yy_c_buf_p) = (yy_hold_char);
2738 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2739 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2742 /* Only push if top exists. Otherwise, replace top. */
2743 if (YY_CURRENT_BUFFER)
2744 (yy_buffer_stack_top)++;
2745 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2747 /* copied from llvmAsm_switch_to_buffer. */
2748 llvmAsm_load_buffer_state( );
2749 (yy_did_buffer_switch_on_eof) = 1;
2752 /** Removes and deletes the top of the stack, if present.
2753 * The next element becomes the new top.
2756 void llvmAsmpop_buffer_state (void)
2758 if (!YY_CURRENT_BUFFER)
2761 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2762 YY_CURRENT_BUFFER_LVALUE = NULL;
2763 if ((yy_buffer_stack_top) > 0)
2764 --(yy_buffer_stack_top);
2766 if (YY_CURRENT_BUFFER) {
2767 llvmAsm_load_buffer_state( );
2768 (yy_did_buffer_switch_on_eof) = 1;
2772 /* Allocates the stack if it does not exist.
2773 * Guarantees space for at least one push.
2775 static void llvmAsmensure_buffer_stack (void)
2779 if (!(yy_buffer_stack)) {
2781 /* First allocation is just for 2 elements, since we don't know if this
2782 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2783 * immediate realloc on the next call.
2786 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
2787 (num_to_alloc * sizeof(struct yy_buffer_state*)
2790 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2792 (yy_buffer_stack_max) = num_to_alloc;
2793 (yy_buffer_stack_top) = 0;
2797 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2799 /* Increase the buffer to prepare for a possible push. */
2800 int grow_size = 8 /* arbitrary grow size */;
2802 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2803 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
2805 num_to_alloc * sizeof(struct yy_buffer_state*)
2808 /* zero only the new slots.*/
2809 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2810 (yy_buffer_stack_max) = num_to_alloc;
2814 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2815 * @param base the character buffer
2816 * @param size the size in bytes of the character buffer
2818 * @return the newly allocated buffer state object.
2820 YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size )
2825 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2826 base[size-1] != YY_END_OF_BUFFER_CHAR )
2827 /* They forgot to leave room for the EOB's. */
2830 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
2832 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
2834 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2835 b->yy_buf_pos = b->yy_ch_buf = base;
2836 b->yy_is_our_buffer = 0;
2837 b->yy_input_file = 0;
2838 b->yy_n_chars = b->yy_buf_size;
2839 b->yy_is_interactive = 0;
2841 b->yy_fill_buffer = 0;
2842 b->yy_buffer_status = YY_BUFFER_NEW;
2844 llvmAsm_switch_to_buffer(b );
2849 /** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
2850 * scan from a @e copy of @a str.
2851 * @param str a NUL-terminated string to scan
2853 * @return the newly allocated buffer state object.
2854 * @note If you want to scan bytes that may contain NUL values, then use
2855 * llvmAsm_scan_bytes() instead.
2857 YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
2860 return llvmAsm_scan_bytes(yystr,strlen(yystr) );
2863 /** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
2864 * scan from a @e copy of @a bytes.
2865 * @param bytes the byte buffer to scan
2866 * @param len the number of bytes in the buffer pointed to by @a bytes.
2868 * @return the newly allocated buffer state object.
2870 YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2877 /* Get memory for full buffer, including space for trailing EOB's. */
2878 n = _yybytes_len + 2;
2879 buf = (char *) llvmAsmalloc(n );
2881 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
2883 for ( i = 0; i < _yybytes_len; ++i )
2884 buf[i] = yybytes[i];
2886 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2888 b = llvmAsm_scan_buffer(buf,n );
2890 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
2892 /* It's okay to grow etc. this buffer, and we should throw it
2893 * away when we're done.
2895 b->yy_is_our_buffer = 1;
2900 #ifndef YY_EXIT_FAILURE
2901 #define YY_EXIT_FAILURE 2
2904 static void yy_fatal_error (yyconst char* msg )
2906 (void) fprintf( stderr, "%s\n", msg );
2907 exit( YY_EXIT_FAILURE );
2910 /* Redefine yyless() so it works in section 3 code. */
2916 /* Undo effects of setting up llvmAsmtext. */ \
2917 int yyless_macro_arg = (n); \
2918 YY_LESS_LINENO(yyless_macro_arg);\
2919 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
2920 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
2921 (yy_hold_char) = *(yy_c_buf_p); \
2922 *(yy_c_buf_p) = '\0'; \
2923 llvmAsmleng = yyless_macro_arg; \
2927 /* Accessor methods (get/set functions) to struct members. */
2929 /** Get the current line number.
2932 int llvmAsmget_lineno (void)
2935 return llvmAsmlineno;
2938 /** Get the input stream.
2941 FILE *llvmAsmget_in (void)
2946 /** Get the output stream.
2949 FILE *llvmAsmget_out (void)
2954 /** Get the length of the current token.
2957 int llvmAsmget_leng (void)
2962 /** Get the current token.
2966 char *llvmAsmget_text (void)
2971 /** Set the current line number.
2972 * @param line_number
2975 void llvmAsmset_lineno (int line_number )
2978 llvmAsmlineno = line_number;
2981 /** Set the input stream. This does not discard the current
2983 * @param in_str A readable stream.
2985 * @see llvmAsm_switch_to_buffer
2987 void llvmAsmset_in (FILE * in_str )
2989 llvmAsmin = in_str ;
2992 void llvmAsmset_out (FILE * out_str )
2994 llvmAsmout = out_str ;
2997 int llvmAsmget_debug (void)
2999 return llvmAsm_flex_debug;
3002 void llvmAsmset_debug (int bdebug )
3004 llvmAsm_flex_debug = bdebug ;
3007 static int yy_init_globals (void)
3009 /* Initialization is the same as for the non-reentrant scanner.
3010 * This function is called from llvmAsmlex_destroy(), so don't allocate here.
3013 /* We do not touch llvmAsmlineno unless the option is enabled. */
3016 (yy_buffer_stack) = 0;
3017 (yy_buffer_stack_top) = 0;
3018 (yy_buffer_stack_max) = 0;
3019 (yy_c_buf_p) = (char *) 0;
3023 /* Defined in main.c */
3026 llvmAsmout = stdout;
3028 llvmAsmin = (FILE *) 0;
3029 llvmAsmout = (FILE *) 0;
3032 /* For future reference: Set errno on error, since we are called by
3038 /* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
3039 int llvmAsmlex_destroy (void)
3042 /* Pop the buffer stack, destroying each element. */
3043 while(YY_CURRENT_BUFFER){
3044 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
3045 YY_CURRENT_BUFFER_LVALUE = NULL;
3046 llvmAsmpop_buffer_state();
3049 /* Destroy the stack itself. */
3050 llvmAsmfree((yy_buffer_stack) );
3051 (yy_buffer_stack) = NULL;
3053 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3054 * llvmAsmlex() is called, initialization will occur. */
3061 * Internal utility routines.
3065 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3068 for ( i = 0; i < n; ++i )
3073 #ifdef YY_NEED_STRLEN
3074 static int yy_flex_strlen (yyconst char * s )
3077 for ( n = 0; s[n]; ++n )
3084 void *llvmAsmalloc (yy_size_t size )
3086 return (void *) malloc( size );
3089 void *llvmAsmrealloc (void * ptr, yy_size_t size )
3091 /* The cast to (char *) in the following accommodates both
3092 * implementations that use char* generic pointers, and those
3093 * that use void* generic pointers. It works with the latter
3094 * because both ANSI C and C++ allow castless assignment from
3095 * any pointer type to void*, and deal with argument conversions
3096 * as though doing an assignment.
3098 return (void *) realloc( (char *) ptr, size );
3101 void llvmAsmfree (void * ptr )
3103 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */
3106 #define YYTABLES_NAME "yytables"
3108 #line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"