blob: 9435cbf576afbab0dda8451f575519b68a0f4b77 [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
Robert Bocchino2def1b32006-01-17 20:06:25 +0000311#define YY_NUM_RULES 103
312#define YY_END_OF_BUFFER 104
313static yyconst short int yy_acclist[181] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000314 { 0,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000315 104, 102, 103, 101, 102, 103, 101, 103, 102, 103,
316 102, 103, 102, 103, 102, 103, 102, 103, 102, 103,
317 94, 102, 103, 94, 102, 103, 1, 102, 103, 102,
318 103, 102, 103, 102, 103, 102, 103, 102, 103, 102,
319 103, 102, 103, 102, 103, 102, 103, 102, 103, 102,
320 103, 102, 103, 102, 103, 102, 103, 102, 103, 102,
321 103, 102, 103, 102, 103, 102, 103, 102, 103, 102,
322 103, 93, 91, 90, 90, 97, 95, 99, 94, 1,
323 77, 34, 59, 20, 93, 90, 90, 98, 99, 17,
324 99, 100, 53, 58, 30, 35, 56, 3, 44, 55,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000325
Robert Bocchino2def1b32006-01-17 20:06:25 +0000326 22, 67, 57, 76, 71, 72, 54, 60, 92, 99,
327 99, 39, 68, 69, 84, 85, 46, 19, 96, 23,
328 4, 51, 45, 38, 11, 99, 32, 2, 5, 48,
Chris Lattnere869eef2005-11-12 00:11:49 +0000329 50, 40, 62, 66, 64, 65, 63, 61, 42, 86,
330 41, 47, 18, 74, 83, 37, 49, 27, 21, 36,
331 7, 79, 29, 82, 52, 70, 78, 24, 25, 80,
332 43, 75, 73, 6, 26, 33, 8, 14, 9, 10,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000333 31, 12, 28, 81, 87, 89, 13, 88, 15, 16
Reid Spencer68a24bd2005-08-27 18:50:39 +0000334 } ;
335
Robert Bocchino2def1b32006-01-17 20:06:25 +0000336static yyconst short int yy_accept[428] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000337 { 0,
338 1, 1, 1, 2, 4, 7, 9, 11, 13, 15,
339 17, 19, 21, 24, 27, 30, 32, 34, 36, 38,
340 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
341 60, 62, 64, 66, 68, 70, 72, 72, 73, 73,
342 74, 75, 76, 77, 77, 78, 78, 79, 80, 80,
343 81, 81, 81, 81, 81, 81, 81, 81, 82, 82,
344 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
345 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
346 83, 83, 84, 84, 84, 84, 84, 84, 84, 84,
347 84, 84, 84, 84, 85, 85, 85, 85, 85, 85,
348
349 85, 85, 85, 85, 85, 85, 85, 86, 87, 89,
Nate Begeman14b05292005-11-05 09:21:28 +0000350 90, 91, 92, 92, 93, 94, 94, 94, 95, 95,
351 95, 96, 96, 96, 96, 97, 97, 97, 97, 97,
352 98, 98, 99, 99, 99, 99, 99, 99, 99, 99,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000353 99, 99, 99, 100, 100, 100, 100, 100, 100, 100,
354 100, 101, 102, 102, 102, 103, 103, 104, 105, 105,
355 105, 105, 105, 105, 106, 106, 107, 107, 108, 108,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000356 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000357 108, 108, 108, 108, 108, 108, 108, 108, 108, 109,
358 109, 110, 111, 111, 111, 111, 112, 112, 112, 112,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000359
Robert Bocchino2def1b32006-01-17 20:06:25 +0000360 112, 113, 114, 115, 115, 115, 115, 115, 115, 115,
361 115, 115, 115, 115, 115, 115, 116, 116, 116, 116,
362 116, 116, 116, 116, 116, 116, 117, 118, 118, 119,
363 119, 119, 120, 120, 120, 120, 120, 120, 120, 120,
364 120, 120, 120, 121, 121, 121, 122, 123, 123, 124,
365 124, 124, 124, 124, 124, 124, 124, 124, 124, 125,
366 125, 126, 126, 127, 128, 128, 128, 129, 129, 129,
367 129, 129, 129, 129, 129, 129, 129, 130, 130, 131,
368 131, 131, 131, 131, 131, 131, 132, 132, 132, 132,
369 132, 132, 133, 133, 133, 134, 135, 136, 137, 138,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000370
Robert Bocchino2def1b32006-01-17 20:06:25 +0000371 139, 140, 141, 141, 141, 141, 142, 143, 144, 144,
372 144, 144, 144, 144, 145, 145, 145, 145, 146, 146,
373 147, 147, 147, 147, 148, 149, 150, 150, 150, 151,
374 151, 152, 152, 152, 152, 153, 153, 154, 155, 156,
375 156, 156, 157, 158, 159, 160, 160, 160, 161, 162,
376 163, 164, 164, 164, 164, 164, 165, 166, 166, 166,
377 166, 166, 166, 166, 166, 166, 167, 167, 167, 167,
378 167, 167, 168, 169, 169, 169, 169, 169, 170, 171,
379 171, 171, 171, 172, 172, 173, 173, 173, 173, 173,
Robert Bocchino9c62b562006-01-10 19:04:32 +0000380 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000381
Robert Bocchino2def1b32006-01-17 20:06:25 +0000382 173, 173, 173, 173, 173, 173, 174, 174, 175, 175,
Robert Bocchino9c62b562006-01-10 19:04:32 +0000383 175, 175, 175, 175, 175, 175, 175, 176, 176, 177,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000384 178, 178, 179, 180, 180, 181, 181
Reid Spencer68a24bd2005-08-27 18:50:39 +0000385 } ;
386
387static yyconst int yy_ec[256] =
388 { 0,
389 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
390 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
393 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
394 11, 11, 11, 11, 11, 11, 11, 12, 13, 1,
395 1, 1, 1, 1, 14, 14, 14, 14, 15, 14,
396 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
397 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
398 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
399
400 21, 22, 23, 24, 25, 5, 26, 27, 28, 29,
401 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
402 40, 41, 1, 1, 1, 1, 1, 1, 1, 1,
403 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 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
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
417 } ;
418
419static yyconst int yy_meta[42] =
420 { 0,
421 1, 1, 2, 1, 3, 1, 1, 3, 3, 3,
422 3, 4, 1, 3, 3, 3, 3, 3, 3, 3,
423 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
424 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
425 3
426 } ;
427
Robert Bocchino2def1b32006-01-17 20:06:25 +0000428static yyconst short int yy_base[432] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000429 { 0,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000430 0, 0, 894, 895, 895, 895, 889, 880, 34, 36,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000431 38, 42, 46, 50, 0, 51, 54, 53, 56, 61,
432 76, 77, 79, 80, 82, 83, 84, 90, 31, 111,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000433 94, 140, 113, 55, 110, 116, 887, 895, 878, 895,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000434 0, 128, 131, 144, 150, 124, 160, 167, 172, 0,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000435 136, 139, 168, 100, 41, 145, 114, 877, 173, 183,
Nate Begeman14b05292005-11-05 09:21:28 +0000436 184, 185, 161, 187, 189, 191, 193, 133, 194, 196,
437 200, 202, 205, 206, 209, 217, 89, 210, 213, 216,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000438 57, 876, 207, 224, 223, 229, 233, 235, 244, 245,
439 241, 238, 253, 875, 254, 249, 243, 240, 252, 264,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000440
Robert Bocchino2def1b32006-01-17 20:06:25 +0000441 248, 275, 269, 276, 273, 283, 874, 0, 288, 290,
442 873, 297, 312, 0, 872, 291, 298, 871, 305, 309,
443 870, 303, 313, 301, 869, 315, 317, 319, 320, 868,
444 321, 325, 331, 332, 326, 329, 337, 336, 346, 343,
445 344, 347, 351, 350, 354, 357, 358, 361, 362, 364,
446 867, 866, 365, 366, 865, 367, 864, 863, 389, 370,
447 377, 374, 401, 862, 382, 861, 385, 860, 390, 389,
448 408, 402, 405, 411, 407, 409, 417, 415, 422, 426,
449 423, 425, 428, 427, 429, 437, 441, 440, 859, 431,
450 895, 452, 461, 377, 464, 467, 452, 468, 453, 471,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000451
Robert Bocchino2def1b32006-01-17 20:06:25 +0000452 858, 857, 856, 472, 458, 442, 473, 474, 477, 476,
453 478, 480, 483, 484, 487, 855, 490, 493, 494, 496,
454 497, 500, 501, 502, 504, 854, 853, 506, 852, 507,
455 509, 0, 512, 513, 508, 522, 525, 527, 528, 523,
456 529, 533, 851, 530, 541, 850, 849, 535, 848, 543,
457 545, 547, 552, 549, 551, 553, 558, 559, 847, 561,
458 846, 562, 565, 845, 565, 568, 844, 571, 577, 567,
459 372, 580, 573, 579, 581, 585, 843, 587, 842, 591,
460 593, 583, 595, 596, 597, 841, 603, 601, 604, 605,
461 607, 840, 609, 612, 839, 838, 837, 836, 835, 834,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000462
Robert Bocchino2def1b32006-01-17 20:06:25 +0000463 833, 832, 617, 615, 619, 831, 830, 829, 621, 623,
464 624, 622, 625, 828, 626, 633, 631, 827, 634, 826,
465 637, 641, 639, 825, 824, 823, 651, 640, 822, 642,
466 821, 643, 653, 655, 820, 657, 819, 818, 817, 659,
467 665, 816, 815, 814, 813, 666, 669, 812, 811, 810,
468 807, 668, 671, 670, 667, 797, 796, 673, 676, 677,
469 672, 678, 691, 692, 674, 795, 694, 695, 698, 697,
470 702, 794, 792, 703, 704, 705, 708, 791, 790, 709,
471 710, 723, 787, 711, 786, 726, 714, 727, 715, 712,
472 730, 719, 733, 736, 739, 740, 742, 744, 716, 746,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000473
Robert Bocchino2def1b32006-01-17 20:06:25 +0000474 747, 748, 749, 754, 756, 782, 750, 781, 761, 760,
475 764, 765, 766, 768, 769, 770, 780, 771, 779, 675,
476 775, 511, 444, 778, 333, 895, 811, 813, 339, 817,
477 264
Reid Spencer68a24bd2005-08-27 18:50:39 +0000478 } ;
479
Robert Bocchino2def1b32006-01-17 20:06:25 +0000480static yyconst short int yy_def[432] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000481 { 0,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000482 426, 1, 426, 426, 426, 426, 427, 428, 429, 426,
483 428, 428, 428, 428, 430, 428, 428, 428, 428, 428,
484 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
485 428, 428, 428, 428, 428, 428, 427, 426, 428, 426,
486 431, 431, 426, 426, 428, 428, 428, 428, 428, 430,
487 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
488 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
489 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
490 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
491 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000492
Robert Bocchino2def1b32006-01-17 20:06:25 +0000493 428, 428, 428, 428, 428, 428, 426, 431, 431, 426,
494 428, 428, 428, 49, 428, 428, 428, 428, 428, 428,
495 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
496 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
497 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
498 428, 428, 428, 428, 428, 428, 428, 428, 49, 428,
499 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
500 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
501 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
502 426, 426, 426, 426, 428, 428, 428, 428, 428, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000503
Robert Bocchino2def1b32006-01-17 20:06:25 +0000504 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
505 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
506 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
507 428, 159, 428, 428, 428, 428, 428, 428, 428, 428,
508 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
509 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
510 428, 428, 426, 428, 428, 428, 428, 428, 428, 428,
511 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
512 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
513 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000514
Robert Bocchino2def1b32006-01-17 20:06:25 +0000515 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
516 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
517 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
518 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
519 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
520 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
521 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
522 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
523 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
524 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000525
Robert Bocchino2def1b32006-01-17 20:06:25 +0000526 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
527 428, 428, 428, 428, 428, 428, 428, 428, 428, 428,
528 428, 428, 428, 428, 428, 0, 426, 426, 426, 426,
529 426
Reid Spencer68a24bd2005-08-27 18:50:39 +0000530 } ;
531
Robert Bocchino2def1b32006-01-17 20:06:25 +0000532static yyconst short int yy_nxt[937] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000533 { 0,
534 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
535 14, 4, 15, 8, 8, 8, 16, 17, 18, 19,
536 20, 21, 22, 8, 23, 8, 24, 25, 26, 27,
537 28, 8, 29, 30, 31, 32, 33, 34, 35, 8,
538 36, 42, 40, 43, 43, 44, 44, 45, 45, 40,
539 46, 85, 40, 40, 47, 48, 48, 40, 47, 48,
Nate Begeman14b05292005-11-05 09:21:28 +0000540 48, 40, 40, 120, 40, 40, 40, 40, 40, 59,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000541 51, 60, 40, 154, 55, 104, 62, 52, 56, 53,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000542 63, 54, 61, 57, 49, 64, 58, 40, 40, 65,
543 40, 40, 67, 40, 40, 40, 74, 70, 77, 66,
544
545 40, 40, 68, 71, 75, 40, 72, 73, 69, 76,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000546 93, 40, 79, 83, 81, 150, 82, 78, 80, 84,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000547 86, 40, 40, 94, 40, 40, 95, 40, 87, 102,
Nate Begeman14b05292005-11-05 09:21:28 +0000548 119, 88, 111, 96, 89, 40, 106, 109, 109, 105,
549 43, 43, 103, 122, 40, 90, 91, 40, 92, 86,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000550 40, 40, 110, 44, 44, 115, 40, 97, 47, 45,
Nate Begeman14b05292005-11-05 09:21:28 +0000551 45, 40, 137, 116, 98, 117, 99, 121, 100, 112,
552 112, 40, 40, 101, 113, 47, 48, 48, 40, 40,
553 113, 114, 114, 40, 40, 114, 114, 118, 114, 114,
554 114, 114, 114, 114, 40, 40, 40, 130, 40, 123,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000555
Nate Begeman14b05292005-11-05 09:21:28 +0000556 40, 125, 40, 128, 40, 40, 124, 40, 132, 133,
557 126, 40, 127, 40, 138, 129, 40, 40, 40, 135,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000558 40, 40, 131, 145, 40, 134, 136, 40, 40, 140,
559 139, 155, 141, 148, 40, 40, 151, 146, 142, 143,
560 40, 144, 153, 147, 40, 149, 40, 152, 156, 40,
561 157, 40, 40, 161, 40, 40, 40, 158, 168, 40,
562 40, 162, 169, 40, 40, 40, 108, 159, 176, 163,
563 164, 182, 160, 165, 167, 40, 166, 170, 172, 174,
564 40, 177, 175, 178, 40, 171, 40, 40, 179, 173,
565 183, 184, 188, 186, 40, 187, 180, 109, 109, 192,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000566
Robert Bocchino2def1b32006-01-17 20:06:25 +0000567 192, 181, 40, 185, 193, 189, 112, 112, 40, 40,
568 193, 113, 40, 197, 40, 190, 40, 113, 194, 195,
569 40, 196, 196, 40, 40, 199, 40, 198, 40, 201,
570 40, 40, 40, 200, 204, 203, 40, 40, 208, 202,
571 40, 41, 40, 40, 40, 206, 207, 40, 40, 209,
572 205, 210, 211, 215, 40, 40, 216, 40, 40, 213,
573 218, 40, 40, 214, 212, 40, 217, 220, 40, 40,
574 219, 221, 40, 40, 223, 40, 40, 40, 40, 222,
575 226, 40, 224, 40, 227, 40, 263, 263, 40, 323,
576 228, 229, 225, 40, 235, 231, 40, 230, 232, 232,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000577
Robert Bocchino2def1b32006-01-17 20:06:25 +0000578 40, 40, 232, 232, 233, 232, 232, 232, 232, 232,
579 232, 234, 40, 40, 240, 243, 40, 241, 40, 40,
580 40, 236, 40, 237, 242, 246, 40, 238, 40, 239,
581 244, 247, 245, 40, 40, 251, 40, 40, 40, 40,
582 40, 248, 40, 249, 256, 250, 253, 254, 40, 258,
583 252, 40, 40, 40, 255, 40, 259, 260, 270, 257,
584 262, 192, 192, 40, 40, 261, 193, 194, 194, 40,
585 263, 263, 193, 196, 196, 40, 196, 196, 40, 40,
586 264, 266, 40, 40, 40, 40, 265, 40, 40, 40,
587 268, 40, 269, 273, 40, 40, 276, 271, 40, 267,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000588
Robert Bocchino2def1b32006-01-17 20:06:25 +0000589 272, 40, 278, 277, 40, 40, 274, 40, 40, 281,
590 275, 40, 40, 40, 282, 40, 280, 40, 40, 40,
591 40, 279, 40, 40, 40, 285, 294, 286, 283, 284,
592 288, 287, 292, 40, 40, 289, 40, 293, 40, 40,
593 40, 40, 290, 291, 40, 296, 40, 298, 300, 302,
594 304, 303, 40, 295, 40, 306, 40, 301, 40, 297,
595 40, 299, 40, 40, 40, 307, 308, 305, 310, 40,
596 40, 309, 40, 40, 263, 263, 40, 311, 40, 40,
597 314, 318, 40, 312, 40, 313, 317, 319, 40, 320,
598 40, 40, 40, 321, 40, 316, 40, 315, 40, 322,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000599
Robert Bocchino2def1b32006-01-17 20:06:25 +0000600 324, 325, 40, 328, 40, 329, 40, 40, 40, 327,
601 332, 330, 40, 326, 40, 40, 40, 335, 40, 331,
602 40, 337, 338, 40, 334, 339, 40, 340, 40, 333,
603 40, 336, 40, 40, 40, 40, 40, 40, 341, 345,
604 343, 347, 40, 348, 40, 40, 342, 350, 40, 344,
605 40, 40, 40, 40, 40, 346, 349, 352, 354, 353,
606 351, 356, 40, 361, 40, 355, 40, 358, 40, 360,
607 40, 363, 357, 362, 359, 364, 40, 40, 40, 40,
608 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
609 367, 365, 368, 366, 369, 370, 374, 375, 371, 373,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000610
Robert Bocchino2def1b32006-01-17 20:06:25 +0000611 376, 372, 40, 40, 377, 40, 40, 380, 40, 40,
612 381, 382, 379, 40, 40, 40, 40, 378, 383, 40,
613 40, 40, 40, 40, 385, 40, 40, 40, 389, 386,
614 40, 384, 387, 390, 40, 393, 391, 40, 40, 388,
615 392, 40, 397, 396, 40, 400, 394, 40, 395, 401,
616 40, 40, 398, 40, 399, 40, 407, 40, 40, 40,
617 40, 40, 405, 402, 406, 40, 408, 40, 410, 403,
618 414, 40, 40, 409, 404, 40, 40, 40, 412, 40,
619 40, 40, 40, 411, 413, 415, 40, 420, 416, 40,
620 40, 40, 40, 40, 418, 424, 417, 40, 40, 423,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000621
Robert Bocchino2def1b32006-01-17 20:06:25 +0000622 419, 40, 40, 40, 422, 40, 40, 40, 40, 421,
623 425, 37, 37, 37, 37, 39, 39, 50, 40, 50,
624 50, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000625 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
626 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Nate Begeman14b05292005-11-05 09:21:28 +0000627 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattnere869eef2005-11-12 00:11:49 +0000628 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Robert Bocchino9c62b562006-01-10 19:04:32 +0000629 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000630 40, 40, 40, 40, 40, 191, 40, 40, 40, 40,
631 107, 40, 38, 426, 3, 426, 426, 426, 426, 426,
Chris Lattnere869eef2005-11-12 00:11:49 +0000632
Robert Bocchino2def1b32006-01-17 20:06:25 +0000633 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
634 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
635 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
636 426, 426, 426, 426, 426, 426
Reid Spencer68a24bd2005-08-27 18:50:39 +0000637 } ;
638
Robert Bocchino2def1b32006-01-17 20:06:25 +0000639static yyconst short int yy_chk[937] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000640 { 0,
641 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
642 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
643 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
644 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
645 1, 9, 29, 9, 9, 10, 10, 11, 11, 11,
646 12, 29, 55, 12, 13, 13, 13, 13, 14, 14,
647 14, 14, 16, 55, 18, 17, 34, 19, 81, 18,
648 16, 18, 20, 81, 17, 34, 19, 16, 17, 16,
649 19, 16, 18, 17, 13, 19, 17, 21, 22, 20,
650 23, 24, 21, 25, 26, 27, 24, 22, 25, 20,
651
Nate Begeman14b05292005-11-05 09:21:28 +0000652 77, 28, 21, 22, 24, 31, 23, 23, 21, 24,
653 31, 54, 26, 28, 27, 77, 27, 25, 26, 28,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000654 30, 35, 30, 31, 33, 57, 31, 36, 30, 33,
655 54, 30, 46, 31, 30, 46, 36, 42, 42, 35,
656 43, 43, 33, 57, 68, 30, 30, 51, 30, 32,
Nate Begeman14b05292005-11-05 09:21:28 +0000657 52, 32, 44, 44, 44, 51, 56, 32, 45, 45,
658 45, 45, 68, 52, 32, 52, 32, 56, 32, 47,
659 47, 47, 63, 32, 47, 48, 48, 48, 48, 53,
660 47, 49, 49, 49, 59, 49, 49, 53, 49, 49,
661 49, 49, 49, 49, 60, 61, 62, 63, 64, 59,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000662
Nate Begeman14b05292005-11-05 09:21:28 +0000663 65, 60, 66, 62, 67, 69, 59, 70, 65, 66,
664 61, 71, 61, 72, 69, 62, 73, 74, 83, 67,
665 75, 78, 64, 74, 79, 66, 67, 80, 76, 71,
Robert Bocchino2def1b32006-01-17 20:06:25 +0000666 70, 83, 72, 76, 85, 84, 78, 75, 73, 73,
667 86, 73, 80, 75, 87, 76, 88, 79, 84, 92,
668 85, 98, 91, 88, 97, 89, 90, 85, 91, 101,
669 96, 88, 92, 99, 93, 95, 431, 86, 98, 88,
670 89, 101, 87, 89, 90, 100, 89, 93, 95, 96,
671 103, 99, 97, 100, 105, 93, 102, 104, 100, 95,
672 102, 102, 104, 103, 106, 103, 100, 109, 109, 110,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000673
Robert Bocchino2def1b32006-01-17 20:06:25 +0000674 110, 100, 116, 102, 110, 105, 112, 112, 112, 117,
675 110, 112, 124, 116, 122, 106, 119, 112, 113, 113,
676 120, 113, 113, 113, 123, 119, 126, 117, 127, 122,
677 128, 129, 131, 120, 126, 124, 132, 135, 131, 123,
678 136, 429, 133, 134, 425, 128, 129, 138, 137, 132,
679 127, 133, 134, 137, 140, 141, 138, 139, 142, 135,
680 140, 144, 143, 136, 134, 145, 139, 142, 146, 147,
681 141, 143, 148, 149, 145, 150, 153, 154, 156, 144,
682 148, 160, 146, 271, 149, 162, 194, 194, 161, 271,
683 150, 153, 147, 165, 162, 156, 167, 154, 159, 159,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000684
Robert Bocchino2def1b32006-01-17 20:06:25 +0000685 170, 169, 159, 159, 160, 159, 159, 159, 159, 159,
686 159, 161, 163, 172, 165, 170, 173, 167, 175, 171,
687 176, 163, 174, 163, 169, 173, 178, 163, 177, 163,
688 171, 174, 172, 179, 181, 178, 182, 180, 184, 183,
689 185, 175, 190, 176, 183, 177, 180, 181, 186, 185,
690 179, 188, 187, 206, 182, 423, 186, 187, 206, 184,
691 190, 192, 192, 197, 199, 188, 192, 193, 193, 205,
692 193, 193, 192, 195, 195, 195, 196, 196, 196, 198,
693 197, 199, 200, 204, 207, 208, 198, 210, 209, 211,
694 204, 212, 205, 209, 213, 214, 212, 207, 215, 200,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000695
Robert Bocchino2def1b32006-01-17 20:06:25 +0000696 208, 217, 214, 213, 218, 219, 210, 220, 221, 218,
697 211, 222, 223, 224, 219, 225, 217, 228, 230, 235,
698 231, 215, 422, 233, 234, 222, 235, 223, 220, 221,
699 225, 224, 233, 236, 240, 228, 237, 234, 238, 239,
700 241, 244, 230, 231, 242, 237, 248, 238, 239, 241,
701 244, 242, 245, 236, 250, 248, 251, 240, 252, 237,
702 254, 238, 255, 253, 256, 250, 251, 245, 253, 257,
703 258, 252, 260, 262, 263, 263, 265, 254, 270, 266,
704 257, 265, 268, 255, 273, 256, 262, 266, 269, 268,
705 274, 272, 275, 269, 282, 260, 276, 258, 278, 270,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000706
Robert Bocchino2def1b32006-01-17 20:06:25 +0000707 272, 273, 280, 276, 281, 278, 283, 284, 285, 275,
708 282, 280, 288, 274, 287, 289, 290, 285, 291, 281,
709 293, 288, 289, 294, 284, 290, 304, 291, 303, 283,
710 305, 287, 309, 312, 310, 311, 313, 315, 293, 305,
711 303, 310, 317, 311, 316, 319, 294, 313, 321, 304,
712 323, 328, 322, 330, 332, 309, 312, 316, 319, 317,
713 315, 322, 327, 332, 333, 321, 334, 327, 336, 330,
714 340, 334, 323, 333, 328, 336, 341, 346, 355, 352,
715 347, 354, 353, 361, 358, 365, 420, 359, 360, 362,
716 346, 340, 347, 341, 352, 353, 359, 360, 354, 358,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000717
Robert Bocchino2def1b32006-01-17 20:06:25 +0000718 361, 355, 363, 364, 362, 367, 368, 365, 370, 369,
719 367, 368, 364, 371, 374, 375, 376, 363, 369, 377,
720 380, 381, 384, 390, 371, 387, 389, 399, 377, 374,
721 392, 370, 375, 380, 382, 384, 381, 386, 388, 376,
722 382, 391, 389, 388, 393, 392, 386, 394, 387, 393,
723 395, 396, 390, 397, 391, 398, 399, 400, 401, 402,
724 403, 407, 397, 394, 398, 404, 400, 405, 402, 395,
725 407, 410, 409, 401, 396, 411, 412, 413, 404, 414,
726 415, 416, 418, 403, 405, 409, 421, 414, 410, 424,
727 419, 417, 408, 406, 412, 421, 411, 385, 383, 418,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000728
Robert Bocchino2def1b32006-01-17 20:06:25 +0000729 413, 379, 378, 373, 416, 372, 366, 357, 356, 415,
730 424, 427, 427, 427, 427, 428, 428, 430, 351, 430,
731 430, 350, 349, 348, 345, 344, 343, 342, 339, 338,
732 337, 335, 331, 329, 326, 325, 324, 320, 318, 314,
733 308, 307, 306, 302, 301, 300, 299, 298, 297, 296,
734 295, 292, 286, 279, 277, 267, 264, 261, 259, 249,
735 247, 246, 243, 229, 227, 226, 216, 203, 202, 201,
736 189, 168, 166, 164, 158, 157, 155, 152, 151, 130,
737 125, 121, 118, 115, 111, 107, 94, 82, 58, 39,
738 37, 8, 7, 3, 426, 426, 426, 426, 426, 426,
Chris Lattnere869eef2005-11-12 00:11:49 +0000739
Robert Bocchino2def1b32006-01-17 20:06:25 +0000740 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
741 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
742 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
743 426, 426, 426, 426, 426, 426
Reid Spencer68a24bd2005-08-27 18:50:39 +0000744 } ;
745
746static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
747static char *yy_full_match;
748static int yy_lp;
749#define REJECT \
750{ \
751*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
752yy_cp = yy_full_match; /* restore poss. backed-over text */ \
753++yy_lp; \
754goto find_rule; \
755}
756#define yymore() yymore_used_but_not_detected
757#define YY_MORE_ADJ 0
758#define YY_RESTORE_YY_MORE_OFFSET
759char *yytext;
Robert Bocchino2def1b32006-01-17 20:06:25 +0000760#line 1 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000761#define INITIAL 0
762/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
763//
764// The LLVM Compiler Infrastructure
765//
766// This file was developed by the LLVM research group and is distributed under
767// the University of Illinois Open Source License. See LICENSE.TXT for details.
768//
769//===----------------------------------------------------------------------===//
770//
771// This file implements the flex scanner for LLVM assembly languages files.
772//
773//===----------------------------------------------------------------------===*/
774#define YY_NEVER_INTERACTIVE 1
Robert Bocchino2def1b32006-01-17 20:06:25 +0000775#line 28 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000776#include "ParserInternals.h"
777#include "llvm/Module.h"
778#include <list>
779#include "llvmAsmParser.h"
780#include <cctype>
781#include <cstdlib>
782
783void set_scan_file(FILE * F){
784 yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) );
785}
786void set_scan_string (const char * str) {
787 yy_scan_string (str);
788}
789
790#define RET_TOK(type, Enum, sym) \
791 llvmAsmlval.type = Instruction::Enum; return sym
792
793namespace llvm {
794
795// TODO: All of the static identifiers are figured out by the lexer,
796// these should be hashed to reduce the lexer size
797
798
799// atoull - Convert an ascii string of decimal digits into the unsigned long
800// long representation... this does not have to do input error checking,
801// because we know that the input will be matched by a suitable regex...
802//
803static uint64_t atoull(const char *Buffer) {
804 uint64_t Result = 0;
805 for (; *Buffer; Buffer++) {
806 uint64_t OldRes = Result;
807 Result *= 10;
808 Result += *Buffer-'0';
809 if (Result < OldRes) // Uh, oh, overflow detected!!!
810 ThrowException("constant bigger than 64 bits detected!");
811 }
812 return Result;
813}
814
815static uint64_t HexIntToVal(const char *Buffer) {
816 uint64_t Result = 0;
817 for (; *Buffer; ++Buffer) {
818 uint64_t OldRes = Result;
819 Result *= 16;
820 char C = *Buffer;
821 if (C >= '0' && C <= '9')
822 Result += C-'0';
823 else if (C >= 'A' && C <= 'F')
824 Result += C-'A'+10;
825 else if (C >= 'a' && C <= 'f')
826 Result += C-'a'+10;
827
828 if (Result < OldRes) // Uh, oh, overflow detected!!!
829 ThrowException("constant bigger than 64 bits detected!");
830 }
831 return Result;
832}
833
834
835// HexToFP - Convert the ascii string in hexidecimal format to the floating
836// point representation of it.
837//
838static double HexToFP(const char *Buffer) {
839 // Behave nicely in the face of C TBAA rules... see:
840 // http://www.nullstone.com/htmls/category/aliastyp.htm
841 union {
842 uint64_t UI;
843 double FP;
844 } UIntToFP;
845 UIntToFP.UI = HexIntToVal(Buffer);
846
847 assert(sizeof(double) == sizeof(uint64_t) &&
848 "Data sizes incompatible on this target!");
849 return UIntToFP.FP; // Cast Hex constant to double
850}
851
852
853// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
854// appropriate character. If AllowNull is set to false, a \00 value will cause
855// an exception to be thrown.
856//
857// If AllowNull is set to true, the return value of the function points to the
858// last character of the string in memory.
859//
860char *UnEscapeLexed(char *Buffer, bool AllowNull) {
861 char *BOut = Buffer;
862 for (char *BIn = Buffer; *BIn; ) {
863 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
864 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
865 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
866 if (!AllowNull && !*BOut)
867 ThrowException("String literal cannot accept \\00 escape!");
868
869 BIn[3] = Tmp; // Restore character
870 BIn += 3; // Skip over handled chars
871 ++BOut;
872 } else {
873 *BOut++ = *BIn++;
874 }
875 }
876
877 return BOut;
878}
879
880} // End llvm namespace
881
882using namespace llvm;
883
884#define YY_NEVER_INTERACTIVE 1
885/* Comments start with a ; and go till end of line */
886/* Variable(Value) identifiers start with a % sign */
887/* Label identifiers end with a colon */
888/* Quoted names can contain any character except " and \ */
889/* [PN]Integer: match positive and negative literal integer values that
890 * are preceeded by a '%' character. These represent unnamed variable slots.
891 */
892/* E[PN]Integer: match positive and negative literal integer values */
893/* FPConstant - A Floating point constant.
894 */
895/* HexFPConstant - Floating point constant represented in IEEE format as a
896 * hexadecimal number for when exponential notation is not precise enough.
897 */
898/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
899 * it to deal with 64 bit numbers.
900 */
Robert Bocchino2def1b32006-01-17 20:06:25 +0000901#line 902 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000902
903/* Macros after this point can all be overridden by user definitions in
904 * section 1.
905 */
906
907#ifndef YY_SKIP_YYWRAP
908#ifdef __cplusplus
909extern "C" int yywrap YY_PROTO(( void ));
910#else
911extern int yywrap YY_PROTO(( void ));
912#endif
913#endif
914
915#ifndef YY_NO_UNPUT
916static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
917#endif
918
919#ifndef yytext_ptr
920static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
921#endif
922
923#ifdef YY_NEED_STRLEN
924static int yy_flex_strlen YY_PROTO(( yyconst char * ));
925#endif
926
927#ifndef YY_NO_INPUT
928#ifdef __cplusplus
929static int yyinput YY_PROTO(( void ));
930#else
931static int input YY_PROTO(( void ));
932#endif
933#endif
934
935#if YY_STACK_USED
936static int yy_start_stack_ptr = 0;
937static int yy_start_stack_depth = 0;
938static int *yy_start_stack = 0;
939#ifndef YY_NO_PUSH_STATE
940static void yy_push_state YY_PROTO(( int new_state ));
941#endif
942#ifndef YY_NO_POP_STATE
943static void yy_pop_state YY_PROTO(( void ));
944#endif
945#ifndef YY_NO_TOP_STATE
946static int yy_top_state YY_PROTO(( void ));
947#endif
948
949#else
950#define YY_NO_PUSH_STATE 1
951#define YY_NO_POP_STATE 1
952#define YY_NO_TOP_STATE 1
953#endif
954
955#ifdef YY_MALLOC_DECL
956YY_MALLOC_DECL
957#else
958#if __STDC__
959#ifndef __cplusplus
960#include <stdlib.h>
961#endif
962#else
963/* Just try to get by without declaring the routines. This will fail
964 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
965 * or sizeof(void*) != sizeof(int).
966 */
967#endif
968#endif
969
970/* Amount of stuff to slurp up with each read. */
971#ifndef YY_READ_BUF_SIZE
972#define YY_READ_BUF_SIZE 8192
973#endif
974
975/* Copy whatever the last rule matched to the standard output. */
976
977#ifndef ECHO
978/* This used to be an fputs(), but since the string might contain NUL's,
979 * we now use fwrite().
980 */
981#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
982#endif
983
984/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
985 * is returned in "result".
986 */
987#ifndef YY_INPUT
988#define YY_INPUT(buf,result,max_size) \
989 if ( yy_current_buffer->yy_is_interactive ) \
990 { \
991 int c = '*', n; \
992 for ( n = 0; n < max_size && \
993 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
994 buf[n] = (char) c; \
995 if ( c == '\n' ) \
996 buf[n++] = (char) c; \
997 if ( c == EOF && ferror( yyin ) ) \
998 YY_FATAL_ERROR( "input in flex scanner failed" ); \
999 result = n; \
1000 } \
1001 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1002 && ferror( yyin ) ) \
1003 YY_FATAL_ERROR( "input in flex scanner failed" );
1004#endif
1005
1006/* No semi-colon after return; correct usage is to write "yyterminate();" -
1007 * we don't want an extra ';' after the "return" because that will cause
1008 * some compilers to complain about unreachable statements.
1009 */
1010#ifndef yyterminate
1011#define yyterminate() return YY_NULL
1012#endif
1013
1014/* Number of entries by which start-condition stack grows. */
1015#ifndef YY_START_STACK_INCR
1016#define YY_START_STACK_INCR 25
1017#endif
1018
1019/* Report a fatal error. */
1020#ifndef YY_FATAL_ERROR
1021#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1022#endif
1023
1024/* Default declaration of generated scanner - a define so the user can
1025 * easily add parameters.
1026 */
1027#ifndef YY_DECL
1028#define YY_DECL int yylex YY_PROTO(( void ))
1029#endif
1030
1031/* Code executed at the beginning of each rule, after yytext and yyleng
1032 * have been set up.
1033 */
1034#ifndef YY_USER_ACTION
1035#define YY_USER_ACTION
1036#endif
1037
1038/* Code executed at the end of each rule. */
1039#ifndef YY_BREAK
1040#define YY_BREAK break;
1041#endif
1042
1043#define YY_RULE_SETUP \
1044 YY_USER_ACTION
1045
1046YY_DECL
1047 {
1048 register yy_state_type yy_current_state;
Nate Begeman14b05292005-11-05 09:21:28 +00001049 register char *yy_cp, *yy_bp;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001050 register int yy_act;
1051
Robert Bocchino2def1b32006-01-17 20:06:25 +00001052#line 179 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001053
1054
Robert Bocchino2def1b32006-01-17 20:06:25 +00001055#line 1056 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001056
1057 if ( yy_init )
1058 {
1059 yy_init = 0;
1060
1061#ifdef YY_USER_INIT
1062 YY_USER_INIT;
1063#endif
1064
1065 if ( ! yy_start )
1066 yy_start = 1; /* first start state */
1067
1068 if ( ! yyin )
1069 yyin = stdin;
1070
1071 if ( ! yyout )
1072 yyout = stdout;
1073
1074 if ( ! yy_current_buffer )
1075 yy_current_buffer =
1076 yy_create_buffer( yyin, YY_BUF_SIZE );
1077
1078 yy_load_buffer_state();
1079 }
1080
1081 while ( 1 ) /* loops until end-of-file is reached */
1082 {
1083 yy_cp = yy_c_buf_p;
1084
1085 /* Support of yytext. */
1086 *yy_cp = yy_hold_char;
1087
1088 /* yy_bp points to the position in yy_ch_buf of the start of
1089 * the current run.
1090 */
1091 yy_bp = yy_cp;
1092
1093 yy_current_state = yy_start;
1094 yy_state_ptr = yy_state_buf;
1095 *yy_state_ptr++ = yy_current_state;
1096yy_match:
1097 do
1098 {
1099 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1100 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1101 {
1102 yy_current_state = (int) yy_def[yy_current_state];
Robert Bocchino2def1b32006-01-17 20:06:25 +00001103 if ( yy_current_state >= 427 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001104 yy_c = yy_meta[(unsigned int) yy_c];
1105 }
1106 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1107 *yy_state_ptr++ = yy_current_state;
1108 ++yy_cp;
1109 }
Robert Bocchino2def1b32006-01-17 20:06:25 +00001110 while ( yy_current_state != 426 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001111
1112yy_find_action:
1113 yy_current_state = *--yy_state_ptr;
1114 yy_lp = yy_accept[yy_current_state];
1115find_rule: /* we branch to this label when backing up */
1116 for ( ; ; ) /* until we find what rule we matched */
1117 {
1118 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1119 {
1120 yy_act = yy_acclist[yy_lp];
1121 {
1122 yy_full_match = yy_cp;
1123 break;
1124 }
1125 }
1126 --yy_cp;
1127 yy_current_state = *--yy_state_ptr;
1128 yy_lp = yy_accept[yy_current_state];
1129 }
1130
1131 YY_DO_BEFORE_ACTION;
1132
1133 if ( yy_act != YY_END_OF_BUFFER )
1134 {
1135 int yyl;
1136 for ( yyl = 0; yyl < yyleng; ++yyl )
1137 if ( yytext[yyl] == '\n' )
1138 ++yylineno;
1139 }
1140
1141do_action: /* This label is used only to access EOF actions. */
1142
1143
1144 switch ( yy_act )
1145 { /* beginning of action switch */
1146case 1:
1147YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001148#line 181 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001149{ /* Ignore comments for now */ }
1150 YY_BREAK
1151case 2:
1152YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001153#line 183 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001154{ return BEGINTOK; }
1155 YY_BREAK
1156case 3:
1157YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001158#line 184 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001159{ return ENDTOK; }
1160 YY_BREAK
1161case 4:
1162YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001163#line 185 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001164{ return TRUETOK; }
1165 YY_BREAK
1166case 5:
1167YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001168#line 186 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001169{ return FALSETOK; }
1170 YY_BREAK
1171case 6:
1172YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001173#line 187 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001174{ return DECLARE; }
1175 YY_BREAK
1176case 7:
1177YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001178#line 188 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001179{ return GLOBAL; }
1180 YY_BREAK
1181case 8:
1182YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001183#line 189 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001184{ return CONSTANT; }
1185 YY_BREAK
1186case 9:
1187YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001188#line 190 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001189{ return INTERNAL; }
1190 YY_BREAK
1191case 10:
1192YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001193#line 191 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001194{ return LINKONCE; }
1195 YY_BREAK
1196case 11:
1197YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001198#line 192 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001199{ return WEAK; }
1200 YY_BREAK
1201case 12:
1202YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001203#line 193 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001204{ return APPENDING; }
1205 YY_BREAK
1206case 13:
1207YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001208#line 194 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001209{ return EXTERNAL; } /* Deprecated, turn into external */
1210 YY_BREAK
1211case 14:
1212YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001213#line 195 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001214{ return EXTERNAL; }
1215 YY_BREAK
1216case 15:
1217YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001218#line 196 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001219{ return IMPLEMENTATION; }
1220 YY_BREAK
1221case 16:
1222YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001223#line 197 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001224{ return ZEROINITIALIZER; }
1225 YY_BREAK
1226case 17:
1227YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001228#line 198 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001229{ return DOTDOTDOT; }
1230 YY_BREAK
1231case 18:
1232YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001233#line 199 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001234{ return UNDEF; }
1235 YY_BREAK
1236case 19:
1237YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001238#line 200 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001239{ return NULL_TOK; }
1240 YY_BREAK
1241case 20:
1242YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001243#line 201 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001244{ return TO; }
1245 YY_BREAK
1246case 21:
1247YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001248#line 202 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001249{ RET_TOK(TermOpVal, Unwind, UNWIND); }
1250 YY_BREAK
1251case 22:
1252YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001253#line 203 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001254{ return NOT; } /* Deprecated, turned into XOR */
1255 YY_BREAK
1256case 23:
1257YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001258#line 204 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001259{ return TAIL; }
1260 YY_BREAK
1261case 24:
1262YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001263#line 205 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001264{ return TARGET; }
1265 YY_BREAK
1266case 25:
1267YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001268#line 206 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001269{ return TRIPLE; }
1270 YY_BREAK
1271case 26:
1272YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001273#line 207 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001274{ return DEPLIBS; }
1275 YY_BREAK
1276case 27:
1277YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001278#line 208 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001279{ return ENDIAN; }
1280 YY_BREAK
1281case 28:
1282YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001283#line 209 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001284{ return POINTERSIZE; }
1285 YY_BREAK
1286case 29:
1287YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001288#line 210 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001289{ return LITTLE; }
1290 YY_BREAK
1291case 30:
1292YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001293#line 211 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001294{ return BIG; }
1295 YY_BREAK
1296case 31:
1297YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001298#line 212 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001299{ return VOLATILE; }
1300 YY_BREAK
1301case 32:
1302YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001303#line 213 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001304{ return ALIGN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001305 YY_BREAK
1306case 33:
1307YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001308#line 214 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001309{ return SECTION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001310 YY_BREAK
1311case 34:
1312YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001313#line 216 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001314{ return CC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001315 YY_BREAK
1316case 35:
1317YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001318#line 217 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001319{ return CCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001320 YY_BREAK
1321case 36:
1322YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001323#line 218 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001324{ return FASTCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001325 YY_BREAK
1326case 37:
1327YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001328#line 219 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001329{ return COLDCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001330 YY_BREAK
1331case 38:
1332YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001333#line 221 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001334{ llvmAsmlval.PrimType = Type::VoidTy ; return VOID; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001335 YY_BREAK
1336case 39:
1337YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001338#line 222 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001339{ llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001340 YY_BREAK
1341case 40:
1342YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001343#line 223 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001344{ llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001345 YY_BREAK
1346case 41:
1347YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001348#line 224 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001349{ llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001350 YY_BREAK
1351case 42:
1352YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001353#line 225 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001354{ llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001355 YY_BREAK
1356case 43:
1357YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001358#line 226 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001359{ llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001360 YY_BREAK
1361case 44:
1362YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001363#line 227 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001364{ llvmAsmlval.PrimType = Type::IntTy ; return INT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001365 YY_BREAK
1366case 45:
1367YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001368#line 228 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001369{ llvmAsmlval.PrimType = Type::UIntTy ; return UINT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001370 YY_BREAK
1371case 46:
1372YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001373#line 229 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001374{ llvmAsmlval.PrimType = Type::LongTy ; return LONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001375 YY_BREAK
1376case 47:
1377YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001378#line 230 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001379{ llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001380 YY_BREAK
1381case 48:
1382YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001383#line 231 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001384{ llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001385 YY_BREAK
1386case 49:
1387YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001388#line 232 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001389{ llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001390 YY_BREAK
1391case 50:
1392YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001393#line 233 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001394{ llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001395 YY_BREAK
1396case 51:
1397YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001398#line 234 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001399{ return TYPE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001400 YY_BREAK
1401case 52:
1402YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001403#line 235 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001404{ return OPAQUE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001405 YY_BREAK
1406case 53:
1407YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001408#line 237 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001409{ RET_TOK(BinaryOpVal, Add, ADD); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001410 YY_BREAK
1411case 54:
1412YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001413#line 238 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001414{ RET_TOK(BinaryOpVal, Sub, SUB); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001415 YY_BREAK
1416case 55:
1417YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001418#line 239 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001419{ RET_TOK(BinaryOpVal, Mul, MUL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001420 YY_BREAK
1421case 56:
1422YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001423#line 240 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001424{ RET_TOK(BinaryOpVal, Div, DIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001425 YY_BREAK
1426case 57:
1427YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001428#line 241 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001429{ RET_TOK(BinaryOpVal, Rem, REM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001430 YY_BREAK
1431case 58:
1432YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001433#line 242 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001434{ RET_TOK(BinaryOpVal, And, AND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001435 YY_BREAK
1436case 59:
1437YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001438#line 243 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001439{ RET_TOK(BinaryOpVal, Or , OR ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001440 YY_BREAK
1441case 60:
1442YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001443#line 244 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001444{ RET_TOK(BinaryOpVal, Xor, XOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001445 YY_BREAK
1446case 61:
1447YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001448#line 245 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001449{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001450 YY_BREAK
1451case 62:
1452YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001453#line 246 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001454{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001455 YY_BREAK
1456case 63:
1457YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001458#line 247 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001459{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001460 YY_BREAK
1461case 64:
1462YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001463#line 248 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001464{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001465 YY_BREAK
1466case 65:
1467YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001468#line 249 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001469{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001470 YY_BREAK
1471case 66:
1472YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001473#line 250 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001474{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001475 YY_BREAK
1476case 67:
1477YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001478#line 252 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001479{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001480 YY_BREAK
1481case 68:
1482YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001483#line 253 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001484{ RET_TOK(OtherOpVal, Call, CALL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001485 YY_BREAK
1486case 69:
1487YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001488#line 254 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001489{ RET_TOK(OtherOpVal, Cast, CAST); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001490 YY_BREAK
1491case 70:
1492YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001493#line 255 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001494{ RET_TOK(OtherOpVal, Select, SELECT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001495 YY_BREAK
1496case 71:
1497YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001498#line 256 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001499{ RET_TOK(OtherOpVal, Shl, SHL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001500 YY_BREAK
1501case 72:
1502YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001503#line 257 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001504{ RET_TOK(OtherOpVal, Shr, SHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001505 YY_BREAK
1506case 73:
1507YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001508#line 258 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001509{ return VANEXT_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001510 YY_BREAK
1511case 74:
1512YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001513#line 259 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001514{ return VAARG_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001515 YY_BREAK
1516case 75:
1517YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001518#line 260 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001519{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001520 YY_BREAK
1521case 76:
1522YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001523#line 261 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001524{ RET_TOK(TermOpVal, Ret, RET); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001525 YY_BREAK
1526case 77:
1527YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001528#line 262 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001529{ RET_TOK(TermOpVal, Br, BR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001530 YY_BREAK
1531case 78:
1532YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001533#line 263 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001534{ RET_TOK(TermOpVal, Switch, SWITCH); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001535 YY_BREAK
1536case 79:
1537YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001538#line 264 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001539{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001540 YY_BREAK
1541case 80:
1542YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001543#line 265 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001544{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001545 YY_BREAK
1546case 81:
1547YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001548#line 266 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001549{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001550 YY_BREAK
1551case 82:
1552YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001553#line 268 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001554{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001555 YY_BREAK
1556case 83:
1557YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001558#line 269 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001559{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001560 YY_BREAK
1561case 84:
1562YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001563#line 270 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001564{ RET_TOK(MemOpVal, Free, FREE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001565 YY_BREAK
1566case 85:
1567YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001568#line 271 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001569{ RET_TOK(MemOpVal, Load, LOAD); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001570 YY_BREAK
1571case 86:
1572YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001573#line 272 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001574{ RET_TOK(MemOpVal, Store, STORE); }
Nate Begeman14b05292005-11-05 09:21:28 +00001575 YY_BREAK
1576case 87:
1577YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001578#line 273 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Chris Lattnere869eef2005-11-12 00:11:49 +00001579{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
1580 YY_BREAK
1581case 88:
1582YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001583#line 275 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Robert Bocchino9c62b562006-01-10 19:04:32 +00001584{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
1585 YY_BREAK
1586case 89:
1587YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001588#line 276 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
1589{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
1590 YY_BREAK
1591case 90:
1592YY_RULE_SETUP
1593#line 279 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001594{
1595 UnEscapeLexed(yytext+1);
1596 llvmAsmlval.StrVal = strdup(yytext+1); // Skip %
1597 return VAR_ID;
1598 }
1599 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001600case 91:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001601YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001602#line 284 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001603{
1604 yytext[strlen(yytext)-1] = 0; // nuke colon
1605 UnEscapeLexed(yytext);
1606 llvmAsmlval.StrVal = strdup(yytext);
1607 return LABELSTR;
1608 }
1609 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001610case 92:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001611YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001612#line 290 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001613{
1614 yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
1615 UnEscapeLexed(yytext+1);
1616 llvmAsmlval.StrVal = strdup(yytext+1);
1617 return LABELSTR;
1618 }
1619 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001620case 93:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001621YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001622#line 297 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001623{ // Note that we cannot unescape a string constant here! The
1624 // string constant might contain a \00 which would not be
1625 // understood by the string stuff. It is valid to make a
1626 // [sbyte] c"Hello World\00" constant, for example.
1627 //
1628 yytext[strlen(yytext)-1] = 0; // nuke end quote
1629 llvmAsmlval.StrVal = strdup(yytext+1); // Nuke start quote
1630 return STRINGCONSTANT;
1631 }
1632 YY_BREAK
Robert Bocchino9c62b562006-01-10 19:04:32 +00001633case 94:
1634YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001635#line 308 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
1636{ llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; }
1637 YY_BREAK
1638case 95:
1639YY_RULE_SETUP
1640#line 309 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001641{
1642 uint64_t Val = atoull(yytext+1);
1643 // +1: we have bigger negative range
1644 if (Val > (uint64_t)INT64_MAX+1)
1645 ThrowException("Constant too large for signed 64 bits!");
1646 llvmAsmlval.SInt64Val = -Val;
1647 return ESINT64VAL;
1648 }
1649 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001650case 96:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001651YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001652#line 317 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001653{
1654 llvmAsmlval.UInt64Val = HexIntToVal(yytext+3);
1655 return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
1656 }
1657 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001658case 97:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001659YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001660#line 322 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001661{
1662 uint64_t Val = atoull(yytext+1);
1663 if ((unsigned)Val != Val)
1664 ThrowException("Invalid value number (too large)!");
1665 llvmAsmlval.UIntVal = unsigned(Val);
1666 return UINTVAL;
1667 }
1668 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001669case 98:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001670YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001671#line 329 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001672{
1673 uint64_t Val = atoull(yytext+2);
1674 // +1: we have bigger negative range
1675 if (Val > (uint64_t)INT32_MAX+1)
1676 ThrowException("Constant too large for signed 32 bits!");
1677 llvmAsmlval.SIntVal = (int)-Val;
1678 return SINTVAL;
1679 }
1680 YY_BREAK
Robert Bocchino9c62b562006-01-10 19:04:32 +00001681case 99:
1682YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001683#line 338 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
1684{ llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
1685 YY_BREAK
1686case 100:
1687YY_RULE_SETUP
1688#line 339 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001689{ llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
1690 YY_BREAK
1691case YY_STATE_EOF(INITIAL):
Robert Bocchino2def1b32006-01-17 20:06:25 +00001692#line 341 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001693{
1694 /* Make sure to free the internal buffers for flex when we are
1695 * done reading our input!
1696 */
1697 yy_delete_buffer(YY_CURRENT_BUFFER);
1698 return EOF;
1699 }
1700 YY_BREAK
Chris Lattnere869eef2005-11-12 00:11:49 +00001701case 101:
1702YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001703#line 349 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
1704{ /* Ignore whitespace */ }
Robert Bocchino9c62b562006-01-10 19:04:32 +00001705 YY_BREAK
1706case 102:
1707YY_RULE_SETUP
Robert Bocchino2def1b32006-01-17 20:06:25 +00001708#line 350 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
1709{ return yytext[0]; }
1710 YY_BREAK
1711case 103:
1712YY_RULE_SETUP
1713#line 352 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001714YY_FATAL_ERROR( "flex scanner jammed" );
1715 YY_BREAK
Robert Bocchino2def1b32006-01-17 20:06:25 +00001716#line 1717 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001717
1718 case YY_END_OF_BUFFER:
1719 {
1720 /* Amount of text matched not including the EOB char. */
1721 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1722
1723 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1724 *yy_cp = yy_hold_char;
1725 YY_RESTORE_YY_MORE_OFFSET
1726
1727 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1728 {
1729 /* We're scanning a new file or input source. It's
1730 * possible that this happened because the user
1731 * just pointed yyin at a new source and called
1732 * yylex(). If so, then we have to assure
1733 * consistency between yy_current_buffer and our
1734 * globals. Here is the right place to do so, because
1735 * this is the first action (other than possibly a
1736 * back-up) that will match for the new input source.
1737 */
1738 yy_n_chars = yy_current_buffer->yy_n_chars;
1739 yy_current_buffer->yy_input_file = yyin;
1740 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1741 }
1742
1743 /* Note that here we test for yy_c_buf_p "<=" to the position
1744 * of the first EOB in the buffer, since yy_c_buf_p will
1745 * already have been incremented past the NUL character
1746 * (since all states make transitions on EOB to the
1747 * end-of-buffer state). Contrast this with the test
1748 * in input().
1749 */
1750 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1751 { /* This was really a NUL. */
1752 yy_state_type yy_next_state;
1753
1754 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1755
1756 yy_current_state = yy_get_previous_state();
1757
1758 /* Okay, we're now positioned to make the NUL
1759 * transition. We couldn't have
1760 * yy_get_previous_state() go ahead and do it
1761 * for us because it doesn't know how to deal
1762 * with the possibility of jamming (and we don't
1763 * want to build jamming into it because then it
1764 * will run more slowly).
1765 */
1766
1767 yy_next_state = yy_try_NUL_trans( yy_current_state );
1768
1769 yy_bp = yytext_ptr + YY_MORE_ADJ;
1770
1771 if ( yy_next_state )
1772 {
1773 /* Consume the NUL. */
1774 yy_cp = ++yy_c_buf_p;
1775 yy_current_state = yy_next_state;
1776 goto yy_match;
1777 }
1778
1779 else
1780 {
1781 yy_cp = yy_c_buf_p;
1782 goto yy_find_action;
1783 }
1784 }
1785
1786 else switch ( yy_get_next_buffer() )
1787 {
1788 case EOB_ACT_END_OF_FILE:
1789 {
1790 yy_did_buffer_switch_on_eof = 0;
1791
1792 if ( yywrap() )
1793 {
1794 /* Note: because we've taken care in
1795 * yy_get_next_buffer() to have set up
1796 * yytext, we can now set up
1797 * yy_c_buf_p so that if some total
1798 * hoser (like flex itself) wants to
1799 * call the scanner after we return the
1800 * YY_NULL, it'll still work - another
1801 * YY_NULL will get returned.
1802 */
1803 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1804
1805 yy_act = YY_STATE_EOF(YY_START);
1806 goto do_action;
1807 }
1808
1809 else
1810 {
1811 if ( ! yy_did_buffer_switch_on_eof )
1812 YY_NEW_FILE;
1813 }
1814 break;
1815 }
1816
1817 case EOB_ACT_CONTINUE_SCAN:
1818 yy_c_buf_p =
1819 yytext_ptr + yy_amount_of_matched_text;
1820
1821 yy_current_state = yy_get_previous_state();
1822
1823 yy_cp = yy_c_buf_p;
1824 yy_bp = yytext_ptr + YY_MORE_ADJ;
1825 goto yy_match;
1826
1827 case EOB_ACT_LAST_MATCH:
1828 yy_c_buf_p =
1829 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1830
1831 yy_current_state = yy_get_previous_state();
1832
1833 yy_cp = yy_c_buf_p;
1834 yy_bp = yytext_ptr + YY_MORE_ADJ;
1835 goto yy_find_action;
1836 }
1837 break;
1838 }
1839
1840 default:
1841 YY_FATAL_ERROR(
1842 "fatal flex scanner internal error--no action found" );
1843 } /* end of action switch */
1844 } /* end of scanning one token */
1845 } /* end of yylex */
1846
1847
1848/* yy_get_next_buffer - try to read in a new buffer
1849 *
1850 * Returns a code representing an action:
1851 * EOB_ACT_LAST_MATCH -
1852 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1853 * EOB_ACT_END_OF_FILE - end of file
1854 */
1855
1856static int yy_get_next_buffer()
1857 {
1858 register char *dest = yy_current_buffer->yy_ch_buf;
1859 register char *source = yytext_ptr;
1860 register int number_to_move, i;
1861 int ret_val;
1862
1863 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1864 YY_FATAL_ERROR(
1865 "fatal flex scanner internal error--end of buffer missed" );
1866
1867 if ( yy_current_buffer->yy_fill_buffer == 0 )
1868 { /* Don't try to fill the buffer, so this is an EOF. */
1869 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1870 {
1871 /* We matched a single character, the EOB, so
1872 * treat this as a final EOF.
1873 */
1874 return EOB_ACT_END_OF_FILE;
1875 }
1876
1877 else
1878 {
1879 /* We matched some text prior to the EOB, first
1880 * process it.
1881 */
1882 return EOB_ACT_LAST_MATCH;
1883 }
1884 }
1885
1886 /* Try to read more data. */
1887
1888 /* First move last chars to start of buffer. */
1889 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1890
1891 for ( i = 0; i < number_to_move; ++i )
1892 *(dest++) = *(source++);
1893
1894 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1895 /* don't do the read, it's not guaranteed to return an EOF,
1896 * just force an EOF
1897 */
1898 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1899
1900 else
1901 {
1902 int num_to_read =
1903 yy_current_buffer->yy_buf_size - number_to_move - 1;
1904
1905 while ( num_to_read <= 0 )
1906 { /* Not enough room in the buffer - grow it. */
1907#ifdef YY_USES_REJECT
1908 YY_FATAL_ERROR(
1909"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1910#else
1911
1912 /* just a shorter name for the current buffer */
1913 YY_BUFFER_STATE b = yy_current_buffer;
1914
1915 int yy_c_buf_p_offset =
1916 (int) (yy_c_buf_p - b->yy_ch_buf);
1917
1918 if ( b->yy_is_our_buffer )
1919 {
1920 int new_size = b->yy_buf_size * 2;
1921
1922 if ( new_size <= 0 )
1923 b->yy_buf_size += b->yy_buf_size / 8;
1924 else
1925 b->yy_buf_size *= 2;
1926
1927 b->yy_ch_buf = (char *)
1928 /* Include room in for 2 EOB chars. */
1929 yy_flex_realloc( (void *) b->yy_ch_buf,
1930 b->yy_buf_size + 2 );
1931 }
1932 else
1933 /* Can't grow it, we don't own it. */
1934 b->yy_ch_buf = 0;
1935
1936 if ( ! b->yy_ch_buf )
1937 YY_FATAL_ERROR(
1938 "fatal error - scanner input buffer overflow" );
1939
1940 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1941
1942 num_to_read = yy_current_buffer->yy_buf_size -
1943 number_to_move - 1;
1944#endif
1945 }
1946
1947 if ( num_to_read > YY_READ_BUF_SIZE )
1948 num_to_read = YY_READ_BUF_SIZE;
1949
1950 /* Read in more data. */
1951 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1952 yy_n_chars, num_to_read );
1953
1954 yy_current_buffer->yy_n_chars = yy_n_chars;
1955 }
1956
1957 if ( yy_n_chars == 0 )
1958 {
1959 if ( number_to_move == YY_MORE_ADJ )
1960 {
1961 ret_val = EOB_ACT_END_OF_FILE;
1962 yyrestart( yyin );
1963 }
1964
1965 else
1966 {
1967 ret_val = EOB_ACT_LAST_MATCH;
1968 yy_current_buffer->yy_buffer_status =
1969 YY_BUFFER_EOF_PENDING;
1970 }
1971 }
1972
1973 else
1974 ret_val = EOB_ACT_CONTINUE_SCAN;
1975
1976 yy_n_chars += number_to_move;
1977 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1978 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1979
1980 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1981
1982 return ret_val;
1983 }
1984
1985
1986/* yy_get_previous_state - get the state just before the EOB char was reached */
1987
1988static yy_state_type yy_get_previous_state()
1989 {
1990 register yy_state_type yy_current_state;
1991 register char *yy_cp;
1992
1993 yy_current_state = yy_start;
1994 yy_state_ptr = yy_state_buf;
1995 *yy_state_ptr++ = yy_current_state;
1996
1997 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1998 {
1999 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2000 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2001 {
2002 yy_current_state = (int) yy_def[yy_current_state];
Robert Bocchino2def1b32006-01-17 20:06:25 +00002003 if ( yy_current_state >= 427 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002004 yy_c = yy_meta[(unsigned int) yy_c];
2005 }
2006 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2007 *yy_state_ptr++ = yy_current_state;
2008 }
2009
2010 return yy_current_state;
2011 }
2012
2013
2014/* yy_try_NUL_trans - try to make a transition on the NUL character
2015 *
2016 * synopsis
2017 * next_state = yy_try_NUL_trans( current_state );
2018 */
2019
2020#ifdef YY_USE_PROTOS
2021static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2022#else
2023static yy_state_type yy_try_NUL_trans( yy_current_state )
2024yy_state_type yy_current_state;
2025#endif
2026 {
2027 register int yy_is_jam;
2028
2029 register YY_CHAR yy_c = 1;
2030 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2031 {
2032 yy_current_state = (int) yy_def[yy_current_state];
Robert Bocchino2def1b32006-01-17 20:06:25 +00002033 if ( yy_current_state >= 427 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002034 yy_c = yy_meta[(unsigned int) yy_c];
2035 }
2036 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Robert Bocchino2def1b32006-01-17 20:06:25 +00002037 yy_is_jam = (yy_current_state == 426);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002038 if ( ! yy_is_jam )
2039 *yy_state_ptr++ = yy_current_state;
2040
2041 return yy_is_jam ? 0 : yy_current_state;
2042 }
2043
2044
2045#ifndef YY_NO_UNPUT
2046#ifdef YY_USE_PROTOS
2047static inline void yyunput( int c, register char *yy_bp )
2048#else
2049static inline void yyunput( c, yy_bp )
2050int c;
2051register char *yy_bp;
2052#endif
2053 {
2054 register char *yy_cp = yy_c_buf_p;
2055
2056 /* undo effects of setting up yytext */
2057 *yy_cp = yy_hold_char;
2058
2059 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2060 { /* need to shift things up to make room */
2061 /* +2 for EOB chars. */
2062 register int number_to_move = yy_n_chars + 2;
2063 register char *dest = &yy_current_buffer->yy_ch_buf[
2064 yy_current_buffer->yy_buf_size + 2];
2065 register char *source =
2066 &yy_current_buffer->yy_ch_buf[number_to_move];
2067
2068 while ( source > yy_current_buffer->yy_ch_buf )
2069 *--dest = *--source;
2070
2071 yy_cp += (int) (dest - source);
2072 yy_bp += (int) (dest - source);
2073 yy_current_buffer->yy_n_chars =
2074 yy_n_chars = yy_current_buffer->yy_buf_size;
2075
2076 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2077 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2078 }
2079
2080 *--yy_cp = (char) c;
2081
2082 if ( c == '\n' )
2083 --yylineno;
2084
2085 yytext_ptr = yy_bp;
2086 yy_hold_char = *yy_cp;
2087 yy_c_buf_p = yy_cp;
2088 }
2089#endif /* ifndef YY_NO_UNPUT */
2090
2091
Reid Spencer68a24bd2005-08-27 18:50:39 +00002092#ifdef __cplusplus
2093static int yyinput()
2094#else
2095static int input()
2096#endif
2097 {
2098 int c;
2099
2100 *yy_c_buf_p = yy_hold_char;
2101
2102 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2103 {
2104 /* yy_c_buf_p now points to the character we want to return.
2105 * If this occurs *before* the EOB characters, then it's a
2106 * valid NUL; if not, then we've hit the end of the buffer.
2107 */
2108 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2109 /* This was really a NUL. */
2110 *yy_c_buf_p = '\0';
2111
2112 else
2113 { /* need more input */
2114 int offset = yy_c_buf_p - yytext_ptr;
2115 ++yy_c_buf_p;
2116
2117 switch ( yy_get_next_buffer() )
2118 {
2119 case EOB_ACT_LAST_MATCH:
2120 /* This happens because yy_g_n_b()
2121 * sees that we've accumulated a
2122 * token and flags that we need to
2123 * try matching the token before
2124 * proceeding. But for input(),
2125 * there's no matching to consider.
2126 * So convert the EOB_ACT_LAST_MATCH
2127 * to EOB_ACT_END_OF_FILE.
2128 */
2129
2130 /* Reset buffer status. */
2131 yyrestart( yyin );
2132
2133 /* fall through */
2134
2135 case EOB_ACT_END_OF_FILE:
2136 {
2137 if ( yywrap() )
2138 return EOF;
2139
2140 if ( ! yy_did_buffer_switch_on_eof )
2141 YY_NEW_FILE;
2142#ifdef __cplusplus
2143 return yyinput();
2144#else
2145 return input();
2146#endif
2147 }
2148
2149 case EOB_ACT_CONTINUE_SCAN:
2150 yy_c_buf_p = yytext_ptr + offset;
2151 break;
2152 }
2153 }
2154 }
2155
2156 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2157 *yy_c_buf_p = '\0'; /* preserve yytext */
2158 yy_hold_char = *++yy_c_buf_p;
2159
2160 if ( c == '\n' )
2161 ++yylineno;
2162
2163 return c;
2164 }
Nate Begeman14b05292005-11-05 09:21:28 +00002165
Reid Spencer68a24bd2005-08-27 18:50:39 +00002166
2167#ifdef YY_USE_PROTOS
2168void yyrestart( FILE *input_file )
2169#else
2170void yyrestart( input_file )
2171FILE *input_file;
2172#endif
2173 {
2174 if ( ! yy_current_buffer )
2175 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2176
2177 yy_init_buffer( yy_current_buffer, input_file );
2178 yy_load_buffer_state();
2179 }
2180
2181
2182#ifdef YY_USE_PROTOS
2183void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2184#else
2185void yy_switch_to_buffer( new_buffer )
2186YY_BUFFER_STATE new_buffer;
2187#endif
2188 {
2189 if ( yy_current_buffer == new_buffer )
2190 return;
2191
2192 if ( yy_current_buffer )
2193 {
2194 /* Flush out information for old buffer. */
2195 *yy_c_buf_p = yy_hold_char;
2196 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2197 yy_current_buffer->yy_n_chars = yy_n_chars;
2198 }
2199
2200 yy_current_buffer = new_buffer;
2201 yy_load_buffer_state();
2202
2203 /* We don't actually know whether we did this switch during
2204 * EOF (yywrap()) processing, but the only time this flag
2205 * is looked at is after yywrap() is called, so it's safe
2206 * to go ahead and always set it.
2207 */
2208 yy_did_buffer_switch_on_eof = 1;
2209 }
2210
2211
2212#ifdef YY_USE_PROTOS
2213void yy_load_buffer_state( void )
2214#else
2215void yy_load_buffer_state()
2216#endif
2217 {
2218 yy_n_chars = yy_current_buffer->yy_n_chars;
2219 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2220 yyin = yy_current_buffer->yy_input_file;
2221 yy_hold_char = *yy_c_buf_p;
2222 }
2223
2224
2225#ifdef YY_USE_PROTOS
2226YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2227#else
2228YY_BUFFER_STATE yy_create_buffer( file, size )
2229FILE *file;
2230int size;
2231#endif
2232 {
2233 YY_BUFFER_STATE b;
2234
2235 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2236 if ( ! b )
2237 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2238
2239 b->yy_buf_size = size;
2240
2241 /* yy_ch_buf has to be 2 characters longer than the size given because
2242 * we need to put in 2 end-of-buffer characters.
2243 */
2244 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2245 if ( ! b->yy_ch_buf )
2246 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2247
2248 b->yy_is_our_buffer = 1;
2249
2250 yy_init_buffer( b, file );
2251
2252 return b;
2253 }
2254
2255
2256#ifdef YY_USE_PROTOS
2257void yy_delete_buffer( YY_BUFFER_STATE b )
2258#else
2259void yy_delete_buffer( b )
2260YY_BUFFER_STATE b;
2261#endif
2262 {
2263 if ( ! b )
2264 return;
2265
2266 if ( b == yy_current_buffer )
2267 yy_current_buffer = (YY_BUFFER_STATE) 0;
2268
2269 if ( b->yy_is_our_buffer )
2270 yy_flex_free( (void *) b->yy_ch_buf );
2271
2272 yy_flex_free( (void *) b );
2273 }
2274
2275
Nate Begeman14b05292005-11-05 09:21:28 +00002276#ifndef YY_ALWAYS_INTERACTIVE
2277#ifndef YY_NEVER_INTERACTIVE
2278extern int isatty YY_PROTO(( int ));
2279#endif
2280#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +00002281
2282#ifdef YY_USE_PROTOS
2283void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2284#else
2285void yy_init_buffer( b, file )
2286YY_BUFFER_STATE b;
2287FILE *file;
2288#endif
2289
2290
2291 {
2292 yy_flush_buffer( b );
2293
2294 b->yy_input_file = file;
2295 b->yy_fill_buffer = 1;
2296
2297#if YY_ALWAYS_INTERACTIVE
2298 b->yy_is_interactive = 1;
2299#else
2300#if YY_NEVER_INTERACTIVE
2301 b->yy_is_interactive = 0;
2302#else
2303 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2304#endif
2305#endif
2306 }
2307
2308
2309#ifdef YY_USE_PROTOS
2310void yy_flush_buffer( YY_BUFFER_STATE b )
2311#else
2312void yy_flush_buffer( b )
2313YY_BUFFER_STATE b;
2314#endif
2315
2316 {
2317 if ( ! b )
2318 return;
2319
2320 b->yy_n_chars = 0;
2321
2322 /* We always need two end-of-buffer characters. The first causes
2323 * a transition to the end-of-buffer state. The second causes
2324 * a jam in that state.
2325 */
2326 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2327 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2328
2329 b->yy_buf_pos = &b->yy_ch_buf[0];
2330
2331 b->yy_at_bol = 1;
2332 b->yy_buffer_status = YY_BUFFER_NEW;
2333
2334 if ( b == yy_current_buffer )
2335 yy_load_buffer_state();
2336 }
2337
2338
2339#ifndef YY_NO_SCAN_BUFFER
2340#ifdef YY_USE_PROTOS
2341YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2342#else
2343YY_BUFFER_STATE yy_scan_buffer( base, size )
2344char *base;
2345yy_size_t size;
2346#endif
2347 {
2348 YY_BUFFER_STATE b;
2349
2350 if ( size < 2 ||
2351 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2352 base[size-1] != YY_END_OF_BUFFER_CHAR )
2353 /* They forgot to leave room for the EOB's. */
2354 return 0;
2355
2356 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2357 if ( ! b )
2358 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2359
2360 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2361 b->yy_buf_pos = b->yy_ch_buf = base;
2362 b->yy_is_our_buffer = 0;
2363 b->yy_input_file = 0;
2364 b->yy_n_chars = b->yy_buf_size;
2365 b->yy_is_interactive = 0;
2366 b->yy_at_bol = 1;
2367 b->yy_fill_buffer = 0;
2368 b->yy_buffer_status = YY_BUFFER_NEW;
2369
2370 yy_switch_to_buffer( b );
2371
2372 return b;
2373 }
2374#endif
2375
2376
2377#ifndef YY_NO_SCAN_STRING
2378#ifdef YY_USE_PROTOS
2379YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2380#else
2381YY_BUFFER_STATE yy_scan_string( yy_str )
2382yyconst char *yy_str;
2383#endif
2384 {
2385 int len;
2386 for ( len = 0; yy_str[len]; ++len )
2387 ;
2388
2389 return yy_scan_bytes( yy_str, len );
2390 }
2391#endif
2392
2393
2394#ifndef YY_NO_SCAN_BYTES
2395#ifdef YY_USE_PROTOS
2396YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2397#else
2398YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2399yyconst char *bytes;
2400int len;
2401#endif
2402 {
2403 YY_BUFFER_STATE b;
2404 char *buf;
2405 yy_size_t n;
2406 int i;
2407
2408 /* Get memory for full buffer, including space for trailing EOB's. */
2409 n = len + 2;
2410 buf = (char *) yy_flex_alloc( n );
2411 if ( ! buf )
2412 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2413
2414 for ( i = 0; i < len; ++i )
2415 buf[i] = bytes[i];
2416
2417 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2418
2419 b = yy_scan_buffer( buf, n );
2420 if ( ! b )
2421 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2422
2423 /* It's okay to grow etc. this buffer, and we should throw it
2424 * away when we're done.
2425 */
2426 b->yy_is_our_buffer = 1;
2427
2428 return b;
2429 }
2430#endif
2431
2432
2433#ifndef YY_NO_PUSH_STATE
2434#ifdef YY_USE_PROTOS
2435static void yy_push_state( int new_state )
2436#else
2437static void yy_push_state( new_state )
2438int new_state;
2439#endif
2440 {
2441 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2442 {
2443 yy_size_t new_size;
2444
2445 yy_start_stack_depth += YY_START_STACK_INCR;
2446 new_size = yy_start_stack_depth * sizeof( int );
2447
2448 if ( ! yy_start_stack )
2449 yy_start_stack = (int *) yy_flex_alloc( new_size );
2450
2451 else
2452 yy_start_stack = (int *) yy_flex_realloc(
2453 (void *) yy_start_stack, new_size );
2454
2455 if ( ! yy_start_stack )
2456 YY_FATAL_ERROR(
2457 "out of memory expanding start-condition stack" );
2458 }
2459
2460 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2461
2462 BEGIN(new_state);
2463 }
2464#endif
2465
2466
2467#ifndef YY_NO_POP_STATE
2468static void yy_pop_state()
2469 {
2470 if ( --yy_start_stack_ptr < 0 )
2471 YY_FATAL_ERROR( "start-condition stack underflow" );
2472
2473 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2474 }
2475#endif
2476
2477
2478#ifndef YY_NO_TOP_STATE
2479static int yy_top_state()
2480 {
2481 return yy_start_stack[yy_start_stack_ptr - 1];
2482 }
2483#endif
2484
2485#ifndef YY_EXIT_FAILURE
2486#define YY_EXIT_FAILURE 2
2487#endif
2488
2489#ifdef YY_USE_PROTOS
2490static void yy_fatal_error( yyconst char msg[] )
2491#else
2492static void yy_fatal_error( msg )
2493char msg[];
2494#endif
2495 {
2496 (void) fprintf( stderr, "%s\n", msg );
2497 exit( YY_EXIT_FAILURE );
2498 }
2499
2500
2501
2502/* Redefine yyless() so it works in section 3 code. */
2503
2504#undef yyless
2505#define yyless(n) \
2506 do \
2507 { \
2508 /* Undo effects of setting up yytext. */ \
2509 yytext[yyleng] = yy_hold_char; \
2510 yy_c_buf_p = yytext + n; \
2511 yy_hold_char = *yy_c_buf_p; \
2512 *yy_c_buf_p = '\0'; \
2513 yyleng = n; \
2514 } \
2515 while ( 0 )
2516
2517
2518/* Internal utility routines. */
2519
2520#ifndef yytext_ptr
2521#ifdef YY_USE_PROTOS
2522static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2523#else
2524static void yy_flex_strncpy( s1, s2, n )
2525char *s1;
2526yyconst char *s2;
2527int n;
2528#endif
2529 {
2530 register int i;
2531 for ( i = 0; i < n; ++i )
2532 s1[i] = s2[i];
2533 }
2534#endif
2535
2536#ifdef YY_NEED_STRLEN
2537#ifdef YY_USE_PROTOS
2538static int yy_flex_strlen( yyconst char *s )
2539#else
2540static int yy_flex_strlen( s )
2541yyconst char *s;
2542#endif
2543 {
2544 register int n;
2545 for ( n = 0; s[n]; ++n )
2546 ;
2547
2548 return n;
2549 }
2550#endif
2551
2552
2553#ifdef YY_USE_PROTOS
2554static void *yy_flex_alloc( yy_size_t size )
2555#else
2556static void *yy_flex_alloc( size )
2557yy_size_t size;
2558#endif
2559 {
2560 return (void *) malloc( size );
2561 }
2562
2563#ifdef YY_USE_PROTOS
2564static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2565#else
2566static inline void *yy_flex_realloc( ptr, size )
2567void *ptr;
2568yy_size_t size;
2569#endif
2570 {
2571 /* The cast to (char *) in the following accommodates both
2572 * implementations that use char* generic pointers, and those
2573 * that use void* generic pointers. It works with the latter
2574 * because both ANSI C and C++ allow castless assignment from
2575 * any pointer type to void*, and deal with argument conversions
2576 * as though doing an assignment.
2577 */
2578 return (void *) realloc( (char *) ptr, size );
2579 }
2580
2581#ifdef YY_USE_PROTOS
2582static void yy_flex_free( void *ptr )
2583#else
2584static void yy_flex_free( ptr )
2585void *ptr;
2586#endif
2587 {
2588 free( ptr );
2589 }
2590
2591#if YY_MAIN
2592int main()
2593 {
2594 yylex();
2595 return 0;
2596 }
2597#endif
Robert Bocchino2def1b32006-01-17 20:06:25 +00002598#line 352 "/Users/bocchino/llvm-checkin/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002599