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