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:
23 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
34 /* 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 /* Some routines like yy_flex_realloc() are emitted as static but are
157 not called by all lexers. This generates warnings in some compilers,
158 notably GCC. Arrange to suppress these. */
160 #define YY_MAY_BE_UNUSED __attribute__((unused))
162 #define YY_MAY_BE_UNUSED
165 /* The following is because we cannot portably get our hands on size_t
166 * (without autoconf's help, which isn't available because we want
167 * flex-generated scanners to compile on their own).
169 typedef unsigned int yy_size_t;
172 struct yy_buffer_state
176 char *yy_ch_buf; /* input buffer */
177 char *yy_buf_pos; /* current position in input buffer */
179 /* Size of input buffer in bytes, not including room for EOB
182 yy_size_t yy_buf_size;
184 /* Number of characters read into yy_ch_buf, not including EOB
189 /* Whether we "own" the buffer - i.e., we know we created it,
190 * and can realloc() it to grow it, and should free() it to
193 int yy_is_our_buffer;
195 /* Whether this is an "interactive" input source; if so, and
196 * if we're using stdio for input, then we want to use getc()
197 * instead of fread(), to make sure we stop fetching input after
200 int yy_is_interactive;
202 /* Whether we're considered to be at the beginning of a line.
203 * If so, '^' rules will be active on the next match, otherwise
208 /* Whether to try to fill the input buffer when we reach the
213 int yy_buffer_status;
214 #define YY_BUFFER_NEW 0
215 #define YY_BUFFER_NORMAL 1
216 /* When an EOF's been seen but there's still some text to process
217 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
218 * shouldn't try reading from the input source any more. We might
219 * still have a bunch of tokens to match, though, because of
220 * possible backing-up.
222 * When we actually see the EOF, we change the status to "new"
223 * (via yyrestart()), so that the user can continue scanning by
224 * just pointing yyin at a new input file.
226 #define YY_BUFFER_EOF_PENDING 2
229 static YY_BUFFER_STATE yy_current_buffer = 0;
231 /* We provide macros for accessing buffer states in case in the
232 * future we want to put the buffer states in a more general
235 #define YY_CURRENT_BUFFER yy_current_buffer
238 /* yy_hold_char holds the character lost when yytext is formed. */
239 static char yy_hold_char;
241 static int yy_n_chars; /* number of characters read into yy_ch_buf */
246 /* Points to current character in buffer. */
247 static char *yy_c_buf_p = (char *) 0;
248 static int yy_init = 1; /* whether we need to initialize */
249 static int yy_start = 0; /* start state number */
251 /* Flag which is used to allow yywrap()'s to do buffer switches
252 * instead of setting up a fresh yyin. A bit of a hack ...
254 static int yy_did_buffer_switch_on_eof;
256 void yyrestart YY_PROTO(( FILE *input_file ));
258 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
259 void yy_load_buffer_state YY_PROTO(( void ));
260 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
261 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
262 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
263 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
264 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
266 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
267 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
268 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
270 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
271 static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
272 static void yy_flex_free YY_PROTO(( void * ));
274 #define yy_new_buffer yy_create_buffer
276 #define yy_set_interactive(is_interactive) \
278 if ( ! yy_current_buffer ) \
279 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
280 yy_current_buffer->yy_is_interactive = is_interactive; \
283 #define yy_set_bol(at_bol) \
285 if ( ! yy_current_buffer ) \
286 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
287 yy_current_buffer->yy_at_bol = at_bol; \
290 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
293 #define YY_USES_REJECT
296 #define YY_SKIP_YYWRAP
297 typedef unsigned char YY_CHAR;
298 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
299 typedef int yy_state_type;
303 #define yytext_ptr yytext
305 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
306 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
307 static int yy_get_next_buffer YY_PROTO(( void ));
308 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
310 /* Done after the current pattern has been matched and before the
311 * corresponding action - sets up yytext.
313 #define YY_DO_BEFORE_ACTION \
314 yytext_ptr = yy_bp; \
315 yyleng = (int) (yy_cp - yy_bp); \
316 yy_hold_char = *yy_cp; \
320 #define YY_NUM_RULES 146
321 #define YY_END_OF_BUFFER 147
322 static yyconst short int yy_acclist[227] =
324 147, 145, 146, 144, 145, 146, 144, 146, 145, 146,
325 145, 146, 145, 146, 145, 146, 145, 146, 145, 146,
326 137, 145, 146, 137, 145, 146, 1, 145, 146, 145,
327 146, 145, 146, 145, 146, 145, 146, 145, 146, 145,
328 146, 145, 146, 145, 146, 145, 146, 145, 146, 145,
329 146, 145, 146, 145, 146, 145, 146, 145, 146, 145,
330 146, 145, 146, 145, 146, 145, 146, 145, 146, 145,
331 146, 145, 146, 145, 146, 134, 132, 130, 140, 138,
332 142, 137, 1, 131, 141, 116, 38, 79, 61, 80,
333 75, 25, 134, 136, 130, 142, 22, 142, 143, 135,
335 131, 62, 74, 36, 39, 3, 64, 89, 94, 92,
336 93, 91, 90, 95, 99, 115, 84, 82, 71, 83,
337 81, 63, 97, 88, 86, 87, 85, 98, 96, 76,
338 133, 142, 142, 73, 100, 78, 67, 123, 70, 77,
339 124, 72, 52, 24, 139, 66, 103, 69, 47, 26,
340 4, 59, 65, 68, 55, 12, 102, 142, 34, 32,
341 2, 51, 5, 56, 105, 46, 58, 53, 125, 101,
342 23, 54, 122, 41, 7, 57, 40, 109, 108, 8,
343 16, 118, 121, 35, 60, 113, 107, 117, 27, 28,
344 106, 119, 114, 112, 6, 29, 104, 50, 33, 44,
346 45, 9, 19, 10, 110, 11, 49, 48, 111, 31,
347 13, 15, 14, 17, 30, 37, 18, 120, 20, 126,
348 128, 129, 42, 127, 43, 21
351 static yyconst short int yy_accept[587] =
353 1, 1, 1, 2, 4, 7, 9, 11, 13, 15,
354 17, 19, 21, 24, 27, 30, 32, 34, 36, 38,
355 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
356 60, 62, 64, 66, 68, 70, 72, 74, 76, 76,
357 77, 77, 78, 78, 79, 80, 80, 81, 81, 82,
358 83, 83, 84, 84, 85, 86, 86, 86, 86, 86,
359 86, 86, 86, 87, 87, 87, 88, 88, 88, 88,
360 88, 88, 88, 89, 89, 89, 89, 89, 89, 89,
361 89, 89, 89, 89, 90, 90, 90, 90, 90, 90,
362 90, 90, 90, 90, 91, 91, 91, 91, 91, 91,
364 91, 91, 92, 92, 92, 92, 92, 92, 92, 92,
365 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
366 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
367 93, 93, 93, 93, 93, 93, 94, 94, 95, 96,
368 97, 98, 99, 99, 100, 100, 101, 102, 103, 103,
369 103, 104, 104, 104, 105, 105, 105, 105, 105, 106,
370 106, 106, 106, 106, 106, 106, 106, 106, 107, 107,
371 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
372 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
373 107, 107, 108, 108, 108, 108, 108, 108, 109, 110,
375 111, 112, 113, 114, 114, 115, 116, 116, 116, 117,
376 117, 117, 117, 117, 117, 118, 119, 120, 120, 120,
377 120, 120, 121, 122, 122, 122, 123, 123, 123, 123,
378 123, 123, 123, 123, 123, 124, 125, 126, 126, 127,
379 128, 128, 129, 130, 130, 130, 130, 130, 130, 130,
380 130, 130, 131, 131, 131, 132, 133, 133, 133, 133,
381 134, 134, 134, 134, 134, 135, 135, 135, 135, 136,
382 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
383 136, 136, 136, 137, 138, 138, 138, 138, 138, 139,
384 140, 140, 140, 140, 141, 141, 141, 141, 141, 141,
386 141, 141, 142, 143, 143, 143, 144, 144, 144, 144,
387 145, 145, 145, 145, 146, 147, 147, 147, 148, 148,
388 148, 148, 148, 149, 150, 150, 150, 151, 151, 151,
389 151, 152, 152, 153, 154, 154, 154, 154, 154, 155,
390 155, 156, 156, 157, 157, 157, 158, 159, 160, 161,
391 161, 161, 162, 162, 163, 163, 163, 163, 163, 163,
392 163, 163, 163, 163, 163, 163, 164, 164, 165, 166,
393 166, 166, 166, 166, 166, 166, 167, 167, 167, 167,
394 167, 168, 168, 168, 168, 168, 168, 168, 168, 168,
395 168, 168, 168, 168, 169, 169, 169, 169, 169, 170,
397 170, 170, 170, 170, 171, 171, 172, 172, 172, 172,
398 172, 172, 172, 172, 172, 172, 173, 174, 174, 174,
399 175, 175, 175, 175, 176, 176, 176, 176, 177, 177,
400 177, 178, 179, 180, 180, 180, 181, 182, 182, 182,
401 182, 183, 183, 184, 185, 185, 185, 185, 186, 186,
402 186, 186, 187, 187, 187, 187, 188, 189, 190, 190,
403 191, 192, 192, 193, 194, 194, 194, 194, 194, 194,
404 194, 195, 195, 195, 196, 197, 197, 197, 197, 197,
405 197, 198, 198, 198, 198, 198, 198, 199, 199, 199,
406 199, 199, 200, 200, 200, 201, 201, 201, 201, 201,
408 201, 202, 202, 202, 203, 203, 203, 203, 203, 204,
409 204, 204, 204, 205, 206, 207, 208, 209, 209, 210,
410 210, 210, 210, 210, 211, 211, 211, 211, 212, 212,
411 213, 214, 214, 214, 214, 214, 215, 215, 215, 215,
412 215, 215, 215, 215, 216, 216, 216, 216, 216, 216,
413 217, 217, 217, 217, 217, 217, 218, 218, 218, 218,
414 218, 218, 219, 219, 219, 219, 219, 219, 219, 219,
415 220, 220, 220, 220, 220, 221, 222, 223, 223, 224,
416 224, 225, 226, 226, 227, 227
419 static yyconst int yy_ec[256] =
421 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
422 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
425 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
426 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
427 1, 1, 1, 16, 17, 17, 17, 17, 18, 17,
428 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
429 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
430 1, 1, 1, 1, 19, 1, 20, 21, 22, 23,
432 24, 25, 26, 27, 28, 5, 29, 30, 31, 32,
433 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
434 43, 44, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 static yyconst int yy_meta[45] =
453 1, 1, 2, 3, 4, 1, 1, 4, 4, 4,
454 4, 4, 4, 5, 1, 1, 4, 4, 4, 4,
455 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
456 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
460 static yyconst short int yy_base[595] =
462 0, 0, 1276, 1277, 1277, 1277, 1271, 1260, 41, 36,
463 45, 51, 57, 63, 0, 74, 66, 69, 68, 90,
464 92, 121, 78, 36, 148, 93, 117, 114, 167, 138,
465 67, 194, 152, 226, 134, 95, 103, 101, 1269, 1277,
466 1258, 1277, 1267, 0, 199, 216, 232, 131, 253, 269,
467 274, 0, 1266, 0, 203, 119, 154, 150, 115, 163,
468 149, 80, 1255, 191, 49, 164, 157, 108, 279, 81,
469 184, 169, 1254, 223, 239, 188, 220, 224, 276, 182,
470 237, 241, 245, 295, 258, 288, 118, 289, 296, 233,
471 297, 306, 301, 298, 303, 304, 305, 308, 319, 323,
473 316, 327, 324, 330, 331, 334, 335, 337, 339, 340,
474 341, 356, 352, 344, 342, 186, 345, 360, 348, 1253,
475 369, 371, 372, 375, 377, 373, 378, 389, 385, 379,
476 390, 403, 407, 392, 393, 1252, 1261, 1277, 0, 421,
477 1250, 436, 454, 0, 1259, 1277, 0, 1248, 437, 381,
478 1247, 412, 423, 1246, 410, 430, 455, 413, 1245, 456,
479 439, 457, 426, 427, 428, 458, 459, 1244, 460, 464,
480 467, 469, 471, 473, 474, 476, 475, 478, 477, 481,
481 480, 483, 486, 494, 501, 499, 506, 503, 505, 507,
482 508, 1243, 510, 513, 514, 517, 515, 1242, 1241, 1240,
484 1239, 1238, 1237, 511, 1236, 1235, 516, 519, 1234, 548,
485 522, 525, 526, 537, 1233, 1232, 1231, 528, 550, 553,
486 562, 1230, 1229, 563, 542, 1228, 541, 566, 567, 568,
487 569, 573, 574, 570, 1227, 1226, 1225, 575, 1224, 1223,
488 576, 1222, 1221, 585, 588, 590, 592, 597, 593, 600,
489 572, 1220, 601, 603, 1277, 612, 632, 636, 640, 645,
490 623, 647, 530, 648, 1219, 649, 612, 605, 1218, 650,
491 651, 652, 613, 653, 655, 654, 656, 660, 657, 664,
492 604, 672, 1217, 1216, 659, 661, 663, 662, 1215, 1214,
493 674, 678, 681, 1213, 677, 692, 693, 694, 695, 696,
495 697, 1212, 1211, 698, 702, 1210, 705, 699, 700, 1209,
496 701, 711, 703, 0, 1208, 706, 724, 740, 725, 731,
497 733, 734, 1207, 1206, 737, 730, 1205, 739, 742, 735,
498 1204, 744, 1203, 1202, 746, 750, 753, 754, 1201, 755,
499 1200, 756, 1199, 758, 760, 775, 769, 1198, 1197, 773,
500 762, 1196, 776, 1195, 778, 782, 783, 784, 785, 617,
501 787, 790, 791, 793, 792, 1194, 794, 1193, 1192, 798,
502 803, 796, 805, 797, 804, 1191, 808, 809, 816, 818,
503 1190, 819, 821, 820, 825, 823, 824, 833, 826, 835,
504 839, 840, 59, 719, 841, 842, 844, 845, 1189, 846,
506 847, 851, 852, 1188, 850, 1187, 855, 866, 856, 867,
507 873, 854, 861, 869, 888, 894, 1186, 874, 880, 1185,
508 884, 885, 886, 1184, 890, 891, 892, 1183, 893, 894,
509 1182, 1181, 1180, 895, 900, 1179, 1178, 897, 906, 901,
510 1177, 908, 1176, 1175, 905, 909, 915, 1174, 919, 920,
511 921, 1173, 922, 923, 924, 1172, 1171, 1170, 704, 1169,
512 1168, 927, 1167, 1166, 926, 929, 935, 930, 936, 937,
513 1165, 941, 945, 1164, 1163, 946, 947, 949, 951, 953,
514 1162, 956, 957, 958, 959, 960, 1161, 961, 962, 972,
515 975, 1160, 977, 978, 1159, 980, 983, 984, 985, 987,
517 1158, 986, 990, 1157, 991, 993, 997, 998, 1156, 1004,
518 1000, 1001, 1155, 1154, 1153, 1137, 1125, 1005, 1124, 1012,
519 1007, 1006, 1019, 1122, 1023, 1024, 1013, 1121, 1028, 1120,
520 1119, 1029, 1032, 1033, 1034, 1117, 1036, 1037, 1038, 1039,
521 1041, 1040, 1043, 1116, 1045, 1048, 1050, 1053, 1054, 1115,
522 1058, 1059, 1066, 1067, 1068, 1114, 1062, 1071, 1073, 1074,
523 1076, 1113, 1080, 1077, 1075, 1079, 1081, 1086, 1087, 1112,
524 1090, 1094, 1088, 1099, 1107, 1106, 1105, 1100, 992, 1101,
525 346, 259, 1104, 256, 1277, 1140, 1142, 1145, 1149, 1152,
530 static yyconst short int yy_def[595] =
532 585, 1, 585, 585, 585, 585, 586, 587, 588, 585,
533 587, 587, 587, 587, 589, 590, 587, 587, 587, 587,
534 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
535 587, 587, 587, 587, 587, 587, 587, 587, 586, 585,
536 587, 585, 591, 592, 585, 585, 587, 587, 587, 587,
537 587, 589, 593, 594, 585, 587, 587, 587, 587, 587,
538 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
539 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
540 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
541 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
543 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
544 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
545 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
546 587, 587, 587, 587, 587, 585, 591, 585, 592, 585,
547 587, 587, 587, 51, 593, 585, 594, 587, 587, 587,
548 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
549 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
550 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
551 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
552 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
554 587, 587, 587, 587, 587, 587, 587, 587, 587, 51,
555 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
556 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
557 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
558 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
559 587, 587, 587, 587, 585, 585, 585, 585, 587, 587,
560 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
561 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
562 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
563 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
565 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
566 587, 587, 587, 210, 587, 587, 587, 587, 587, 587,
567 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
568 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
569 587, 587, 587, 587, 587, 587, 585, 587, 587, 587,
570 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
571 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
572 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
573 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
574 587, 587, 585, 585, 587, 587, 587, 587, 587, 587,
576 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
577 587, 587, 587, 587, 585, 585, 587, 587, 587, 587,
578 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
579 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
580 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
581 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
582 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
583 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
584 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
585 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
587 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
588 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
589 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
590 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
591 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
592 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
593 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
594 587, 587, 587, 587, 587, 587, 587, 587, 587, 587,
595 587, 587, 587, 587, 0, 585, 585, 585, 585, 585,
600 static yyconst short int yy_nxt[1322] =
602 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
603 14, 14, 14, 4, 15, 16, 8, 8, 8, 17,
604 18, 19, 20, 21, 22, 23, 24, 25, 8, 26,
605 27, 28, 29, 30, 8, 31, 32, 33, 34, 35,
606 36, 37, 8, 38, 43, 46, 46, 46, 46, 42,
607 45, 45, 45, 45, 47, 47, 47, 47, 42, 48,
608 393, 394, 42, 83, 42, 49, 50, 50, 50, 50,
609 42, 49, 50, 50, 50, 50, 42, 53, 158, 42,
610 42, 42, 42, 55, 55, 55, 55, 65, 56, 66,
611 106, 42, 61, 42, 42, 57, 62, 58, 51, 59,
613 67, 81, 60, 42, 63, 42, 42, 82, 42, 68,
614 166, 64, 87, 69, 42, 133, 42, 156, 132, 70,
615 88, 42, 71, 72, 135, 89, 73, 42, 42, 90,
616 42, 42, 42, 74, 42, 134, 91, 94, 186, 141,
617 75, 148, 76, 77, 42, 162, 95, 42, 152, 92,
618 78, 42, 96, 130, 79, 93, 80, 84, 84, 84,
619 84, 42, 42, 42, 103, 42, 131, 42, 147, 85,
620 42, 118, 151, 104, 155, 105, 42, 42, 119, 86,
621 42, 149, 42, 150, 120, 159, 160, 121, 161, 153,
622 97, 168, 98, 154, 122, 42, 99, 42, 100, 42,
624 101, 42, 102, 107, 42, 177, 226, 42, 45, 45,
625 45, 45, 55, 55, 55, 55, 108, 109, 172, 110,
626 111, 112, 167, 113, 140, 46, 46, 46, 46, 114,
627 157, 115, 116, 42, 117, 107, 42, 42, 139, 42,
628 49, 47, 47, 47, 47, 42, 42, 173, 123, 124,
629 42, 125, 42, 126, 42, 127, 174, 128, 42, 189,
630 169, 129, 142, 142, 142, 142, 42, 180, 170, 42,
631 143, 42, 42, 179, 178, 171, 143, 49, 50, 50,
632 50, 50, 42, 144, 144, 144, 144, 42, 181, 42,
633 144, 144, 42, 144, 144, 144, 144, 144, 144, 175,
635 163, 42, 42, 164, 84, 84, 84, 84, 42, 42,
636 42, 42, 165, 176, 42, 188, 42, 42, 42, 42,
637 187, 42, 194, 182, 183, 184, 190, 185, 191, 42,
638 192, 199, 42, 197, 193, 204, 42, 42, 195, 198,
639 42, 196, 201, 42, 42, 200, 203, 42, 42, 205,
640 42, 206, 42, 42, 42, 42, 202, 42, 42, 42,
641 212, 42, 207, 215, 211, 42, 208, 224, 213, 42,
642 217, 209, 227, 42, 225, 222, 210, 216, 219, 218,
643 214, 220, 42, 230, 42, 42, 42, 228, 42, 223,
644 42, 42, 42, 221, 42, 229, 231, 247, 42, 234,
646 236, 239, 42, 42, 233, 42, 42, 232, 246, 235,
647 238, 241, 242, 263, 237, 240, 42, 248, 251, 249,
648 42, 243, 250, 42, 244, 42, 42, 252, 253, 245,
649 256, 256, 256, 256, 254, 264, 42, 266, 257, 42,
650 42, 42, 269, 42, 257, 142, 142, 142, 142, 42,
651 42, 267, 42, 143, 274, 273, 261, 275, 265, 143,
652 258, 259, 262, 260, 260, 260, 260, 42, 42, 42,
653 42, 42, 42, 42, 268, 271, 272, 42, 270, 278,
654 42, 276, 42, 279, 42, 277, 42, 42, 42, 42,
655 42, 42, 285, 42, 42, 280, 42, 292, 289, 42,
657 281, 291, 283, 293, 282, 290, 295, 42, 287, 296,
658 284, 288, 42, 294, 42, 286, 42, 297, 42, 42,
659 42, 42, 300, 42, 42, 302, 42, 42, 42, 42,
660 42, 298, 42, 299, 301, 42, 304, 308, 42, 42,
661 303, 42, 307, 42, 310, 311, 305, 306, 309, 317,
662 42, 350, 319, 312, 42, 42, 313, 314, 314, 314,
663 314, 315, 316, 42, 314, 314, 42, 314, 314, 314,
664 314, 314, 314, 320, 318, 42, 42, 325, 326, 42,
665 42, 42, 42, 42, 321, 42, 42, 42, 42, 42,
666 344, 329, 328, 323, 322, 327, 331, 333, 42, 336,
668 324, 42, 330, 42, 332, 42, 42, 335, 337, 334,
669 42, 340, 342, 42, 42, 338, 42, 42, 42, 341,
670 339, 256, 256, 256, 256, 42, 42, 366, 343, 257,
671 42, 353, 358, 345, 354, 257, 42, 425, 258, 258,
672 346, 347, 347, 347, 347, 347, 347, 347, 347, 260,
673 260, 260, 260, 42, 260, 260, 260, 260, 42, 348,
674 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
675 42, 355, 42, 42, 42, 42, 42, 42, 349, 351,
676 352, 357, 360, 365, 359, 42, 362, 42, 356, 363,
677 42, 42, 364, 367, 42, 361, 368, 374, 369, 370,
679 372, 371, 376, 373, 375, 42, 42, 42, 42, 42,
680 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
681 393, 394, 496, 380, 42, 381, 379, 377, 378, 382,
682 383, 384, 385, 391, 389, 390, 386, 42, 42, 388,
683 387, 393, 394, 42, 42, 392, 42, 42, 42, 395,
684 42, 400, 42, 42, 396, 42, 397, 42, 398, 42,
685 399, 402, 401, 42, 403, 404, 42, 42, 42, 42,
686 405, 42, 407, 42, 406, 42, 415, 416, 347, 347,
687 347, 347, 411, 413, 418, 408, 42, 414, 42, 42,
688 409, 42, 417, 410, 412, 42, 42, 42, 42, 420,
690 42, 421, 422, 42, 42, 42, 42, 42, 424, 42,
691 42, 42, 419, 430, 428, 431, 42, 42, 42, 423,
692 426, 42, 42, 427, 429, 432, 436, 434, 435, 42,
693 433, 42, 42, 42, 42, 437, 42, 42, 42, 42,
694 439, 441, 443, 444, 445, 438, 42, 449, 42, 440,
695 442, 447, 42, 42, 42, 42, 448, 42, 42, 42,
696 42, 446, 450, 42, 42, 42, 454, 42, 42, 42,
697 453, 451, 457, 459, 42, 460, 462, 452, 456, 42,
698 42, 464, 42, 461, 458, 455, 42, 42, 463, 415,
699 416, 467, 466, 42, 465, 415, 416, 42, 42, 42,
701 469, 470, 468, 42, 42, 42, 42, 42, 42, 474,
702 42, 478, 479, 42, 42, 472, 481, 471, 42, 42,
703 483, 42, 42, 476, 477, 484, 475, 473, 42, 486,
704 482, 480, 42, 42, 42, 42, 42, 42, 485, 42,
705 42, 487, 42, 42, 488, 493, 489, 494, 42, 42,
706 42, 491, 492, 497, 42, 498, 490, 500, 42, 42,
707 42, 495, 42, 502, 42, 499, 42, 501, 503, 42,
708 42, 42, 42, 42, 42, 42, 510, 505, 504, 511,
709 509, 506, 507, 515, 517, 42, 512, 513, 42, 508,
710 42, 42, 516, 42, 514, 518, 42, 42, 42, 42,
712 42, 521, 523, 42, 42, 42, 42, 524, 526, 522,
713 42, 42, 519, 42, 42, 528, 520, 42, 42, 42,
714 42, 532, 525, 527, 535, 42, 42, 536, 538, 529,
715 530, 534, 42, 533, 531, 537, 42, 42, 539, 540,
716 543, 42, 42, 542, 541, 42, 42, 42, 545, 42,
717 42, 42, 42, 42, 42, 546, 42, 549, 42, 551,
718 553, 42, 555, 42, 548, 544, 42, 42, 552, 554,
719 547, 42, 42, 556, 550, 42, 559, 561, 557, 42,
720 42, 42, 562, 558, 42, 566, 42, 42, 42, 42,
721 42, 560, 42, 42, 42, 563, 564, 565, 572, 42,
723 42, 42, 573, 42, 568, 570, 569, 42, 567, 571,
724 574, 578, 42, 42, 42, 579, 575, 42, 42, 42,
725 42, 582, 577, 576, 583, 42, 42, 42, 42, 42,
726 42, 580, 42, 42, 42, 42, 581, 42, 42, 584,
727 39, 39, 39, 39, 39, 41, 41, 44, 44, 52,
728 42, 52, 52, 52, 54, 54, 137, 137, 137, 137,
729 137, 145, 145, 145, 145, 145, 42, 42, 42, 42,
730 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
731 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
732 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
734 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
735 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
736 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
737 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
738 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
739 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
740 42, 42, 146, 42, 138, 255, 42, 42, 42, 146,
741 138, 42, 136, 42, 40, 585, 3, 585, 585, 585,
742 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
743 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
745 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
746 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
750 static yyconst short int yy_chk[1322] =
752 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
753 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
754 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
755 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
756 1, 1, 1, 1, 9, 10, 10, 10, 10, 24,
757 9, 9, 9, 9, 11, 11, 11, 11, 11, 12,
758 393, 393, 65, 24, 12, 13, 13, 13, 13, 13,
759 13, 14, 14, 14, 14, 14, 14, 16, 65, 17,
760 31, 19, 18, 16, 16, 16, 16, 19, 17, 19,
761 31, 23, 18, 62, 70, 17, 18, 17, 13, 17,
763 19, 23, 17, 20, 18, 21, 26, 23, 36, 20,
764 70, 18, 26, 20, 38, 37, 37, 62, 36, 20,
765 26, 68, 20, 21, 38, 26, 21, 28, 59, 26,
766 27, 87, 56, 21, 22, 37, 27, 28, 87, 48,
767 22, 56, 22, 22, 48, 68, 28, 35, 59, 27,
768 22, 30, 28, 35, 22, 27, 22, 25, 25, 25,
769 25, 25, 61, 58, 30, 33, 35, 57, 594, 25,
770 67, 33, 58, 30, 61, 30, 60, 66, 33, 25,
771 29, 57, 72, 57, 33, 66, 67, 33, 67, 60,
772 29, 72, 29, 60, 33, 80, 29, 71, 29, 116,
774 29, 76, 29, 32, 64, 80, 116, 32, 45, 45,
775 45, 45, 55, 55, 55, 55, 32, 32, 76, 32,
776 32, 32, 71, 32, 46, 46, 46, 46, 46, 32,
777 64, 32, 32, 77, 32, 34, 74, 78, 592, 34,
778 47, 47, 47, 47, 47, 47, 90, 77, 34, 34,
779 81, 34, 75, 34, 82, 34, 78, 34, 83, 90,
780 74, 34, 49, 49, 49, 49, 49, 83, 75, 584,
781 49, 85, 582, 82, 81, 75, 49, 50, 50, 50,
782 50, 50, 50, 51, 51, 51, 51, 51, 85, 79,
783 51, 51, 69, 51, 51, 51, 51, 51, 51, 79,
785 69, 86, 88, 69, 84, 84, 84, 84, 84, 89,
786 91, 94, 69, 79, 93, 89, 95, 96, 97, 92,
787 88, 98, 95, 86, 86, 86, 91, 86, 92, 101,
788 93, 98, 99, 96, 94, 101, 100, 103, 95, 97,
789 102, 95, 99, 104, 105, 98, 100, 106, 107, 102,
790 108, 103, 109, 110, 111, 115, 99, 114, 117, 581,
791 109, 119, 104, 110, 108, 113, 105, 114, 109, 112,
792 111, 106, 117, 118, 115, 113, 107, 110, 112, 111,
793 109, 112, 121, 119, 122, 123, 126, 118, 124, 113,
794 125, 127, 130, 112, 150, 118, 121, 130, 129, 123,
796 125, 127, 128, 131, 122, 134, 135, 121, 129, 124,
797 126, 128, 128, 150, 125, 127, 132, 131, 133, 131,
798 133, 128, 132, 155, 128, 152, 158, 134, 135, 128,
799 140, 140, 140, 140, 135, 152, 153, 155, 140, 163,
800 164, 165, 158, 156, 140, 142, 142, 142, 142, 142,
801 149, 156, 161, 142, 164, 163, 149, 165, 153, 142,
802 143, 143, 149, 143, 143, 143, 143, 143, 157, 160,
803 162, 166, 167, 169, 157, 161, 162, 170, 160, 167,
804 171, 166, 172, 169, 173, 166, 174, 175, 177, 176,
805 179, 178, 174, 181, 180, 169, 182, 179, 177, 183,
807 170, 178, 172, 180, 171, 177, 182, 184, 176, 183,
808 173, 176, 186, 181, 185, 175, 188, 184, 189, 187,
809 190, 191, 186, 193, 204, 188, 194, 195, 197, 207,
810 196, 184, 208, 185, 187, 211, 190, 195, 212, 213,
811 189, 218, 194, 263, 197, 204, 191, 193, 196, 213,
812 214, 263, 218, 207, 227, 225, 208, 210, 210, 210,
813 210, 211, 212, 219, 210, 210, 220, 210, 210, 210,
814 210, 210, 210, 219, 214, 221, 224, 225, 227, 228,
815 229, 230, 231, 234, 220, 251, 232, 233, 238, 241,
816 251, 230, 229, 224, 221, 228, 232, 233, 244, 241,
818 224, 245, 231, 246, 232, 247, 249, 238, 244, 234,
819 248, 247, 249, 250, 253, 245, 254, 281, 268, 248,
820 246, 256, 256, 256, 256, 267, 273, 281, 250, 256,
821 360, 267, 273, 253, 268, 256, 261, 360, 257, 257,
822 254, 257, 257, 257, 257, 258, 258, 258, 258, 259,
823 259, 259, 259, 259, 260, 260, 260, 260, 260, 261,
824 262, 264, 266, 270, 271, 272, 274, 276, 275, 277,
825 279, 270, 285, 278, 286, 288, 287, 280, 262, 264,
826 266, 272, 275, 280, 274, 282, 277, 291, 271, 278,
827 295, 292, 279, 282, 293, 276, 285, 292, 286, 287,
829 288, 287, 295, 291, 293, 296, 297, 298, 299, 300,
830 301, 304, 308, 309, 311, 305, 313, 459, 307, 316,
831 394, 394, 459, 299, 312, 300, 298, 296, 297, 301,
832 304, 305, 307, 316, 312, 313, 308, 317, 319, 311,
833 309, 318, 318, 326, 320, 317, 321, 322, 330, 319,
834 325, 326, 328, 318, 320, 329, 321, 332, 322, 335,
835 325, 329, 328, 336, 330, 332, 337, 338, 340, 342,
836 335, 344, 337, 345, 336, 351, 346, 346, 347, 347,
837 347, 347, 344, 345, 351, 338, 350, 345, 346, 353,
838 340, 355, 350, 342, 344, 356, 357, 358, 359, 355,
840 361, 356, 357, 362, 363, 365, 364, 367, 359, 372,
841 374, 370, 353, 365, 363, 367, 371, 375, 373, 358,
842 361, 377, 378, 362, 364, 370, 374, 372, 373, 379,
843 371, 380, 382, 384, 383, 375, 386, 387, 385, 389,
844 378, 380, 383, 384, 385, 377, 388, 389, 390, 379,
845 382, 387, 391, 392, 395, 396, 388, 397, 398, 400,
846 401, 386, 390, 405, 402, 403, 396, 412, 407, 409,
847 395, 391, 400, 402, 413, 403, 407, 392, 398, 408,
848 410, 409, 414, 405, 401, 397, 411, 418, 408, 415,
849 415, 412, 411, 419, 410, 416, 416, 421, 422, 423,
851 414, 418, 413, 425, 426, 427, 429, 430, 434, 423,
852 438, 429, 429, 435, 440, 421, 434, 419, 445, 439,
853 438, 442, 446, 426, 427, 439, 425, 422, 447, 442,
854 435, 430, 449, 450, 451, 453, 454, 455, 440, 465,
855 462, 445, 466, 468, 446, 453, 447, 454, 467, 469,
856 470, 450, 451, 462, 472, 465, 449, 467, 473, 476,
857 477, 455, 478, 469, 479, 466, 480, 468, 470, 482,
858 483, 484, 485, 486, 488, 489, 480, 473, 472, 482,
859 479, 476, 477, 486, 489, 490, 483, 484, 491, 478,
860 493, 494, 488, 496, 485, 490, 497, 498, 499, 502,
862 500, 494, 497, 503, 505, 579, 506, 498, 500, 496,
863 507, 508, 491, 511, 512, 503, 493, 510, 518, 522,
864 521, 508, 499, 502, 512, 520, 527, 518, 521, 505,
865 506, 511, 523, 510, 507, 520, 525, 526, 522, 523,
866 527, 529, 532, 526, 525, 533, 534, 535, 532, 537,
867 538, 539, 540, 542, 541, 533, 543, 537, 545, 539,
868 541, 546, 543, 547, 535, 529, 548, 549, 540, 542,
869 534, 551, 552, 545, 538, 557, 548, 551, 546, 553,
870 554, 555, 552, 547, 558, 557, 559, 560, 565, 561,
871 564, 549, 566, 563, 567, 553, 554, 555, 564, 568,
873 569, 573, 565, 571, 559, 561, 560, 572, 558, 563,
874 566, 571, 574, 578, 580, 572, 567, 583, 577, 576,
875 575, 578, 569, 568, 580, 570, 562, 556, 550, 544,
876 536, 573, 531, 530, 528, 524, 574, 519, 517, 583,
877 586, 586, 586, 586, 586, 587, 587, 588, 588, 589,
878 516, 589, 589, 589, 590, 590, 591, 591, 591, 591,
879 591, 593, 593, 593, 593, 593, 515, 514, 513, 509,
880 504, 501, 495, 492, 487, 481, 475, 474, 471, 464,
881 463, 461, 460, 458, 457, 456, 452, 448, 444, 443,
882 441, 437, 436, 433, 432, 431, 428, 424, 420, 417,
884 406, 404, 399, 381, 376, 369, 368, 366, 354, 352,
885 349, 348, 343, 341, 339, 334, 333, 331, 327, 324,
886 323, 315, 310, 306, 303, 302, 294, 290, 289, 284,
887 283, 269, 265, 252, 243, 242, 240, 239, 237, 236,
888 235, 226, 223, 222, 217, 216, 215, 209, 206, 205,
889 203, 202, 201, 200, 199, 198, 192, 168, 159, 154,
890 151, 148, 145, 141, 137, 136, 120, 73, 63, 53,
891 43, 41, 39, 8, 7, 3, 585, 585, 585, 585,
892 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
893 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
895 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
896 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
900 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
901 static char *yy_full_match;
905 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
906 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
910 #define yymore() yymore_used_but_not_detected
911 #define YY_MORE_ADJ 0
912 #define YY_RESTORE_YY_MORE_OFFSET
914 #line 1 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
916 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
918 // The LLVM Compiler Infrastructure
920 // This file was developed by the LLVM research group and is distributed under
921 // the University of Illinois Open Source License. See LICENSE.TXT for details.
923 //===----------------------------------------------------------------------===//
925 // This file implements the flex scanner for LLVM assembly languages files.
927 //===----------------------------------------------------------------------===*/
928 #define YY_NEVER_INTERACTIVE 1
929 #line 28 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
930 #include "ParserInternals.h"
931 #include "llvm/Module.h"
932 #include "llvm/Support/MathExtras.h"
934 #include "llvmAsmParser.h"
938 void set_scan_file(FILE * F){
939 yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
941 void set_scan_string (const char * str) {
942 yy_scan_string (str);
945 // Construct a token value for a non-obsolete token
946 #define RET_TOK(type, Enum, sym) \
947 llvmAsmlval.type = Instruction::Enum; \
950 // Construct a token value for an obsolete token
951 #define RET_TY(CTYPE, SYM) \
952 llvmAsmlval.PrimType = CTYPE;\
957 // TODO: All of the static identifiers are figured out by the lexer,
958 // these should be hashed to reduce the lexer size
961 // atoull - Convert an ascii string of decimal digits into the unsigned long
962 // long representation... this does not have to do input error checking,
963 // because we know that the input will be matched by a suitable regex...
965 static uint64_t atoull(const char *Buffer) {
967 for (; *Buffer; Buffer++) {
968 uint64_t OldRes = Result;
970 Result += *Buffer-'0';
971 if (Result < OldRes) // Uh, oh, overflow detected!!!
972 GenerateError("constant bigger than 64 bits detected!");
977 static uint64_t HexIntToVal(const char *Buffer) {
979 for (; *Buffer; ++Buffer) {
980 uint64_t OldRes = Result;
983 if (C >= '0' && C <= '9')
985 else if (C >= 'A' && C <= 'F')
987 else if (C >= 'a' && C <= 'f')
990 if (Result < OldRes) // Uh, oh, overflow detected!!!
991 GenerateError("constant bigger than 64 bits detected!");
997 // HexToFP - Convert the ascii string in hexidecimal format to the floating
998 // point representation of it.
1000 static double HexToFP(const char *Buffer) {
1001 return BitsToDouble(HexIntToVal(Buffer)); // Cast Hex constant to double
1005 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1006 // appropriate character.
1007 char *UnEscapeLexed(char *Buffer, char* EndBuffer) {
1008 char *BOut = Buffer;
1009 for (char *BIn = Buffer; *BIn; ) {
1010 if (BIn[0] == '\\') {
1011 if (BIn < EndBuffer-1 && BIn[1] == '\\') {
1012 *BOut++ = '\\'; // Two \ becomes one
1014 } else if (BIn < EndBuffer-2 && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1015 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1016 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1017 BIn[3] = Tmp; // Restore character
1018 BIn += 3; // Skip over handled chars
1030 } // End llvm namespace
1032 using namespace llvm;
1034 #define YY_NEVER_INTERACTIVE 1
1035 /* Comments start with a ; and go till end of line */
1036 /* Local Values and Type identifiers start with a % sign */
1037 /* Global Value identifiers start with an @ sign */
1038 /* Label identifiers end with a colon */
1039 /* Quoted names can contain any character except " and \ */
1040 /* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
1041 /* Integer types are specified with i and a bitwidth */
1042 /* E[PN]Integer: match positive and negative literal integer values. */
1043 /* FPConstant - A Floating point constant.
1045 /* HexFPConstant - Floating point constant represented in IEEE format as a
1046 * hexadecimal number for when exponential notation is not precise enough.
1048 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1049 * it to deal with 64 bit numbers.
1051 /* WSNL - shorthand for newline followed by whitespace */
1052 #line 1053 "Lexer.cpp"
1054 /* Macros after this point can all be overridden by user definitions in
1058 #ifndef YY_SKIP_YYWRAP
1060 extern "C" int yywrap YY_PROTO(( void ));
1062 extern int yywrap YY_PROTO(( void ));
1067 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
1071 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1074 #ifdef YY_NEED_STRLEN
1075 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1080 static int yyinput YY_PROTO(( void ));
1082 static int input YY_PROTO(( void ));
1087 static int yy_start_stack_ptr = 0;
1088 static int yy_start_stack_depth = 0;
1089 static int *yy_start_stack = 0;
1090 #ifndef YY_NO_PUSH_STATE
1091 static void yy_push_state YY_PROTO(( int new_state ));
1093 #ifndef YY_NO_POP_STATE
1094 static void yy_pop_state YY_PROTO(( void ));
1096 #ifndef YY_NO_TOP_STATE
1097 static int yy_top_state YY_PROTO(( void ));
1101 #define YY_NO_PUSH_STATE 1
1102 #define YY_NO_POP_STATE 1
1103 #define YY_NO_TOP_STATE 1
1106 #ifdef YY_MALLOC_DECL
1114 /* Just try to get by without declaring the routines. This will fail
1115 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1116 * or sizeof(void*) != sizeof(int).
1121 /* Amount of stuff to slurp up with each read. */
1122 #ifndef YY_READ_BUF_SIZE
1123 #define YY_READ_BUF_SIZE 8192
1126 /* Copy whatever the last rule matched to the standard output. */
1129 /* This used to be an fputs(), but since the string might contain NUL's,
1130 * we now use fwrite().
1132 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1135 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1136 * is returned in "result".
1139 #define YY_INPUT(buf,result,max_size) \
1140 if ( yy_current_buffer->yy_is_interactive ) \
1143 for ( n = 0; n < max_size && \
1144 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1145 buf[n] = (char) c; \
1147 buf[n++] = (char) c; \
1148 if ( c == EOF && ferror( yyin ) ) \
1149 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1152 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1153 && ferror( yyin ) ) \
1154 YY_FATAL_ERROR( "input in flex scanner failed" );
1157 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1158 * we don't want an extra ';' after the "return" because that will cause
1159 * some compilers to complain about unreachable statements.
1162 #define yyterminate() return YY_NULL
1165 /* Number of entries by which start-condition stack grows. */
1166 #ifndef YY_START_STACK_INCR
1167 #define YY_START_STACK_INCR 25
1170 /* Report a fatal error. */
1171 #ifndef YY_FATAL_ERROR
1172 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1175 /* Default declaration of generated scanner - a define so the user can
1176 * easily add parameters.
1179 #define YY_DECL int yylex YY_PROTO(( void ))
1182 /* Code executed at the beginning of each rule, after yytext and yyleng
1185 #ifndef YY_USER_ACTION
1186 #define YY_USER_ACTION
1189 /* Code executed at the end of each rule. */
1191 #define YY_BREAK break;
1194 #define YY_RULE_SETUP \
1199 register yy_state_type yy_current_state;
1200 register char *yy_cp = NULL, *yy_bp = NULL;
1201 register int yy_act;
1203 #line 182 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1206 #line 1207 "Lexer.cpp"
1217 yy_start = 1; /* first start state */
1225 if ( ! yy_current_buffer )
1227 yy_create_buffer( yyin, YY_BUF_SIZE );
1229 yy_load_buffer_state();
1232 while ( 1 ) /* loops until end-of-file is reached */
1236 /* Support of yytext. */
1237 *yy_cp = yy_hold_char;
1239 /* yy_bp points to the position in yy_ch_buf of the start of
1244 yy_current_state = yy_start;
1245 yy_state_ptr = yy_state_buf;
1246 *yy_state_ptr++ = yy_current_state;
1250 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1251 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1253 yy_current_state = (int) yy_def[yy_current_state];
1254 if ( yy_current_state >= 586 )
1255 yy_c = yy_meta[(unsigned int) yy_c];
1257 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1258 *yy_state_ptr++ = yy_current_state;
1261 while ( yy_current_state != 585 );
1264 yy_current_state = *--yy_state_ptr;
1265 yy_lp = yy_accept[yy_current_state];
1266 find_rule: /* we branch to this label when backing up */
1267 for ( ; ; ) /* until we find what rule we matched */
1269 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1271 yy_act = yy_acclist[yy_lp];
1273 yy_full_match = yy_cp;
1278 yy_current_state = *--yy_state_ptr;
1279 yy_lp = yy_accept[yy_current_state];
1282 YY_DO_BEFORE_ACTION;
1284 if ( yy_act != YY_END_OF_BUFFER )
1287 for ( yyl = 0; yyl < yyleng; ++yyl )
1288 if ( yytext[yyl] == '\n' )
1292 do_action: /* This label is used only to access EOF actions. */
1296 { /* beginning of action switch */
1299 #line 184 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1300 { /* Ignore comments for now */ }
1304 #line 186 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1305 { return BEGINTOK; }
1309 #line 187 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1314 #line 188 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1319 #line 189 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1320 { return FALSETOK; }
1324 #line 190 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1329 #line 191 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1334 #line 192 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1339 #line 193 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1340 { return CONSTANT; }
1344 #line 194 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1345 { return INTERNAL; }
1349 #line 195 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1350 { return LINKONCE; }
1354 #line 196 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1359 #line 197 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1360 { return APPENDING; }
1364 #line 198 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1365 { return DLLIMPORT; }
1369 #line 199 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1370 { return DLLEXPORT; }
1374 #line 200 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1379 #line 201 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1380 { return PROTECTED; }
1384 #line 202 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1385 { return EXTERN_WEAK; }
1389 #line 203 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1390 { return EXTERNAL; }
1394 #line 204 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1395 { return THREAD_LOCAL; }
1399 #line 205 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1400 { return ZEROINITIALIZER; }
1404 #line 206 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1405 { return DOTDOTDOT; }
1409 #line 207 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1414 #line 208 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1415 { return NULL_TOK; }
1419 #line 209 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1424 #line 210 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1429 #line 211 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1434 #line 212 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1439 #line 213 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1444 #line 214 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1445 { return DATALAYOUT; }
1449 #line 215 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1450 { return VOLATILE; }
1454 #line 216 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1459 #line 217 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1464 #line 218 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1469 #line 219 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1474 #line 220 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1479 #line 221 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1480 { return SIDEEFFECT; }
1484 #line 223 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1489 #line 224 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1494 #line 225 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1495 { return FASTCC_TOK; }
1499 #line 226 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1500 { return COLDCC_TOK; }
1504 #line 227 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1505 { return X86_STDCALLCC_TOK; }
1509 #line 228 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1510 { return X86_FASTCALLCC_TOK; }
1514 #line 230 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1519 #line 231 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1524 #line 232 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1529 #line 233 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1534 #line 234 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1535 { return NOUNWIND; }
1539 #line 235 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1540 { return NORETURN; }
1544 #line 236 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1549 #line 237 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1554 #line 238 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1558 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1559 yy_c_buf_p = yy_cp -= 1;
1560 YY_DO_BEFORE_ACTION; /* set up yytext again */
1562 #line 239 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1563 { // For auto-upgrade only, drop in LLVM 3.0
1567 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1568 yy_c_buf_p = yy_cp -= 1;
1569 YY_DO_BEFORE_ACTION; /* set up yytext again */
1571 #line 241 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1572 { // For auto-upgrade only, drop in LLVM 3.0
1577 #line 244 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1578 { RET_TY(Type::VoidTy, VOID); }
1582 #line 245 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1583 { RET_TY(Type::FloatTy, FLOAT); }
1587 #line 246 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1588 { RET_TY(Type::DoubleTy,DOUBLE);}
1592 #line 247 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1593 { RET_TY(Type::LabelTy, LABEL); }
1597 #line 248 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1602 #line 249 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1607 #line 250 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1608 { uint64_t NumBits = atoull(yytext+1);
1609 if (NumBits < IntegerType::MIN_INT_BITS ||
1610 NumBits > IntegerType::MAX_INT_BITS)
1611 GenerateError("Bitwidth for integer type out of range!");
1612 const Type* Ty = IntegerType::get(NumBits);
1613 RET_TY(Ty, INTTYPE);
1618 #line 258 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1619 { RET_TOK(BinaryOpVal, Add, ADD); }
1623 #line 259 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1624 { RET_TOK(BinaryOpVal, Sub, SUB); }
1628 #line 260 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1629 { RET_TOK(BinaryOpVal, Mul, MUL); }
1633 #line 261 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1634 { RET_TOK(BinaryOpVal, UDiv, UDIV); }
1638 #line 262 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1639 { RET_TOK(BinaryOpVal, SDiv, SDIV); }
1643 #line 263 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1644 { RET_TOK(BinaryOpVal, FDiv, FDIV); }
1648 #line 264 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1649 { RET_TOK(BinaryOpVal, URem, UREM); }
1653 #line 265 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1654 { RET_TOK(BinaryOpVal, SRem, SREM); }
1658 #line 266 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1659 { RET_TOK(BinaryOpVal, FRem, FREM); }
1663 #line 267 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1664 { RET_TOK(BinaryOpVal, Shl, SHL); }
1668 #line 268 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1669 { RET_TOK(BinaryOpVal, LShr, LSHR); }
1673 #line 269 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1674 { RET_TOK(BinaryOpVal, AShr, ASHR); }
1678 #line 270 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1679 { RET_TOK(BinaryOpVal, And, AND); }
1683 #line 271 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1684 { RET_TOK(BinaryOpVal, Or , OR ); }
1688 #line 272 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1689 { RET_TOK(BinaryOpVal, Xor, XOR); }
1693 #line 273 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1694 { RET_TOK(OtherOpVal, ICmp, ICMP); }
1698 #line 274 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1699 { RET_TOK(OtherOpVal, FCmp, FCMP); }
1703 #line 276 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1708 #line 277 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1713 #line 278 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1718 #line 279 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1723 #line 280 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1728 #line 281 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1733 #line 282 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1738 #line 283 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1743 #line 284 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1748 #line 285 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1753 #line 286 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1758 #line 287 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1763 #line 288 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1768 #line 289 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1773 #line 290 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1778 #line 291 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1783 #line 292 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1788 #line 293 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1793 #line 294 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1798 #line 295 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1803 #line 297 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1804 { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
1808 #line 298 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1809 { RET_TOK(OtherOpVal, Call, CALL); }
1813 #line 299 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1814 { RET_TOK(CastOpVal, Trunc, TRUNC); }
1818 #line 300 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1819 { RET_TOK(CastOpVal, ZExt, ZEXT); }
1823 #line 301 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1824 { RET_TOK(CastOpVal, SExt, SEXT); }
1828 #line 302 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1829 { RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
1833 #line 303 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1834 { RET_TOK(CastOpVal, FPExt, FPEXT); }
1838 #line 304 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1839 { RET_TOK(CastOpVal, UIToFP, UITOFP); }
1843 #line 305 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1844 { RET_TOK(CastOpVal, SIToFP, SITOFP); }
1848 #line 306 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1849 { RET_TOK(CastOpVal, FPToUI, FPTOUI); }
1853 #line 307 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1854 { RET_TOK(CastOpVal, FPToSI, FPTOSI); }
1858 #line 308 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1859 { RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
1863 #line 309 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1864 { RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
1868 #line 310 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1869 { RET_TOK(CastOpVal, BitCast, BITCAST); }
1873 #line 311 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1874 { RET_TOK(OtherOpVal, Select, SELECT); }
1878 #line 312 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1879 { RET_TOK(OtherOpVal, VAArg , VAARG); }
1883 #line 313 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1884 { RET_TOK(TermOpVal, Ret, RET); }
1888 #line 314 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1889 { RET_TOK(TermOpVal, Br, BR); }
1893 #line 315 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1894 { RET_TOK(TermOpVal, Switch, SWITCH); }
1898 #line 316 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1899 { RET_TOK(TermOpVal, Invoke, INVOKE); }
1903 #line 317 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1904 { RET_TOK(TermOpVal, Unwind, UNWIND); }
1908 #line 318 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1909 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
1913 #line 320 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1914 { RET_TOK(MemOpVal, Malloc, MALLOC); }
1918 #line 321 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1919 { RET_TOK(MemOpVal, Alloca, ALLOCA); }
1923 #line 322 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1924 { RET_TOK(MemOpVal, Free, FREE); }
1928 #line 323 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1929 { RET_TOK(MemOpVal, Load, LOAD); }
1933 #line 324 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1934 { RET_TOK(MemOpVal, Store, STORE); }
1938 #line 325 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1939 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
1943 #line 327 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1944 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
1948 #line 328 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1949 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1953 #line 329 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1954 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
1958 #line 332 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1960 llvmAsmlval.StrVal = new std::string(yytext+1); // Skip %
1966 #line 336 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1968 llvmAsmlval.StrVal = new std::string(yytext+1); // Skip @
1974 #line 340 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1976 yytext[yyleng-1] = 0; // nuke colon
1977 llvmAsmlval.StrVal = new std::string(yytext);
1983 #line 345 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1985 yytext[yyleng-2] = 0; // nuke colon, end quote
1986 const char* EndChar = UnEscapeLexed(yytext+1, yytext+yyleng);
1987 llvmAsmlval.StrVal =
1988 new std::string(yytext+1, EndChar - yytext - 1);
1994 #line 353 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
1995 { yytext[yyleng-1] = 0; // nuke end quote
1996 const char* EndChar = UnEscapeLexed(yytext+1, yytext+yyleng);
1997 llvmAsmlval.StrVal =
1998 new std::string(yytext+1, EndChar - yytext - 1);
1999 return STRINGCONSTANT;
2004 #line 359 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2006 yytext[yyleng-1] = 0; // nuke end quote
2007 const char* EndChar =
2008 UnEscapeLexed(yytext+2, yytext+yyleng);
2009 llvmAsmlval.StrVal =
2010 new std::string(yytext+2, EndChar - yytext - 2);
2011 return ATSTRINGCONSTANT;
2016 #line 367 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2018 yytext[yyleng-1] = 0; // nuke end quote
2019 const char* EndChar =
2020 UnEscapeLexed(yytext+2, yytext+yyleng);
2021 llvmAsmlval.StrVal =
2022 new std::string(yytext+2, EndChar - yytext - 2);
2023 return PCTSTRINGCONSTANT;
2028 #line 375 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2030 uint32_t numBits = ((yyleng * 64) / 19) + 1;
2031 APInt Tmp(numBits, yytext, yyleng, 10);
2032 uint32_t activeBits = Tmp.getActiveBits();
2033 if (activeBits > 0 && activeBits < numBits)
2034 Tmp.trunc(activeBits);
2035 if (Tmp.getBitWidth() > 64) {
2036 llvmAsmlval.APIntVal = new APInt(Tmp);
2039 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2046 #line 389 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2048 uint32_t numBits = (((yyleng-1) * 64) / 19) + 2;
2049 APInt Tmp(numBits, yytext, yyleng, 10);
2050 uint32_t minBits = Tmp.getMinSignedBits();
2051 if (minBits > 0 && minBits < numBits)
2053 if (Tmp.getBitWidth() > 64) {
2054 llvmAsmlval.APIntVal = new APInt(Tmp);
2057 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2064 #line 404 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2065 { int len = yyleng - 3;
2066 uint32_t bits = len * 4;
2067 APInt Tmp(bits, yytext+3, len, 16);
2068 uint32_t activeBits = Tmp.getActiveBits();
2069 if (activeBits > 0 && activeBits < bits)
2070 Tmp.trunc(activeBits);
2071 if (Tmp.getBitWidth() > 64) {
2072 llvmAsmlval.APIntVal = new APInt(Tmp);
2073 return yytext[0] == 's' ? ESAPINTVAL : EUAPINTVAL;
2074 } else if (yytext[0] == 's') {
2075 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2078 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2085 #line 422 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2087 uint64_t Val = atoull(yytext+1);
2088 if ((unsigned)Val != Val)
2089 GenerateError("Invalid value number (too large)!");
2090 llvmAsmlval.UIntVal = unsigned(Val);
2096 #line 429 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2098 uint64_t Val = atoull(yytext+1);
2099 if ((unsigned)Val != Val)
2100 GenerateError("Invalid value number (too large)!");
2101 llvmAsmlval.UIntVal = unsigned(Val);
2102 return GLOBALVAL_ID;
2107 #line 437 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2108 { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
2112 #line 438 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2113 { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
2115 case YY_STATE_EOF(INITIAL):
2116 #line 440 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2118 /* Make sure to free the internal buffers for flex when we are
2119 * done reading our input!
2121 yy_delete_buffer(YY_CURRENT_BUFFER);
2127 #line 448 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2128 { /* Ignore whitespace */ }
2132 #line 449 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2133 { return yytext[0]; }
2137 #line 451 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"
2138 YY_FATAL_ERROR( "flex scanner jammed" );
2140 #line 2141 "Lexer.cpp"
2142 case YY_END_OF_BUFFER:
2144 /* Amount of text matched not including the EOB char. */
2145 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2147 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2148 *yy_cp = yy_hold_char;
2149 YY_RESTORE_YY_MORE_OFFSET
2151 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2153 /* We're scanning a new file or input source. It's
2154 * possible that this happened because the user
2155 * just pointed yyin at a new source and called
2156 * yylex(). If so, then we have to assure
2157 * consistency between yy_current_buffer and our
2158 * globals. Here is the right place to do so, because
2159 * this is the first action (other than possibly a
2160 * back-up) that will match for the new input source.
2162 yy_n_chars = yy_current_buffer->yy_n_chars;
2163 yy_current_buffer->yy_input_file = yyin;
2164 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2167 /* Note that here we test for yy_c_buf_p "<=" to the position
2168 * of the first EOB in the buffer, since yy_c_buf_p will
2169 * already have been incremented past the NUL character
2170 * (since all states make transitions on EOB to the
2171 * end-of-buffer state). Contrast this with the test
2174 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2175 { /* This was really a NUL. */
2176 yy_state_type yy_next_state;
2178 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2180 yy_current_state = yy_get_previous_state();
2182 /* Okay, we're now positioned to make the NUL
2183 * transition. We couldn't have
2184 * yy_get_previous_state() go ahead and do it
2185 * for us because it doesn't know how to deal
2186 * with the possibility of jamming (and we don't
2187 * want to build jamming into it because then it
2188 * will run more slowly).
2191 yy_next_state = yy_try_NUL_trans( yy_current_state );
2193 yy_bp = yytext_ptr + YY_MORE_ADJ;
2195 if ( yy_next_state )
2197 /* Consume the NUL. */
2198 yy_cp = ++yy_c_buf_p;
2199 yy_current_state = yy_next_state;
2206 goto yy_find_action;
2210 else switch ( yy_get_next_buffer() )
2212 case EOB_ACT_END_OF_FILE:
2214 yy_did_buffer_switch_on_eof = 0;
2218 /* Note: because we've taken care in
2219 * yy_get_next_buffer() to have set up
2220 * yytext, we can now set up
2221 * yy_c_buf_p so that if some total
2222 * hoser (like flex itself) wants to
2223 * call the scanner after we return the
2224 * YY_NULL, it'll still work - another
2225 * YY_NULL will get returned.
2227 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2229 yy_act = YY_STATE_EOF(YY_START);
2235 if ( ! yy_did_buffer_switch_on_eof )
2241 case EOB_ACT_CONTINUE_SCAN:
2243 yytext_ptr + yy_amount_of_matched_text;
2245 yy_current_state = yy_get_previous_state();
2248 yy_bp = yytext_ptr + YY_MORE_ADJ;
2251 case EOB_ACT_LAST_MATCH:
2253 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2255 yy_current_state = yy_get_previous_state();
2258 yy_bp = yytext_ptr + YY_MORE_ADJ;
2259 goto yy_find_action;
2266 "fatal flex scanner internal error--no action found" );
2267 } /* end of action switch */
2268 } /* end of scanning one token */
2269 } /* end of yylex */
2272 /* yy_get_next_buffer - try to read in a new buffer
2274 * Returns a code representing an action:
2275 * EOB_ACT_LAST_MATCH -
2276 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2277 * EOB_ACT_END_OF_FILE - end of file
2280 static int yy_get_next_buffer()
2282 register char *dest = yy_current_buffer->yy_ch_buf;
2283 register char *source = yytext_ptr;
2284 register int number_to_move, i;
2287 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2289 "fatal flex scanner internal error--end of buffer missed" );
2291 if ( yy_current_buffer->yy_fill_buffer == 0 )
2292 { /* Don't try to fill the buffer, so this is an EOF. */
2293 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2295 /* We matched a single character, the EOB, so
2296 * treat this as a final EOF.
2298 return EOB_ACT_END_OF_FILE;
2303 /* We matched some text prior to the EOB, first
2306 return EOB_ACT_LAST_MATCH;
2310 /* Try to read more data. */
2312 /* First move last chars to start of buffer. */
2313 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2315 for ( i = 0; i < number_to_move; ++i )
2316 *(dest++) = *(source++);
2318 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2319 /* don't do the read, it's not guaranteed to return an EOF,
2322 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2327 yy_current_buffer->yy_buf_size - number_to_move - 1;
2329 while ( num_to_read <= 0 )
2330 { /* Not enough room in the buffer - grow it. */
2331 #ifdef YY_USES_REJECT
2333 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2336 /* just a shorter name for the current buffer */
2337 YY_BUFFER_STATE b = yy_current_buffer;
2339 int yy_c_buf_p_offset =
2340 (int) (yy_c_buf_p - b->yy_ch_buf);
2342 if ( b->yy_is_our_buffer )
2344 int new_size = b->yy_buf_size * 2;
2346 if ( new_size <= 0 )
2347 b->yy_buf_size += b->yy_buf_size / 8;
2349 b->yy_buf_size *= 2;
2351 b->yy_ch_buf = (char *)
2352 /* Include room in for 2 EOB chars. */
2353 yy_flex_realloc( (void *) b->yy_ch_buf,
2354 b->yy_buf_size + 2 );
2357 /* Can't grow it, we don't own it. */
2360 if ( ! b->yy_ch_buf )
2362 "fatal error - scanner input buffer overflow" );
2364 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2366 num_to_read = yy_current_buffer->yy_buf_size -
2371 if ( num_to_read > YY_READ_BUF_SIZE )
2372 num_to_read = YY_READ_BUF_SIZE;
2374 /* Read in more data. */
2375 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2376 yy_n_chars, num_to_read );
2378 yy_current_buffer->yy_n_chars = yy_n_chars;
2381 if ( yy_n_chars == 0 )
2383 if ( number_to_move == YY_MORE_ADJ )
2385 ret_val = EOB_ACT_END_OF_FILE;
2391 ret_val = EOB_ACT_LAST_MATCH;
2392 yy_current_buffer->yy_buffer_status =
2393 YY_BUFFER_EOF_PENDING;
2398 ret_val = EOB_ACT_CONTINUE_SCAN;
2400 yy_n_chars += number_to_move;
2401 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2402 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2404 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2410 /* yy_get_previous_state - get the state just before the EOB char was reached */
2412 static yy_state_type yy_get_previous_state()
2414 register yy_state_type yy_current_state;
2415 register char *yy_cp;
2417 yy_current_state = yy_start;
2418 yy_state_ptr = yy_state_buf;
2419 *yy_state_ptr++ = yy_current_state;
2421 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2423 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2424 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2426 yy_current_state = (int) yy_def[yy_current_state];
2427 if ( yy_current_state >= 586 )
2428 yy_c = yy_meta[(unsigned int) yy_c];
2430 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2431 *yy_state_ptr++ = yy_current_state;
2434 return yy_current_state;
2438 /* yy_try_NUL_trans - try to make a transition on the NUL character
2441 * next_state = yy_try_NUL_trans( current_state );
2444 #ifdef YY_USE_PROTOS
2445 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2447 static yy_state_type yy_try_NUL_trans( yy_current_state )
2448 yy_state_type yy_current_state;
2451 register int yy_is_jam;
2453 register YY_CHAR yy_c = 1;
2454 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2456 yy_current_state = (int) yy_def[yy_current_state];
2457 if ( yy_current_state >= 586 )
2458 yy_c = yy_meta[(unsigned int) yy_c];
2460 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2461 yy_is_jam = (yy_current_state == 585);
2463 *yy_state_ptr++ = yy_current_state;
2465 return yy_is_jam ? 0 : yy_current_state;
2470 #ifdef YY_USE_PROTOS
2471 static inline void yyunput( int c, register char *yy_bp )
2473 static inline void yyunput( c, yy_bp )
2475 register char *yy_bp;
2478 register char *yy_cp = yy_c_buf_p;
2480 /* undo effects of setting up yytext */
2481 *yy_cp = yy_hold_char;
2483 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2484 { /* need to shift things up to make room */
2485 /* +2 for EOB chars. */
2486 register int number_to_move = yy_n_chars + 2;
2487 register char *dest = &yy_current_buffer->yy_ch_buf[
2488 yy_current_buffer->yy_buf_size + 2];
2489 register char *source =
2490 &yy_current_buffer->yy_ch_buf[number_to_move];
2492 while ( source > yy_current_buffer->yy_ch_buf )
2493 *--dest = *--source;
2495 yy_cp += (int) (dest - source);
2496 yy_bp += (int) (dest - source);
2497 yy_current_buffer->yy_n_chars =
2498 yy_n_chars = yy_current_buffer->yy_buf_size;
2500 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2501 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2504 *--yy_cp = (char) c;
2510 yy_hold_char = *yy_cp;
2513 #endif /* ifndef YY_NO_UNPUT */
2518 static int yyinput()
2525 *yy_c_buf_p = yy_hold_char;
2527 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2529 /* yy_c_buf_p now points to the character we want to return.
2530 * If this occurs *before* the EOB characters, then it's a
2531 * valid NUL; if not, then we've hit the end of the buffer.
2533 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2534 /* This was really a NUL. */
2538 { /* need more input */
2539 int offset = yy_c_buf_p - yytext_ptr;
2542 switch ( yy_get_next_buffer() )
2544 case EOB_ACT_LAST_MATCH:
2545 /* This happens because yy_g_n_b()
2546 * sees that we've accumulated a
2547 * token and flags that we need to
2548 * try matching the token before
2549 * proceeding. But for input(),
2550 * there's no matching to consider.
2551 * So convert the EOB_ACT_LAST_MATCH
2552 * to EOB_ACT_END_OF_FILE.
2555 /* Reset buffer status. */
2560 case EOB_ACT_END_OF_FILE:
2565 if ( ! yy_did_buffer_switch_on_eof )
2574 case EOB_ACT_CONTINUE_SCAN:
2575 yy_c_buf_p = yytext_ptr + offset;
2581 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2582 *yy_c_buf_p = '\0'; /* preserve yytext */
2583 yy_hold_char = *++yy_c_buf_p;
2590 #endif /* YY_NO_INPUT */
2592 #ifdef YY_USE_PROTOS
2593 void yyrestart( FILE *input_file )
2595 void yyrestart( input_file )
2599 if ( ! yy_current_buffer )
2600 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2602 yy_init_buffer( yy_current_buffer, input_file );
2603 yy_load_buffer_state();
2607 #ifdef YY_USE_PROTOS
2608 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2610 void yy_switch_to_buffer( new_buffer )
2611 YY_BUFFER_STATE new_buffer;
2614 if ( yy_current_buffer == new_buffer )
2617 if ( yy_current_buffer )
2619 /* Flush out information for old buffer. */
2620 *yy_c_buf_p = yy_hold_char;
2621 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2622 yy_current_buffer->yy_n_chars = yy_n_chars;
2625 yy_current_buffer = new_buffer;
2626 yy_load_buffer_state();
2628 /* We don't actually know whether we did this switch during
2629 * EOF (yywrap()) processing, but the only time this flag
2630 * is looked at is after yywrap() is called, so it's safe
2631 * to go ahead and always set it.
2633 yy_did_buffer_switch_on_eof = 1;
2637 #ifdef YY_USE_PROTOS
2638 void yy_load_buffer_state( void )
2640 void yy_load_buffer_state()
2643 yy_n_chars = yy_current_buffer->yy_n_chars;
2644 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2645 yyin = yy_current_buffer->yy_input_file;
2646 yy_hold_char = *yy_c_buf_p;
2650 #ifdef YY_USE_PROTOS
2651 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2653 YY_BUFFER_STATE yy_create_buffer( file, size )
2660 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2662 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2664 b->yy_buf_size = size;
2666 /* yy_ch_buf has to be 2 characters longer than the size given because
2667 * we need to put in 2 end-of-buffer characters.
2669 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2670 if ( ! b->yy_ch_buf )
2671 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2673 b->yy_is_our_buffer = 1;
2675 yy_init_buffer( b, file );
2681 #ifdef YY_USE_PROTOS
2682 void yy_delete_buffer( YY_BUFFER_STATE b )
2684 void yy_delete_buffer( b )
2691 if ( b == yy_current_buffer )
2692 yy_current_buffer = (YY_BUFFER_STATE) 0;
2694 if ( b->yy_is_our_buffer )
2695 yy_flex_free( (void *) b->yy_ch_buf );
2697 yy_flex_free( (void *) b );
2702 #ifdef YY_USE_PROTOS
2703 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2705 void yy_init_buffer( b, file )
2712 yy_flush_buffer( b );
2714 b->yy_input_file = file;
2715 b->yy_fill_buffer = 1;
2717 #if YY_ALWAYS_INTERACTIVE
2718 b->yy_is_interactive = 1;
2720 #if YY_NEVER_INTERACTIVE
2721 b->yy_is_interactive = 0;
2723 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2729 #ifdef YY_USE_PROTOS
2730 void yy_flush_buffer( YY_BUFFER_STATE b )
2732 void yy_flush_buffer( b )
2742 /* We always need two end-of-buffer characters. The first causes
2743 * a transition to the end-of-buffer state. The second causes
2744 * a jam in that state.
2746 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2747 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2749 b->yy_buf_pos = &b->yy_ch_buf[0];
2752 b->yy_buffer_status = YY_BUFFER_NEW;
2754 if ( b == yy_current_buffer )
2755 yy_load_buffer_state();
2759 #ifndef YY_NO_SCAN_BUFFER
2760 #ifdef YY_USE_PROTOS
2761 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2763 YY_BUFFER_STATE yy_scan_buffer( base, size )
2771 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2772 base[size-1] != YY_END_OF_BUFFER_CHAR )
2773 /* They forgot to leave room for the EOB's. */
2776 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2778 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2780 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2781 b->yy_buf_pos = b->yy_ch_buf = base;
2782 b->yy_is_our_buffer = 0;
2783 b->yy_input_file = 0;
2784 b->yy_n_chars = b->yy_buf_size;
2785 b->yy_is_interactive = 0;
2787 b->yy_fill_buffer = 0;
2788 b->yy_buffer_status = YY_BUFFER_NEW;
2790 yy_switch_to_buffer( b );
2797 #ifndef YY_NO_SCAN_STRING
2798 #ifdef YY_USE_PROTOS
2799 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2801 YY_BUFFER_STATE yy_scan_string( yy_str )
2802 yyconst char *yy_str;
2806 for ( len = 0; yy_str[len]; ++len )
2809 return yy_scan_bytes( yy_str, len );
2814 #ifndef YY_NO_SCAN_BYTES
2815 #ifdef YY_USE_PROTOS
2816 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2818 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2819 yyconst char *bytes;
2828 /* Get memory for full buffer, including space for trailing EOB's. */
2830 buf = (char *) yy_flex_alloc( n );
2832 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2834 for ( i = 0; i < len; ++i )
2837 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2839 b = yy_scan_buffer( buf, n );
2841 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2843 /* It's okay to grow etc. this buffer, and we should throw it
2844 * away when we're done.
2846 b->yy_is_our_buffer = 1;
2853 #ifndef YY_NO_PUSH_STATE
2854 #ifdef YY_USE_PROTOS
2855 static void yy_push_state( int new_state )
2857 static void yy_push_state( new_state )
2861 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2865 yy_start_stack_depth += YY_START_STACK_INCR;
2866 new_size = yy_start_stack_depth * sizeof( int );
2868 if ( ! yy_start_stack )
2869 yy_start_stack = (int *) yy_flex_alloc( new_size );
2872 yy_start_stack = (int *) yy_flex_realloc(
2873 (void *) yy_start_stack, new_size );
2875 if ( ! yy_start_stack )
2877 "out of memory expanding start-condition stack" );
2880 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2887 #ifndef YY_NO_POP_STATE
2888 static void yy_pop_state()
2890 if ( --yy_start_stack_ptr < 0 )
2891 YY_FATAL_ERROR( "start-condition stack underflow" );
2893 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2898 #ifndef YY_NO_TOP_STATE
2899 static int yy_top_state()
2901 return yy_start_stack[yy_start_stack_ptr - 1];
2905 #ifndef YY_EXIT_FAILURE
2906 #define YY_EXIT_FAILURE 2
2909 #ifdef YY_USE_PROTOS
2910 static void yy_fatal_error( yyconst char msg[] )
2912 static void yy_fatal_error( msg )
2916 (void) fprintf( stderr, "%s\n", msg );
2917 exit( YY_EXIT_FAILURE );
2922 /* Redefine yyless() so it works in section 3 code. */
2928 /* Undo effects of setting up yytext. */ \
2929 yytext[yyleng] = yy_hold_char; \
2930 yy_c_buf_p = yytext + n; \
2931 yy_hold_char = *yy_c_buf_p; \
2932 *yy_c_buf_p = '\0'; \
2938 /* Internal utility routines. */
2941 #ifdef YY_USE_PROTOS
2942 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2944 static void yy_flex_strncpy( s1, s2, n )
2951 for ( i = 0; i < n; ++i )
2956 #ifdef YY_NEED_STRLEN
2957 #ifdef YY_USE_PROTOS
2958 static int yy_flex_strlen( yyconst char *s )
2960 static int yy_flex_strlen( s )
2965 for ( n = 0; s[n]; ++n )
2973 #ifdef YY_USE_PROTOS
2974 static void *yy_flex_alloc( yy_size_t size )
2976 static void *yy_flex_alloc( size )
2980 return (void *) malloc( size );
2983 #ifdef YY_USE_PROTOS
2984 static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2986 static inline void *yy_flex_realloc( ptr, size )
2991 /* The cast to (char *) in the following accommodates both
2992 * implementations that use char* generic pointers, and those
2993 * that use void* generic pointers. It works with the latter
2994 * because both ANSI C and C++ allow castless assignment from
2995 * any pointer type to void*, and deal with argument conversions
2996 * as though doing an assignment.
2998 return (void *) realloc( (char *) ptr, size );
3001 #ifdef YY_USE_PROTOS
3002 static void yy_flex_free( void *ptr )
3004 static void yy_flex_free( ptr )
3018 #line 451 "/proj/llvm/head/llvm/lib/AsmParser/Lexer.l"