blob: 15067d7801080cdaa76765281baa24671f590432 [file] [log] [blame]
Reid Spencer68a24bd2005-08-27 18:50:39 +00001#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
18
19#line 20 "Lexer.cpp"
20/* A lexical scanner generated by flex */
21
22/* Scanner skeleton version:
23 * $Header$
24 */
25
26#define FLEX_SCANNER
27#define YY_FLEX_MAJOR_VERSION 2
28#define YY_FLEX_MINOR_VERSION 5
29
30#include <stdio.h>
Reid Spencer68a24bd2005-08-27 18:50:39 +000031
32
33/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
34#ifdef c_plusplus
35#ifndef __cplusplus
36#define __cplusplus
37#endif
38#endif
39
40
41#ifdef __cplusplus
42
43#include <stdlib.h>
Nate Begeman14b05292005-11-05 09:21:28 +000044#include <unistd.h>
Reid Spencer68a24bd2005-08-27 18:50:39 +000045
46/* Use prototypes in function declarations. */
47#define YY_USE_PROTOS
48
49/* The "const" storage-class-modifier is valid. */
50#define YY_USE_CONST
51
52#else /* ! __cplusplus */
53
54#if __STDC__
55
56#define YY_USE_PROTOS
57#define YY_USE_CONST
58
59#endif /* __STDC__ */
60#endif /* ! __cplusplus */
61
62#ifdef __TURBOC__
63 #pragma warn -rch
64 #pragma warn -use
65#include <io.h>
66#include <stdlib.h>
67#define YY_USE_CONST
68#define YY_USE_PROTOS
69#endif
70
71#ifdef YY_USE_CONST
72#define yyconst const
73#else
74#define yyconst
75#endif
76
77
78#ifdef YY_USE_PROTOS
79#define YY_PROTO(proto) proto
80#else
81#define YY_PROTO(proto) ()
82#endif
83
84/* Returned upon end-of-file. */
85#define YY_NULL 0
86
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
90 * double cast.
91 */
92#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
93
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.
97 */
98#define BEGIN yy_start = 1 + 2 *
99
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
102 * compatibility.
103 */
104#define YY_START ((yy_start - 1) / 2)
105#define YYSTATE YY_START
106
107/* Action number for EOF rule of a given start state. */
108#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
109
110/* Special action meaning "start processing a new file". */
111#define YY_NEW_FILE yyrestart( yyin )
112
113#define YY_END_OF_BUFFER_CHAR 0
114
115/* Size of default input buffer. */
116#define YY_BUF_SIZE (16384*64)
117
118typedef struct yy_buffer_state *YY_BUFFER_STATE;
119
120extern int yyleng;
121extern FILE *yyin, *yyout;
122
123#define EOB_ACT_CONTINUE_SCAN 0
124#define EOB_ACT_END_OF_FILE 1
125#define EOB_ACT_LAST_MATCH 2
126
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:
130 *
131 * if ( condition_holds )
132 * yyless( 5 );
133 * else
134 * do_something_else();
135 *
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.
139 */
140
141/* Return all but the first 'n' matched characters back to the input stream. */
142
143#define yyless(n) \
144 do \
145 { \
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 */ \
151 } \
152 while ( 0 )
153
154#define unput(c) yyunput( c, yytext_ptr )
155
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).
159 */
160typedef unsigned int yy_size_t;
161
162
163struct yy_buffer_state
164 {
165 FILE *yy_input_file;
166
167 char *yy_ch_buf; /* input buffer */
168 char *yy_buf_pos; /* current position in input buffer */
169
170 /* Size of input buffer in bytes, not including room for EOB
171 * characters.
172 */
173 yy_size_t yy_buf_size;
174
175 /* Number of characters read into yy_ch_buf, not including EOB
176 * characters.
177 */
178 int yy_n_chars;
179
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
182 * delete it.
183 */
184 int yy_is_our_buffer;
185
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
189 * each newline.
190 */
191 int yy_is_interactive;
192
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
195 * not.
196 */
197 int yy_at_bol;
198
199 /* Whether to try to fill the input buffer when we reach the
200 * end of it.
201 */
202 int yy_fill_buffer;
203
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.
212 *
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.
216 */
217#define YY_BUFFER_EOF_PENDING 2
218 };
219
220static YY_BUFFER_STATE yy_current_buffer = 0;
221
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
224 * "scanner state".
225 */
226#define YY_CURRENT_BUFFER yy_current_buffer
227
228
229/* yy_hold_char holds the character lost when yytext is formed. */
230static char yy_hold_char;
231
232static int yy_n_chars; /* number of characters read into yy_ch_buf */
233
234
235int yyleng;
236
237/* Points to current character in buffer. */
238static char *yy_c_buf_p = (char *) 0;
239static int yy_init = 1; /* whether we need to initialize */
240static int yy_start = 0; /* start state number */
241
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 ...
244 */
245static int yy_did_buffer_switch_on_eof;
246
247void yyrestart YY_PROTO(( FILE *input_file ));
248
249void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
250void yy_load_buffer_state YY_PROTO(( void ));
251YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
252void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
253void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
254void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
255#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
256
257YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
258YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
259YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
260
261static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
262static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
263static void yy_flex_free YY_PROTO(( void * ));
264
265#define yy_new_buffer yy_create_buffer
266
267#define yy_set_interactive(is_interactive) \
268 { \
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; \
272 }
273
274#define yy_set_bol(at_bol) \
275 { \
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; \
279 }
280
281#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
282
283
284#define YY_USES_REJECT
285
286#define yywrap() 1
287#define YY_SKIP_YYWRAP
288typedef unsigned char YY_CHAR;
289FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
290typedef int yy_state_type;
291extern int yylineno;
292int yylineno = 1;
293extern char *yytext;
294#define yytext_ptr yytext
295
296static yy_state_type yy_get_previous_state YY_PROTO(( void ));
297static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
298static int yy_get_next_buffer YY_PROTO(( void ));
299static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
300
301/* Done after the current pattern has been matched and before the
302 * corresponding action - sets up yytext.
303 */
304#define YY_DO_BEFORE_ACTION \
305 yytext_ptr = yy_bp; \
306 yyleng = (int) (yy_cp - yy_bp); \
307 yy_hold_char = *yy_cp; \
308 *yy_cp = '\0'; \
309 yy_c_buf_p = yy_cp;
310
Chris Lattner66316012006-01-24 04:14:29 +0000311#define YY_NUM_RULES 105
312#define YY_END_OF_BUFFER 106
313static yyconst short int yy_acclist[183] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000314 { 0,
Chris Lattner66316012006-01-24 04:14:29 +0000315 106, 104, 105, 103, 104, 105, 103, 105, 104, 105,
316 104, 105, 104, 105, 104, 105, 104, 105, 104, 105,
317 96, 104, 105, 96, 104, 105, 1, 104, 105, 104,
318 105, 104, 105, 104, 105, 104, 105, 104, 105, 104,
319 105, 104, 105, 104, 105, 104, 105, 104, 105, 104,
320 105, 104, 105, 104, 105, 104, 105, 104, 105, 104,
321 105, 104, 105, 104, 105, 104, 105, 104, 105, 104,
322 105, 95, 93, 92, 92, 99, 97, 101, 96, 1,
323 79, 36, 61, 20, 95, 92, 92, 100, 101, 17,
324 101, 102, 55, 60, 35, 30, 37, 58, 3, 46,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000325
Chris Lattner66316012006-01-24 04:14:29 +0000326 57, 22, 69, 59, 78, 73, 74, 56, 62, 94,
327 101, 101, 41, 70, 71, 86, 87, 48, 19, 98,
328 23, 4, 53, 47, 40, 11, 101, 32, 2, 5,
329 50, 52, 42, 64, 68, 66, 67, 65, 63, 44,
330 88, 43, 49, 18, 76, 85, 39, 51, 27, 21,
331 38, 7, 81, 29, 84, 34, 54, 72, 80, 24,
332 25, 82, 45, 77, 75, 6, 26, 33, 8, 14,
333 9, 10, 31, 12, 28, 83, 89, 91, 13, 90,
334 15, 16
Reid Spencer68a24bd2005-08-27 18:50:39 +0000335 } ;
336
Chris Lattner66316012006-01-24 04:14:29 +0000337static yyconst short int yy_accept[435] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000338 { 0,
339 1, 1, 1, 2, 4, 7, 9, 11, 13, 15,
340 17, 19, 21, 24, 27, 30, 32, 34, 36, 38,
341 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
342 60, 62, 64, 66, 68, 70, 72, 72, 73, 73,
343 74, 75, 76, 77, 77, 78, 78, 79, 80, 80,
Chris Lattner8335e842006-01-23 23:05:42 +0000344 81, 81, 81, 81, 81, 81, 81, 81, 81, 82,
345 82, 83, 83, 83, 83, 83, 83, 83, 83, 83,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000346 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
Chris Lattner66316012006-01-24 04:14:29 +0000347 83, 83, 83, 83, 84, 84, 84, 84, 84, 84,
348 84, 84, 84, 84, 84, 84, 85, 85, 85, 85,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349
Chris Lattner66316012006-01-24 04:14:29 +0000350 85, 85, 85, 85, 85, 85, 85, 85, 85, 86,
351 87, 89, 90, 91, 92, 92, 93, 94, 94, 94,
352 95, 95, 96, 96, 97, 97, 97, 97, 98, 98,
353 98, 98, 98, 99, 99, 100, 100, 100, 100, 100,
354 100, 100, 100, 100, 100, 100, 101, 101, 101, 101,
355 101, 101, 101, 101, 101, 102, 103, 103, 103, 104,
356 104, 105, 106, 106, 106, 106, 106, 106, 107, 107,
357 108, 108, 109, 109, 109, 109, 109, 109, 109, 109,
Chris Lattner8335e842006-01-23 23:05:42 +0000358 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
Chris Lattner66316012006-01-24 04:14:29 +0000359 109, 109, 109, 110, 110, 111, 112, 112, 112, 112,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000360
Chris Lattner66316012006-01-24 04:14:29 +0000361 113, 113, 113, 113, 113, 114, 115, 116, 116, 116,
362 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
363 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
364 118, 119, 119, 119, 120, 120, 120, 121, 121, 121,
365 121, 121, 121, 121, 121, 121, 121, 121, 122, 122,
366 122, 123, 124, 124, 125, 125, 125, 125, 125, 125,
367 125, 125, 125, 125, 126, 126, 127, 127, 128, 129,
368 129, 129, 130, 130, 130, 130, 130, 130, 130, 130,
369 130, 130, 131, 131, 132, 132, 132, 132, 132, 132,
370 132, 133, 133, 133, 133, 133, 133, 133, 134, 134,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000371
Chris Lattner66316012006-01-24 04:14:29 +0000372 134, 135, 136, 137, 138, 139, 140, 141, 142, 142,
373 142, 142, 143, 144, 145, 145, 145, 145, 145, 145,
374 146, 146, 146, 146, 147, 147, 148, 148, 148, 148,
375 149, 150, 151, 151, 151, 152, 152, 153, 153, 153,
376 153, 154, 154, 155, 156, 157, 158, 158, 158, 159,
377 160, 161, 162, 162, 162, 163, 164, 165, 166, 166,
378 166, 166, 166, 167, 168, 168, 168, 168, 168, 168,
379 168, 168, 168, 169, 169, 169, 169, 169, 169, 170,
380 171, 171, 171, 171, 171, 172, 173, 173, 173, 173,
381 174, 174, 175, 175, 175, 175, 175, 175, 175, 175,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000382
Chris Lattner66316012006-01-24 04:14:29 +0000383 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
384 175, 175, 175, 176, 176, 177, 177, 177, 177, 177,
385 177, 177, 177, 177, 178, 178, 179, 180, 180, 181,
386 182, 182, 183, 183
Reid Spencer68a24bd2005-08-27 18:50:39 +0000387 } ;
388
389static yyconst int yy_ec[256] =
390 { 0,
391 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
392 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
395 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
396 11, 11, 11, 11, 11, 11, 11, 12, 13, 1,
397 1, 1, 1, 1, 14, 14, 14, 14, 15, 14,
398 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
399 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
400 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
401
402 21, 22, 23, 24, 25, 5, 26, 27, 28, 29,
403 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
404 40, 41, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412
413 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 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
419 } ;
420
421static yyconst int yy_meta[42] =
422 { 0,
423 1, 1, 2, 1, 3, 1, 1, 3, 3, 3,
424 3, 4, 1, 3, 3, 3, 3, 3, 3, 3,
425 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
426 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
427 3
428 } ;
429
Chris Lattner66316012006-01-24 04:14:29 +0000430static yyconst short int yy_base[439] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000431 { 0,
Chris Lattner66316012006-01-24 04:14:29 +0000432 0, 0, 908, 909, 909, 909, 903, 894, 34, 36,
Chris Lattner8335e842006-01-23 23:05:42 +0000433 38, 42, 46, 50, 0, 52, 57, 54, 68, 62,
434 80, 82, 76, 94, 98, 40, 83, 88, 56, 125,
Chris Lattner66316012006-01-24 04:14:29 +0000435 108, 154, 109, 87, 110, 111, 901, 909, 892, 909,
436 0, 119, 134, 141, 144, 124, 147, 164, 179, 0,
437 55, 153, 157, 155, 119, 159, 172, 173, 891, 175,
438 192, 193, 194, 90, 180, 195, 198, 196, 202, 200,
439 206, 207, 212, 214, 216, 215, 223, 219, 227, 226,
440 224, 230, 243, 890, 233, 242, 244, 249, 130, 250,
441 251, 252, 253, 258, 261, 889, 262, 264, 256, 263,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000442
Chris Lattner66316012006-01-24 04:14:29 +0000443 277, 279, 41, 285, 278, 294, 84, 288, 888, 0,
444 298, 305, 887, 312, 324, 0, 886, 306, 298, 885,
445 318, 884, 268, 883, 313, 325, 307, 882, 326, 329,
446 331, 332, 881, 333, 335, 336, 341, 337, 338, 344,
447 343, 354, 358, 342, 356, 360, 353, 366, 367, 355,
448 368, 372, 370, 373, 880, 879, 374, 31, 878, 377,
449 877, 876, 400, 388, 390, 382, 412, 875, 379, 874,
450 380, 873, 392, 404, 384, 414, 387, 416, 417, 418,
451 420, 422, 426, 430, 432, 424, 444, 434, 438, 428,
452 446, 448, 872, 435, 909, 458, 470, 460, 472, 475,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000453
Chris Lattner66316012006-01-24 04:14:29 +0000454 460, 386, 463, 464, 871, 870, 869, 476, 478, 479,
455 482, 485, 486, 487, 488, 489, 490, 496, 492, 868,
456 493, 497, 498, 504, 505, 510, 512, 511, 513, 867,
457 866, 514, 516, 865, 517, 519, 0, 521, 520, 536,
458 518, 535, 537, 539, 522, 540, 547, 864, 550, 551,
459 863, 862, 552, 861, 523, 553, 555, 557, 556, 564,
460 565, 567, 569, 860, 570, 859, 571, 576, 858, 572,
461 579, 857, 576, 589, 580, 582, 581, 591, 592, 595,
462 597, 856, 598, 855, 600, 599, 602, 603, 606, 607,
463 854, 610, 611, 617, 613, 619, 621, 853, 625, 629,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000464
Chris Lattner66316012006-01-24 04:14:29 +0000465 852, 851, 850, 849, 848, 847, 846, 845, 632, 631,
466 633, 844, 843, 842, 634, 638, 639, 635, 637, 841,
467 636, 640, 646, 840, 649, 839, 650, 651, 655, 838,
468 837, 836, 656, 641, 835, 665, 834, 666, 669, 668,
469 833, 672, 832, 831, 830, 829, 670, 671, 828, 827,
470 826, 825, 674, 680, 824, 823, 822, 819, 682, 676,
471 683, 684, 810, 808, 686, 685, 690, 693, 696, 698,
472 695, 702, 807, 703, 709, 706, 705, 712, 806, 804,
473 716, 717, 718, 720, 803, 802, 719, 721, 727, 801,
474 722, 798, 730, 725, 737, 738, 726, 740, 743, 744,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000475
Chris Lattner66316012006-01-24 04:14:29 +0000476 745, 746, 747, 750, 751, 752, 757, 756, 763, 762,
477 764, 767, 796, 769, 795, 773, 774, 768, 775, 776,
478 779, 780, 782, 794, 783, 792, 454, 788, 452, 450,
479 790, 301, 909, 823, 825, 263, 829, 226
Reid Spencer68a24bd2005-08-27 18:50:39 +0000480 } ;
481
Chris Lattner66316012006-01-24 04:14:29 +0000482static yyconst short int yy_def[439] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000483 { 0,
Chris Lattner66316012006-01-24 04:14:29 +0000484 433, 1, 433, 433, 433, 433, 434, 435, 436, 433,
485 435, 435, 435, 435, 437, 435, 435, 435, 435, 435,
486 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
487 435, 435, 435, 435, 435, 435, 434, 433, 435, 433,
488 438, 438, 433, 433, 435, 435, 435, 435, 435, 437,
489 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
490 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
491 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
492 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
493 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000494
Chris Lattner66316012006-01-24 04:14:29 +0000495 435, 435, 435, 435, 435, 435, 435, 435, 433, 438,
496 438, 433, 435, 435, 435, 49, 435, 435, 435, 435,
497 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
498 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
499 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
500 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
501 435, 435, 49, 435, 435, 435, 435, 435, 435, 435,
502 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
503 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
504 435, 435, 435, 435, 433, 433, 433, 433, 435, 435,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000505
Chris Lattner66316012006-01-24 04:14:29 +0000506 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
507 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
508 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
509 435, 435, 435, 435, 435, 435, 163, 435, 435, 435,
510 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
511 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
512 435, 435, 435, 435, 435, 435, 435, 433, 435, 435,
513 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
514 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
515 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000516
Chris Lattner66316012006-01-24 04:14:29 +0000517 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
518 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
519 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
520 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
521 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
522 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
523 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
524 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
525 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
526 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000527
Chris Lattner66316012006-01-24 04:14:29 +0000528 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
529 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
530 435, 435, 435, 435, 435, 435, 435, 435, 435, 435,
531 435, 435, 0, 433, 433, 433, 433, 433
Reid Spencer68a24bd2005-08-27 18:50:39 +0000532 } ;
533
Chris Lattner66316012006-01-24 04:14:29 +0000534static yyconst short int yy_nxt[951] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000535 { 0,
536 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
537 14, 4, 15, 8, 8, 8, 16, 17, 18, 19,
538 20, 21, 22, 8, 23, 8, 24, 25, 26, 27,
539 28, 8, 29, 30, 31, 32, 33, 34, 35, 8,
540 36, 42, 40, 43, 43, 44, 44, 45, 45, 40,
Chris Lattner8335e842006-01-23 23:05:42 +0000541 46, 40, 40, 40, 47, 48, 48, 40, 47, 48,
Chris Lattner66316012006-01-24 04:14:29 +0000542 48, 40, 235, 40, 186, 40, 40, 40, 40, 81,
543 60, 51, 61, 40, 117, 82, 87, 56, 52, 40,
Chris Lattner8335e842006-01-23 23:05:42 +0000544 53, 57, 54, 62, 49, 55, 58, 40, 63, 59,
545 66, 40, 64, 40, 40, 40, 68, 65, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000546
Chris Lattner66316012006-01-24 04:14:29 +0000547 67, 40, 71, 73, 74, 40, 69, 106, 72, 40,
548 75, 85, 70, 83, 78, 84, 193, 86, 76, 40,
549 40, 40, 40, 77, 95, 104, 133, 79, 111, 111,
550 40, 108, 113, 80, 88, 40, 40, 96, 105, 107,
551 97, 40, 89, 43, 43, 90, 122, 98, 91, 112,
552 44, 44, 47, 45, 45, 40, 114, 114, 40, 92,
553 93, 115, 94, 88, 40, 40, 40, 115, 40, 164,
554 40, 99, 47, 48, 48, 40, 120, 118, 100, 119,
555 101, 123, 102, 40, 40, 121, 40, 103, 116, 116,
556 40, 40, 116, 116, 124, 116, 116, 116, 116, 116,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000557
Chris Lattner66316012006-01-24 04:14:29 +0000558 116, 126, 125, 40, 40, 40, 40, 40, 127, 40,
559 128, 40, 131, 40, 135, 134, 136, 40, 40, 129,
560 141, 130, 138, 40, 132, 40, 40, 40, 110, 139,
561 40, 140, 137, 148, 40, 40, 143, 40, 40, 151,
562 142, 40, 144, 149, 40, 153, 154, 145, 146, 150,
563 147, 152, 155, 40, 40, 40, 157, 159, 156, 158,
564 40, 40, 40, 40, 40, 41, 160, 40, 165, 40,
565 172, 161, 40, 40, 40, 40, 166, 168, 162, 40,
566 169, 171, 173, 170, 167, 174, 176, 163, 40, 40,
567 40, 180, 204, 175, 178, 179, 40, 177, 182, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000568
Chris Lattner66316012006-01-24 04:14:29 +0000569 187, 188, 190, 183, 191, 40, 181, 111, 111, 40,
570 192, 184, 40, 189, 196, 196, 185, 40, 40, 197,
571 194, 114, 114, 40, 40, 197, 115, 202, 201, 40,
572 198, 199, 115, 200, 200, 40, 40, 40, 203, 205,
573 40, 207, 40, 40, 40, 208, 40, 40, 40, 40,
574 212, 206, 40, 40, 40, 40, 214, 210, 211, 213,
575 219, 215, 209, 220, 40, 40, 40, 40, 223, 40,
576 217, 40, 218, 216, 221, 222, 224, 40, 40, 40,
577 225, 40, 226, 40, 40, 40, 227, 230, 40, 229,
578 40, 40, 228, 40, 231, 40, 232, 40, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000579
Chris Lattner66316012006-01-24 04:14:29 +0000580 234, 40, 240, 40, 270, 236, 249, 251, 233, 237,
581 237, 245, 246, 237, 237, 40, 237, 237, 237, 237,
582 237, 237, 238, 40, 239, 40, 247, 40, 40, 40,
583 248, 40, 241, 40, 242, 40, 252, 40, 243, 40,
584 244, 40, 256, 40, 250, 40, 40, 264, 255, 40,
585 258, 253, 254, 260, 257, 40, 259, 40, 263, 40,
586 261, 40, 265, 40, 267, 40, 262, 196, 196, 268,
587 268, 40, 197, 266, 40, 40, 198, 198, 197, 268,
588 268, 200, 200, 40, 200, 200, 40, 40, 269, 40,
589 40, 271, 272, 40, 273, 275, 40, 40, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000590
Chris Lattner66316012006-01-24 04:14:29 +0000591 40, 40, 278, 40, 40, 281, 276, 40, 40, 40,
592 282, 277, 274, 286, 283, 40, 40, 279, 287, 285,
593 280, 40, 40, 40, 40, 40, 284, 40, 40, 40,
594 40, 40, 40, 40, 40, 290, 288, 289, 291, 293,
595 292, 298, 295, 294, 299, 313, 40, 40, 40, 301,
596 40, 40, 296, 297, 300, 302, 307, 304, 40, 306,
597 308, 40, 40, 40, 40, 309, 40, 40, 40, 303,
598 310, 305, 312, 316, 314, 40, 40, 311, 40, 315,
599 40, 40, 40, 40, 317, 268, 268, 40, 324, 320,
600 40, 40, 40, 40, 326, 323, 318, 319, 325, 329,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000601
Chris Lattner66316012006-01-24 04:14:29 +0000602 40, 330, 40, 40, 322, 327, 40, 321, 40, 40,
603 40, 40, 328, 40, 40, 334, 335, 40, 40, 331,
604 336, 40, 40, 333, 40, 337, 332, 341, 40, 338,
605 40, 343, 40, 345, 340, 344, 40, 339, 342, 346,
606 40, 347, 40, 40, 40, 40, 40, 40, 40, 40,
607 40, 40, 40, 352, 348, 350, 354, 40, 355, 357,
608 40, 40, 40, 349, 359, 351, 40, 40, 353, 356,
609 358, 363, 365, 361, 360, 366, 40, 40, 362, 40,
610 40, 40, 40, 40, 370, 40, 368, 40, 364, 369,
611 371, 40, 367, 40, 40, 40, 40, 40, 374, 373,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000612
Chris Lattner66316012006-01-24 04:14:29 +0000613 377, 40, 372, 375, 40, 381, 40, 40, 376, 40,
614 382, 378, 380, 40, 40, 386, 40, 40, 379, 388,
615 40, 383, 384, 40, 385, 389, 390, 40, 40, 40,
616 40, 40, 40, 40, 392, 387, 40, 40, 40, 391,
617 396, 40, 393, 397, 399, 394, 400, 398, 40, 40,
618 401, 40, 395, 403, 40, 40, 40, 40, 40, 402,
619 408, 40, 40, 40, 406, 404, 405, 40, 40, 407,
620 412, 413, 409, 40, 40, 40, 410, 415, 40, 40,
621 40, 411, 416, 417, 40, 40, 40, 40, 419, 421,
622 40, 40, 414, 40, 40, 420, 418, 422, 427, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000623
Chris Lattner66316012006-01-24 04:14:29 +0000624 424, 40, 423, 40, 425, 40, 40, 40, 431, 40,
625 426, 430, 40, 40, 40, 40, 429, 40, 40, 40,
626 428, 40, 432, 37, 37, 37, 37, 39, 39, 50,
627 40, 50, 50, 40, 40, 40, 40, 40, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000628 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
629 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Nate Begeman14b05292005-11-05 09:21:28 +0000630 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattnere869eef2005-11-12 00:11:49 +0000631 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Robert Bocchino9c62b562006-01-10 19:04:32 +0000632 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattner66316012006-01-24 04:14:29 +0000633 40, 40, 40, 40, 40, 40, 40, 40, 40, 195,
Chris Lattnere869eef2005-11-12 00:11:49 +0000634
Chris Lattner66316012006-01-24 04:14:29 +0000635 40, 40, 40, 40, 109, 40, 38, 433, 3, 433,
636 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
637 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
638 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
639 433, 433, 433, 433, 433, 433, 433, 433, 433, 433
Reid Spencer68a24bd2005-08-27 18:50:39 +0000640 } ;
641
Chris Lattner66316012006-01-24 04:14:29 +0000642static yyconst short int yy_chk[951] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000643 { 0,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
646 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
647 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Chris Lattner66316012006-01-24 04:14:29 +0000648 1, 9, 158, 9, 9, 10, 10, 11, 11, 11,
649 12, 26, 103, 12, 13, 13, 13, 13, 14, 14,
650 14, 14, 158, 16, 103, 18, 51, 29, 17, 26,
Chris Lattner8335e842006-01-23 23:05:42 +0000651 18, 16, 18, 20, 51, 26, 29, 17, 16, 19,
652 16, 17, 16, 18, 13, 16, 17, 23, 19, 17,
Chris Lattner66316012006-01-24 04:14:29 +0000653 20, 21, 19, 22, 27, 107, 21, 19, 34, 28,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000654
Chris Lattner66316012006-01-24 04:14:29 +0000655 20, 64, 22, 23, 23, 24, 21, 34, 22, 25,
656 24, 28, 21, 27, 25, 27, 107, 28, 24, 31,
657 33, 35, 36, 24, 31, 33, 64, 25, 42, 42,
Chris Lattner8335e842006-01-23 23:05:42 +0000658 55, 36, 46, 25, 30, 46, 30, 31, 33, 35,
Chris Lattner66316012006-01-24 04:14:29 +0000659 31, 89, 30, 43, 43, 30, 55, 31, 30, 44,
Chris Lattner8335e842006-01-23 23:05:42 +0000660 44, 44, 45, 45, 45, 45, 47, 47, 47, 30,
Chris Lattner66316012006-01-24 04:14:29 +0000661 30, 47, 30, 32, 52, 32, 54, 47, 53, 89,
Chris Lattner8335e842006-01-23 23:05:42 +0000662 56, 32, 48, 48, 48, 48, 53, 52, 32, 52,
663 32, 56, 32, 57, 58, 54, 60, 32, 49, 49,
664 49, 65, 49, 49, 57, 49, 49, 49, 49, 49,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000665
Chris Lattner8335e842006-01-23 23:05:42 +0000666 49, 60, 58, 61, 62, 63, 66, 68, 60, 67,
667 61, 70, 63, 69, 66, 65, 67, 71, 72, 62,
Chris Lattner66316012006-01-24 04:14:29 +0000668 70, 62, 68, 73, 63, 74, 76, 75, 438, 68,
669 78, 69, 67, 75, 77, 81, 72, 80, 79, 77,
670 71, 82, 73, 76, 85, 78, 79, 74, 74, 76,
671 74, 77, 80, 86, 83, 87, 82, 85, 81, 83,
672 88, 90, 91, 92, 93, 436, 86, 99, 90, 94,
673 93, 87, 95, 97, 100, 98, 90, 91, 87, 123,
674 91, 92, 94, 91, 90, 95, 97, 88, 101, 105,
675 102, 100, 123, 95, 98, 99, 104, 97, 102, 108,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000676
Chris Lattner66316012006-01-24 04:14:29 +0000677 104, 104, 105, 102, 105, 106, 101, 111, 111, 119,
678 106, 102, 432, 104, 112, 112, 102, 118, 127, 112,
679 108, 114, 114, 114, 125, 112, 114, 119, 118, 121,
680 115, 115, 114, 115, 115, 115, 126, 129, 121, 125,
681 130, 127, 131, 132, 134, 129, 135, 136, 138, 139,
682 134, 126, 137, 144, 141, 140, 136, 131, 132, 135,
683 140, 137, 130, 141, 147, 142, 150, 145, 144, 143,
684 138, 146, 139, 137, 142, 143, 145, 148, 149, 151,
685 146, 153, 147, 152, 154, 157, 148, 151, 160, 150,
686 169, 171, 149, 166, 152, 175, 153, 202, 177, 164,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000687
Chris Lattner66316012006-01-24 04:14:29 +0000688 157, 165, 166, 173, 202, 160, 175, 177, 154, 163,
689 163, 169, 171, 163, 163, 174, 163, 163, 163, 163,
690 163, 163, 164, 167, 165, 176, 173, 178, 179, 180,
691 174, 181, 167, 182, 167, 186, 178, 183, 167, 190,
692 167, 184, 182, 185, 176, 188, 194, 190, 181, 189,
693 184, 179, 180, 186, 183, 187, 185, 191, 189, 192,
694 187, 430, 191, 429, 194, 427, 188, 196, 196, 198,
695 198, 201, 196, 192, 203, 204, 197, 197, 196, 197,
696 197, 199, 199, 199, 200, 200, 200, 208, 201, 209,
697 210, 203, 204, 211, 208, 210, 212, 213, 214, 215,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000698
Chris Lattner66316012006-01-24 04:14:29 +0000699 216, 217, 213, 219, 221, 216, 211, 218, 222, 223,
700 217, 212, 209, 222, 218, 224, 225, 214, 223, 221,
701 215, 226, 228, 227, 229, 232, 219, 233, 235, 241,
702 236, 239, 238, 245, 255, 226, 224, 225, 227, 229,
703 228, 238, 233, 232, 239, 255, 242, 240, 243, 241,
704 244, 246, 235, 236, 240, 242, 245, 243, 247, 244,
705 246, 249, 250, 253, 256, 247, 257, 259, 258, 242,
706 249, 243, 253, 258, 256, 260, 261, 250, 262, 257,
707 263, 265, 267, 270, 259, 268, 268, 273, 270, 262,
708 271, 275, 277, 276, 273, 267, 260, 261, 271, 276,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000709
Chris Lattner66316012006-01-24 04:14:29 +0000710 274, 277, 278, 279, 265, 274, 280, 263, 281, 283,
711 286, 285, 275, 287, 288, 281, 283, 289, 290, 278,
712 285, 292, 293, 280, 295, 286, 279, 290, 294, 287,
713 296, 293, 297, 295, 289, 294, 299, 288, 292, 296,
714 300, 297, 310, 309, 311, 315, 318, 321, 319, 316,
715 317, 322, 334, 311, 299, 309, 316, 323, 317, 319,
716 325, 327, 328, 300, 322, 310, 329, 333, 315, 318,
717 321, 328, 333, 325, 323, 334, 336, 338, 327, 340,
718 339, 347, 348, 342, 340, 353, 338, 360, 329, 339,
719 342, 354, 336, 359, 361, 362, 366, 365, 353, 348,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000720
Chris Lattner66316012006-01-24 04:14:29 +0000721 360, 367, 347, 354, 368, 366, 371, 369, 359, 370,
722 367, 361, 365, 372, 374, 371, 377, 376, 362, 374,
723 375, 368, 369, 378, 370, 375, 376, 381, 382, 383,
724 387, 384, 388, 391, 378, 372, 394, 397, 389, 377,
725 384, 393, 381, 387, 389, 382, 391, 388, 395, 396,
726 393, 398, 383, 395, 399, 400, 401, 402, 403, 394,
727 400, 404, 405, 406, 398, 396, 397, 408, 407, 399,
728 404, 405, 401, 410, 409, 411, 402, 407, 412, 418,
729 414, 403, 408, 409, 416, 417, 419, 420, 411, 414,
730 421, 422, 406, 423, 425, 412, 410, 416, 421, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000731
Chris Lattner66316012006-01-24 04:14:29 +0000732 418, 431, 417, 426, 419, 424, 415, 413, 428, 392,
733 420, 425, 390, 386, 385, 380, 423, 379, 373, 364,
734 422, 363, 431, 434, 434, 434, 434, 435, 435, 437,
735 358, 437, 437, 357, 356, 355, 352, 351, 350, 349,
736 346, 345, 344, 343, 341, 337, 335, 332, 331, 330,
737 326, 324, 320, 314, 313, 312, 308, 307, 306, 305,
738 304, 303, 302, 301, 298, 291, 284, 282, 272, 269,
739 266, 264, 254, 252, 251, 248, 234, 231, 230, 220,
740 207, 206, 205, 193, 172, 170, 168, 162, 161, 159,
741 156, 155, 133, 128, 124, 122, 120, 117, 113, 109,
Chris Lattnere869eef2005-11-12 00:11:49 +0000742
Chris Lattner66316012006-01-24 04:14:29 +0000743 96, 84, 59, 39, 37, 8, 7, 3, 433, 433,
744 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
745 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
746 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
747 433, 433, 433, 433, 433, 433, 433, 433, 433, 433
Reid Spencer68a24bd2005-08-27 18:50:39 +0000748 } ;
749
750static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
751static char *yy_full_match;
752static int yy_lp;
753#define REJECT \
754{ \
755*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
756yy_cp = yy_full_match; /* restore poss. backed-over text */ \
757++yy_lp; \
758goto find_rule; \
759}
760#define yymore() yymore_used_but_not_detected
761#define YY_MORE_ADJ 0
762#define YY_RESTORE_YY_MORE_OFFSET
763char *yytext;
Chris Lattner8335e842006-01-23 23:05:42 +0000764#line 1 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000765#define INITIAL 0
766/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
767//
768// The LLVM Compiler Infrastructure
769//
770// This file was developed by the LLVM research group and is distributed under
771// the University of Illinois Open Source License. See LICENSE.TXT for details.
772//
773//===----------------------------------------------------------------------===//
774//
775// This file implements the flex scanner for LLVM assembly languages files.
776//
777//===----------------------------------------------------------------------===*/
778#define YY_NEVER_INTERACTIVE 1
Chris Lattner8335e842006-01-23 23:05:42 +0000779#line 28 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000780#include "ParserInternals.h"
781#include "llvm/Module.h"
782#include <list>
783#include "llvmAsmParser.h"
784#include <cctype>
785#include <cstdlib>
786
787void set_scan_file(FILE * F){
788 yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
789}
790void set_scan_string (const char * str) {
791 yy_scan_string (str);
792}
793
794#define RET_TOK(type, Enum, sym) \
795 llvmAsmlval.type = Instruction::Enum; return sym
796
797namespace llvm {
798
799// TODO: All of the static identifiers are figured out by the lexer,
800// these should be hashed to reduce the lexer size
801
802
803// atoull - Convert an ascii string of decimal digits into the unsigned long
804// long representation... this does not have to do input error checking,
805// because we know that the input will be matched by a suitable regex...
806//
807static uint64_t atoull(const char *Buffer) {
808 uint64_t Result = 0;
809 for (; *Buffer; Buffer++) {
810 uint64_t OldRes = Result;
811 Result *= 10;
812 Result += *Buffer-'0';
813 if (Result < OldRes) // Uh, oh, overflow detected!!!
814 ThrowException("constant bigger than 64 bits detected!");
815 }
816 return Result;
817}
818
819static uint64_t HexIntToVal(const char *Buffer) {
820 uint64_t Result = 0;
821 for (; *Buffer; ++Buffer) {
822 uint64_t OldRes = Result;
823 Result *= 16;
824 char C = *Buffer;
825 if (C >= '0' && C <= '9')
826 Result += C-'0';
827 else if (C >= 'A' && C <= 'F')
828 Result += C-'A'+10;
829 else if (C >= 'a' && C <= 'f')
830 Result += C-'a'+10;
831
832 if (Result < OldRes) // Uh, oh, overflow detected!!!
833 ThrowException("constant bigger than 64 bits detected!");
834 }
835 return Result;
836}
837
838
839// HexToFP - Convert the ascii string in hexidecimal format to the floating
840// point representation of it.
841//
842static double HexToFP(const char *Buffer) {
843 // Behave nicely in the face of C TBAA rules... see:
844 // http://www.nullstone.com/htmls/category/aliastyp.htm
845 union {
846 uint64_t UI;
847 double FP;
848 } UIntToFP;
849 UIntToFP.UI = HexIntToVal(Buffer);
850
851 assert(sizeof(double) == sizeof(uint64_t) &&
852 "Data sizes incompatible on this target!");
853 return UIntToFP.FP; // Cast Hex constant to double
854}
855
856
857// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
858// appropriate character. If AllowNull is set to false, a \00 value will cause
859// an exception to be thrown.
860//
861// If AllowNull is set to true, the return value of the function points to the
862// last character of the string in memory.
863//
864char *UnEscapeLexed(char *Buffer, bool AllowNull) {
865 char *BOut = Buffer;
866 for (char *BIn = Buffer; *BIn; ) {
867 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
868 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
869 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
870 if (!AllowNull && !*BOut)
871 ThrowException("String literal cannot accept \\00 escape!");
872
873 BIn[3] = Tmp; // Restore character
874 BIn += 3; // Skip over handled chars
875 ++BOut;
876 } else {
877 *BOut++ = *BIn++;
878 }
879 }
880
881 return BOut;
882}
883
884} // End llvm namespace
885
886using namespace llvm;
887
888#define YY_NEVER_INTERACTIVE 1
889/* Comments start with a ; and go till end of line */
890/* Variable(Value) identifiers start with a % sign */
891/* Label identifiers end with a colon */
892/* Quoted names can contain any character except " and \ */
893/* [PN]Integer: match positive and negative literal integer values that
894 * are preceeded by a '%' character. These represent unnamed variable slots.
895 */
896/* E[PN]Integer: match positive and negative literal integer values */
897/* FPConstant - A Floating point constant.
898 */
899/* HexFPConstant - Floating point constant represented in IEEE format as a
900 * hexadecimal number for when exponential notation is not precise enough.
901 */
902/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
903 * it to deal with 64 bit numbers.
904 */
Chris Lattner66316012006-01-24 04:14:29 +0000905#line 906 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000906
907/* Macros after this point can all be overridden by user definitions in
908 * section 1.
909 */
910
911#ifndef YY_SKIP_YYWRAP
912#ifdef __cplusplus
913extern "C" int yywrap YY_PROTO(( void ));
914#else
915extern int yywrap YY_PROTO(( void ));
916#endif
917#endif
918
919#ifndef YY_NO_UNPUT
920static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
921#endif
922
923#ifndef yytext_ptr
924static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
925#endif
926
927#ifdef YY_NEED_STRLEN
928static int yy_flex_strlen YY_PROTO(( yyconst char * ));
929#endif
930
931#ifndef YY_NO_INPUT
932#ifdef __cplusplus
933static int yyinput YY_PROTO(( void ));
934#else
935static int input YY_PROTO(( void ));
936#endif
937#endif
938
939#if YY_STACK_USED
940static int yy_start_stack_ptr = 0;
941static int yy_start_stack_depth = 0;
942static int *yy_start_stack = 0;
943#ifndef YY_NO_PUSH_STATE
944static void yy_push_state YY_PROTO(( int new_state ));
945#endif
946#ifndef YY_NO_POP_STATE
947static void yy_pop_state YY_PROTO(( void ));
948#endif
949#ifndef YY_NO_TOP_STATE
950static int yy_top_state YY_PROTO(( void ));
951#endif
952
953#else
954#define YY_NO_PUSH_STATE 1
955#define YY_NO_POP_STATE 1
956#define YY_NO_TOP_STATE 1
957#endif
958
959#ifdef YY_MALLOC_DECL
960YY_MALLOC_DECL
961#else
962#if __STDC__
963#ifndef __cplusplus
964#include <stdlib.h>
965#endif
966#else
967/* Just try to get by without declaring the routines. This will fail
968 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
969 * or sizeof(void*) != sizeof(int).
970 */
971#endif
972#endif
973
974/* Amount of stuff to slurp up with each read. */
975#ifndef YY_READ_BUF_SIZE
976#define YY_READ_BUF_SIZE 8192
977#endif
978
979/* Copy whatever the last rule matched to the standard output. */
980
981#ifndef ECHO
982/* This used to be an fputs(), but since the string might contain NUL's,
983 * we now use fwrite().
984 */
985#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
986#endif
987
988/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
989 * is returned in "result".
990 */
991#ifndef YY_INPUT
992#define YY_INPUT(buf,result,max_size) \
993 if ( yy_current_buffer->yy_is_interactive ) \
994 { \
995 int c = '*', n; \
996 for ( n = 0; n < max_size && \
997 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
998 buf[n] = (char) c; \
999 if ( c == '\n' ) \
1000 buf[n++] = (char) c; \
1001 if ( c == EOF && ferror( yyin ) ) \
1002 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1003 result = n; \
1004 } \
1005 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1006 && ferror( yyin ) ) \
1007 YY_FATAL_ERROR( "input in flex scanner failed" );
1008#endif
1009
1010/* No semi-colon after return; correct usage is to write "yyterminate();" -
1011 * we don't want an extra ';' after the "return" because that will cause
1012 * some compilers to complain about unreachable statements.
1013 */
1014#ifndef yyterminate
1015#define yyterminate() return YY_NULL
1016#endif
1017
1018/* Number of entries by which start-condition stack grows. */
1019#ifndef YY_START_STACK_INCR
1020#define YY_START_STACK_INCR 25
1021#endif
1022
1023/* Report a fatal error. */
1024#ifndef YY_FATAL_ERROR
1025#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1026#endif
1027
1028/* Default declaration of generated scanner - a define so the user can
1029 * easily add parameters.
1030 */
1031#ifndef YY_DECL
1032#define YY_DECL int yylex YY_PROTO(( void ))
1033#endif
1034
1035/* Code executed at the beginning of each rule, after yytext and yyleng
1036 * have been set up.
1037 */
1038#ifndef YY_USER_ACTION
1039#define YY_USER_ACTION
1040#endif
1041
1042/* Code executed at the end of each rule. */
1043#ifndef YY_BREAK
1044#define YY_BREAK break;
1045#endif
1046
1047#define YY_RULE_SETUP \
1048 YY_USER_ACTION
1049
1050YY_DECL
1051 {
1052 register yy_state_type yy_current_state;
Nate Begeman14b05292005-11-05 09:21:28 +00001053 register char *yy_cp, *yy_bp;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001054 register int yy_act;
1055
Chris Lattner8335e842006-01-23 23:05:42 +00001056#line 179 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001057
1058
Chris Lattner66316012006-01-24 04:14:29 +00001059#line 1060 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001060
1061 if ( yy_init )
1062 {
1063 yy_init = 0;
1064
1065#ifdef YY_USER_INIT
1066 YY_USER_INIT;
1067#endif
1068
1069 if ( ! yy_start )
1070 yy_start = 1; /* first start state */
1071
1072 if ( ! yyin )
1073 yyin = stdin;
1074
1075 if ( ! yyout )
1076 yyout = stdout;
1077
1078 if ( ! yy_current_buffer )
1079 yy_current_buffer =
1080 yy_create_buffer( yyin, YY_BUF_SIZE );
1081
1082 yy_load_buffer_state();
1083 }
1084
1085 while ( 1 ) /* loops until end-of-file is reached */
1086 {
1087 yy_cp = yy_c_buf_p;
1088
1089 /* Support of yytext. */
1090 *yy_cp = yy_hold_char;
1091
1092 /* yy_bp points to the position in yy_ch_buf of the start of
1093 * the current run.
1094 */
1095 yy_bp = yy_cp;
1096
1097 yy_current_state = yy_start;
1098 yy_state_ptr = yy_state_buf;
1099 *yy_state_ptr++ = yy_current_state;
1100yy_match:
1101 do
1102 {
1103 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1104 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1105 {
1106 yy_current_state = (int) yy_def[yy_current_state];
Chris Lattner66316012006-01-24 04:14:29 +00001107 if ( yy_current_state >= 434 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001108 yy_c = yy_meta[(unsigned int) yy_c];
1109 }
1110 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1111 *yy_state_ptr++ = yy_current_state;
1112 ++yy_cp;
1113 }
Chris Lattner66316012006-01-24 04:14:29 +00001114 while ( yy_current_state != 433 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001115
1116yy_find_action:
1117 yy_current_state = *--yy_state_ptr;
1118 yy_lp = yy_accept[yy_current_state];
1119find_rule: /* we branch to this label when backing up */
1120 for ( ; ; ) /* until we find what rule we matched */
1121 {
1122 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1123 {
1124 yy_act = yy_acclist[yy_lp];
1125 {
1126 yy_full_match = yy_cp;
1127 break;
1128 }
1129 }
1130 --yy_cp;
1131 yy_current_state = *--yy_state_ptr;
1132 yy_lp = yy_accept[yy_current_state];
1133 }
1134
1135 YY_DO_BEFORE_ACTION;
1136
1137 if ( yy_act != YY_END_OF_BUFFER )
1138 {
1139 int yyl;
1140 for ( yyl = 0; yyl < yyleng; ++yyl )
1141 if ( yytext[yyl] == '\n' )
1142 ++yylineno;
1143 }
1144
1145do_action: /* This label is used only to access EOF actions. */
1146
1147
1148 switch ( yy_act )
1149 { /* beginning of action switch */
1150case 1:
1151YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001152#line 181 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001153{ /* Ignore comments for now */ }
1154 YY_BREAK
1155case 2:
1156YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001157#line 183 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001158{ return BEGINTOK; }
1159 YY_BREAK
1160case 3:
1161YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001162#line 184 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001163{ return ENDTOK; }
1164 YY_BREAK
1165case 4:
1166YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001167#line 185 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001168{ return TRUETOK; }
1169 YY_BREAK
1170case 5:
1171YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001172#line 186 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001173{ return FALSETOK; }
1174 YY_BREAK
1175case 6:
1176YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001177#line 187 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001178{ return DECLARE; }
1179 YY_BREAK
1180case 7:
1181YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001182#line 188 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001183{ return GLOBAL; }
1184 YY_BREAK
1185case 8:
1186YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001187#line 189 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001188{ return CONSTANT; }
1189 YY_BREAK
1190case 9:
1191YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001192#line 190 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001193{ return INTERNAL; }
1194 YY_BREAK
1195case 10:
1196YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001197#line 191 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001198{ return LINKONCE; }
1199 YY_BREAK
1200case 11:
1201YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001202#line 192 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001203{ return WEAK; }
1204 YY_BREAK
1205case 12:
1206YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001207#line 193 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001208{ return APPENDING; }
1209 YY_BREAK
1210case 13:
1211YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001212#line 194 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001213{ return EXTERNAL; } /* Deprecated, turn into external */
1214 YY_BREAK
1215case 14:
1216YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001217#line 195 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001218{ return EXTERNAL; }
1219 YY_BREAK
1220case 15:
1221YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001222#line 196 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001223{ return IMPLEMENTATION; }
1224 YY_BREAK
1225case 16:
1226YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001227#line 197 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001228{ return ZEROINITIALIZER; }
1229 YY_BREAK
1230case 17:
1231YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001232#line 198 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001233{ return DOTDOTDOT; }
1234 YY_BREAK
1235case 18:
1236YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001237#line 199 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001238{ return UNDEF; }
1239 YY_BREAK
1240case 19:
1241YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001242#line 200 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001243{ return NULL_TOK; }
1244 YY_BREAK
1245case 20:
1246YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001247#line 201 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001248{ return TO; }
1249 YY_BREAK
1250case 21:
1251YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001252#line 202 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001253{ RET_TOK(TermOpVal, Unwind, UNWIND); }
1254 YY_BREAK
1255case 22:
1256YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001257#line 203 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001258{ return NOT; } /* Deprecated, turned into XOR */
1259 YY_BREAK
1260case 23:
1261YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001262#line 204 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001263{ return TAIL; }
1264 YY_BREAK
1265case 24:
1266YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001267#line 205 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001268{ return TARGET; }
1269 YY_BREAK
1270case 25:
1271YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001272#line 206 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001273{ return TRIPLE; }
1274 YY_BREAK
1275case 26:
1276YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001277#line 207 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001278{ return DEPLIBS; }
1279 YY_BREAK
1280case 27:
1281YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001282#line 208 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001283{ return ENDIAN; }
1284 YY_BREAK
1285case 28:
1286YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001287#line 209 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001288{ return POINTERSIZE; }
1289 YY_BREAK
1290case 29:
1291YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001292#line 210 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001293{ return LITTLE; }
1294 YY_BREAK
1295case 30:
1296YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001297#line 211 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001298{ return BIG; }
1299 YY_BREAK
1300case 31:
1301YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001302#line 212 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001303{ return VOLATILE; }
1304 YY_BREAK
1305case 32:
1306YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001307#line 213 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001308{ return ALIGN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001309 YY_BREAK
1310case 33:
1311YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001312#line 214 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001313{ return SECTION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001314 YY_BREAK
1315case 34:
1316YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001317#line 215 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001318{ return MODULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001319 YY_BREAK
1320case 35:
1321YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001322#line 216 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1323{ return ASM_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001324 YY_BREAK
1325case 36:
1326YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001327#line 218 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001328{ return CC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001329 YY_BREAK
1330case 37:
1331YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001332#line 219 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001333{ return CCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001334 YY_BREAK
1335case 38:
1336YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001337#line 220 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001338{ return FASTCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001339 YY_BREAK
1340case 39:
1341YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001342#line 221 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1343{ return COLDCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001344 YY_BREAK
1345case 40:
1346YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001347#line 223 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001348{ llvmAsmlval.PrimType = Type::VoidTy ; return VOID; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001349 YY_BREAK
1350case 41:
1351YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001352#line 224 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001353{ llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001354 YY_BREAK
1355case 42:
1356YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001357#line 225 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001358{ llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001359 YY_BREAK
1360case 43:
1361YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001362#line 226 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001363{ llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001364 YY_BREAK
1365case 44:
1366YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001367#line 227 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001368{ llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001369 YY_BREAK
1370case 45:
1371YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001372#line 228 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001373{ llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001374 YY_BREAK
1375case 46:
1376YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001377#line 229 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001378{ llvmAsmlval.PrimType = Type::IntTy ; return INT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001379 YY_BREAK
1380case 47:
1381YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001382#line 230 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001383{ llvmAsmlval.PrimType = Type::UIntTy ; return UINT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001384 YY_BREAK
1385case 48:
1386YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001387#line 231 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001388{ llvmAsmlval.PrimType = Type::LongTy ; return LONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001389 YY_BREAK
1390case 49:
1391YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001392#line 232 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001393{ llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001394 YY_BREAK
1395case 50:
1396YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001397#line 233 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001398{ llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001399 YY_BREAK
1400case 51:
1401YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001402#line 234 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001403{ llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001404 YY_BREAK
1405case 52:
1406YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001407#line 235 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001408{ llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001409 YY_BREAK
1410case 53:
1411YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001412#line 236 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001413{ return TYPE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001414 YY_BREAK
1415case 54:
1416YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001417#line 237 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1418{ return OPAQUE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001419 YY_BREAK
1420case 55:
1421YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001422#line 239 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001423{ RET_TOK(BinaryOpVal, Add, ADD); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001424 YY_BREAK
1425case 56:
1426YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001427#line 240 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001428{ RET_TOK(BinaryOpVal, Sub, SUB); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001429 YY_BREAK
1430case 57:
1431YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001432#line 241 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001433{ RET_TOK(BinaryOpVal, Mul, MUL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001434 YY_BREAK
1435case 58:
1436YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001437#line 242 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001438{ RET_TOK(BinaryOpVal, Div, DIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001439 YY_BREAK
1440case 59:
1441YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001442#line 243 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001443{ RET_TOK(BinaryOpVal, Rem, REM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001444 YY_BREAK
1445case 60:
1446YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001447#line 244 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001448{ RET_TOK(BinaryOpVal, And, AND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001449 YY_BREAK
1450case 61:
1451YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001452#line 245 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001453{ RET_TOK(BinaryOpVal, Or , OR ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001454 YY_BREAK
1455case 62:
1456YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001457#line 246 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001458{ RET_TOK(BinaryOpVal, Xor, XOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001459 YY_BREAK
1460case 63:
1461YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001462#line 247 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001463{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001464 YY_BREAK
1465case 64:
1466YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001467#line 248 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001468{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001469 YY_BREAK
1470case 65:
1471YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001472#line 249 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001473{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001474 YY_BREAK
1475case 66:
1476YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001477#line 250 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001478{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001479 YY_BREAK
1480case 67:
1481YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001482#line 251 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001483{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001484 YY_BREAK
1485case 68:
1486YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001487#line 252 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1488{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001489 YY_BREAK
1490case 69:
1491YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001492#line 254 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001493{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001494 YY_BREAK
1495case 70:
1496YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001497#line 255 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001498{ RET_TOK(OtherOpVal, Call, CALL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001499 YY_BREAK
1500case 71:
1501YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001502#line 256 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001503{ RET_TOK(OtherOpVal, Cast, CAST); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001504 YY_BREAK
1505case 72:
1506YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001507#line 257 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001508{ RET_TOK(OtherOpVal, Select, SELECT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001509 YY_BREAK
1510case 73:
1511YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001512#line 258 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001513{ RET_TOK(OtherOpVal, Shl, SHL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001514 YY_BREAK
1515case 74:
1516YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001517#line 259 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001518{ RET_TOK(OtherOpVal, Shr, SHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001519 YY_BREAK
1520case 75:
1521YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001522#line 260 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001523{ return VANEXT_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001524 YY_BREAK
1525case 76:
1526YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001527#line 261 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001528{ return VAARG_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001529 YY_BREAK
1530case 77:
1531YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001532#line 262 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001533{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001534 YY_BREAK
1535case 78:
1536YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001537#line 263 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001538{ RET_TOK(TermOpVal, Ret, RET); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001539 YY_BREAK
1540case 79:
1541YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001542#line 264 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001543{ RET_TOK(TermOpVal, Br, BR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001544 YY_BREAK
1545case 80:
1546YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001547#line 265 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001548{ RET_TOK(TermOpVal, Switch, SWITCH); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001549 YY_BREAK
1550case 81:
1551YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001552#line 266 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001553{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001554 YY_BREAK
1555case 82:
1556YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001557#line 267 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001558{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001559 YY_BREAK
1560case 83:
1561YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001562#line 268 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1563{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001564 YY_BREAK
1565case 84:
1566YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001567#line 270 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001568{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001569 YY_BREAK
1570case 85:
1571YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001572#line 271 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001573{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001574 YY_BREAK
1575case 86:
1576YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001577#line 272 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001578{ RET_TOK(MemOpVal, Free, FREE); }
Nate Begeman14b05292005-11-05 09:21:28 +00001579 YY_BREAK
1580case 87:
1581YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001582#line 273 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001583{ RET_TOK(MemOpVal, Load, LOAD); }
Chris Lattnere869eef2005-11-12 00:11:49 +00001584 YY_BREAK
1585case 88:
1586YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001587#line 274 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001588{ RET_TOK(MemOpVal, Store, STORE); }
Robert Bocchino9c62b562006-01-10 19:04:32 +00001589 YY_BREAK
1590case 89:
1591YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001592#line 275 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1593{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
Robert Bocchino2def1b32006-01-17 20:06:25 +00001594 YY_BREAK
1595case 90:
1596YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001597#line 277 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001598{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
Chris Lattner8335e842006-01-23 23:05:42 +00001599 YY_BREAK
1600case 91:
1601YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001602#line 278 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1603{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1604 YY_BREAK
1605case 92:
1606YY_RULE_SETUP
1607#line 281 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001608{
1609 UnEscapeLexed(yytext+1);
1610 llvmAsmlval.StrVal = strdup(yytext+1); // Skip %
1611 return VAR_ID;
1612 }
1613 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001614case 93:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001615YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001616#line 286 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001617{
1618 yytext[strlen(yytext)-1] = 0; // nuke colon
1619 UnEscapeLexed(yytext);
1620 llvmAsmlval.StrVal = strdup(yytext);
1621 return LABELSTR;
1622 }
1623 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001624case 94:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001625YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001626#line 292 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001627{
1628 yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
1629 UnEscapeLexed(yytext+1);
1630 llvmAsmlval.StrVal = strdup(yytext+1);
1631 return LABELSTR;
1632 }
1633 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001634case 95:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001635YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001636#line 299 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001637{ // Note that we cannot unescape a string constant here! The
1638 // string constant might contain a \00 which would not be
1639 // understood by the string stuff. It is valid to make a
1640 // [sbyte] c"Hello World\00" constant, for example.
1641 //
1642 yytext[strlen(yytext)-1] = 0; // nuke end quote
1643 llvmAsmlval.StrVal = strdup(yytext+1); // Nuke start quote
1644 return STRINGCONSTANT;
1645 }
1646 YY_BREAK
Chris Lattner8335e842006-01-23 23:05:42 +00001647case 96:
1648YY_RULE_SETUP
1649#line 310 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001650{ llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
1651 YY_BREAK
1652case 97:
1653YY_RULE_SETUP
1654#line 311 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001655{
1656 uint64_t Val = atoull(yytext+1);
1657 // +1: we have bigger negative range
1658 if (Val > (uint64_t)INT64_MAX+1)
1659 ThrowException("Constant too large for signed 64 bits!");
1660 llvmAsmlval.SInt64Val = -Val;
1661 return ESINT64VAL;
1662 }
1663 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001664case 98:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001665YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001666#line 319 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001667{
1668 llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
1669 return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
1670 }
1671 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001672case 99:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001673YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001674#line 324 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001675{
1676 uint64_t Val = atoull(yytext+1);
1677 if ((unsigned)Val != Val)
1678 ThrowException("Invalid value number (too large)!");
1679 llvmAsmlval.UIntVal = unsigned(Val);
1680 return UINTVAL;
1681 }
1682 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001683case 100:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001684YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001685#line 331 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001686{
1687 uint64_t Val = atoull(yytext+2);
1688 // +1: we have bigger negative range
1689 if (Val > (uint64_t)INT32_MAX+1)
1690 ThrowException("Constant too large for signed 32 bits!");
1691 llvmAsmlval.SIntVal = (int)-Val;
1692 return SINTVAL;
1693 }
1694 YY_BREAK
Chris Lattner8335e842006-01-23 23:05:42 +00001695case 101:
1696YY_RULE_SETUP
1697#line 340 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001698{ llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
1699 YY_BREAK
1700case 102:
1701YY_RULE_SETUP
1702#line 341 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001703{ llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
1704 YY_BREAK
1705case YY_STATE_EOF(INITIAL):
Chris Lattner66316012006-01-24 04:14:29 +00001706#line 343 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001707{
1708 /* Make sure to free the internal buffers for flex when we are
1709 * done reading our input!
1710 */
1711 yy_delete_buffer(YY_CURRENT_BUFFER);
1712 return EOF;
1713 }
1714 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001715case 103:
1716YY_RULE_SETUP
Chris Lattner8335e842006-01-23 23:05:42 +00001717#line 351 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Chris Lattner66316012006-01-24 04:14:29 +00001718{ /* Ignore whitespace */ }
Chris Lattner8335e842006-01-23 23:05:42 +00001719 YY_BREAK
1720case 104:
1721YY_RULE_SETUP
Chris Lattner66316012006-01-24 04:14:29 +00001722#line 352 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
1723{ return yytext[0]; }
1724 YY_BREAK
1725case 105:
1726YY_RULE_SETUP
1727#line 354 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001728YY_FATAL_ERROR( "flex scanner jammed" );
1729 YY_BREAK
Chris Lattner66316012006-01-24 04:14:29 +00001730#line 1731 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001731
1732 case YY_END_OF_BUFFER:
1733 {
1734 /* Amount of text matched not including the EOB char. */
1735 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1736
1737 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1738 *yy_cp = yy_hold_char;
1739 YY_RESTORE_YY_MORE_OFFSET
1740
1741 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1742 {
1743 /* We're scanning a new file or input source. It's
1744 * possible that this happened because the user
1745 * just pointed yyin at a new source and called
1746 * yylex(). If so, then we have to assure
1747 * consistency between yy_current_buffer and our
1748 * globals. Here is the right place to do so, because
1749 * this is the first action (other than possibly a
1750 * back-up) that will match for the new input source.
1751 */
1752 yy_n_chars = yy_current_buffer->yy_n_chars;
1753 yy_current_buffer->yy_input_file = yyin;
1754 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1755 }
1756
1757 /* Note that here we test for yy_c_buf_p "<=" to the position
1758 * of the first EOB in the buffer, since yy_c_buf_p will
1759 * already have been incremented past the NUL character
1760 * (since all states make transitions on EOB to the
1761 * end-of-buffer state). Contrast this with the test
1762 * in input().
1763 */
1764 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1765 { /* This was really a NUL. */
1766 yy_state_type yy_next_state;
1767
1768 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1769
1770 yy_current_state = yy_get_previous_state();
1771
1772 /* Okay, we're now positioned to make the NUL
1773 * transition. We couldn't have
1774 * yy_get_previous_state() go ahead and do it
1775 * for us because it doesn't know how to deal
1776 * with the possibility of jamming (and we don't
1777 * want to build jamming into it because then it
1778 * will run more slowly).
1779 */
1780
1781 yy_next_state = yy_try_NUL_trans( yy_current_state );
1782
1783 yy_bp = yytext_ptr + YY_MORE_ADJ;
1784
1785 if ( yy_next_state )
1786 {
1787 /* Consume the NUL. */
1788 yy_cp = ++yy_c_buf_p;
1789 yy_current_state = yy_next_state;
1790 goto yy_match;
1791 }
1792
1793 else
1794 {
1795 yy_cp = yy_c_buf_p;
1796 goto yy_find_action;
1797 }
1798 }
1799
1800 else switch ( yy_get_next_buffer() )
1801 {
1802 case EOB_ACT_END_OF_FILE:
1803 {
1804 yy_did_buffer_switch_on_eof = 0;
1805
1806 if ( yywrap() )
1807 {
1808 /* Note: because we've taken care in
1809 * yy_get_next_buffer() to have set up
1810 * yytext, we can now set up
1811 * yy_c_buf_p so that if some total
1812 * hoser (like flex itself) wants to
1813 * call the scanner after we return the
1814 * YY_NULL, it'll still work - another
1815 * YY_NULL will get returned.
1816 */
1817 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1818
1819 yy_act = YY_STATE_EOF(YY_START);
1820 goto do_action;
1821 }
1822
1823 else
1824 {
1825 if ( ! yy_did_buffer_switch_on_eof )
1826 YY_NEW_FILE;
1827 }
1828 break;
1829 }
1830
1831 case EOB_ACT_CONTINUE_SCAN:
1832 yy_c_buf_p =
1833 yytext_ptr + yy_amount_of_matched_text;
1834
1835 yy_current_state = yy_get_previous_state();
1836
1837 yy_cp = yy_c_buf_p;
1838 yy_bp = yytext_ptr + YY_MORE_ADJ;
1839 goto yy_match;
1840
1841 case EOB_ACT_LAST_MATCH:
1842 yy_c_buf_p =
1843 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1844
1845 yy_current_state = yy_get_previous_state();
1846
1847 yy_cp = yy_c_buf_p;
1848 yy_bp = yytext_ptr + YY_MORE_ADJ;
1849 goto yy_find_action;
1850 }
1851 break;
1852 }
1853
1854 default:
1855 YY_FATAL_ERROR(
1856 "fatal flex scanner internal error--no action found" );
1857 } /* end of action switch */
1858 } /* end of scanning one token */
1859 } /* end of yylex */
1860
1861
1862/* yy_get_next_buffer - try to read in a new buffer
1863 *
1864 * Returns a code representing an action:
1865 * EOB_ACT_LAST_MATCH -
1866 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1867 * EOB_ACT_END_OF_FILE - end of file
1868 */
1869
1870static int yy_get_next_buffer()
1871 {
1872 register char *dest = yy_current_buffer->yy_ch_buf;
1873 register char *source = yytext_ptr;
1874 register int number_to_move, i;
1875 int ret_val;
1876
1877 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1878 YY_FATAL_ERROR(
1879 "fatal flex scanner internal error--end of buffer missed" );
1880
1881 if ( yy_current_buffer->yy_fill_buffer == 0 )
1882 { /* Don't try to fill the buffer, so this is an EOF. */
1883 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1884 {
1885 /* We matched a single character, the EOB, so
1886 * treat this as a final EOF.
1887 */
1888 return EOB_ACT_END_OF_FILE;
1889 }
1890
1891 else
1892 {
1893 /* We matched some text prior to the EOB, first
1894 * process it.
1895 */
1896 return EOB_ACT_LAST_MATCH;
1897 }
1898 }
1899
1900 /* Try to read more data. */
1901
1902 /* First move last chars to start of buffer. */
1903 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1904
1905 for ( i = 0; i < number_to_move; ++i )
1906 *(dest++) = *(source++);
1907
1908 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1909 /* don't do the read, it's not guaranteed to return an EOF,
1910 * just force an EOF
1911 */
1912 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1913
1914 else
1915 {
1916 int num_to_read =
1917 yy_current_buffer->yy_buf_size - number_to_move - 1;
1918
1919 while ( num_to_read <= 0 )
1920 { /* Not enough room in the buffer - grow it. */
1921#ifdef YY_USES_REJECT
1922 YY_FATAL_ERROR(
1923"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1924#else
1925
1926 /* just a shorter name for the current buffer */
1927 YY_BUFFER_STATE b = yy_current_buffer;
1928
1929 int yy_c_buf_p_offset =
1930 (int) (yy_c_buf_p - b->yy_ch_buf);
1931
1932 if ( b->yy_is_our_buffer )
1933 {
1934 int new_size = b->yy_buf_size * 2;
1935
1936 if ( new_size <= 0 )
1937 b->yy_buf_size += b->yy_buf_size / 8;
1938 else
1939 b->yy_buf_size *= 2;
1940
1941 b->yy_ch_buf = (char *)
1942 /* Include room in for 2 EOB chars. */
1943 yy_flex_realloc( (void *) b->yy_ch_buf,
1944 b->yy_buf_size + 2 );
1945 }
1946 else
1947 /* Can't grow it, we don't own it. */
1948 b->yy_ch_buf = 0;
1949
1950 if ( ! b->yy_ch_buf )
1951 YY_FATAL_ERROR(
1952 "fatal error - scanner input buffer overflow" );
1953
1954 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1955
1956 num_to_read = yy_current_buffer->yy_buf_size -
1957 number_to_move - 1;
1958#endif
1959 }
1960
1961 if ( num_to_read > YY_READ_BUF_SIZE )
1962 num_to_read = YY_READ_BUF_SIZE;
1963
1964 /* Read in more data. */
1965 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1966 yy_n_chars, num_to_read );
1967
1968 yy_current_buffer->yy_n_chars = yy_n_chars;
1969 }
1970
1971 if ( yy_n_chars == 0 )
1972 {
1973 if ( number_to_move == YY_MORE_ADJ )
1974 {
1975 ret_val = EOB_ACT_END_OF_FILE;
1976 yyrestart( yyin );
1977 }
1978
1979 else
1980 {
1981 ret_val = EOB_ACT_LAST_MATCH;
1982 yy_current_buffer->yy_buffer_status =
1983 YY_BUFFER_EOF_PENDING;
1984 }
1985 }
1986
1987 else
1988 ret_val = EOB_ACT_CONTINUE_SCAN;
1989
1990 yy_n_chars += number_to_move;
1991 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1992 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1993
1994 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1995
1996 return ret_val;
1997 }
1998
1999
2000/* yy_get_previous_state - get the state just before the EOB char was reached */
2001
2002static yy_state_type yy_get_previous_state()
2003 {
2004 register yy_state_type yy_current_state;
2005 register char *yy_cp;
2006
2007 yy_current_state = yy_start;
2008 yy_state_ptr = yy_state_buf;
2009 *yy_state_ptr++ = yy_current_state;
2010
2011 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2012 {
2013 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2014 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2015 {
2016 yy_current_state = (int) yy_def[yy_current_state];
Chris Lattner66316012006-01-24 04:14:29 +00002017 if ( yy_current_state >= 434 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002018 yy_c = yy_meta[(unsigned int) yy_c];
2019 }
2020 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2021 *yy_state_ptr++ = yy_current_state;
2022 }
2023
2024 return yy_current_state;
2025 }
2026
2027
2028/* yy_try_NUL_trans - try to make a transition on the NUL character
2029 *
2030 * synopsis
2031 * next_state = yy_try_NUL_trans( current_state );
2032 */
2033
2034#ifdef YY_USE_PROTOS
2035static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2036#else
2037static yy_state_type yy_try_NUL_trans( yy_current_state )
2038yy_state_type yy_current_state;
2039#endif
2040 {
2041 register int yy_is_jam;
2042
2043 register YY_CHAR yy_c = 1;
2044 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2045 {
2046 yy_current_state = (int) yy_def[yy_current_state];
Chris Lattner66316012006-01-24 04:14:29 +00002047 if ( yy_current_state >= 434 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002048 yy_c = yy_meta[(unsigned int) yy_c];
2049 }
2050 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Chris Lattner66316012006-01-24 04:14:29 +00002051 yy_is_jam = (yy_current_state == 433);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002052 if ( ! yy_is_jam )
2053 *yy_state_ptr++ = yy_current_state;
2054
2055 return yy_is_jam ? 0 : yy_current_state;
2056 }
2057
2058
2059#ifndef YY_NO_UNPUT
2060#ifdef YY_USE_PROTOS
2061static inline void yyunput( int c, register char *yy_bp )
2062#else
2063static inline void yyunput( c, yy_bp )
2064int c;
2065register char *yy_bp;
2066#endif
2067 {
2068 register char *yy_cp = yy_c_buf_p;
2069
2070 /* undo effects of setting up yytext */
2071 *yy_cp = yy_hold_char;
2072
2073 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2074 { /* need to shift things up to make room */
2075 /* +2 for EOB chars. */
2076 register int number_to_move = yy_n_chars + 2;
2077 register char *dest = &yy_current_buffer->yy_ch_buf[
2078 yy_current_buffer->yy_buf_size + 2];
2079 register char *source =
2080 &yy_current_buffer->yy_ch_buf[number_to_move];
2081
2082 while ( source > yy_current_buffer->yy_ch_buf )
2083 *--dest = *--source;
2084
2085 yy_cp += (int) (dest - source);
2086 yy_bp += (int) (dest - source);
2087 yy_current_buffer->yy_n_chars =
2088 yy_n_chars = yy_current_buffer->yy_buf_size;
2089
2090 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2091 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2092 }
2093
2094 *--yy_cp = (char) c;
2095
2096 if ( c == '\n' )
2097 --yylineno;
2098
2099 yytext_ptr = yy_bp;
2100 yy_hold_char = *yy_cp;
2101 yy_c_buf_p = yy_cp;
2102 }
2103#endif /* ifndef YY_NO_UNPUT */
2104
2105
Reid Spencer68a24bd2005-08-27 18:50:39 +00002106#ifdef __cplusplus
2107static int yyinput()
2108#else
2109static int input()
2110#endif
2111 {
2112 int c;
2113
2114 *yy_c_buf_p = yy_hold_char;
2115
2116 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2117 {
2118 /* yy_c_buf_p now points to the character we want to return.
2119 * If this occurs *before* the EOB characters, then it's a
2120 * valid NUL; if not, then we've hit the end of the buffer.
2121 */
2122 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2123 /* This was really a NUL. */
2124 *yy_c_buf_p = '\0';
2125
2126 else
2127 { /* need more input */
2128 int offset = yy_c_buf_p - yytext_ptr;
2129 ++yy_c_buf_p;
2130
2131 switch ( yy_get_next_buffer() )
2132 {
2133 case EOB_ACT_LAST_MATCH:
2134 /* This happens because yy_g_n_b()
2135 * sees that we've accumulated a
2136 * token and flags that we need to
2137 * try matching the token before
2138 * proceeding. But for input(),
2139 * there's no matching to consider.
2140 * So convert the EOB_ACT_LAST_MATCH
2141 * to EOB_ACT_END_OF_FILE.
2142 */
2143
2144 /* Reset buffer status. */
2145 yyrestart( yyin );
2146
2147 /* fall through */
2148
2149 case EOB_ACT_END_OF_FILE:
2150 {
2151 if ( yywrap() )
2152 return EOF;
2153
2154 if ( ! yy_did_buffer_switch_on_eof )
2155 YY_NEW_FILE;
2156#ifdef __cplusplus
2157 return yyinput();
2158#else
2159 return input();
2160#endif
2161 }
2162
2163 case EOB_ACT_CONTINUE_SCAN:
2164 yy_c_buf_p = yytext_ptr + offset;
2165 break;
2166 }
2167 }
2168 }
2169
2170 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2171 *yy_c_buf_p = '\0'; /* preserve yytext */
2172 yy_hold_char = *++yy_c_buf_p;
2173
2174 if ( c == '\n' )
2175 ++yylineno;
2176
2177 return c;
2178 }
Nate Begeman14b05292005-11-05 09:21:28 +00002179
Reid Spencer68a24bd2005-08-27 18:50:39 +00002180
2181#ifdef YY_USE_PROTOS
2182void yyrestart( FILE *input_file )
2183#else
2184void yyrestart( input_file )
2185FILE *input_file;
2186#endif
2187 {
2188 if ( ! yy_current_buffer )
2189 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2190
2191 yy_init_buffer( yy_current_buffer, input_file );
2192 yy_load_buffer_state();
2193 }
2194
2195
2196#ifdef YY_USE_PROTOS
2197void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2198#else
2199void yy_switch_to_buffer( new_buffer )
2200YY_BUFFER_STATE new_buffer;
2201#endif
2202 {
2203 if ( yy_current_buffer == new_buffer )
2204 return;
2205
2206 if ( yy_current_buffer )
2207 {
2208 /* Flush out information for old buffer. */
2209 *yy_c_buf_p = yy_hold_char;
2210 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2211 yy_current_buffer->yy_n_chars = yy_n_chars;
2212 }
2213
2214 yy_current_buffer = new_buffer;
2215 yy_load_buffer_state();
2216
2217 /* We don't actually know whether we did this switch during
2218 * EOF (yywrap()) processing, but the only time this flag
2219 * is looked at is after yywrap() is called, so it's safe
2220 * to go ahead and always set it.
2221 */
2222 yy_did_buffer_switch_on_eof = 1;
2223 }
2224
2225
2226#ifdef YY_USE_PROTOS
2227void yy_load_buffer_state( void )
2228#else
2229void yy_load_buffer_state()
2230#endif
2231 {
2232 yy_n_chars = yy_current_buffer->yy_n_chars;
2233 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2234 yyin = yy_current_buffer->yy_input_file;
2235 yy_hold_char = *yy_c_buf_p;
2236 }
2237
2238
2239#ifdef YY_USE_PROTOS
2240YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2241#else
2242YY_BUFFER_STATE yy_create_buffer( file, size )
2243FILE *file;
2244int size;
2245#endif
2246 {
2247 YY_BUFFER_STATE b;
2248
2249 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2250 if ( ! b )
2251 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2252
2253 b->yy_buf_size = size;
2254
2255 /* yy_ch_buf has to be 2 characters longer than the size given because
2256 * we need to put in 2 end-of-buffer characters.
2257 */
2258 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2259 if ( ! b->yy_ch_buf )
2260 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2261
2262 b->yy_is_our_buffer = 1;
2263
2264 yy_init_buffer( b, file );
2265
2266 return b;
2267 }
2268
2269
2270#ifdef YY_USE_PROTOS
2271void yy_delete_buffer( YY_BUFFER_STATE b )
2272#else
2273void yy_delete_buffer( b )
2274YY_BUFFER_STATE b;
2275#endif
2276 {
2277 if ( ! b )
2278 return;
2279
2280 if ( b == yy_current_buffer )
2281 yy_current_buffer = (YY_BUFFER_STATE) 0;
2282
2283 if ( b->yy_is_our_buffer )
2284 yy_flex_free( (void *) b->yy_ch_buf );
2285
2286 yy_flex_free( (void *) b );
2287 }
2288
2289
Nate Begeman14b05292005-11-05 09:21:28 +00002290#ifndef YY_ALWAYS_INTERACTIVE
2291#ifndef YY_NEVER_INTERACTIVE
2292extern int isatty YY_PROTO(( int ));
2293#endif
2294#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +00002295
2296#ifdef YY_USE_PROTOS
2297void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2298#else
2299void yy_init_buffer( b, file )
2300YY_BUFFER_STATE b;
2301FILE *file;
2302#endif
2303
2304
2305 {
2306 yy_flush_buffer( b );
2307
2308 b->yy_input_file = file;
2309 b->yy_fill_buffer = 1;
2310
2311#if YY_ALWAYS_INTERACTIVE
2312 b->yy_is_interactive = 1;
2313#else
2314#if YY_NEVER_INTERACTIVE
2315 b->yy_is_interactive = 0;
2316#else
2317 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2318#endif
2319#endif
2320 }
2321
2322
2323#ifdef YY_USE_PROTOS
2324void yy_flush_buffer( YY_BUFFER_STATE b )
2325#else
2326void yy_flush_buffer( b )
2327YY_BUFFER_STATE b;
2328#endif
2329
2330 {
2331 if ( ! b )
2332 return;
2333
2334 b->yy_n_chars = 0;
2335
2336 /* We always need two end-of-buffer characters. The first causes
2337 * a transition to the end-of-buffer state. The second causes
2338 * a jam in that state.
2339 */
2340 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2341 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2342
2343 b->yy_buf_pos = &b->yy_ch_buf[0];
2344
2345 b->yy_at_bol = 1;
2346 b->yy_buffer_status = YY_BUFFER_NEW;
2347
2348 if ( b == yy_current_buffer )
2349 yy_load_buffer_state();
2350 }
2351
2352
2353#ifndef YY_NO_SCAN_BUFFER
2354#ifdef YY_USE_PROTOS
2355YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2356#else
2357YY_BUFFER_STATE yy_scan_buffer( base, size )
2358char *base;
2359yy_size_t size;
2360#endif
2361 {
2362 YY_BUFFER_STATE b;
2363
2364 if ( size < 2 ||
2365 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2366 base[size-1] != YY_END_OF_BUFFER_CHAR )
2367 /* They forgot to leave room for the EOB's. */
2368 return 0;
2369
2370 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2371 if ( ! b )
2372 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2373
2374 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2375 b->yy_buf_pos = b->yy_ch_buf = base;
2376 b->yy_is_our_buffer = 0;
2377 b->yy_input_file = 0;
2378 b->yy_n_chars = b->yy_buf_size;
2379 b->yy_is_interactive = 0;
2380 b->yy_at_bol = 1;
2381 b->yy_fill_buffer = 0;
2382 b->yy_buffer_status = YY_BUFFER_NEW;
2383
2384 yy_switch_to_buffer( b );
2385
2386 return b;
2387 }
2388#endif
2389
2390
2391#ifndef YY_NO_SCAN_STRING
2392#ifdef YY_USE_PROTOS
2393YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2394#else
2395YY_BUFFER_STATE yy_scan_string( yy_str )
2396yyconst char *yy_str;
2397#endif
2398 {
2399 int len;
2400 for ( len = 0; yy_str[len]; ++len )
2401 ;
2402
2403 return yy_scan_bytes( yy_str, len );
2404 }
2405#endif
2406
2407
2408#ifndef YY_NO_SCAN_BYTES
2409#ifdef YY_USE_PROTOS
2410YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2411#else
2412YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2413yyconst char *bytes;
2414int len;
2415#endif
2416 {
2417 YY_BUFFER_STATE b;
2418 char *buf;
2419 yy_size_t n;
2420 int i;
2421
2422 /* Get memory for full buffer, including space for trailing EOB's. */
2423 n = len + 2;
2424 buf = (char *) yy_flex_alloc( n );
2425 if ( ! buf )
2426 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2427
2428 for ( i = 0; i < len; ++i )
2429 buf[i] = bytes[i];
2430
2431 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2432
2433 b = yy_scan_buffer( buf, n );
2434 if ( ! b )
2435 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2436
2437 /* It's okay to grow etc. this buffer, and we should throw it
2438 * away when we're done.
2439 */
2440 b->yy_is_our_buffer = 1;
2441
2442 return b;
2443 }
2444#endif
2445
2446
2447#ifndef YY_NO_PUSH_STATE
2448#ifdef YY_USE_PROTOS
2449static void yy_push_state( int new_state )
2450#else
2451static void yy_push_state( new_state )
2452int new_state;
2453#endif
2454 {
2455 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2456 {
2457 yy_size_t new_size;
2458
2459 yy_start_stack_depth += YY_START_STACK_INCR;
2460 new_size = yy_start_stack_depth * sizeof( int );
2461
2462 if ( ! yy_start_stack )
2463 yy_start_stack = (int *) yy_flex_alloc( new_size );
2464
2465 else
2466 yy_start_stack = (int *) yy_flex_realloc(
2467 (void *) yy_start_stack, new_size );
2468
2469 if ( ! yy_start_stack )
2470 YY_FATAL_ERROR(
2471 "out of memory expanding start-condition stack" );
2472 }
2473
2474 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2475
2476 BEGIN(new_state);
2477 }
2478#endif
2479
2480
2481#ifndef YY_NO_POP_STATE
2482static void yy_pop_state()
2483 {
2484 if ( --yy_start_stack_ptr < 0 )
2485 YY_FATAL_ERROR( "start-condition stack underflow" );
2486
2487 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2488 }
2489#endif
2490
2491
2492#ifndef YY_NO_TOP_STATE
2493static int yy_top_state()
2494 {
2495 return yy_start_stack[yy_start_stack_ptr - 1];
2496 }
2497#endif
2498
2499#ifndef YY_EXIT_FAILURE
2500#define YY_EXIT_FAILURE 2
2501#endif
2502
2503#ifdef YY_USE_PROTOS
2504static void yy_fatal_error( yyconst char msg[] )
2505#else
2506static void yy_fatal_error( msg )
2507char msg[];
2508#endif
2509 {
2510 (void) fprintf( stderr, "%s\n", msg );
2511 exit( YY_EXIT_FAILURE );
2512 }
2513
2514
2515
2516/* Redefine yyless() so it works in section 3 code. */
2517
2518#undef yyless
2519#define yyless(n) \
2520 do \
2521 { \
2522 /* Undo effects of setting up yytext. */ \
2523 yytext[yyleng] = yy_hold_char; \
2524 yy_c_buf_p = yytext + n; \
2525 yy_hold_char = *yy_c_buf_p; \
2526 *yy_c_buf_p = '\0'; \
2527 yyleng = n; \
2528 } \
2529 while ( 0 )
2530
2531
2532/* Internal utility routines. */
2533
2534#ifndef yytext_ptr
2535#ifdef YY_USE_PROTOS
2536static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2537#else
2538static void yy_flex_strncpy( s1, s2, n )
2539char *s1;
2540yyconst char *s2;
2541int n;
2542#endif
2543 {
2544 register int i;
2545 for ( i = 0; i < n; ++i )
2546 s1[i] = s2[i];
2547 }
2548#endif
2549
2550#ifdef YY_NEED_STRLEN
2551#ifdef YY_USE_PROTOS
2552static int yy_flex_strlen( yyconst char *s )
2553#else
2554static int yy_flex_strlen( s )
2555yyconst char *s;
2556#endif
2557 {
2558 register int n;
2559 for ( n = 0; s[n]; ++n )
2560 ;
2561
2562 return n;
2563 }
2564#endif
2565
2566
2567#ifdef YY_USE_PROTOS
2568static void *yy_flex_alloc( yy_size_t size )
2569#else
2570static void *yy_flex_alloc( size )
2571yy_size_t size;
2572#endif
2573 {
2574 return (void *) malloc( size );
2575 }
2576
2577#ifdef YY_USE_PROTOS
2578static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2579#else
2580static inline void *yy_flex_realloc( ptr, size )
2581void *ptr;
2582yy_size_t size;
2583#endif
2584 {
2585 /* The cast to (char *) in the following accommodates both
2586 * implementations that use char* generic pointers, and those
2587 * that use void* generic pointers. It works with the latter
2588 * because both ANSI C and C++ allow castless assignment from
2589 * any pointer type to void*, and deal with argument conversions
2590 * as though doing an assignment.
2591 */
2592 return (void *) realloc( (char *) ptr, size );
2593 }
2594
2595#ifdef YY_USE_PROTOS
2596static void yy_flex_free( void *ptr )
2597#else
2598static void yy_flex_free( ptr )
2599void *ptr;
2600#endif
2601 {
2602 free( ptr );
2603 }
2604
2605#if YY_MAIN
2606int main()
2607 {
2608 yylex();
2609 return 0;
2610 }
2611#endif
Chris Lattner66316012006-01-24 04:14:29 +00002612#line 354 "/Users/sabre/cvs/llvm/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002613