1 #define yy_create_buffer llvmAsm_create_buffer
2 #define yy_delete_buffer llvmAsm_delete_buffer
3 #define yy_scan_buffer llvmAsm_scan_buffer
4 #define yy_scan_string llvmAsm_scan_string
5 #define yy_scan_bytes llvmAsm_scan_bytes
6 #define yy_flex_debug llvmAsm_flex_debug
7 #define yy_init_buffer llvmAsm_init_buffer
8 #define yy_flush_buffer llvmAsm_flush_buffer
9 #define yy_load_buffer_state llvmAsm_load_buffer_state
10 #define yy_switch_to_buffer llvmAsm_switch_to_buffer
11 #define yyin llvmAsmin
12 #define yyleng llvmAsmleng
13 #define yylex llvmAsmlex
14 #define yyout llvmAsmout
15 #define yyrestart llvmAsmrestart
16 #define yytext llvmAsmtext
17 #define yylineno llvmAsmlineno
20 /* A lexical scanner generated by flex */
22 /* Scanner skeleton version:
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
33 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
46 /* Use prototypes in function declarations. */
49 /* The "const" storage-class-modifier is valid. */
52 #else /* ! __cplusplus */
60 #endif /* ! __cplusplus */
79 #define YY_PROTO(proto) proto
81 #define YY_PROTO(proto) ()
84 /* Returned upon end-of-file. */
87 /* Promotes a possibly negative, possibly signed char to an unsigned
88 * integer for use as an array index. If the signed char is negative,
89 * we want to instead treat it as an 8-bit unsigned char, hence the
92 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
94 /* Enter a start condition. This macro really ought to take a parameter,
95 * but we do it the disgusting crufty way forced on us by the ()-less
96 * definition of BEGIN.
98 #define BEGIN yy_start = 1 + 2 *
100 /* Translate the current start state into a value that can be later handed
101 * to BEGIN to return to the state. The YYSTATE alias is for lex
104 #define YY_START ((yy_start - 1) / 2)
105 #define YYSTATE YY_START
107 /* Action number for EOF rule of a given start state. */
108 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
110 /* Special action meaning "start processing a new file". */
111 #define YY_NEW_FILE yyrestart( yyin )
113 #define YY_END_OF_BUFFER_CHAR 0
115 /* Size of default input buffer. */
116 #define YY_BUF_SIZE (16384*64)
118 typedef struct yy_buffer_state *YY_BUFFER_STATE;
121 extern FILE *yyin, *yyout;
123 #define EOB_ACT_CONTINUE_SCAN 0
124 #define EOB_ACT_END_OF_FILE 1
125 #define EOB_ACT_LAST_MATCH 2
127 /* The funky do-while in the following #define is used to turn the definition
128 * int a single C statement (which needs a semi-colon terminator). This
129 * avoids problems with code like:
131 * if ( condition_holds )
134 * do_something_else();
136 * Prior to using the do-while the compiler would get upset at the
137 * "else" because it interpreted the "if" statement as being all
138 * done when it reached the ';' after the yyless() call.
141 /* Return all but the first 'n' matched characters back to the input stream. */
146 /* Undo effects of setting up yytext. */ \
147 *yy_cp = yy_hold_char; \
148 YY_RESTORE_YY_MORE_OFFSET \
149 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
150 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
154 #define unput(c) yyunput( c, yytext_ptr )
156 /* The following is because we cannot portably get our hands on size_t
157 * (without autoconf's help, which isn't available because we want
158 * flex-generated scanners to compile on their own).
160 typedef unsigned int yy_size_t;
163 struct yy_buffer_state
167 char *yy_ch_buf; /* input buffer */
168 char *yy_buf_pos; /* current position in input buffer */
170 /* Size of input buffer in bytes, not including room for EOB
173 yy_size_t yy_buf_size;
175 /* Number of characters read into yy_ch_buf, not including EOB
180 /* Whether we "own" the buffer - i.e., we know we created it,
181 * and can realloc() it to grow it, and should free() it to
184 int yy_is_our_buffer;
186 /* Whether this is an "interactive" input source; if so, and
187 * if we're using stdio for input, then we want to use getc()
188 * instead of fread(), to make sure we stop fetching input after
191 int yy_is_interactive;
193 /* Whether we're considered to be at the beginning of a line.
194 * If so, '^' rules will be active on the next match, otherwise
199 /* Whether to try to fill the input buffer when we reach the
204 int yy_buffer_status;
205 #define YY_BUFFER_NEW 0
206 #define YY_BUFFER_NORMAL 1
207 /* When an EOF's been seen but there's still some text to process
208 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
209 * shouldn't try reading from the input source any more. We might
210 * still have a bunch of tokens to match, though, because of
211 * possible backing-up.
213 * When we actually see the EOF, we change the status to "new"
214 * (via yyrestart()), so that the user can continue scanning by
215 * just pointing yyin at a new input file.
217 #define YY_BUFFER_EOF_PENDING 2
220 static YY_BUFFER_STATE yy_current_buffer = 0;
222 /* We provide macros for accessing buffer states in case in the
223 * future we want to put the buffer states in a more general
226 #define YY_CURRENT_BUFFER yy_current_buffer
229 /* yy_hold_char holds the character lost when yytext is formed. */
230 static char yy_hold_char;
232 static int yy_n_chars; /* number of characters read into yy_ch_buf */
237 /* Points to current character in buffer. */
238 static char *yy_c_buf_p = (char *) 0;
239 static int yy_init = 1; /* whether we need to initialize */
240 static int yy_start = 0; /* start state number */
242 /* Flag which is used to allow yywrap()'s to do buffer switches
243 * instead of setting up a fresh yyin. A bit of a hack ...
245 static int yy_did_buffer_switch_on_eof;
247 void yyrestart YY_PROTO(( FILE *input_file ));
249 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250 void yy_load_buffer_state YY_PROTO(( void ));
251 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
257 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
261 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262 static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263 static void yy_flex_free YY_PROTO(( void * ));
265 #define yy_new_buffer yy_create_buffer
267 #define yy_set_interactive(is_interactive) \
269 if ( ! yy_current_buffer ) \
270 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
271 yy_current_buffer->yy_is_interactive = is_interactive; \
274 #define yy_set_bol(at_bol) \
276 if ( ! yy_current_buffer ) \
277 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
278 yy_current_buffer->yy_at_bol = at_bol; \
281 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
284 #define YY_USES_REJECT
287 #define YY_SKIP_YYWRAP
288 typedef unsigned char YY_CHAR;
289 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
290 typedef int yy_state_type;
294 #define yytext_ptr yytext
296 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
297 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
298 static int yy_get_next_buffer YY_PROTO(( void ));
299 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
301 /* Done after the current pattern has been matched and before the
302 * corresponding action - sets up yytext.
304 #define YY_DO_BEFORE_ACTION \
305 yytext_ptr = yy_bp; \
306 yyleng = (int) (yy_cp - yy_bp); \
307 yy_hold_char = *yy_cp; \
311 #define YY_NUM_RULES 114
312 #define YY_END_OF_BUFFER 115
313 static yyconst short int yy_acclist[192] =
315 115, 113, 114, 112, 113, 114, 112, 114, 113, 114,
316 113, 114, 113, 114, 113, 114, 113, 114, 113, 114,
317 105, 113, 114, 105, 113, 114, 1, 113, 114, 113,
318 114, 113, 114, 113, 114, 113, 114, 113, 114, 113,
319 114, 113, 114, 113, 114, 113, 114, 113, 114, 113,
320 114, 113, 114, 113, 114, 113, 114, 113, 114, 113,
321 114, 113, 114, 113, 114, 113, 114, 113, 114, 113,
322 114, 104, 102, 101, 101, 108, 106, 110, 105, 1,
323 87, 41, 69, 23, 104, 101, 101, 109, 110, 20,
324 110, 111, 63, 68, 39, 34, 42, 66, 3, 54,
326 65, 25, 77, 67, 86, 81, 82, 64, 70, 103,
327 110, 110, 49, 78, 79, 32, 94, 95, 56, 22,
328 107, 26, 4, 61, 55, 48, 11, 110, 36, 2,
329 5, 58, 60, 50, 72, 76, 74, 75, 73, 71,
330 52, 96, 51, 57, 21, 84, 93, 45, 59, 30,
331 24, 44, 7, 89, 33, 92, 38, 62, 80, 88,
332 27, 28, 90, 53, 85, 83, 43, 6, 29, 37,
333 8, 17, 9, 10, 35, 12, 14, 13, 40, 15,
334 31, 91, 97, 99, 100, 16, 46, 98, 18, 47,
339 static yyconst short int yy_accept[505] =
341 1, 1, 1, 2, 4, 7, 9, 11, 13, 15,
342 17, 19, 21, 24, 27, 30, 32, 34, 36, 38,
343 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
344 60, 62, 64, 66, 68, 70, 72, 72, 73, 73,
345 74, 75, 76, 77, 77, 78, 78, 79, 80, 80,
346 81, 81, 81, 81, 81, 81, 81, 81, 81, 82,
347 82, 83, 83, 83, 83, 83, 83, 83, 83, 83,
348 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
349 83, 83, 83, 83, 83, 83, 83, 84, 84, 84,
350 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
352 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
353 85, 85, 85, 85, 86, 87, 89, 90, 91, 92,
354 92, 93, 94, 94, 94, 95, 95, 96, 96, 97,
355 97, 97, 97, 98, 98, 98, 98, 98, 98, 98,
356 99, 99, 99, 100, 100, 100, 100, 100, 100, 100,
357 100, 100, 100, 100, 101, 101, 101, 101, 101, 101,
358 101, 101, 101, 102, 103, 103, 103, 104, 104, 105,
359 106, 106, 106, 106, 106, 106, 107, 107, 108, 108,
360 108, 108, 109, 109, 109, 109, 109, 109, 109, 109,
361 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
363 109, 109, 109, 109, 110, 110, 111, 112, 112, 112,
364 112, 113, 113, 113, 113, 113, 114, 115, 116, 116,
365 116, 116, 117, 117, 117, 117, 117, 117, 117, 117,
366 117, 117, 117, 117, 117, 118, 118, 118, 118, 118,
367 118, 118, 118, 118, 118, 119, 120, 120, 120, 121,
368 121, 121, 122, 122, 122, 122, 122, 122, 122, 122,
369 122, 122, 122, 122, 122, 123, 123, 123, 124, 125,
370 125, 126, 126, 126, 126, 126, 126, 126, 126, 126,
371 126, 127, 127, 128, 128, 128, 129, 130, 130, 130,
372 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
374 131, 131, 131, 132, 132, 133, 133, 133, 133, 133,
375 133, 133, 134, 134, 134, 134, 134, 134, 134, 135,
376 135, 135, 136, 137, 138, 139, 140, 141, 142, 142,
377 142, 143, 143, 143, 143, 144, 145, 146, 146, 146,
378 146, 146, 146, 147, 147, 147, 147, 147, 147, 148,
379 148, 149, 149, 149, 149, 149, 149, 149, 150, 151,
380 152, 152, 152, 153, 153, 154, 154, 154, 154, 155,
381 155, 156, 157, 158, 159, 159, 159, 160, 160, 160,
382 161, 162, 163, 163, 163, 164, 165, 166, 167, 167,
383 167, 167, 167, 167, 167, 168, 169, 170, 170, 170,
385 170, 170, 170, 170, 170, 170, 170, 170, 170, 171,
386 171, 171, 171, 171, 171, 171, 171, 171, 171, 172,
387 172, 172, 172, 173, 173, 173, 173, 173, 174, 175,
388 175, 175, 175, 175, 175, 176, 176, 176, 176, 177,
389 178, 179, 179, 179, 179, 179, 179, 179, 179, 179,
390 179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
391 179, 179, 180, 180, 180, 180, 180, 180, 181, 181,
392 181, 181, 181, 182, 182, 182, 183, 183, 183, 183,
393 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
394 184, 184, 185, 186, 187, 187, 188, 188, 189, 190,
399 static yyconst int yy_ec[256] =
401 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
402 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
405 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
406 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
407 1, 1, 1, 1, 16, 16, 16, 16, 17, 16,
408 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
409 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
410 1, 1, 1, 1, 18, 1, 19, 20, 21, 22,
412 23, 24, 25, 26, 27, 5, 28, 29, 30, 31,
413 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
414 42, 43, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 static yyconst int yy_meta[44] =
433 1, 1, 2, 1, 3, 1, 1, 3, 3, 3,
434 3, 3, 3, 4, 1, 3, 3, 3, 3, 3,
435 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
436 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
440 static yyconst short int yy_base[509] =
442 0, 0, 1096, 1097, 1097, 1097, 1091, 1080, 36, 40,
443 44, 50, 56, 62, 0, 63, 66, 81, 89, 47,
444 90, 91, 76, 96, 108, 49, 97, 110, 68, 137,
445 120, 168, 112, 115, 135, 127, 1089, 1097, 1078, 1097,
446 0, 158, 173, 180, 196, 70, 201, 216, 221, 0,
447 121, 152, 123, 139, 166, 140, 162, 184, 1077, 222,
448 180, 31, 186, 119, 232, 208, 144, 225, 234, 236,
449 235, 188, 238, 240, 246, 241, 245, 203, 248, 256,
450 254, 258, 262, 252, 272, 274, 1076, 276, 278, 280,
451 255, 253, 283, 284, 285, 286, 288, 297, 300, 1075,
453 301, 292, 295, 307, 309, 318, 316, 315, 322, 312,
454 147, 329, 330, 1074, 0, 344, 349, 1073, 363, 380,
455 0, 1072, 338, 336, 1071, 355, 1070, 356, 1069, 353,
456 367, 334, 1068, 375, 365, 381, 384, 370, 371, 1067,
457 388, 392, 391, 393, 394, 395, 396, 400, 399, 407,
458 406, 409, 411, 413, 410, 414, 418, 421, 425, 426,
459 427, 429, 1066, 1065, 430, 431, 1064, 435, 1063, 1062,
460 458, 436, 439, 434, 469, 1061, 449, 1060, 438, 441,
461 458, 1059, 471, 472, 474, 473, 481, 482, 475, 476,
462 483, 488, 489, 493, 495, 496, 504, 501, 503, 505,
464 510, 507, 516, 1058, 511, 1097, 527, 541, 545, 549,
465 554, 555, 440, 556, 557, 1057, 1056, 1055, 558, 559,
466 560, 1054, 527, 518, 561, 189, 562, 528, 566, 563,
467 564, 567, 568, 570, 1053, 571, 587, 580, 578, 579,
468 581, 590, 591, 596, 1052, 1051, 594, 598, 1050, 597,
469 601, 0, 606, 603, 607, 602, 608, 610, 618, 620,
470 625, 623, 628, 629, 1049, 630, 626, 1048, 1047, 638,
471 1046, 634, 640, 642, 644, 646, 648, 651, 653, 652,
472 1045, 654, 1044, 656, 657, 662, 1043, 662, 665, 1042,
473 668, 671, 674, 680, 682, 683, 684, 685, 687, 686,
475 689, 690, 1041, 691, 1040, 696, 692, 695, 693, 700,
476 699, 1039, 710, 712, 713, 714, 715, 719, 1038, 718,
477 722, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 725, 729,
478 1030, 726, 730, 732, 1029, 1028, 1027, 731, 735, 743,
479 733, 737, 1026, 734, 746, 744, 747, 750, 1025, 752,
480 1024, 755, 761, 760, 758, 763, 764, 1023, 1022, 1021,
481 771, 762, 1020, 773, 1019, 774, 777, 779, 1018, 787,
482 1017, 1016, 1015, 1014, 778, 788, 1013, 791, 792, 1012,
483 1011, 1010, 790, 795, 1009, 1008, 1007, 1006, 793, 796,
484 798, 797, 804, 801, 1005, 1004, 1003, 809, 811, 812,
486 813, 814, 816, 817, 820, 822, 827, 819, 1002, 815,
487 833, 826, 839, 843, 845, 846, 847, 848, 999, 849,
488 850, 851, 990, 854, 857, 855, 856, 989, 987, 858,
489 866, 876, 862, 861, 986, 879, 880, 881, 984, 983,
490 982, 882, 884, 888, 890, 889, 863, 891, 896, 897,
491 899, 901, 900, 902, 903, 904, 908, 909, 912, 913,
492 916, 980, 918, 924, 923, 925, 926, 977, 928, 929,
493 930, 931, 975, 935, 936, 973, 934, 944, 942, 946,
494 950, 954, 956, 957, 958, 960, 961, 959, 962, 864,
495 964, 829, 766, 604, 969, 519, 965, 517, 477, 446,
497 970, 333, 1097, 1005, 1007, 83, 1011, 80
500 static yyconst short int yy_def[509] =
502 503, 1, 503, 503, 503, 503, 504, 505, 506, 503,
503 505, 505, 505, 505, 507, 505, 505, 505, 505, 505,
504 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
505 505, 505, 505, 505, 505, 505, 504, 503, 505, 503,
506 508, 508, 503, 503, 505, 505, 505, 505, 505, 507,
507 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
508 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
509 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
510 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
511 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
513 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
514 505, 505, 505, 503, 508, 508, 503, 505, 505, 505,
515 49, 505, 505, 505, 505, 505, 505, 505, 505, 505,
516 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
517 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
518 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
519 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
520 49, 505, 505, 505, 505, 505, 505, 505, 505, 505,
521 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
522 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
524 505, 505, 505, 505, 505, 503, 503, 503, 503, 505,
525 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
526 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
527 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
528 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
529 505, 171, 505, 505, 505, 505, 505, 505, 505, 505,
530 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
531 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
532 505, 505, 505, 505, 505, 503, 505, 505, 505, 505,
533 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
535 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
536 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
537 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
538 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
539 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
540 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
541 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
542 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
543 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
544 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
546 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
547 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
548 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
549 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
550 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
551 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
552 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
553 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
554 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
555 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
557 505, 505, 0, 503, 503, 503, 503, 503
560 static yyconst short int yy_nxt[1141] =
562 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
563 14, 14, 14, 4, 15, 8, 8, 8, 16, 17,
564 18, 19, 20, 21, 22, 8, 23, 8, 24, 25,
565 26, 27, 28, 8, 29, 30, 31, 32, 33, 34,
566 35, 8, 36, 42, 40, 43, 43, 43, 43, 44,
567 44, 44, 44, 45, 45, 45, 45, 40, 46, 134,
568 40, 135, 40, 40, 47, 48, 48, 48, 48, 40,
569 47, 48, 48, 48, 48, 40, 40, 69, 118, 40,
570 84, 40, 115, 40, 51, 41, 85, 70, 56, 40,
571 90, 52, 57, 53, 40, 54, 49, 58, 55, 60,
573 59, 61, 40, 40, 40, 76, 77, 64, 71, 40,
574 40, 65, 62, 74, 78, 66, 63, 67, 72, 75,
575 68, 40, 79, 40, 73, 40, 81, 80, 40, 86,
576 108, 87, 40, 40, 40, 88, 40, 110, 99, 82,
577 40, 89, 122, 109, 125, 83, 91, 111, 40, 113,
578 40, 100, 40, 40, 101, 137, 92, 40, 203, 93,
579 40, 102, 94, 95, 128, 40, 112, 116, 116, 116,
580 116, 126, 141, 96, 97, 40, 98, 91, 123, 40,
581 124, 40, 43, 43, 43, 43, 129, 103, 117, 44,
582 44, 44, 44, 40, 104, 127, 105, 40, 106, 40,
584 133, 40, 40, 107, 47, 45, 45, 45, 45, 40,
585 119, 119, 119, 119, 40, 130, 40, 120, 297, 148,
586 136, 40, 156, 120, 47, 48, 48, 48, 48, 40,
587 121, 121, 121, 121, 40, 40, 121, 121, 40, 121,
588 121, 121, 121, 121, 121, 40, 140, 40, 40, 40,
589 131, 40, 138, 40, 40, 143, 144, 132, 40, 40,
590 149, 40, 142, 146, 139, 40, 40, 40, 40, 40,
591 147, 40, 145, 152, 159, 40, 150, 151, 157, 162,
592 153, 154, 161, 155, 158, 40, 160, 40, 164, 40,
593 163, 40, 166, 40, 172, 171, 40, 40, 40, 40,
595 165, 40, 167, 173, 168, 40, 180, 182, 40, 169,
596 40, 174, 176, 40, 40, 177, 170, 181, 178, 175,
597 40, 179, 40, 183, 188, 40, 184, 186, 40, 40,
598 202, 40, 197, 198, 185, 40, 189, 190, 187, 192,
599 191, 196, 40, 40, 193, 199, 40, 40, 200, 40,
600 201, 40, 194, 116, 116, 116, 116, 195, 207, 207,
601 207, 207, 212, 204, 205, 208, 40, 213, 40, 40,
602 218, 208, 119, 119, 119, 119, 40, 214, 40, 120,
603 40, 216, 215, 40, 40, 120, 209, 210, 40, 211,
604 211, 211, 211, 40, 40, 217, 219, 40, 223, 224,
606 220, 40, 222, 221, 40, 40, 40, 40, 40, 40,
607 225, 227, 40, 40, 226, 229, 230, 228, 234, 40,
608 40, 235, 40, 40, 40, 237, 40, 40, 231, 236,
609 232, 40, 233, 239, 40, 240, 242, 238, 40, 40,
610 40, 241, 40, 40, 40, 243, 245, 40, 40, 40,
611 246, 40, 40, 40, 40, 247, 255, 244, 249, 40,
612 288, 261, 40, 262, 250, 251, 248, 252, 252, 252,
613 252, 40, 253, 252, 252, 254, 252, 252, 252, 252,
614 252, 252, 40, 260, 40, 40, 40, 40, 40, 40,
615 40, 256, 263, 257, 40, 40, 40, 258, 266, 259,
617 265, 40, 40, 268, 269, 267, 40, 264, 40, 40,
618 273, 270, 271, 272, 40, 275, 40, 40, 40, 274,
619 40, 276, 278, 40, 40, 280, 281, 277, 282, 40,
620 40, 40, 40, 284, 283, 279, 207, 207, 207, 207,
621 40, 40, 285, 208, 295, 294, 299, 209, 209, 208,
622 286, 286, 286, 286, 286, 286, 286, 286, 211, 211,
623 211, 211, 40, 211, 211, 211, 211, 40, 40, 40,
624 40, 40, 40, 40, 40, 40, 40, 40, 291, 40,
625 40, 40, 302, 40, 40, 287, 289, 290, 304, 303,
626 298, 40, 40, 40, 40, 292, 293, 301, 300, 306,
628 40, 296, 308, 40, 40, 307, 305, 40, 311, 40,
629 40, 40, 309, 310, 40, 40, 40, 40, 312, 40,
630 40, 40, 313, 40, 314, 315, 316, 321, 319, 320,
631 323, 40, 325, 40, 317, 322, 40, 318, 40, 40,
632 327, 40, 40, 40, 324, 330, 326, 40, 329, 332,
633 331, 40, 333, 40, 334, 40, 328, 40, 336, 40,
634 335, 40, 339, 337, 40, 40, 40, 40, 338, 40,
635 40, 286, 286, 286, 286, 40, 340, 343, 40, 346,
636 349, 40, 341, 348, 40, 342, 350, 40, 351, 352,
637 345, 347, 344, 40, 353, 40, 40, 40, 40, 40,
639 40, 355, 40, 40, 40, 40, 40, 358, 40, 40,
640 362, 363, 40, 40, 354, 356, 357, 359, 364, 361,
641 365, 369, 360, 40, 366, 40, 40, 40, 40, 367,
642 368, 40, 40, 372, 371, 40, 373, 374, 40, 40,
643 370, 375, 40, 40, 40, 40, 40, 40, 40, 376,
644 40, 380, 379, 378, 382, 384, 40, 40, 377, 40,
645 40, 387, 390, 40, 385, 40, 381, 383, 40, 386,
646 388, 40, 389, 40, 40, 40, 40, 40, 393, 40,
647 392, 395, 396, 391, 40, 394, 40, 40, 400, 401,
648 40, 40, 40, 397, 398, 399, 404, 406, 402, 405,
650 40, 40, 403, 40, 40, 40, 40, 407, 40, 40,
651 40, 40, 408, 410, 40, 411, 412, 40, 409, 416,
652 413, 414, 40, 417, 40, 40, 40, 40, 40, 40,
653 40, 415, 40, 40, 418, 40, 424, 419, 425, 40,
654 40, 423, 40, 420, 433, 421, 40, 426, 427, 429,
655 428, 422, 40, 431, 430, 432, 40, 434, 40, 40,
656 40, 40, 40, 40, 40, 435, 437, 40, 40, 40,
657 40, 40, 439, 442, 40, 40, 40, 40, 446, 40,
658 451, 436, 443, 438, 447, 440, 441, 444, 448, 40,
659 450, 445, 40, 40, 40, 40, 449, 40, 453, 452,
661 455, 40, 40, 40, 40, 460, 456, 454, 458, 40,
662 40, 461, 40, 40, 40, 40, 40, 40, 459, 465,
663 467, 40, 40, 463, 457, 40, 40, 464, 466, 40,
664 468, 40, 462, 469, 472, 473, 40, 40, 40, 40,
665 470, 40, 40, 40, 40, 471, 476, 40, 40, 40,
666 480, 477, 474, 478, 479, 40, 482, 40, 485, 40,
667 475, 483, 486, 40, 487, 481, 484, 40, 488, 40,
668 40, 40, 40, 40, 40, 40, 489, 40, 40, 494,
669 495, 496, 40, 40, 490, 491, 40, 501, 40, 500,
670 40, 493, 492, 40, 499, 40, 40, 40, 498, 40,
672 40, 497, 40, 40, 502, 37, 37, 37, 37, 39,
673 39, 50, 40, 50, 50, 40, 40, 40, 40, 40,
674 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
675 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
676 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
677 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
678 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
679 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
680 40, 40, 40, 40, 40, 40, 40, 206, 40, 40,
681 40, 40, 114, 40, 38, 503, 3, 503, 503, 503,
683 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
684 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
685 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
686 503, 503, 503, 503, 503, 503, 503, 503, 503, 503
689 static yyconst short int yy_chk[1141] =
691 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
692 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
693 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
694 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
695 1, 1, 1, 9, 62, 9, 9, 9, 9, 10,
696 10, 10, 10, 11, 11, 11, 11, 11, 12, 62,
697 20, 62, 26, 12, 13, 13, 13, 13, 13, 13,
698 14, 14, 14, 14, 14, 14, 16, 20, 46, 17,
699 26, 29, 508, 46, 16, 506, 26, 20, 17, 23,
700 29, 16, 17, 16, 18, 16, 13, 17, 16, 18,
702 17, 18, 19, 21, 22, 23, 23, 19, 21, 24,
703 27, 19, 18, 22, 24, 19, 18, 19, 21, 22,
704 19, 25, 24, 28, 21, 33, 25, 24, 34, 27,
705 33, 27, 64, 31, 51, 28, 53, 34, 31, 25,
706 36, 28, 51, 33, 53, 25, 30, 35, 35, 36,
707 30, 31, 54, 56, 31, 64, 30, 67, 111, 30,
708 111, 31, 30, 30, 56, 52, 35, 42, 42, 42,
709 42, 54, 67, 30, 30, 57, 30, 32, 52, 55,
710 52, 32, 43, 43, 43, 43, 57, 32, 44, 44,
711 44, 44, 44, 61, 32, 55, 32, 58, 32, 63,
713 61, 72, 226, 32, 45, 45, 45, 45, 45, 45,
714 47, 47, 47, 47, 47, 58, 78, 47, 226, 72,
715 63, 66, 78, 47, 48, 48, 48, 48, 48, 48,
716 49, 49, 49, 49, 49, 60, 49, 49, 68, 49,
717 49, 49, 49, 49, 49, 65, 66, 69, 71, 70,
718 60, 73, 65, 74, 76, 69, 70, 60, 77, 75,
719 73, 79, 68, 71, 65, 84, 92, 81, 91, 80,
720 71, 82, 70, 76, 80, 83, 74, 75, 79, 82,
721 77, 77, 81, 77, 79, 85, 80, 86, 84, 88,
722 83, 89, 86, 90, 92, 91, 93, 94, 95, 96,
724 85, 97, 88, 93, 89, 102, 95, 97, 103, 90,
725 98, 93, 94, 99, 101, 94, 90, 96, 94, 93,
726 104, 94, 105, 98, 102, 110, 99, 101, 108, 107,
727 110, 106, 108, 108, 99, 109, 103, 104, 101, 106,
728 105, 107, 112, 113, 106, 108, 502, 132, 109, 124,
729 109, 123, 106, 116, 116, 116, 116, 106, 117, 117,
730 117, 117, 123, 112, 113, 117, 130, 124, 126, 128,
731 132, 117, 119, 119, 119, 119, 119, 126, 135, 119,
732 131, 130, 128, 138, 139, 119, 120, 120, 134, 120,
733 120, 120, 120, 120, 136, 131, 134, 137, 138, 139,
735 135, 141, 137, 136, 143, 142, 144, 145, 146, 147,
736 141, 142, 149, 148, 141, 144, 145, 143, 148, 151,
737 150, 149, 152, 155, 153, 151, 154, 156, 145, 150,
738 146, 157, 147, 153, 158, 154, 156, 152, 159, 160,
739 161, 155, 162, 165, 166, 157, 159, 174, 168, 172,
740 160, 179, 173, 213, 180, 161, 174, 158, 165, 500,
741 213, 179, 177, 180, 166, 168, 162, 171, 171, 171,
742 171, 181, 172, 171, 171, 173, 171, 171, 171, 171,
743 171, 171, 175, 177, 183, 184, 186, 185, 189, 190,
744 499, 175, 181, 175, 187, 188, 191, 175, 185, 175,
746 184, 192, 193, 187, 188, 186, 194, 183, 195, 196,
747 192, 189, 190, 191, 198, 194, 199, 197, 200, 193,
748 202, 195, 197, 201, 205, 199, 200, 196, 201, 203,
749 498, 224, 496, 203, 202, 198, 207, 207, 207, 207,
750 223, 228, 205, 207, 224, 223, 228, 208, 208, 207,
751 208, 208, 208, 208, 209, 209, 209, 209, 210, 210,
752 210, 210, 210, 211, 211, 211, 211, 211, 212, 214,
753 215, 219, 220, 221, 225, 227, 230, 231, 219, 229,
754 232, 233, 231, 234, 236, 212, 214, 215, 233, 232,
755 227, 239, 240, 238, 241, 220, 221, 230, 229, 236,
757 237, 225, 238, 242, 243, 237, 234, 247, 241, 244,
758 250, 248, 239, 240, 251, 256, 254, 494, 242, 253,
759 255, 257, 243, 258, 244, 247, 248, 255, 253, 254,
760 257, 259, 258, 260, 250, 256, 262, 251, 261, 267,
761 259, 263, 264, 266, 257, 262, 258, 272, 261, 264,
762 263, 270, 266, 273, 267, 274, 260, 275, 272, 276,
763 270, 277, 275, 273, 278, 280, 279, 282, 274, 284,
764 285, 286, 286, 286, 286, 288, 276, 279, 289, 284,
765 288, 291, 277, 285, 292, 278, 289, 293, 291, 292,
766 282, 284, 280, 294, 293, 295, 296, 297, 298, 300,
768 299, 295, 301, 302, 304, 307, 309, 298, 308, 306,
769 302, 304, 311, 310, 294, 296, 297, 299, 306, 301,
770 307, 311, 300, 313, 308, 314, 315, 316, 317, 309,
771 310, 320, 318, 315, 314, 321, 316, 317, 329, 332,
772 313, 318, 330, 333, 338, 334, 341, 344, 339, 320,
773 342, 332, 330, 329, 334, 339, 340, 346, 321, 345,
774 347, 342, 346, 348, 340, 350, 333, 338, 352, 341,
775 344, 355, 345, 354, 353, 362, 356, 357, 350, 493,
776 348, 353, 354, 347, 361, 352, 364, 366, 361, 361,
777 367, 375, 368, 355, 356, 357, 366, 368, 362, 367,
779 370, 376, 364, 383, 378, 379, 389, 370, 384, 390,
780 392, 391, 375, 378, 394, 379, 383, 393, 376, 391,
781 384, 389, 398, 392, 399, 400, 401, 402, 410, 403,
782 404, 390, 408, 405, 393, 406, 402, 394, 403, 412,
783 407, 401, 492, 398, 412, 399, 411, 404, 405, 407,
784 406, 400, 413, 410, 408, 411, 414, 413, 415, 416,
785 417, 418, 420, 421, 422, 414, 416, 424, 426, 427,
786 425, 430, 418, 422, 434, 433, 447, 490, 427, 431,
787 434, 415, 424, 417, 430, 420, 421, 425, 431, 432,
788 433, 426, 436, 437, 438, 442, 432, 443, 437, 436,
790 442, 444, 446, 445, 448, 447, 443, 438, 445, 449,
791 450, 448, 451, 453, 452, 454, 455, 456, 446, 452,
792 454, 457, 458, 450, 444, 459, 460, 451, 453, 461,
793 455, 463, 449, 456, 459, 460, 465, 464, 466, 467,
794 457, 469, 470, 471, 472, 458, 464, 477, 474, 475,
795 469, 465, 461, 466, 467, 479, 471, 478, 475, 480,
796 463, 472, 477, 481, 478, 470, 474, 482, 479, 483,
797 484, 485, 488, 486, 487, 489, 480, 491, 497, 485,
798 486, 487, 495, 501, 481, 482, 476, 497, 473, 495,
799 468, 484, 483, 462, 491, 441, 440, 439, 489, 435,
801 429, 488, 428, 423, 501, 504, 504, 504, 504, 505,
802 505, 507, 419, 507, 507, 409, 397, 396, 395, 388,
803 387, 386, 385, 382, 381, 380, 377, 374, 373, 372,
804 371, 369, 365, 363, 360, 359, 358, 351, 349, 343,
805 337, 336, 335, 331, 328, 327, 326, 325, 324, 323,
806 322, 319, 312, 305, 303, 290, 287, 283, 281, 271,
807 269, 268, 265, 249, 246, 245, 235, 222, 218, 217,
808 216, 204, 182, 178, 176, 170, 169, 167, 164, 163,
809 140, 133, 129, 127, 125, 122, 118, 114, 100, 87,
810 59, 39, 37, 8, 7, 3, 503, 503, 503, 503,
812 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
813 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
814 503, 503, 503, 503, 503, 503, 503, 503, 503, 503,
815 503, 503, 503, 503, 503, 503, 503, 503, 503, 503
818 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
819 static char *yy_full_match;
823 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
824 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
828 #define yymore() yymore_used_but_not_detected
829 #define YY_MORE_ADJ 0
830 #define YY_RESTORE_YY_MORE_OFFSET
832 #line 1 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
834 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
836 // The LLVM Compiler Infrastructure
838 // This file was developed by the LLVM research group and is distributed under
839 // the University of Illinois Open Source License. See LICENSE.TXT for details.
841 //===----------------------------------------------------------------------===//
843 // This file implements the flex scanner for LLVM assembly languages files.
845 //===----------------------------------------------------------------------===*/
846 #define YY_NEVER_INTERACTIVE 1
847 #line 28 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
848 #include "ParserInternals.h"
849 #include "llvm/Module.h"
851 #include "llvmAsmParser.h"
855 void set_scan_file(FILE * F){
856 yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
858 void set_scan_string (const char * str) {
859 yy_scan_string (str);
862 #define RET_TOK(type, Enum, sym) \
863 llvmAsmlval.type = Instruction::Enum; return sym
867 // TODO: All of the static identifiers are figured out by the lexer,
868 // these should be hashed to reduce the lexer size
871 // atoull - Convert an ascii string of decimal digits into the unsigned long
872 // long representation... this does not have to do input error checking,
873 // because we know that the input will be matched by a suitable regex...
875 static uint64_t atoull(const char *Buffer) {
877 for (; *Buffer; Buffer++) {
878 uint64_t OldRes = Result;
880 Result += *Buffer-'0';
881 if (Result < OldRes) // Uh, oh, overflow detected!!!
882 GenerateError("constant bigger than 64 bits detected!");
887 static uint64_t HexIntToVal(const char *Buffer) {
889 for (; *Buffer; ++Buffer) {
890 uint64_t OldRes = Result;
893 if (C >= '0' && C <= '9')
895 else if (C >= 'A' && C <= 'F')
897 else if (C >= 'a' && C <= 'f')
900 if (Result < OldRes) // Uh, oh, overflow detected!!!
901 GenerateError("constant bigger than 64 bits detected!");
907 // HexToFP - Convert the ascii string in hexidecimal format to the floating
908 // point representation of it.
910 static double HexToFP(const char *Buffer) {
911 // Behave nicely in the face of C TBAA rules... see:
912 // http://www.nullstone.com/htmls/category/aliastyp.htm
917 UIntToFP.UI = HexIntToVal(Buffer);
919 assert(sizeof(double) == sizeof(uint64_t) &&
920 "Data sizes incompatible on this target!");
921 return UIntToFP.FP; // Cast Hex constant to double
925 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the
926 // appropriate character. If AllowNull is set to false, a \00 value will cause
927 // an exception to be thrown.
929 // If AllowNull is set to true, the return value of the function points to the
930 // last character of the string in memory.
932 char *UnEscapeLexed(char *Buffer, bool AllowNull) {
934 for (char *BIn = Buffer; *BIn; ) {
935 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
936 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
937 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
938 if (!AllowNull && !*BOut)
939 GenerateError("String literal cannot accept \\00 escape!");
941 BIn[3] = Tmp; // Restore character
942 BIn += 3; // Skip over handled chars
952 } // End llvm namespace
954 using namespace llvm;
956 #define YY_NEVER_INTERACTIVE 1
957 /* Comments start with a ; and go till end of line */
958 /* Variable(Value) identifiers start with a % sign */
959 /* Label identifiers end with a colon */
960 /* Quoted names can contain any character except " and \ */
961 /* [PN]Integer: match positive and negative literal integer values that
962 * are preceeded by a '%' character. These represent unnamed variable slots.
964 /* E[PN]Integer: match positive and negative literal integer values */
965 /* FPConstant - A Floating point constant.
967 /* HexFPConstant - Floating point constant represented in IEEE format as a
968 * hexadecimal number for when exponential notation is not precise enough.
970 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
971 * it to deal with 64 bit numbers.
973 #line 974 "Lexer.cpp"
975 /* Macros after this point can all be overridden by user definitions in
979 #ifndef YY_SKIP_YYWRAP
981 extern "C" int yywrap YY_PROTO(( void ));
983 extern int yywrap YY_PROTO(( void ));
988 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
992 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
995 #ifdef YY_NEED_STRLEN
996 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1001 static int yyinput YY_PROTO(( void ));
1003 static int input YY_PROTO(( void ));
1008 static int yy_start_stack_ptr = 0;
1009 static int yy_start_stack_depth = 0;
1010 static int *yy_start_stack = 0;
1011 #ifndef YY_NO_PUSH_STATE
1012 static void yy_push_state YY_PROTO(( int new_state ));
1014 #ifndef YY_NO_POP_STATE
1015 static void yy_pop_state YY_PROTO(( void ));
1017 #ifndef YY_NO_TOP_STATE
1018 static int yy_top_state YY_PROTO(( void ));
1022 #define YY_NO_PUSH_STATE 1
1023 #define YY_NO_POP_STATE 1
1024 #define YY_NO_TOP_STATE 1
1027 #ifdef YY_MALLOC_DECL
1035 /* Just try to get by without declaring the routines. This will fail
1036 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1037 * or sizeof(void*) != sizeof(int).
1042 /* Amount of stuff to slurp up with each read. */
1043 #ifndef YY_READ_BUF_SIZE
1044 #define YY_READ_BUF_SIZE 8192
1047 /* Copy whatever the last rule matched to the standard output. */
1050 /* This used to be an fputs(), but since the string might contain NUL's,
1051 * we now use fwrite().
1053 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1056 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1057 * is returned in "result".
1060 #define YY_INPUT(buf,result,max_size) \
1061 if ( yy_current_buffer->yy_is_interactive ) \
1064 for ( n = 0; n < max_size && \
1065 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1066 buf[n] = (char) c; \
1068 buf[n++] = (char) c; \
1069 if ( c == EOF && ferror( yyin ) ) \
1070 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1073 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1074 && ferror( yyin ) ) \
1075 YY_FATAL_ERROR( "input in flex scanner failed" );
1078 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1079 * we don't want an extra ';' after the "return" because that will cause
1080 * some compilers to complain about unreachable statements.
1083 #define yyterminate() return YY_NULL
1086 /* Number of entries by which start-condition stack grows. */
1087 #ifndef YY_START_STACK_INCR
1088 #define YY_START_STACK_INCR 25
1091 /* Report a fatal error. */
1092 #ifndef YY_FATAL_ERROR
1093 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1096 /* Default declaration of generated scanner - a define so the user can
1097 * easily add parameters.
1100 #define YY_DECL int yylex YY_PROTO(( void ))
1103 /* Code executed at the beginning of each rule, after yytext and yyleng
1106 #ifndef YY_USER_ACTION
1107 #define YY_USER_ACTION
1110 /* Code executed at the end of each rule. */
1112 #define YY_BREAK break;
1115 #define YY_RULE_SETUP \
1120 register yy_state_type yy_current_state;
1121 register char *yy_cp, *yy_bp;
1122 register int yy_act;
1124 #line 179 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1127 #line 1128 "Lexer.cpp"
1138 yy_start = 1; /* first start state */
1146 if ( ! yy_current_buffer )
1148 yy_create_buffer( yyin, YY_BUF_SIZE );
1150 yy_load_buffer_state();
1153 while ( 1 ) /* loops until end-of-file is reached */
1157 /* Support of yytext. */
1158 *yy_cp = yy_hold_char;
1160 /* yy_bp points to the position in yy_ch_buf of the start of
1165 yy_current_state = yy_start;
1166 yy_state_ptr = yy_state_buf;
1167 *yy_state_ptr++ = yy_current_state;
1171 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1172 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1174 yy_current_state = (int) yy_def[yy_current_state];
1175 if ( yy_current_state >= 504 )
1176 yy_c = yy_meta[(unsigned int) yy_c];
1178 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1179 *yy_state_ptr++ = yy_current_state;
1182 while ( yy_current_state != 503 );
1185 yy_current_state = *--yy_state_ptr;
1186 yy_lp = yy_accept[yy_current_state];
1187 find_rule: /* we branch to this label when backing up */
1188 for ( ; ; ) /* until we find what rule we matched */
1190 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1192 yy_act = yy_acclist[yy_lp];
1194 yy_full_match = yy_cp;
1199 yy_current_state = *--yy_state_ptr;
1200 yy_lp = yy_accept[yy_current_state];
1203 YY_DO_BEFORE_ACTION;
1205 if ( yy_act != YY_END_OF_BUFFER )
1208 for ( yyl = 0; yyl < yyleng; ++yyl )
1209 if ( yytext[yyl] == '\n' )
1213 do_action: /* This label is used only to access EOF actions. */
1217 { /* beginning of action switch */
1220 #line 181 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1221 { /* Ignore comments for now */ }
1225 #line 183 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1226 { return BEGINTOK; }
1230 #line 184 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1235 #line 185 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1240 #line 186 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1241 { return FALSETOK; }
1245 #line 187 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1250 #line 188 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1255 #line 189 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1256 { return CONSTANT; }
1260 #line 190 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1261 { return INTERNAL; }
1265 #line 191 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1266 { return LINKONCE; }
1270 #line 192 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1275 #line 193 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1276 { return APPENDING; }
1280 #line 194 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1281 { return DLLIMPORT; }
1285 #line 195 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1286 { return DLLEXPORT; }
1290 #line 196 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1291 { return EXTERN_WEAK; }
1295 #line 197 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1296 { return EXTERNAL; } /* Deprecated, turn into external */
1300 #line 198 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1301 { return EXTERNAL; }
1305 #line 199 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1306 { return IMPLEMENTATION; }
1310 #line 200 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1311 { return ZEROINITIALIZER; }
1315 #line 201 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1316 { return DOTDOTDOT; }
1320 #line 202 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1325 #line 203 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1326 { return NULL_TOK; }
1330 #line 204 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1335 #line 205 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1336 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1340 #line 206 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1341 { return NOT; } /* Deprecated, turned into XOR */
1345 #line 207 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1350 #line 208 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1355 #line 209 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1360 #line 210 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1365 #line 211 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1370 #line 212 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1371 { return POINTERSIZE; }
1375 #line 213 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1380 #line 214 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1385 #line 215 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1390 #line 216 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1391 { return VOLATILE; }
1395 #line 217 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1400 #line 218 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1405 #line 219 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1410 #line 220 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1415 #line 221 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1416 { return SIDEEFFECT; }
1420 #line 223 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1425 #line 224 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1430 #line 225 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1431 { return CSRETCC_TOK; }
1435 #line 226 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1436 { return FASTCC_TOK; }
1440 #line 227 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1441 { return COLDCC_TOK; }
1445 #line 228 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1446 { return X86_STDCALLCC_TOK; }
1450 #line 229 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1451 { return X86_FASTCALLCC_TOK; }
1455 #line 231 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1456 { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; }
1460 #line 232 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1461 { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; }
1465 #line 233 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1466 { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; }
1470 #line 234 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1471 { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; }
1475 #line 235 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1476 { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; }
1480 #line 236 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1481 { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
1485 #line 237 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1486 { llvmAsmlval.PrimType = Type::IntTy ; return INT; }
1490 #line 238 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1491 { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; }
1495 #line 239 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1496 { llvmAsmlval.PrimType = Type::LongTy ; return LONG; }
1500 #line 240 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1501 { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; }
1505 #line 241 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1506 { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; }
1510 #line 242 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1511 { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
1515 #line 243 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1516 { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; }
1520 #line 244 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1525 #line 245 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1530 #line 247 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1531 { RET_TOK(BinaryOpVal, Add, ADD); }
1535 #line 248 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1536 { RET_TOK(BinaryOpVal, Sub, SUB); }
1540 #line 249 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1541 { RET_TOK(BinaryOpVal, Mul, MUL); }
1545 #line 250 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1546 { RET_TOK(BinaryOpVal, Div, DIV); }
1550 #line 251 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1551 { RET_TOK(BinaryOpVal, Rem, REM); }
1555 #line 252 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1556 { RET_TOK(BinaryOpVal, And, AND); }
1560 #line 253 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1561 { RET_TOK(BinaryOpVal, Or , OR ); }
1565 #line 254 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1566 { RET_TOK(BinaryOpVal, Xor, XOR); }
1570 #line 255 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1571 { RET_TOK(BinaryOpVal, SetNE, SETNE); }
1575 #line 256 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1576 { RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
1580 #line 257 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1581 { RET_TOK(BinaryOpVal, SetLT, SETLT); }
1585 #line 258 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1586 { RET_TOK(BinaryOpVal, SetGT, SETGT); }
1590 #line 259 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1591 { RET_TOK(BinaryOpVal, SetLE, SETLE); }
1595 #line 260 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1596 { RET_TOK(BinaryOpVal, SetGE, SETGE); }
1600 #line 262 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1601 { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
1605 #line 263 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1606 { RET_TOK(OtherOpVal, Call, CALL); }
1610 #line 264 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1611 { RET_TOK(OtherOpVal, Cast, CAST); }
1615 #line 265 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1616 { RET_TOK(OtherOpVal, Select, SELECT); }
1620 #line 266 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1621 { RET_TOK(OtherOpVal, Shl, SHL); }
1625 #line 267 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1626 { RET_TOK(OtherOpVal, Shr, SHR); }
1630 #line 268 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1631 { return VANEXT_old; }
1635 #line 269 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1636 { return VAARG_old; }
1640 #line 270 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1641 { RET_TOK(OtherOpVal, VAArg , VAARG); }
1645 #line 271 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1646 { RET_TOK(TermOpVal, Ret, RET); }
1650 #line 272 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1651 { RET_TOK(TermOpVal, Br, BR); }
1655 #line 273 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1656 { RET_TOK(TermOpVal, Switch, SWITCH); }
1660 #line 274 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1661 { RET_TOK(TermOpVal, Invoke, INVOKE); }
1665 #line 275 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1666 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1670 #line 276 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1671 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
1675 #line 278 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1676 { RET_TOK(MemOpVal, Malloc, MALLOC); }
1680 #line 279 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1681 { RET_TOK(MemOpVal, Alloca, ALLOCA); }
1685 #line 280 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1686 { RET_TOK(MemOpVal, Free, FREE); }
1690 #line 281 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1691 { RET_TOK(MemOpVal, Load, LOAD); }
1695 #line 282 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1696 { RET_TOK(MemOpVal, Store, STORE); }
1700 #line 283 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1701 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
1705 #line 285 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1706 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
1710 #line 286 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1711 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1715 #line 287 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1716 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
1720 #line 290 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1722 UnEscapeLexed(yytext+1);
1723 llvmAsmlval.StrVal = strdup(yytext+1); // Skip %
1729 #line 295 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1731 yytext[strlen(yytext)-1] = 0; // nuke colon
1732 UnEscapeLexed(yytext);
1733 llvmAsmlval.StrVal = strdup(yytext);
1739 #line 301 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1741 yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
1742 UnEscapeLexed(yytext+1);
1743 llvmAsmlval.StrVal = strdup(yytext+1);
1749 #line 308 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1750 { // Note that we cannot unescape a string constant here! The
1751 // string constant might contain a \00 which would not be
1752 // understood by the string stuff. It is valid to make a
1753 // [sbyte] c"Hello World\00" constant, for example.
1755 yytext[strlen(yytext)-1] = 0; // nuke end quote
1756 llvmAsmlval.StrVal = strdup(yytext+1); // Nuke start quote
1757 return STRINGCONSTANT;
1762 #line 319 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1763 { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
1767 #line 320 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1769 uint64_t Val = atoull(yytext+1);
1770 // +1: we have bigger negative range
1771 if (Val > (uint64_t)INT64_MAX+1)
1772 GenerateError("Constant too large for signed 64 bits!");
1773 llvmAsmlval.SInt64Val = -Val;
1779 #line 328 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1781 llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
1782 return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
1787 #line 333 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1789 uint64_t Val = atoull(yytext+1);
1790 if ((unsigned)Val != Val)
1791 GenerateError("Invalid value number (too large)!");
1792 llvmAsmlval.UIntVal = unsigned(Val);
1798 #line 340 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1800 uint64_t Val = atoull(yytext+2);
1801 // +1: we have bigger negative range
1802 if (Val > (uint64_t)INT32_MAX+1)
1803 GenerateError("Constant too large for signed 32 bits!");
1804 llvmAsmlval.SIntVal = (int)-Val;
1810 #line 349 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1811 { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
1815 #line 350 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1816 { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
1818 case YY_STATE_EOF(INITIAL):
1819 #line 352 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1821 /* Make sure to free the internal buffers for flex when we are
1822 * done reading our input!
1824 yy_delete_buffer(YY_CURRENT_BUFFER);
1830 #line 360 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1831 { /* Ignore whitespace */ }
1835 #line 361 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1836 { return yytext[0]; }
1840 #line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"
1841 YY_FATAL_ERROR( "flex scanner jammed" );
1843 #line 1844 "Lexer.cpp"
1845 case YY_END_OF_BUFFER:
1847 /* Amount of text matched not including the EOB char. */
1848 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1850 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1851 *yy_cp = yy_hold_char;
1852 YY_RESTORE_YY_MORE_OFFSET
1854 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1856 /* We're scanning a new file or input source. It's
1857 * possible that this happened because the user
1858 * just pointed yyin at a new source and called
1859 * yylex(). If so, then we have to assure
1860 * consistency between yy_current_buffer and our
1861 * globals. Here is the right place to do so, because
1862 * this is the first action (other than possibly a
1863 * back-up) that will match for the new input source.
1865 yy_n_chars = yy_current_buffer->yy_n_chars;
1866 yy_current_buffer->yy_input_file = yyin;
1867 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1870 /* Note that here we test for yy_c_buf_p "<=" to the position
1871 * of the first EOB in the buffer, since yy_c_buf_p will
1872 * already have been incremented past the NUL character
1873 * (since all states make transitions on EOB to the
1874 * end-of-buffer state). Contrast this with the test
1877 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1878 { /* This was really a NUL. */
1879 yy_state_type yy_next_state;
1881 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1883 yy_current_state = yy_get_previous_state();
1885 /* Okay, we're now positioned to make the NUL
1886 * transition. We couldn't have
1887 * yy_get_previous_state() go ahead and do it
1888 * for us because it doesn't know how to deal
1889 * with the possibility of jamming (and we don't
1890 * want to build jamming into it because then it
1891 * will run more slowly).
1894 yy_next_state = yy_try_NUL_trans( yy_current_state );
1896 yy_bp = yytext_ptr + YY_MORE_ADJ;
1898 if ( yy_next_state )
1900 /* Consume the NUL. */
1901 yy_cp = ++yy_c_buf_p;
1902 yy_current_state = yy_next_state;
1909 goto yy_find_action;
1913 else switch ( yy_get_next_buffer() )
1915 case EOB_ACT_END_OF_FILE:
1917 yy_did_buffer_switch_on_eof = 0;
1921 /* Note: because we've taken care in
1922 * yy_get_next_buffer() to have set up
1923 * yytext, we can now set up
1924 * yy_c_buf_p so that if some total
1925 * hoser (like flex itself) wants to
1926 * call the scanner after we return the
1927 * YY_NULL, it'll still work - another
1928 * YY_NULL will get returned.
1930 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1932 yy_act = YY_STATE_EOF(YY_START);
1938 if ( ! yy_did_buffer_switch_on_eof )
1944 case EOB_ACT_CONTINUE_SCAN:
1946 yytext_ptr + yy_amount_of_matched_text;
1948 yy_current_state = yy_get_previous_state();
1951 yy_bp = yytext_ptr + YY_MORE_ADJ;
1954 case EOB_ACT_LAST_MATCH:
1956 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1958 yy_current_state = yy_get_previous_state();
1961 yy_bp = yytext_ptr + YY_MORE_ADJ;
1962 goto yy_find_action;
1969 "fatal flex scanner internal error--no action found" );
1970 } /* end of action switch */
1971 } /* end of scanning one token */
1972 } /* end of yylex */
1975 /* yy_get_next_buffer - try to read in a new buffer
1977 * Returns a code representing an action:
1978 * EOB_ACT_LAST_MATCH -
1979 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1980 * EOB_ACT_END_OF_FILE - end of file
1983 static int yy_get_next_buffer()
1985 register char *dest = yy_current_buffer->yy_ch_buf;
1986 register char *source = yytext_ptr;
1987 register int number_to_move, i;
1990 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1992 "fatal flex scanner internal error--end of buffer missed" );
1994 if ( yy_current_buffer->yy_fill_buffer == 0 )
1995 { /* Don't try to fill the buffer, so this is an EOF. */
1996 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1998 /* We matched a single character, the EOB, so
1999 * treat this as a final EOF.
2001 return EOB_ACT_END_OF_FILE;
2006 /* We matched some text prior to the EOB, first
2009 return EOB_ACT_LAST_MATCH;
2013 /* Try to read more data. */
2015 /* First move last chars to start of buffer. */
2016 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2018 for ( i = 0; i < number_to_move; ++i )
2019 *(dest++) = *(source++);
2021 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2022 /* don't do the read, it's not guaranteed to return an EOF,
2025 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2030 yy_current_buffer->yy_buf_size - number_to_move - 1;
2032 while ( num_to_read <= 0 )
2033 { /* Not enough room in the buffer - grow it. */
2034 #ifdef YY_USES_REJECT
2036 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2039 /* just a shorter name for the current buffer */
2040 YY_BUFFER_STATE b = yy_current_buffer;
2042 int yy_c_buf_p_offset =
2043 (int) (yy_c_buf_p - b->yy_ch_buf);
2045 if ( b->yy_is_our_buffer )
2047 int new_size = b->yy_buf_size * 2;
2049 if ( new_size <= 0 )
2050 b->yy_buf_size += b->yy_buf_size / 8;
2052 b->yy_buf_size *= 2;
2054 b->yy_ch_buf = (char *)
2055 /* Include room in for 2 EOB chars. */
2056 yy_flex_realloc( (void *) b->yy_ch_buf,
2057 b->yy_buf_size + 2 );
2060 /* Can't grow it, we don't own it. */
2063 if ( ! b->yy_ch_buf )
2065 "fatal error - scanner input buffer overflow" );
2067 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2069 num_to_read = yy_current_buffer->yy_buf_size -
2074 if ( num_to_read > YY_READ_BUF_SIZE )
2075 num_to_read = YY_READ_BUF_SIZE;
2077 /* Read in more data. */
2078 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2079 yy_n_chars, num_to_read );
2081 yy_current_buffer->yy_n_chars = yy_n_chars;
2084 if ( yy_n_chars == 0 )
2086 if ( number_to_move == YY_MORE_ADJ )
2088 ret_val = EOB_ACT_END_OF_FILE;
2094 ret_val = EOB_ACT_LAST_MATCH;
2095 yy_current_buffer->yy_buffer_status =
2096 YY_BUFFER_EOF_PENDING;
2101 ret_val = EOB_ACT_CONTINUE_SCAN;
2103 yy_n_chars += number_to_move;
2104 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2105 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2107 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2113 /* yy_get_previous_state - get the state just before the EOB char was reached */
2115 static yy_state_type yy_get_previous_state()
2117 register yy_state_type yy_current_state;
2118 register char *yy_cp;
2120 yy_current_state = yy_start;
2121 yy_state_ptr = yy_state_buf;
2122 *yy_state_ptr++ = yy_current_state;
2124 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2126 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2127 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2129 yy_current_state = (int) yy_def[yy_current_state];
2130 if ( yy_current_state >= 504 )
2131 yy_c = yy_meta[(unsigned int) yy_c];
2133 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2134 *yy_state_ptr++ = yy_current_state;
2137 return yy_current_state;
2141 /* yy_try_NUL_trans - try to make a transition on the NUL character
2144 * next_state = yy_try_NUL_trans( current_state );
2147 #ifdef YY_USE_PROTOS
2148 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2150 static yy_state_type yy_try_NUL_trans( yy_current_state )
2151 yy_state_type yy_current_state;
2154 register int yy_is_jam;
2156 register YY_CHAR yy_c = 1;
2157 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2159 yy_current_state = (int) yy_def[yy_current_state];
2160 if ( yy_current_state >= 504 )
2161 yy_c = yy_meta[(unsigned int) yy_c];
2163 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2164 yy_is_jam = (yy_current_state == 503);
2166 *yy_state_ptr++ = yy_current_state;
2168 return yy_is_jam ? 0 : yy_current_state;
2173 #ifdef YY_USE_PROTOS
2174 static inline void yyunput( int c, register char *yy_bp )
2176 static inline void yyunput( c, yy_bp )
2178 register char *yy_bp;
2181 register char *yy_cp = yy_c_buf_p;
2183 /* undo effects of setting up yytext */
2184 *yy_cp = yy_hold_char;
2186 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2187 { /* need to shift things up to make room */
2188 /* +2 for EOB chars. */
2189 register int number_to_move = yy_n_chars + 2;
2190 register char *dest = &yy_current_buffer->yy_ch_buf[
2191 yy_current_buffer->yy_buf_size + 2];
2192 register char *source =
2193 &yy_current_buffer->yy_ch_buf[number_to_move];
2195 while ( source > yy_current_buffer->yy_ch_buf )
2196 *--dest = *--source;
2198 yy_cp += (int) (dest - source);
2199 yy_bp += (int) (dest - source);
2200 yy_current_buffer->yy_n_chars =
2201 yy_n_chars = yy_current_buffer->yy_buf_size;
2203 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2204 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2207 *--yy_cp = (char) c;
2213 yy_hold_char = *yy_cp;
2216 #endif /* ifndef YY_NO_UNPUT */
2220 static int yyinput()
2227 *yy_c_buf_p = yy_hold_char;
2229 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2231 /* yy_c_buf_p now points to the character we want to return.
2232 * If this occurs *before* the EOB characters, then it's a
2233 * valid NUL; if not, then we've hit the end of the buffer.
2235 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2236 /* This was really a NUL. */
2240 { /* need more input */
2241 int offset = yy_c_buf_p - yytext_ptr;
2244 switch ( yy_get_next_buffer() )
2246 case EOB_ACT_LAST_MATCH:
2247 /* This happens because yy_g_n_b()
2248 * sees that we've accumulated a
2249 * token and flags that we need to
2250 * try matching the token before
2251 * proceeding. But for input(),
2252 * there's no matching to consider.
2253 * So convert the EOB_ACT_LAST_MATCH
2254 * to EOB_ACT_END_OF_FILE.
2257 /* Reset buffer status. */
2262 case EOB_ACT_END_OF_FILE:
2267 if ( ! yy_did_buffer_switch_on_eof )
2276 case EOB_ACT_CONTINUE_SCAN:
2277 yy_c_buf_p = yytext_ptr + offset;
2283 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2284 *yy_c_buf_p = '\0'; /* preserve yytext */
2285 yy_hold_char = *++yy_c_buf_p;
2294 #ifdef YY_USE_PROTOS
2295 void yyrestart( FILE *input_file )
2297 void yyrestart( input_file )
2301 if ( ! yy_current_buffer )
2302 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2304 yy_init_buffer( yy_current_buffer, input_file );
2305 yy_load_buffer_state();
2309 #ifdef YY_USE_PROTOS
2310 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2312 void yy_switch_to_buffer( new_buffer )
2313 YY_BUFFER_STATE new_buffer;
2316 if ( yy_current_buffer == new_buffer )
2319 if ( yy_current_buffer )
2321 /* Flush out information for old buffer. */
2322 *yy_c_buf_p = yy_hold_char;
2323 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2324 yy_current_buffer->yy_n_chars = yy_n_chars;
2327 yy_current_buffer = new_buffer;
2328 yy_load_buffer_state();
2330 /* We don't actually know whether we did this switch during
2331 * EOF (yywrap()) processing, but the only time this flag
2332 * is looked at is after yywrap() is called, so it's safe
2333 * to go ahead and always set it.
2335 yy_did_buffer_switch_on_eof = 1;
2339 #ifdef YY_USE_PROTOS
2340 void yy_load_buffer_state( void )
2342 void yy_load_buffer_state()
2345 yy_n_chars = yy_current_buffer->yy_n_chars;
2346 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2347 yyin = yy_current_buffer->yy_input_file;
2348 yy_hold_char = *yy_c_buf_p;
2352 #ifdef YY_USE_PROTOS
2353 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2355 YY_BUFFER_STATE yy_create_buffer( file, size )
2362 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2364 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2366 b->yy_buf_size = size;
2368 /* yy_ch_buf has to be 2 characters longer than the size given because
2369 * we need to put in 2 end-of-buffer characters.
2371 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2372 if ( ! b->yy_ch_buf )
2373 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2375 b->yy_is_our_buffer = 1;
2377 yy_init_buffer( b, file );
2383 #ifdef YY_USE_PROTOS
2384 void yy_delete_buffer( YY_BUFFER_STATE b )
2386 void yy_delete_buffer( b )
2393 if ( b == yy_current_buffer )
2394 yy_current_buffer = (YY_BUFFER_STATE) 0;
2396 if ( b->yy_is_our_buffer )
2397 yy_flex_free( (void *) b->yy_ch_buf );
2399 yy_flex_free( (void *) b );
2403 #ifndef YY_ALWAYS_INTERACTIVE
2404 #ifndef YY_NEVER_INTERACTIVE
2405 extern int isatty YY_PROTO(( int ));
2409 #ifdef YY_USE_PROTOS
2410 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2412 void yy_init_buffer( b, file )
2419 yy_flush_buffer( b );
2421 b->yy_input_file = file;
2422 b->yy_fill_buffer = 1;
2424 #if YY_ALWAYS_INTERACTIVE
2425 b->yy_is_interactive = 1;
2427 #if YY_NEVER_INTERACTIVE
2428 b->yy_is_interactive = 0;
2430 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2436 #ifdef YY_USE_PROTOS
2437 void yy_flush_buffer( YY_BUFFER_STATE b )
2439 void yy_flush_buffer( b )
2449 /* We always need two end-of-buffer characters. The first causes
2450 * a transition to the end-of-buffer state. The second causes
2451 * a jam in that state.
2453 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2454 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2456 b->yy_buf_pos = &b->yy_ch_buf[0];
2459 b->yy_buffer_status = YY_BUFFER_NEW;
2461 if ( b == yy_current_buffer )
2462 yy_load_buffer_state();
2466 #ifndef YY_NO_SCAN_BUFFER
2467 #ifdef YY_USE_PROTOS
2468 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2470 YY_BUFFER_STATE yy_scan_buffer( base, size )
2478 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2479 base[size-1] != YY_END_OF_BUFFER_CHAR )
2480 /* They forgot to leave room for the EOB's. */
2483 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2485 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2487 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2488 b->yy_buf_pos = b->yy_ch_buf = base;
2489 b->yy_is_our_buffer = 0;
2490 b->yy_input_file = 0;
2491 b->yy_n_chars = b->yy_buf_size;
2492 b->yy_is_interactive = 0;
2494 b->yy_fill_buffer = 0;
2495 b->yy_buffer_status = YY_BUFFER_NEW;
2497 yy_switch_to_buffer( b );
2504 #ifndef YY_NO_SCAN_STRING
2505 #ifdef YY_USE_PROTOS
2506 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2508 YY_BUFFER_STATE yy_scan_string( yy_str )
2509 yyconst char *yy_str;
2513 for ( len = 0; yy_str[len]; ++len )
2516 return yy_scan_bytes( yy_str, len );
2521 #ifndef YY_NO_SCAN_BYTES
2522 #ifdef YY_USE_PROTOS
2523 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2525 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2526 yyconst char *bytes;
2535 /* Get memory for full buffer, including space for trailing EOB's. */
2537 buf = (char *) yy_flex_alloc( n );
2539 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2541 for ( i = 0; i < len; ++i )
2544 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2546 b = yy_scan_buffer( buf, n );
2548 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2550 /* It's okay to grow etc. this buffer, and we should throw it
2551 * away when we're done.
2553 b->yy_is_our_buffer = 1;
2560 #ifndef YY_NO_PUSH_STATE
2561 #ifdef YY_USE_PROTOS
2562 static void yy_push_state( int new_state )
2564 static void yy_push_state( new_state )
2568 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2572 yy_start_stack_depth += YY_START_STACK_INCR;
2573 new_size = yy_start_stack_depth * sizeof( int );
2575 if ( ! yy_start_stack )
2576 yy_start_stack = (int *) yy_flex_alloc( new_size );
2579 yy_start_stack = (int *) yy_flex_realloc(
2580 (void *) yy_start_stack, new_size );
2582 if ( ! yy_start_stack )
2584 "out of memory expanding start-condition stack" );
2587 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2594 #ifndef YY_NO_POP_STATE
2595 static void yy_pop_state()
2597 if ( --yy_start_stack_ptr < 0 )
2598 YY_FATAL_ERROR( "start-condition stack underflow" );
2600 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2605 #ifndef YY_NO_TOP_STATE
2606 static int yy_top_state()
2608 return yy_start_stack[yy_start_stack_ptr - 1];
2612 #ifndef YY_EXIT_FAILURE
2613 #define YY_EXIT_FAILURE 2
2616 #ifdef YY_USE_PROTOS
2617 static void yy_fatal_error( yyconst char msg[] )
2619 static void yy_fatal_error( msg )
2623 (void) fprintf( stderr, "%s\n", msg );
2624 exit( YY_EXIT_FAILURE );
2629 /* Redefine yyless() so it works in section 3 code. */
2635 /* Undo effects of setting up yytext. */ \
2636 yytext[yyleng] = yy_hold_char; \
2637 yy_c_buf_p = yytext + n; \
2638 yy_hold_char = *yy_c_buf_p; \
2639 *yy_c_buf_p = '\0'; \
2645 /* Internal utility routines. */
2648 #ifdef YY_USE_PROTOS
2649 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2651 static void yy_flex_strncpy( s1, s2, n )
2658 for ( i = 0; i < n; ++i )
2663 #ifdef YY_NEED_STRLEN
2664 #ifdef YY_USE_PROTOS
2665 static int yy_flex_strlen( yyconst char *s )
2667 static int yy_flex_strlen( s )
2672 for ( n = 0; s[n]; ++n )
2680 #ifdef YY_USE_PROTOS
2681 static void *yy_flex_alloc( yy_size_t size )
2683 static void *yy_flex_alloc( size )
2687 return (void *) malloc( size );
2690 #ifdef YY_USE_PROTOS
2691 static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2693 static inline void *yy_flex_realloc( ptr, size )
2698 /* The cast to (char *) in the following accommodates both
2699 * implementations that use char* generic pointers, and those
2700 * that use void* generic pointers. It works with the latter
2701 * because both ANSI C and C++ allow castless assignment from
2702 * any pointer type to void*, and deal with argument conversions
2703 * as though doing an assignment.
2705 return (void *) realloc( (char *) ptr, size );
2708 #ifdef YY_USE_PROTOS
2709 static void yy_flex_free( void *ptr )
2711 static void yy_flex_free( ptr )
2725 #line 363 "/Users/resistor/llvm/src/llvm/lib/AsmParser/Lexer.l"