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, 94, 95, 56, 22, 107,
328 26, 4, 61, 55, 48, 11, 110, 36, 2, 5,
329 58, 60, 50, 72, 76, 74, 75, 73, 71, 52,
330 96, 51, 57, 21, 84, 93, 45, 59, 30, 24,
331 44, 7, 89, 33, 92, 38, 62, 80, 88, 27,
332 28, 90, 53, 85, 83, 43, 6, 29, 37, 8,
333 17, 9, 10, 35, 12, 14, 13, 32, 40, 15,
334 31, 91, 97, 99, 100, 16, 46, 98, 18, 47,
339 static yyconst short int yy_accept[511] =
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, 116, 116, 116, 116, 116, 116, 116, 116,
366 116, 116, 116, 116, 116, 117, 117, 117, 117, 117,
367 117, 117, 117, 117, 117, 118, 119, 119, 119, 120,
368 120, 120, 121, 121, 121, 121, 121, 121, 121, 121,
369 121, 121, 121, 121, 121, 122, 122, 122, 123, 124,
370 124, 125, 125, 125, 125, 125, 125, 125, 125, 125,
371 125, 126, 126, 127, 127, 127, 128, 129, 129, 129,
372 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
374 130, 130, 130, 130, 131, 131, 132, 132, 132, 132,
375 132, 132, 132, 133, 133, 133, 133, 133, 133, 133,
376 134, 134, 134, 135, 136, 137, 138, 139, 140, 141,
377 141, 141, 142, 142, 142, 142, 143, 144, 145, 145,
378 145, 145, 145, 145, 146, 146, 146, 146, 146, 146,
379 147, 147, 148, 148, 148, 148, 148, 148, 148, 148,
380 149, 150, 151, 151, 151, 152, 152, 153, 153, 153,
381 153, 154, 154, 155, 156, 157, 158, 158, 158, 159,
382 159, 159, 160, 161, 162, 162, 162, 163, 164, 165,
383 166, 166, 166, 166, 166, 166, 166, 167, 167, 168,
385 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
386 169, 169, 170, 170, 170, 170, 170, 170, 170, 170,
387 170, 170, 171, 171, 171, 171, 171, 172, 172, 172,
388 172, 172, 173, 174, 174, 174, 174, 174, 174, 175,
389 175, 175, 175, 176, 176, 177, 178, 178, 178, 178,
390 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
391 179, 179, 179, 179, 179, 179, 179, 179, 180, 180,
392 180, 180, 180, 180, 181, 181, 181, 181, 181, 182,
393 182, 182, 183, 183, 183, 183, 183, 183, 183, 183,
394 183, 183, 183, 183, 183, 183, 184, 184, 185, 186,
396 187, 187, 188, 188, 189, 190, 191, 191, 192, 192
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[515] =
442 0, 0, 1108, 1109, 1109, 1109, 1103, 1092, 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, 1101, 1109, 1090, 1109,
446 0, 158, 173, 180, 196, 70, 201, 216, 221, 0,
447 121, 152, 123, 139, 166, 140, 162, 184, 1089, 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, 1088, 276, 278, 280,
451 255, 253, 283, 284, 285, 286, 288, 297, 300, 1087,
453 301, 292, 295, 307, 309, 318, 316, 315, 322, 312,
454 147, 329, 330, 1086, 0, 344, 349, 1085, 363, 380,
455 0, 1084, 338, 336, 1083, 355, 1082, 356, 1081, 353,
456 367, 334, 1080, 375, 365, 381, 384, 370, 371, 1079,
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, 1078, 1077, 430, 431, 1076, 435, 1075, 1074,
460 458, 436, 439, 434, 469, 1073, 449, 1072, 438, 441,
461 458, 1071, 471, 472, 474, 473, 481, 482, 475, 476,
462 483, 488, 489, 493, 495, 496, 504, 501, 503, 505,
464 510, 507, 516, 1070, 511, 1109, 527, 541, 545, 549,
465 554, 555, 440, 556, 557, 1069, 1068, 1067, 558, 559,
466 560, 517, 528, 518, 561, 189, 562, 563, 566, 569,
467 570, 567, 564, 578, 1066, 579, 581, 580, 584, 587,
468 592, 595, 591, 596, 1065, 1064, 597, 598, 1063, 593,
469 599, 0, 603, 607, 614, 604, 616, 618, 619, 600,
470 626, 629, 631, 630, 1062, 633, 632, 1061, 1060, 634,
471 1059, 635, 644, 645, 648, 649, 650, 651, 652, 655,
472 1058, 656, 1057, 659, 657, 677, 1056, 660, 519, 1055,
473 661, 662, 677, 678, 664, 680, 687, 688, 689, 691,
475 690, 692, 693, 1054, 694, 1053, 695, 696, 699, 697,
476 702, 703, 1052, 705, 714, 710, 716, 718, 721, 1051,
477 724, 726, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 728,
478 729, 1043, 732, 731, 736, 1042, 1041, 1040, 733, 734,
479 738, 735, 737, 1039, 740, 747, 750, 751, 752, 1038,
480 753, 1037, 759, 757, 761, 762, 765, 767, 768, 1036,
481 1035, 1034, 773, 770, 1033, 772, 1032, 775, 781, 791,
482 1031, 792, 1030, 1029, 1028, 1027, 779, 780, 1026, 794,
483 795, 1025, 1024, 1023, 798, 801, 1022, 1021, 1020, 1019,
484 802, 782, 806, 807, 808, 809, 1018, 810, 1017, 1016,
486 812, 815, 816, 819, 818, 821, 822, 823, 826, 831,
487 824, 1015, 829, 835, 843, 845, 847, 837, 851, 849,
488 852, 1014, 853, 855, 857, 859, 1013, 861, 862, 864,
489 865, 1012, 1011, 869, 866, 881, 870, 867, 1010, 883,
490 884, 886, 1007, 871, 998, 997, 891, 892, 893, 895,
491 897, 898, 902, 903, 904, 905, 906, 907, 910, 995,
492 914, 908, 912, 918, 921, 923, 919, 994, 925, 929,
493 933, 934, 935, 992, 936, 937, 939, 940, 990, 943,
494 944, 989, 947, 951, 946, 955, 956, 963, 964, 965,
495 966, 968, 969, 967, 970, 985, 971, 984, 983, 979,
497 973, 783, 982, 602, 477, 446, 978, 333, 1109, 1013,
501 static yyconst short int yy_def[515] =
503 509, 1, 509, 509, 509, 509, 510, 511, 512, 509,
504 511, 511, 511, 511, 513, 511, 511, 511, 511, 511,
505 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
506 511, 511, 511, 511, 511, 511, 510, 509, 511, 509,
507 514, 514, 509, 509, 511, 511, 511, 511, 511, 513,
508 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
509 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
510 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
511 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
512 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
514 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
515 511, 511, 511, 509, 514, 514, 509, 511, 511, 511,
516 49, 511, 511, 511, 511, 511, 511, 511, 511, 511,
517 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
518 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
519 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
520 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
521 49, 511, 511, 511, 511, 511, 511, 511, 511, 511,
522 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
523 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
525 511, 511, 511, 511, 511, 509, 509, 509, 509, 511,
526 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
527 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
528 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
529 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
530 511, 171, 511, 511, 511, 511, 511, 511, 511, 511,
531 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
532 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
533 511, 511, 511, 511, 511, 509, 511, 511, 511, 511,
534 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
536 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
537 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
538 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
539 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
540 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
541 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
542 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
543 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
544 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
545 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
547 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
548 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
549 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
550 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
551 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
552 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
553 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
554 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
555 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
556 511, 511, 511, 511, 511, 511, 511, 511, 511, 511,
558 511, 511, 511, 511, 511, 511, 511, 511, 0, 509,
562 static yyconst short int yy_nxt[1153] =
564 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
565 14, 14, 14, 4, 15, 8, 8, 8, 16, 17,
566 18, 19, 20, 21, 22, 8, 23, 8, 24, 25,
567 26, 27, 28, 8, 29, 30, 31, 32, 33, 34,
568 35, 8, 36, 42, 40, 43, 43, 43, 43, 44,
569 44, 44, 44, 45, 45, 45, 45, 40, 46, 134,
570 40, 135, 40, 40, 47, 48, 48, 48, 48, 40,
571 47, 48, 48, 48, 48, 40, 40, 69, 118, 40,
572 84, 40, 115, 40, 51, 41, 85, 70, 56, 40,
573 90, 52, 57, 53, 40, 54, 49, 58, 55, 60,
575 59, 61, 40, 40, 40, 76, 77, 64, 71, 40,
576 40, 65, 62, 74, 78, 66, 63, 67, 72, 75,
577 68, 40, 79, 40, 73, 40, 81, 80, 40, 86,
578 108, 87, 40, 40, 40, 88, 40, 110, 99, 82,
579 40, 89, 122, 109, 125, 83, 91, 111, 40, 113,
580 40, 100, 40, 40, 101, 137, 92, 40, 203, 93,
581 40, 102, 94, 95, 128, 40, 112, 116, 116, 116,
582 116, 126, 141, 96, 97, 40, 98, 91, 123, 40,
583 124, 40, 43, 43, 43, 43, 129, 103, 117, 44,
584 44, 44, 44, 40, 104, 127, 105, 40, 106, 40,
586 133, 40, 40, 107, 47, 45, 45, 45, 45, 40,
587 119, 119, 119, 119, 40, 130, 40, 120, 298, 148,
588 136, 40, 156, 120, 47, 48, 48, 48, 48, 40,
589 121, 121, 121, 121, 40, 40, 121, 121, 40, 121,
590 121, 121, 121, 121, 121, 40, 140, 40, 40, 40,
591 131, 40, 138, 40, 40, 143, 144, 132, 40, 40,
592 149, 40, 142, 146, 139, 40, 40, 40, 40, 40,
593 147, 40, 145, 152, 159, 40, 150, 151, 157, 162,
594 153, 154, 161, 155, 158, 40, 160, 40, 164, 40,
595 163, 40, 166, 40, 172, 171, 40, 40, 40, 40,
597 165, 40, 167, 173, 168, 40, 180, 182, 40, 169,
598 40, 174, 176, 40, 40, 177, 170, 181, 178, 175,
599 40, 179, 40, 183, 188, 40, 184, 186, 40, 40,
600 202, 40, 197, 198, 185, 40, 189, 190, 187, 192,
601 191, 196, 40, 40, 193, 199, 40, 40, 200, 40,
602 201, 40, 194, 116, 116, 116, 116, 195, 207, 207,
603 207, 207, 212, 204, 205, 208, 40, 213, 40, 40,
604 218, 208, 119, 119, 119, 119, 40, 214, 40, 120,
605 40, 216, 215, 40, 40, 120, 209, 210, 40, 211,
606 211, 211, 211, 40, 40, 217, 219, 40, 223, 224,
608 220, 40, 222, 221, 40, 40, 40, 40, 40, 40,
609 225, 227, 40, 40, 226, 229, 230, 228, 234, 40,
610 40, 235, 40, 40, 40, 237, 40, 40, 231, 236,
611 232, 40, 233, 239, 40, 240, 242, 238, 40, 40,
612 40, 241, 40, 40, 40, 243, 245, 40, 40, 40,
613 246, 40, 40, 40, 40, 247, 255, 244, 249, 40,
614 288, 261, 40, 262, 250, 251, 248, 252, 252, 252,
615 252, 40, 253, 252, 252, 254, 252, 252, 252, 252,
616 252, 252, 40, 260, 40, 40, 40, 40, 40, 40,
617 40, 256, 263, 257, 40, 40, 40, 258, 266, 259,
619 265, 40, 40, 268, 269, 267, 40, 264, 40, 40,
620 273, 270, 271, 272, 40, 275, 40, 40, 40, 274,
621 40, 276, 278, 40, 40, 280, 281, 277, 282, 40,
622 40, 40, 40, 284, 283, 279, 207, 207, 207, 207,
623 351, 40, 285, 208, 296, 294, 295, 209, 209, 208,
624 286, 286, 286, 286, 286, 286, 286, 286, 211, 211,
625 211, 211, 40, 211, 211, 211, 211, 40, 40, 40,
626 40, 40, 40, 40, 40, 40, 40, 40, 291, 40,
627 40, 300, 40, 40, 305, 287, 289, 290, 303, 304,
628 299, 40, 40, 40, 40, 292, 293, 40, 301, 308,
630 40, 297, 309, 302, 40, 40, 40, 307, 40, 40,
631 40, 40, 40, 40, 306, 40, 40, 40, 310, 312,
632 40, 311, 314, 313, 315, 320, 317, 40, 316, 40,
633 318, 40, 40, 321, 322, 319, 329, 323, 324, 40,
634 326, 328, 40, 40, 40, 40, 40, 40, 40, 330,
635 333, 331, 325, 332, 327, 334, 336, 40, 40, 337,
636 335, 40, 40, 40, 40, 40, 340, 338, 40, 40,
637 40, 339, 40, 40, 40, 40, 344, 40, 350, 341,
638 353, 352, 347, 349, 342, 343, 286, 286, 286, 286,
639 40, 40, 346, 40, 348, 345, 355, 354, 356, 357,
641 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
642 40, 360, 40, 364, 365, 40, 40, 366, 40, 358,
643 359, 361, 363, 40, 367, 371, 362, 40, 368, 40,
644 374, 40, 370, 369, 40, 372, 373, 40, 375, 40,
645 376, 40, 40, 377, 40, 40, 40, 40, 40, 40,
646 40, 40, 381, 40, 386, 378, 380, 382, 384, 387,
647 40, 389, 379, 40, 40, 40, 40, 383, 392, 385,
648 40, 388, 40, 391, 40, 40, 390, 397, 40, 395,
649 40, 40, 394, 40, 399, 40, 40, 393, 40, 396,
650 403, 404, 40, 40, 40, 40, 40, 407, 401, 402,
652 400, 406, 398, 408, 40, 40, 405, 40, 40, 409,
653 412, 40, 410, 411, 40, 40, 413, 418, 414, 40,
654 40, 40, 40, 40, 415, 40, 416, 419, 40, 40,
655 417, 40, 40, 420, 40, 40, 40, 40, 421, 40,
656 428, 423, 40, 429, 40, 422, 424, 427, 40, 425,
657 40, 431, 430, 433, 432, 426, 40, 436, 40, 434,
658 40, 437, 40, 438, 40, 40, 40, 435, 40, 439,
659 40, 441, 40, 440, 40, 40, 443, 40, 40, 40,
660 40, 447, 40, 40, 40, 442, 456, 451, 453, 448,
661 444, 445, 449, 446, 40, 452, 40, 40, 455, 40,
663 450, 454, 458, 457, 40, 40, 40, 460, 40, 461,
664 40, 40, 459, 464, 462, 40, 40, 40, 40, 40,
665 40, 40, 467, 40, 471, 40, 465, 40, 473, 463,
666 469, 40, 40, 470, 40, 472, 40, 475, 40, 468,
667 466, 474, 40, 478, 476, 479, 40, 40, 40, 40,
668 40, 482, 40, 40, 477, 480, 40, 40, 486, 40,
669 40, 483, 484, 485, 40, 488, 491, 481, 40, 40,
670 489, 493, 494, 487, 490, 492, 40, 40, 40, 40,
671 40, 40, 40, 40, 40, 495, 40, 500, 501, 502,
672 496, 40, 40, 506, 497, 40, 40, 40, 40, 499,
674 498, 505, 40, 40, 507, 40, 504, 40, 40, 503,
675 40, 40, 508, 37, 37, 37, 37, 39, 39, 50,
676 40, 50, 50, 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, 40, 40, 40,
681 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
682 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
683 40, 40, 40, 40, 40, 40, 40, 40, 40, 206,
685 40, 40, 40, 40, 114, 40, 38, 509, 3, 509,
686 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
687 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
688 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
689 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
693 static yyconst short int yy_chk[1153] =
695 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699 1, 1, 1, 9, 62, 9, 9, 9, 9, 10,
700 10, 10, 10, 11, 11, 11, 11, 11, 12, 62,
701 20, 62, 26, 12, 13, 13, 13, 13, 13, 13,
702 14, 14, 14, 14, 14, 14, 16, 20, 46, 17,
703 26, 29, 514, 46, 16, 512, 26, 20, 17, 23,
704 29, 16, 17, 16, 18, 16, 13, 17, 16, 18,
706 17, 18, 19, 21, 22, 23, 23, 19, 21, 24,
707 27, 19, 18, 22, 24, 19, 18, 19, 21, 22,
708 19, 25, 24, 28, 21, 33, 25, 24, 34, 27,
709 33, 27, 64, 31, 51, 28, 53, 34, 31, 25,
710 36, 28, 51, 33, 53, 25, 30, 35, 35, 36,
711 30, 31, 54, 56, 31, 64, 30, 67, 111, 30,
712 111, 31, 30, 30, 56, 52, 35, 42, 42, 42,
713 42, 54, 67, 30, 30, 57, 30, 32, 52, 55,
714 52, 32, 43, 43, 43, 43, 57, 32, 44, 44,
715 44, 44, 44, 61, 32, 55, 32, 58, 32, 63,
717 61, 72, 226, 32, 45, 45, 45, 45, 45, 45,
718 47, 47, 47, 47, 47, 58, 78, 47, 226, 72,
719 63, 66, 78, 47, 48, 48, 48, 48, 48, 48,
720 49, 49, 49, 49, 49, 60, 49, 49, 68, 49,
721 49, 49, 49, 49, 49, 65, 66, 69, 71, 70,
722 60, 73, 65, 74, 76, 69, 70, 60, 77, 75,
723 73, 79, 68, 71, 65, 84, 92, 81, 91, 80,
724 71, 82, 70, 76, 80, 83, 74, 75, 79, 82,
725 77, 77, 81, 77, 79, 85, 80, 86, 84, 88,
726 83, 89, 86, 90, 92, 91, 93, 94, 95, 96,
728 85, 97, 88, 93, 89, 102, 95, 97, 103, 90,
729 98, 93, 94, 99, 101, 94, 90, 96, 94, 93,
730 104, 94, 105, 98, 102, 110, 99, 101, 108, 107,
731 110, 106, 108, 108, 99, 109, 103, 104, 101, 106,
732 105, 107, 112, 113, 106, 108, 508, 132, 109, 124,
733 109, 123, 106, 116, 116, 116, 116, 106, 117, 117,
734 117, 117, 123, 112, 113, 117, 130, 124, 126, 128,
735 132, 117, 119, 119, 119, 119, 119, 126, 135, 119,
736 131, 130, 128, 138, 139, 119, 120, 120, 134, 120,
737 120, 120, 120, 120, 136, 131, 134, 137, 138, 139,
739 135, 141, 137, 136, 143, 142, 144, 145, 146, 147,
740 141, 142, 149, 148, 141, 144, 145, 143, 148, 151,
741 150, 149, 152, 155, 153, 151, 154, 156, 145, 150,
742 146, 157, 147, 153, 158, 154, 156, 152, 159, 160,
743 161, 155, 162, 165, 166, 157, 159, 174, 168, 172,
744 160, 179, 173, 213, 180, 161, 174, 158, 165, 506,
745 213, 179, 177, 180, 166, 168, 162, 171, 171, 171,
746 171, 181, 172, 171, 171, 173, 171, 171, 171, 171,
747 171, 171, 175, 177, 183, 184, 186, 185, 189, 190,
748 505, 175, 181, 175, 187, 188, 191, 175, 185, 175,
750 184, 192, 193, 187, 188, 186, 194, 183, 195, 196,
751 192, 189, 190, 191, 198, 194, 199, 197, 200, 193,
752 202, 195, 197, 201, 205, 199, 200, 196, 201, 203,
753 222, 224, 289, 203, 202, 198, 207, 207, 207, 207,
754 289, 223, 205, 207, 224, 222, 223, 208, 208, 207,
755 208, 208, 208, 208, 209, 209, 209, 209, 210, 210,
756 210, 210, 210, 211, 211, 211, 211, 211, 212, 214,
757 215, 219, 220, 221, 225, 227, 228, 233, 219, 229,
758 232, 228, 230, 231, 233, 212, 214, 215, 231, 232,
759 227, 234, 236, 238, 237, 220, 221, 239, 229, 237,
761 240, 225, 238, 230, 243, 241, 250, 236, 242, 244,
762 247, 248, 251, 260, 234, 504, 253, 256, 239, 241,
763 254, 240, 243, 242, 244, 253, 248, 255, 247, 257,
764 250, 258, 259, 254, 255, 251, 260, 256, 257, 261,
765 258, 259, 262, 264, 263, 267, 266, 270, 272, 261,
766 264, 262, 257, 263, 258, 266, 270, 273, 274, 272,
767 267, 275, 276, 277, 278, 279, 275, 273, 280, 282,
768 285, 274, 284, 288, 291, 292, 279, 295, 288, 276,
769 292, 291, 284, 285, 277, 278, 286, 286, 286, 286,
770 293, 294, 282, 296, 284, 280, 294, 293, 295, 296,
772 297, 298, 299, 301, 300, 302, 303, 305, 307, 308,
773 310, 299, 309, 303, 305, 311, 312, 307, 314, 297,
774 298, 300, 302, 316, 308, 312, 301, 315, 309, 317,
775 316, 318, 311, 310, 319, 314, 315, 321, 317, 322,
776 318, 330, 331, 319, 334, 333, 339, 340, 342, 335,
777 343, 341, 331, 345, 340, 321, 330, 333, 335, 341,
778 346, 343, 322, 347, 348, 349, 351, 334, 347, 339,
779 354, 342, 353, 346, 355, 356, 345, 354, 357, 351,
780 358, 359, 349, 364, 356, 366, 363, 348, 368, 353,
781 363, 363, 377, 378, 369, 392, 502, 368, 358, 359,
783 357, 366, 355, 369, 370, 372, 364, 380, 381, 370,
784 378, 385, 372, 377, 386, 391, 380, 392, 381, 393,
785 394, 395, 396, 398, 385, 401, 386, 393, 402, 403,
786 391, 405, 404, 394, 406, 407, 408, 411, 395, 409,
787 405, 398, 413, 406, 410, 396, 401, 404, 414, 402,
788 418, 408, 407, 410, 409, 403, 415, 414, 416, 411,
789 417, 415, 420, 416, 419, 421, 423, 413, 424, 417,
790 425, 419, 426, 418, 428, 429, 421, 430, 431, 435,
791 438, 426, 434, 437, 444, 420, 438, 431, 435, 428,
792 423, 424, 429, 425, 436, 434, 440, 441, 437, 442,
794 430, 436, 441, 440, 447, 448, 449, 444, 450, 447,
795 451, 452, 442, 450, 448, 453, 454, 455, 456, 457,
796 458, 462, 453, 459, 457, 463, 451, 461, 459, 449,
797 455, 464, 467, 456, 465, 458, 466, 462, 469, 454,
798 452, 461, 470, 465, 463, 466, 471, 472, 473, 475,
799 476, 470, 477, 478, 464, 467, 480, 481, 475, 485,
800 483, 471, 472, 473, 484, 477, 481, 469, 486, 487,
801 478, 484, 485, 476, 480, 483, 488, 489, 490, 491,
802 494, 492, 493, 495, 497, 486, 501, 491, 492, 493,
803 487, 507, 500, 501, 488, 503, 499, 498, 496, 490,
805 489, 497, 482, 479, 503, 474, 495, 468, 460, 494,
806 446, 445, 507, 510, 510, 510, 510, 511, 511, 513,
807 443, 513, 513, 439, 433, 432, 427, 422, 412, 400,
808 399, 397, 390, 389, 388, 387, 384, 383, 382, 379,
809 376, 375, 374, 373, 371, 367, 365, 362, 361, 360,
810 352, 350, 344, 338, 337, 336, 332, 329, 328, 327,
811 326, 325, 324, 323, 320, 313, 306, 304, 290, 287,
812 283, 281, 271, 269, 268, 265, 249, 246, 245, 235,
813 218, 217, 216, 204, 182, 178, 176, 170, 169, 167,
814 164, 163, 140, 133, 129, 127, 125, 122, 118, 114,
816 100, 87, 59, 39, 37, 8, 7, 3, 509, 509,
817 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
818 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
819 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
820 509, 509, 509, 509, 509, 509, 509, 509, 509, 509,
824 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
825 static char *yy_full_match;
829 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
830 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
834 #define yymore() yymore_used_but_not_detected
835 #define YY_MORE_ADJ 0
836 #define YY_RESTORE_YY_MORE_OFFSET
838 #line 1 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
840 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
842 // The LLVM Compiler Infrastructure
844 // This file was developed by the LLVM research group and is distributed under
845 // the University of Illinois Open Source License. See LICENSE.TXT for details.
847 //===----------------------------------------------------------------------===//
849 // This file implements the flex scanner for LLVM assembly languages files.
851 //===----------------------------------------------------------------------===*/
852 #define YY_NEVER_INTERACTIVE 1
853 #line 28 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
854 #include "ParserInternals.h"
855 #include "llvm/Module.h"
857 #include "llvmAsmParser.h"
861 void set_scan_file(FILE * F){
862 yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
864 void set_scan_string (const char * str) {
865 yy_scan_string (str);
868 #define RET_TOK(type, Enum, sym) \
869 llvmAsmlval.type = Instruction::Enum; return sym
873 // TODO: All of the static identifiers are figured out by the lexer,
874 // these should be hashed to reduce the lexer size
877 // atoull - Convert an ascii string of decimal digits into the unsigned long
878 // long representation... this does not have to do input error checking,
879 // because we know that the input will be matched by a suitable regex...
881 static uint64_t atoull(const char *Buffer) {
883 for (; *Buffer; Buffer++) {
884 uint64_t OldRes = Result;
886 Result += *Buffer-'0';
887 if (Result < OldRes) // Uh, oh, overflow detected!!!
888 GenerateError("constant bigger than 64 bits detected!");
893 static uint64_t HexIntToVal(const char *Buffer) {
895 for (; *Buffer; ++Buffer) {
896 uint64_t OldRes = Result;
899 if (C >= '0' && C <= '9')
901 else if (C >= 'A' && C <= 'F')
903 else if (C >= 'a' && C <= 'f')
906 if (Result < OldRes) // Uh, oh, overflow detected!!!
907 GenerateError("constant bigger than 64 bits detected!");
913 // HexToFP - Convert the ascii string in hexidecimal format to the floating
914 // point representation of it.
916 static double HexToFP(const char *Buffer) {
917 // Behave nicely in the face of C TBAA rules... see:
918 // http://www.nullstone.com/htmls/category/aliastyp.htm
923 UIntToFP.UI = HexIntToVal(Buffer);
925 assert(sizeof(double) == sizeof(uint64_t) &&
926 "Data sizes incompatible on this target!");
927 return UIntToFP.FP; // Cast Hex constant to double
931 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the
932 // appropriate character. If AllowNull is set to false, a \00 value will cause
933 // an exception to be thrown.
935 // If AllowNull is set to true, the return value of the function points to the
936 // last character of the string in memory.
938 char *UnEscapeLexed(char *Buffer, bool AllowNull) {
940 for (char *BIn = Buffer; *BIn; ) {
941 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
942 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
943 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
944 if (!AllowNull && !*BOut)
945 GenerateError("String literal cannot accept \\00 escape!");
947 BIn[3] = Tmp; // Restore character
948 BIn += 3; // Skip over handled chars
958 } // End llvm namespace
960 using namespace llvm;
962 #define YY_NEVER_INTERACTIVE 1
963 /* Comments start with a ; and go till end of line */
964 /* Variable(Value) identifiers start with a % sign */
965 /* Label identifiers end with a colon */
966 /* Quoted names can contain any character except " and \ */
967 /* [PN]Integer: match positive and negative literal integer values that
968 * are preceeded by a '%' character. These represent unnamed variable slots.
970 /* E[PN]Integer: match positive and negative literal integer values */
971 /* FPConstant - A Floating point constant.
973 /* HexFPConstant - Floating point constant represented in IEEE format as a
974 * hexadecimal number for when exponential notation is not precise enough.
976 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
977 * it to deal with 64 bit numbers.
979 #line 980 "Lexer.cpp"
981 /* Macros after this point can all be overridden by user definitions in
985 #ifndef YY_SKIP_YYWRAP
987 extern "C" int yywrap YY_PROTO(( void ));
989 extern int yywrap YY_PROTO(( void ));
994 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
998 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1001 #ifdef YY_NEED_STRLEN
1002 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1007 static int yyinput YY_PROTO(( void ));
1009 static int input YY_PROTO(( void ));
1014 static int yy_start_stack_ptr = 0;
1015 static int yy_start_stack_depth = 0;
1016 static int *yy_start_stack = 0;
1017 #ifndef YY_NO_PUSH_STATE
1018 static void yy_push_state YY_PROTO(( int new_state ));
1020 #ifndef YY_NO_POP_STATE
1021 static void yy_pop_state YY_PROTO(( void ));
1023 #ifndef YY_NO_TOP_STATE
1024 static int yy_top_state YY_PROTO(( void ));
1028 #define YY_NO_PUSH_STATE 1
1029 #define YY_NO_POP_STATE 1
1030 #define YY_NO_TOP_STATE 1
1033 #ifdef YY_MALLOC_DECL
1041 /* Just try to get by without declaring the routines. This will fail
1042 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1043 * or sizeof(void*) != sizeof(int).
1048 /* Amount of stuff to slurp up with each read. */
1049 #ifndef YY_READ_BUF_SIZE
1050 #define YY_READ_BUF_SIZE 8192
1053 /* Copy whatever the last rule matched to the standard output. */
1056 /* This used to be an fputs(), but since the string might contain NUL's,
1057 * we now use fwrite().
1059 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1062 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1063 * is returned in "result".
1066 #define YY_INPUT(buf,result,max_size) \
1067 if ( yy_current_buffer->yy_is_interactive ) \
1070 for ( n = 0; n < max_size && \
1071 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1072 buf[n] = (char) c; \
1074 buf[n++] = (char) c; \
1075 if ( c == EOF && ferror( yyin ) ) \
1076 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1079 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1080 && ferror( yyin ) ) \
1081 YY_FATAL_ERROR( "input in flex scanner failed" );
1084 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1085 * we don't want an extra ';' after the "return" because that will cause
1086 * some compilers to complain about unreachable statements.
1089 #define yyterminate() return YY_NULL
1092 /* Number of entries by which start-condition stack grows. */
1093 #ifndef YY_START_STACK_INCR
1094 #define YY_START_STACK_INCR 25
1097 /* Report a fatal error. */
1098 #ifndef YY_FATAL_ERROR
1099 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1102 /* Default declaration of generated scanner - a define so the user can
1103 * easily add parameters.
1106 #define YY_DECL int yylex YY_PROTO(( void ))
1109 /* Code executed at the beginning of each rule, after yytext and yyleng
1112 #ifndef YY_USER_ACTION
1113 #define YY_USER_ACTION
1116 /* Code executed at the end of each rule. */
1118 #define YY_BREAK break;
1121 #define YY_RULE_SETUP \
1126 register yy_state_type yy_current_state;
1127 register char *yy_cp, *yy_bp;
1128 register int yy_act;
1130 #line 179 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1133 #line 1134 "Lexer.cpp"
1144 yy_start = 1; /* first start state */
1152 if ( ! yy_current_buffer )
1154 yy_create_buffer( yyin, YY_BUF_SIZE );
1156 yy_load_buffer_state();
1159 while ( 1 ) /* loops until end-of-file is reached */
1163 /* Support of yytext. */
1164 *yy_cp = yy_hold_char;
1166 /* yy_bp points to the position in yy_ch_buf of the start of
1171 yy_current_state = yy_start;
1172 yy_state_ptr = yy_state_buf;
1173 *yy_state_ptr++ = yy_current_state;
1177 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1178 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1180 yy_current_state = (int) yy_def[yy_current_state];
1181 if ( yy_current_state >= 510 )
1182 yy_c = yy_meta[(unsigned int) yy_c];
1184 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1185 *yy_state_ptr++ = yy_current_state;
1188 while ( yy_current_state != 509 );
1191 yy_current_state = *--yy_state_ptr;
1192 yy_lp = yy_accept[yy_current_state];
1193 find_rule: /* we branch to this label when backing up */
1194 for ( ; ; ) /* until we find what rule we matched */
1196 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1198 yy_act = yy_acclist[yy_lp];
1200 yy_full_match = yy_cp;
1205 yy_current_state = *--yy_state_ptr;
1206 yy_lp = yy_accept[yy_current_state];
1209 YY_DO_BEFORE_ACTION;
1211 if ( yy_act != YY_END_OF_BUFFER )
1214 for ( yyl = 0; yyl < yyleng; ++yyl )
1215 if ( yytext[yyl] == '\n' )
1219 do_action: /* This label is used only to access EOF actions. */
1223 { /* beginning of action switch */
1226 #line 181 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1227 { /* Ignore comments for now */ }
1231 #line 183 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1232 { return BEGINTOK; }
1236 #line 184 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1241 #line 185 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1246 #line 186 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1247 { return FALSETOK; }
1251 #line 187 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1256 #line 188 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1261 #line 189 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1262 { return CONSTANT; }
1266 #line 190 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1267 { return INTERNAL; }
1271 #line 191 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1272 { return LINKONCE; }
1276 #line 192 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1281 #line 193 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1282 { return APPENDING; }
1286 #line 194 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1287 { return DLLIMPORT; }
1291 #line 195 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1292 { return DLLEXPORT; }
1296 #line 196 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1297 { return EXTERN_WEAK; }
1301 #line 197 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1302 { return EXTERNAL; } /* Deprecated, turn into external */
1306 #line 198 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1307 { return EXTERNAL; }
1311 #line 199 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1312 { return IMPLEMENTATION; }
1316 #line 200 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1317 { return ZEROINITIALIZER; }
1321 #line 201 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1322 { return DOTDOTDOT; }
1326 #line 202 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1331 #line 203 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1332 { return NULL_TOK; }
1336 #line 204 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1341 #line 205 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1342 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1346 #line 206 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1347 { return NOT; } /* Deprecated, turned into XOR */
1351 #line 207 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1356 #line 208 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1361 #line 209 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1366 #line 210 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1371 #line 211 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1376 #line 212 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1377 { return POINTERSIZE; }
1381 #line 213 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1382 { return DATALAYOUT; }
1386 #line 214 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1391 #line 215 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1396 #line 216 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1397 { return VOLATILE; }
1401 #line 217 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1406 #line 218 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1411 #line 219 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1416 #line 220 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1421 #line 221 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1422 { return SIDEEFFECT; }
1426 #line 223 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1431 #line 224 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1436 #line 225 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1437 { return CSRETCC_TOK; }
1441 #line 226 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1442 { return FASTCC_TOK; }
1446 #line 227 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1447 { return COLDCC_TOK; }
1451 #line 228 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1452 { return X86_STDCALLCC_TOK; }
1456 #line 229 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1457 { return X86_FASTCALLCC_TOK; }
1461 #line 231 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1462 { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; }
1466 #line 232 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1467 { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; }
1471 #line 233 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1472 { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; }
1476 #line 234 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1477 { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; }
1481 #line 235 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1482 { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; }
1486 #line 236 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1487 { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
1491 #line 237 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1492 { llvmAsmlval.PrimType = Type::IntTy ; return INT; }
1496 #line 238 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1497 { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; }
1501 #line 239 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1502 { llvmAsmlval.PrimType = Type::LongTy ; return LONG; }
1506 #line 240 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1507 { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; }
1511 #line 241 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1512 { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; }
1516 #line 242 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1517 { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
1521 #line 243 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1522 { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; }
1526 #line 244 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1531 #line 245 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1536 #line 247 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1537 { RET_TOK(BinaryOpVal, Add, ADD); }
1541 #line 248 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1542 { RET_TOK(BinaryOpVal, Sub, SUB); }
1546 #line 249 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1547 { RET_TOK(BinaryOpVal, Mul, MUL); }
1551 #line 250 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1552 { RET_TOK(BinaryOpVal, Div, DIV); }
1556 #line 251 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1557 { RET_TOK(BinaryOpVal, Rem, REM); }
1561 #line 252 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1562 { RET_TOK(BinaryOpVal, And, AND); }
1566 #line 253 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1567 { RET_TOK(BinaryOpVal, Or , OR ); }
1571 #line 254 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1572 { RET_TOK(BinaryOpVal, Xor, XOR); }
1576 #line 255 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1577 { RET_TOK(BinaryOpVal, SetNE, SETNE); }
1581 #line 256 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1582 { RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
1586 #line 257 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1587 { RET_TOK(BinaryOpVal, SetLT, SETLT); }
1591 #line 258 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1592 { RET_TOK(BinaryOpVal, SetGT, SETGT); }
1596 #line 259 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1597 { RET_TOK(BinaryOpVal, SetLE, SETLE); }
1601 #line 260 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1602 { RET_TOK(BinaryOpVal, SetGE, SETGE); }
1606 #line 262 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1607 { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
1611 #line 263 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1612 { RET_TOK(OtherOpVal, Call, CALL); }
1616 #line 264 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1617 { RET_TOK(OtherOpVal, Cast, CAST); }
1621 #line 265 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1622 { RET_TOK(OtherOpVal, Select, SELECT); }
1626 #line 266 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1627 { RET_TOK(OtherOpVal, Shl, SHL); }
1631 #line 267 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1632 { RET_TOK(OtherOpVal, Shr, SHR); }
1636 #line 268 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1637 { return VANEXT_old; }
1641 #line 269 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1642 { return VAARG_old; }
1646 #line 270 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1647 { RET_TOK(OtherOpVal, VAArg , VAARG); }
1651 #line 271 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1652 { RET_TOK(TermOpVal, Ret, RET); }
1656 #line 272 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1657 { RET_TOK(TermOpVal, Br, BR); }
1661 #line 273 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1662 { RET_TOK(TermOpVal, Switch, SWITCH); }
1666 #line 274 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1667 { RET_TOK(TermOpVal, Invoke, INVOKE); }
1671 #line 275 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1672 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1676 #line 276 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1677 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
1681 #line 278 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1682 { RET_TOK(MemOpVal, Malloc, MALLOC); }
1686 #line 279 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1687 { RET_TOK(MemOpVal, Alloca, ALLOCA); }
1691 #line 280 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1692 { RET_TOK(MemOpVal, Free, FREE); }
1696 #line 281 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1697 { RET_TOK(MemOpVal, Load, LOAD); }
1701 #line 282 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1702 { RET_TOK(MemOpVal, Store, STORE); }
1706 #line 283 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1707 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
1711 #line 285 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1712 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
1716 #line 286 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1717 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1721 #line 287 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1722 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
1726 #line 290 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1728 UnEscapeLexed(yytext+1);
1729 llvmAsmlval.StrVal = strdup(yytext+1); // Skip %
1735 #line 295 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1737 yytext[strlen(yytext)-1] = 0; // nuke colon
1738 UnEscapeLexed(yytext);
1739 llvmAsmlval.StrVal = strdup(yytext);
1745 #line 301 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1747 yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
1748 UnEscapeLexed(yytext+1);
1749 llvmAsmlval.StrVal = strdup(yytext+1);
1755 #line 308 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1756 { // Note that we cannot unescape a string constant here! The
1757 // string constant might contain a \00 which would not be
1758 // understood by the string stuff. It is valid to make a
1759 // [sbyte] c"Hello World\00" constant, for example.
1761 yytext[strlen(yytext)-1] = 0; // nuke end quote
1762 llvmAsmlval.StrVal = strdup(yytext+1); // Nuke start quote
1763 return STRINGCONSTANT;
1768 #line 319 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1769 { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
1773 #line 320 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1775 uint64_t Val = atoull(yytext+1);
1776 // +1: we have bigger negative range
1777 if (Val > (uint64_t)INT64_MAX+1)
1778 GenerateError("Constant too large for signed 64 bits!");
1779 llvmAsmlval.SInt64Val = -Val;
1785 #line 328 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1787 llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
1788 return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
1793 #line 333 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1795 uint64_t Val = atoull(yytext+1);
1796 if ((unsigned)Val != Val)
1797 GenerateError("Invalid value number (too large)!");
1798 llvmAsmlval.UIntVal = unsigned(Val);
1804 #line 340 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1806 uint64_t Val = atoull(yytext+2);
1807 // +1: we have bigger negative range
1808 if (Val > (uint64_t)INT32_MAX+1)
1809 GenerateError("Constant too large for signed 32 bits!");
1810 llvmAsmlval.SIntVal = (int)-Val;
1816 #line 349 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1817 { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
1821 #line 350 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1822 { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
1824 case YY_STATE_EOF(INITIAL):
1825 #line 352 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1827 /* Make sure to free the internal buffers for flex when we are
1828 * done reading our input!
1830 yy_delete_buffer(YY_CURRENT_BUFFER);
1836 #line 360 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1837 { /* Ignore whitespace */ }
1841 #line 361 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1842 { return yytext[0]; }
1846 #line 363 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1847 YY_FATAL_ERROR( "flex scanner jammed" );
1849 #line 1850 "Lexer.cpp"
1851 case YY_END_OF_BUFFER:
1853 /* Amount of text matched not including the EOB char. */
1854 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1856 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1857 *yy_cp = yy_hold_char;
1858 YY_RESTORE_YY_MORE_OFFSET
1860 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1862 /* We're scanning a new file or input source. It's
1863 * possible that this happened because the user
1864 * just pointed yyin at a new source and called
1865 * yylex(). If so, then we have to assure
1866 * consistency between yy_current_buffer and our
1867 * globals. Here is the right place to do so, because
1868 * this is the first action (other than possibly a
1869 * back-up) that will match for the new input source.
1871 yy_n_chars = yy_current_buffer->yy_n_chars;
1872 yy_current_buffer->yy_input_file = yyin;
1873 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1876 /* Note that here we test for yy_c_buf_p "<=" to the position
1877 * of the first EOB in the buffer, since yy_c_buf_p will
1878 * already have been incremented past the NUL character
1879 * (since all states make transitions on EOB to the
1880 * end-of-buffer state). Contrast this with the test
1883 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1884 { /* This was really a NUL. */
1885 yy_state_type yy_next_state;
1887 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1889 yy_current_state = yy_get_previous_state();
1891 /* Okay, we're now positioned to make the NUL
1892 * transition. We couldn't have
1893 * yy_get_previous_state() go ahead and do it
1894 * for us because it doesn't know how to deal
1895 * with the possibility of jamming (and we don't
1896 * want to build jamming into it because then it
1897 * will run more slowly).
1900 yy_next_state = yy_try_NUL_trans( yy_current_state );
1902 yy_bp = yytext_ptr + YY_MORE_ADJ;
1904 if ( yy_next_state )
1906 /* Consume the NUL. */
1907 yy_cp = ++yy_c_buf_p;
1908 yy_current_state = yy_next_state;
1915 goto yy_find_action;
1919 else switch ( yy_get_next_buffer() )
1921 case EOB_ACT_END_OF_FILE:
1923 yy_did_buffer_switch_on_eof = 0;
1927 /* Note: because we've taken care in
1928 * yy_get_next_buffer() to have set up
1929 * yytext, we can now set up
1930 * yy_c_buf_p so that if some total
1931 * hoser (like flex itself) wants to
1932 * call the scanner after we return the
1933 * YY_NULL, it'll still work - another
1934 * YY_NULL will get returned.
1936 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1938 yy_act = YY_STATE_EOF(YY_START);
1944 if ( ! yy_did_buffer_switch_on_eof )
1950 case EOB_ACT_CONTINUE_SCAN:
1952 yytext_ptr + yy_amount_of_matched_text;
1954 yy_current_state = yy_get_previous_state();
1957 yy_bp = yytext_ptr + YY_MORE_ADJ;
1960 case EOB_ACT_LAST_MATCH:
1962 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1964 yy_current_state = yy_get_previous_state();
1967 yy_bp = yytext_ptr + YY_MORE_ADJ;
1968 goto yy_find_action;
1975 "fatal flex scanner internal error--no action found" );
1976 } /* end of action switch */
1977 } /* end of scanning one token */
1978 } /* end of yylex */
1981 /* yy_get_next_buffer - try to read in a new buffer
1983 * Returns a code representing an action:
1984 * EOB_ACT_LAST_MATCH -
1985 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1986 * EOB_ACT_END_OF_FILE - end of file
1989 static int yy_get_next_buffer()
1991 register char *dest = yy_current_buffer->yy_ch_buf;
1992 register char *source = yytext_ptr;
1993 register int number_to_move, i;
1996 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1998 "fatal flex scanner internal error--end of buffer missed" );
2000 if ( yy_current_buffer->yy_fill_buffer == 0 )
2001 { /* Don't try to fill the buffer, so this is an EOF. */
2002 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2004 /* We matched a single character, the EOB, so
2005 * treat this as a final EOF.
2007 return EOB_ACT_END_OF_FILE;
2012 /* We matched some text prior to the EOB, first
2015 return EOB_ACT_LAST_MATCH;
2019 /* Try to read more data. */
2021 /* First move last chars to start of buffer. */
2022 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2024 for ( i = 0; i < number_to_move; ++i )
2025 *(dest++) = *(source++);
2027 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2028 /* don't do the read, it's not guaranteed to return an EOF,
2031 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2036 yy_current_buffer->yy_buf_size - number_to_move - 1;
2038 while ( num_to_read <= 0 )
2039 { /* Not enough room in the buffer - grow it. */
2040 #ifdef YY_USES_REJECT
2042 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2045 /* just a shorter name for the current buffer */
2046 YY_BUFFER_STATE b = yy_current_buffer;
2048 int yy_c_buf_p_offset =
2049 (int) (yy_c_buf_p - b->yy_ch_buf);
2051 if ( b->yy_is_our_buffer )
2053 int new_size = b->yy_buf_size * 2;
2055 if ( new_size <= 0 )
2056 b->yy_buf_size += b->yy_buf_size / 8;
2058 b->yy_buf_size *= 2;
2060 b->yy_ch_buf = (char *)
2061 /* Include room in for 2 EOB chars. */
2062 yy_flex_realloc( (void *) b->yy_ch_buf,
2063 b->yy_buf_size + 2 );
2066 /* Can't grow it, we don't own it. */
2069 if ( ! b->yy_ch_buf )
2071 "fatal error - scanner input buffer overflow" );
2073 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2075 num_to_read = yy_current_buffer->yy_buf_size -
2080 if ( num_to_read > YY_READ_BUF_SIZE )
2081 num_to_read = YY_READ_BUF_SIZE;
2083 /* Read in more data. */
2084 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2085 yy_n_chars, num_to_read );
2087 yy_current_buffer->yy_n_chars = yy_n_chars;
2090 if ( yy_n_chars == 0 )
2092 if ( number_to_move == YY_MORE_ADJ )
2094 ret_val = EOB_ACT_END_OF_FILE;
2100 ret_val = EOB_ACT_LAST_MATCH;
2101 yy_current_buffer->yy_buffer_status =
2102 YY_BUFFER_EOF_PENDING;
2107 ret_val = EOB_ACT_CONTINUE_SCAN;
2109 yy_n_chars += number_to_move;
2110 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2111 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2113 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2119 /* yy_get_previous_state - get the state just before the EOB char was reached */
2121 static yy_state_type yy_get_previous_state()
2123 register yy_state_type yy_current_state;
2124 register char *yy_cp;
2126 yy_current_state = yy_start;
2127 yy_state_ptr = yy_state_buf;
2128 *yy_state_ptr++ = yy_current_state;
2130 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2132 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2133 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2135 yy_current_state = (int) yy_def[yy_current_state];
2136 if ( yy_current_state >= 510 )
2137 yy_c = yy_meta[(unsigned int) yy_c];
2139 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2140 *yy_state_ptr++ = yy_current_state;
2143 return yy_current_state;
2147 /* yy_try_NUL_trans - try to make a transition on the NUL character
2150 * next_state = yy_try_NUL_trans( current_state );
2153 #ifdef YY_USE_PROTOS
2154 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2156 static yy_state_type yy_try_NUL_trans( yy_current_state )
2157 yy_state_type yy_current_state;
2160 register int yy_is_jam;
2162 register YY_CHAR yy_c = 1;
2163 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2165 yy_current_state = (int) yy_def[yy_current_state];
2166 if ( yy_current_state >= 510 )
2167 yy_c = yy_meta[(unsigned int) yy_c];
2169 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2170 yy_is_jam = (yy_current_state == 509);
2172 *yy_state_ptr++ = yy_current_state;
2174 return yy_is_jam ? 0 : yy_current_state;
2179 #ifdef YY_USE_PROTOS
2180 static inline void yyunput( int c, register char *yy_bp )
2182 static inline void yyunput( c, yy_bp )
2184 register char *yy_bp;
2187 register char *yy_cp = yy_c_buf_p;
2189 /* undo effects of setting up yytext */
2190 *yy_cp = yy_hold_char;
2192 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2193 { /* need to shift things up to make room */
2194 /* +2 for EOB chars. */
2195 register int number_to_move = yy_n_chars + 2;
2196 register char *dest = &yy_current_buffer->yy_ch_buf[
2197 yy_current_buffer->yy_buf_size + 2];
2198 register char *source =
2199 &yy_current_buffer->yy_ch_buf[number_to_move];
2201 while ( source > yy_current_buffer->yy_ch_buf )
2202 *--dest = *--source;
2204 yy_cp += (int) (dest - source);
2205 yy_bp += (int) (dest - source);
2206 yy_current_buffer->yy_n_chars =
2207 yy_n_chars = yy_current_buffer->yy_buf_size;
2209 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2210 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2213 *--yy_cp = (char) c;
2219 yy_hold_char = *yy_cp;
2222 #endif /* ifndef YY_NO_UNPUT */
2226 static int yyinput()
2233 *yy_c_buf_p = yy_hold_char;
2235 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2237 /* yy_c_buf_p now points to the character we want to return.
2238 * If this occurs *before* the EOB characters, then it's a
2239 * valid NUL; if not, then we've hit the end of the buffer.
2241 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2242 /* This was really a NUL. */
2246 { /* need more input */
2247 int offset = yy_c_buf_p - yytext_ptr;
2250 switch ( yy_get_next_buffer() )
2252 case EOB_ACT_LAST_MATCH:
2253 /* This happens because yy_g_n_b()
2254 * sees that we've accumulated a
2255 * token and flags that we need to
2256 * try matching the token before
2257 * proceeding. But for input(),
2258 * there's no matching to consider.
2259 * So convert the EOB_ACT_LAST_MATCH
2260 * to EOB_ACT_END_OF_FILE.
2263 /* Reset buffer status. */
2268 case EOB_ACT_END_OF_FILE:
2273 if ( ! yy_did_buffer_switch_on_eof )
2282 case EOB_ACT_CONTINUE_SCAN:
2283 yy_c_buf_p = yytext_ptr + offset;
2289 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2290 *yy_c_buf_p = '\0'; /* preserve yytext */
2291 yy_hold_char = *++yy_c_buf_p;
2300 #ifdef YY_USE_PROTOS
2301 void yyrestart( FILE *input_file )
2303 void yyrestart( input_file )
2307 if ( ! yy_current_buffer )
2308 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2310 yy_init_buffer( yy_current_buffer, input_file );
2311 yy_load_buffer_state();
2315 #ifdef YY_USE_PROTOS
2316 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2318 void yy_switch_to_buffer( new_buffer )
2319 YY_BUFFER_STATE new_buffer;
2322 if ( yy_current_buffer == new_buffer )
2325 if ( yy_current_buffer )
2327 /* Flush out information for old buffer. */
2328 *yy_c_buf_p = yy_hold_char;
2329 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2330 yy_current_buffer->yy_n_chars = yy_n_chars;
2333 yy_current_buffer = new_buffer;
2334 yy_load_buffer_state();
2336 /* We don't actually know whether we did this switch during
2337 * EOF (yywrap()) processing, but the only time this flag
2338 * is looked at is after yywrap() is called, so it's safe
2339 * to go ahead and always set it.
2341 yy_did_buffer_switch_on_eof = 1;
2345 #ifdef YY_USE_PROTOS
2346 void yy_load_buffer_state( void )
2348 void yy_load_buffer_state()
2351 yy_n_chars = yy_current_buffer->yy_n_chars;
2352 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2353 yyin = yy_current_buffer->yy_input_file;
2354 yy_hold_char = *yy_c_buf_p;
2358 #ifdef YY_USE_PROTOS
2359 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2361 YY_BUFFER_STATE yy_create_buffer( file, size )
2368 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2370 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2372 b->yy_buf_size = size;
2374 /* yy_ch_buf has to be 2 characters longer than the size given because
2375 * we need to put in 2 end-of-buffer characters.
2377 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2378 if ( ! b->yy_ch_buf )
2379 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2381 b->yy_is_our_buffer = 1;
2383 yy_init_buffer( b, file );
2389 #ifdef YY_USE_PROTOS
2390 void yy_delete_buffer( YY_BUFFER_STATE b )
2392 void yy_delete_buffer( b )
2399 if ( b == yy_current_buffer )
2400 yy_current_buffer = (YY_BUFFER_STATE) 0;
2402 if ( b->yy_is_our_buffer )
2403 yy_flex_free( (void *) b->yy_ch_buf );
2405 yy_flex_free( (void *) b );
2409 #ifndef YY_ALWAYS_INTERACTIVE
2410 #ifndef YY_NEVER_INTERACTIVE
2411 extern int isatty YY_PROTO(( int ));
2415 #ifdef YY_USE_PROTOS
2416 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2418 void yy_init_buffer( b, file )
2425 yy_flush_buffer( b );
2427 b->yy_input_file = file;
2428 b->yy_fill_buffer = 1;
2430 #if YY_ALWAYS_INTERACTIVE
2431 b->yy_is_interactive = 1;
2433 #if YY_NEVER_INTERACTIVE
2434 b->yy_is_interactive = 0;
2436 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2442 #ifdef YY_USE_PROTOS
2443 void yy_flush_buffer( YY_BUFFER_STATE b )
2445 void yy_flush_buffer( b )
2455 /* We always need two end-of-buffer characters. The first causes
2456 * a transition to the end-of-buffer state. The second causes
2457 * a jam in that state.
2459 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2460 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2462 b->yy_buf_pos = &b->yy_ch_buf[0];
2465 b->yy_buffer_status = YY_BUFFER_NEW;
2467 if ( b == yy_current_buffer )
2468 yy_load_buffer_state();
2472 #ifndef YY_NO_SCAN_BUFFER
2473 #ifdef YY_USE_PROTOS
2474 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2476 YY_BUFFER_STATE yy_scan_buffer( base, size )
2484 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2485 base[size-1] != YY_END_OF_BUFFER_CHAR )
2486 /* They forgot to leave room for the EOB's. */
2489 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2491 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2493 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2494 b->yy_buf_pos = b->yy_ch_buf = base;
2495 b->yy_is_our_buffer = 0;
2496 b->yy_input_file = 0;
2497 b->yy_n_chars = b->yy_buf_size;
2498 b->yy_is_interactive = 0;
2500 b->yy_fill_buffer = 0;
2501 b->yy_buffer_status = YY_BUFFER_NEW;
2503 yy_switch_to_buffer( b );
2510 #ifndef YY_NO_SCAN_STRING
2511 #ifdef YY_USE_PROTOS
2512 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2514 YY_BUFFER_STATE yy_scan_string( yy_str )
2515 yyconst char *yy_str;
2519 for ( len = 0; yy_str[len]; ++len )
2522 return yy_scan_bytes( yy_str, len );
2527 #ifndef YY_NO_SCAN_BYTES
2528 #ifdef YY_USE_PROTOS
2529 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2531 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2532 yyconst char *bytes;
2541 /* Get memory for full buffer, including space for trailing EOB's. */
2543 buf = (char *) yy_flex_alloc( n );
2545 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2547 for ( i = 0; i < len; ++i )
2550 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2552 b = yy_scan_buffer( buf, n );
2554 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2556 /* It's okay to grow etc. this buffer, and we should throw it
2557 * away when we're done.
2559 b->yy_is_our_buffer = 1;
2566 #ifndef YY_NO_PUSH_STATE
2567 #ifdef YY_USE_PROTOS
2568 static void yy_push_state( int new_state )
2570 static void yy_push_state( new_state )
2574 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2578 yy_start_stack_depth += YY_START_STACK_INCR;
2579 new_size = yy_start_stack_depth * sizeof( int );
2581 if ( ! yy_start_stack )
2582 yy_start_stack = (int *) yy_flex_alloc( new_size );
2585 yy_start_stack = (int *) yy_flex_realloc(
2586 (void *) yy_start_stack, new_size );
2588 if ( ! yy_start_stack )
2590 "out of memory expanding start-condition stack" );
2593 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2600 #ifndef YY_NO_POP_STATE
2601 static void yy_pop_state()
2603 if ( --yy_start_stack_ptr < 0 )
2604 YY_FATAL_ERROR( "start-condition stack underflow" );
2606 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2611 #ifndef YY_NO_TOP_STATE
2612 static int yy_top_state()
2614 return yy_start_stack[yy_start_stack_ptr - 1];
2618 #ifndef YY_EXIT_FAILURE
2619 #define YY_EXIT_FAILURE 2
2622 #ifdef YY_USE_PROTOS
2623 static void yy_fatal_error( yyconst char msg[] )
2625 static void yy_fatal_error( msg )
2629 (void) fprintf( stderr, "%s\n", msg );
2630 exit( YY_EXIT_FAILURE );
2635 /* Redefine yyless() so it works in section 3 code. */
2641 /* Undo effects of setting up yytext. */ \
2642 yytext[yyleng] = yy_hold_char; \
2643 yy_c_buf_p = yytext + n; \
2644 yy_hold_char = *yy_c_buf_p; \
2645 *yy_c_buf_p = '\0'; \
2651 /* Internal utility routines. */
2654 #ifdef YY_USE_PROTOS
2655 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2657 static void yy_flex_strncpy( s1, s2, n )
2664 for ( i = 0; i < n; ++i )
2669 #ifdef YY_NEED_STRLEN
2670 #ifdef YY_USE_PROTOS
2671 static int yy_flex_strlen( yyconst char *s )
2673 static int yy_flex_strlen( s )
2678 for ( n = 0; s[n]; ++n )
2686 #ifdef YY_USE_PROTOS
2687 static void *yy_flex_alloc( yy_size_t size )
2689 static void *yy_flex_alloc( size )
2693 return (void *) malloc( size );
2696 #ifdef YY_USE_PROTOS
2697 static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2699 static inline void *yy_flex_realloc( ptr, size )
2704 /* The cast to (char *) in the following accommodates both
2705 * implementations that use char* generic pointers, and those
2706 * that use void* generic pointers. It works with the latter
2707 * because both ANSI C and C++ allow castless assignment from
2708 * any pointer type to void*, and deal with argument conversions
2709 * as though doing an assignment.
2711 return (void *) realloc( (char *) ptr, size );
2714 #ifdef YY_USE_PROTOS
2715 static void yy_flex_free( void *ptr )
2717 static void yy_flex_free( ptr )
2731 #line 363 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"