blob: 93748f9cf178f58460cb45b11246fa177f9b761d [file] [log] [blame]
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001#line 2 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00003#line 4 "Lexer.cpp"
4
5#define YY_INT_ALIGNED short int
6
Chris Lattner224f84f2006-08-18 17:34:45 +00007/* A lexical scanner generated by flex */
Reid Spencer68a24bd2005-08-27 18:50:39 +00008
Reid Spencer68a24bd2005-08-27 18:50:39 +00009#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000012#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +000016
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000017/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
Reid Spencer68a24bd2005-08-27 18:50:39 +000020#include <stdio.h>
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000021#include <string.h>
22#include <errno.h>
23#include <stdlib.h>
Reid Spencer68a24bd2005-08-27 18:50:39 +000024
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000025/* end standard C headers. */
Reid Spencer68a24bd2005-08-27 18:50:39 +000026
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000027/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
Reid Spencer68a24bd2005-08-27 18:50:39 +000041#endif
42
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +000043#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57#endif /* ! C99 */
58
59/* Limits of integral types. */
60#ifndef INT8_MIN
61#define INT8_MIN (-128)
62#endif
63#ifndef INT16_MIN
64#define INT16_MIN (-32767-1)
65#endif
66#ifndef INT32_MIN
67#define INT32_MIN (-2147483647-1)
68#endif
69#ifndef INT8_MAX
70#define INT8_MAX (127)
71#endif
72#ifndef INT16_MAX
73#define INT16_MAX (32767)
74#endif
75#ifndef INT32_MAX
76#define INT32_MAX (2147483647)
77#endif
78#ifndef UINT8_MAX
79#define UINT8_MAX (255U)
80#endif
81#ifndef UINT16_MAX
82#define UINT16_MAX (65535U)
83#endif
84#ifndef UINT32_MAX
85#define UINT32_MAX (4294967295U)
86#endif
87
88#endif /* ! FLEXINT_H */
Reid Spencer68a24bd2005-08-27 18:50:39 +000089
90#ifdef __cplusplus
91
Reid Spencer68a24bd2005-08-27 18:50:39 +000092/* The "const" storage-class-modifier is valid. */
93#define YY_USE_CONST
94
95#else /* ! __cplusplus */
96
97#if __STDC__
98
Reid Spencer68a24bd2005-08-27 18:50:39 +000099#define YY_USE_CONST
100
101#endif /* __STDC__ */
102#endif /* ! __cplusplus */
103
Reid Spencer68a24bd2005-08-27 18:50:39 +0000104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
Reid Spencer68a24bd2005-08-27 18:50:39 +0000110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
113/* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120/* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
123 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000124#define BEGIN (yy_start) = 1 + 2 *
Reid Spencer68a24bd2005-08-27 18:50:39 +0000125
126/* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
128 * compatibility.
129 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000130#define YY_START (((yy_start) - 1) / 2)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000137#define YY_NEW_FILE llvmAsmrestart(llvmAsmin )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000142#ifndef YY_BUF_SIZE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000143#define YY_BUF_SIZE (16384*64)
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000144#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000145
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000146/* The state buf must be large enough to hold one state per character in the main buffer.
147 */
148#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151#define YY_TYPEDEF_YY_BUFFER_STATE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000152typedef struct yy_buffer_state *YY_BUFFER_STATE;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000153#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000154
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000155extern int llvmAsmleng;
156
157extern FILE *llvmAsmin, *llvmAsmout;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE llvmAsmlex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
169 */
170 #define YY_LESS_LINENO(n) \
171 do { \
172 int yyl;\
173 for ( yyl = n; yyl < llvmAsmleng; ++yyl )\
174 if ( llvmAsmtext[yyl] == '\n' )\
175 --llvmAsmlineno;\
176 }while(0)
177
178/* Return all but the first "n" matched characters back to the input stream. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000179#define yyless(n) \
180 do \
181 { \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000182 /* Undo effects of setting up llvmAsmtext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000186 YY_RESTORE_YY_MORE_OFFSET \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000189 } \
190 while ( 0 )
191
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000193
194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000198
199#ifndef YY_TYPEDEF_YY_SIZE_T
200#define YY_TYPEDEF_YY_SIZE_T
Reid Spencer68a24bd2005-08-27 18:50:39 +0000201typedef unsigned int yy_size_t;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000202#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000203
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000206struct yy_buffer_state
207 {
208 FILE *yy_input_file;
209
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
212
213 /* Size of input buffer in bytes, not including room for EOB
214 * characters.
215 */
216 yy_size_t yy_buf_size;
217
218 /* Number of characters read into yy_ch_buf, not including EOB
219 * characters.
220 */
221 int yy_n_chars;
222
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
225 * delete it.
226 */
227 int yy_is_our_buffer;
228
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
232 * each newline.
233 */
234 int yy_is_interactive;
235
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
238 * not.
239 */
240 int yy_at_bol;
241
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
Reid Spencer68a24bd2005-08-27 18:50:39 +0000245 /* Whether to try to fill the input buffer when we reach the
246 * end of it.
247 */
248 int yy_fill_buffer;
249
250 int yy_buffer_status;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000251
Reid Spencer68a24bd2005-08-27 18:50:39 +0000252#define YY_BUFFER_NEW 0
253#define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
259 *
260 * When we actually see the EOF, we change the status to "new"
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000261 * (via llvmAsmrestart()), so that the user can continue scanning by
262 * just pointing llvmAsmin at a new input file.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000263 */
264#define YY_BUFFER_EOF_PENDING 2
Reid Spencer68a24bd2005-08-27 18:50:39 +0000265
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000266 };
267#endif /* !YY_STRUCT_YY_BUFFER_STATE */
268
269/* Stack of input buffers. */
270static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000273
274/* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000277 *
278 * Returns the top of the stack, or NULL.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000279 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000283
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000284/* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
286 */
287#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
Reid Spencer68a24bd2005-08-27 18:50:39 +0000288
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000289/* yy_hold_char holds the character lost when llvmAsmtext is formed. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000290static char yy_hold_char;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000291static int yy_n_chars; /* number of characters read into yy_ch_buf */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000292int llvmAsmleng;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = (char *) 0;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000296static int yy_init = 0; /* whether we need to initialize */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000297static int yy_start = 0; /* start state number */
298
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000299/* Flag which is used to allow llvmAsmwrap()'s to do buffer switches
300 * instead of setting up a fresh llvmAsmin. A bit of a hack ...
Reid Spencer68a24bd2005-08-27 18:50:39 +0000301 */
302static int yy_did_buffer_switch_on_eof;
303
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000304void llvmAsmrestart (FILE *input_file );
305void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size );
307void llvmAsm_delete_buffer (YY_BUFFER_STATE b );
308void llvmAsm_flush_buffer (YY_BUFFER_STATE b );
309void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer );
310void llvmAsmpop_buffer_state (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000311
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000312static void llvmAsmensure_buffer_stack (void );
313static void llvmAsm_load_buffer_state (void );
314static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000315
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000316#define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000317
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000318YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size );
319YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str );
320YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000321
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000322void *llvmAsmalloc (yy_size_t );
323void *llvmAsmrealloc (void *,yy_size_t );
324void llvmAsmfree (void * );
325
326#define yy_new_buffer llvmAsm_create_buffer
Reid Spencer68a24bd2005-08-27 18:50:39 +0000327
328#define yy_set_interactive(is_interactive) \
329 { \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000330 if ( ! YY_CURRENT_BUFFER ){ \
331 llvmAsmensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000336 }
337
338#define yy_set_bol(at_bol) \
339 { \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000340 if ( ! YY_CURRENT_BUFFER ){\
341 llvmAsmensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
344 } \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000346 }
347
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000350/* Begin user sect3 */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000351
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000352#define llvmAsmwrap(n) 1
Reid Spencer68a24bd2005-08-27 18:50:39 +0000353#define YY_SKIP_YYWRAP
Reid Spencer68a24bd2005-08-27 18:50:39 +0000354
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000355typedef unsigned char YY_CHAR;
356
357FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0;
358
359typedef int yy_state_type;
360
361extern int llvmAsmlineno;
362
363int llvmAsmlineno = 1;
364
365extern char *llvmAsmtext;
366#define yytext_ptr llvmAsmtext
367
368static yy_state_type yy_get_previous_state (void );
369static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
370static int yy_get_next_buffer (void );
371static void yy_fatal_error (yyconst char msg[] );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000372
373/* Done after the current pattern has been matched and before the
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000374 * corresponding action - sets up llvmAsmtext.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000377 (yytext_ptr) = yy_bp; \
378 llvmAsmleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000380 *yy_cp = '\0'; \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000381 (yy_c_buf_p) = yy_cp;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000382
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000383#define YY_NUM_RULES 111
384#define YY_END_OF_BUFFER 112
385/* This struct is not used in this scanner,
386 but its presence is necessary. */
387struct yy_trans_info
388 {
389 flex_int32_t yy_verify;
390 flex_int32_t yy_nxt;
391 };
392static yyconst flex_int16_t yy_accept[479] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000393 { 0,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000394 0, 0, 112, 110, 109, 109, 110, 110, 110, 110,
395 110, 110, 102, 102, 1, 110, 110, 110, 110, 110,
396 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
397 110, 110, 110, 110, 110, 110, 0, 101, 0, 99,
398 98, 98, 105, 0, 103, 0, 107, 102, 0, 1,
399 0, 0, 0, 0, 0, 0, 0, 0, 84, 0,
400 40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 0, 0, 0, 0, 66, 0, 0, 0, 0,
403 0, 0, 0, 0, 0, 0, 0, 0, 23, 0,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000404
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 101, 98, 98, 107, 20, 107, 0, 108, 60,
407 0, 0, 65, 0, 38, 0, 33, 0, 0, 0,
408 41, 0, 0, 0, 0, 0, 63, 0, 0, 3,
409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
410 51, 0, 0, 0, 0, 0, 0, 0, 0, 62,
411 25, 0, 0, 74, 0, 64, 83, 0, 0, 0,
412 0, 0, 78, 0, 79, 0, 0, 0, 61, 0,
413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
414 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
415
416 0, 100, 107, 0, 0, 0, 107, 0, 0, 0,
417 0, 46, 75, 76, 0, 0, 0, 0, 0, 0,
418 0, 0, 0, 0, 0, 0, 0, 0, 0, 91,
419 0, 0, 0, 0, 0, 0, 0, 0, 0, 92,
420 53, 0, 0, 22, 0, 0, 104, 0, 0, 0,
421 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
422 0, 0, 4, 58, 0, 52, 0, 0, 0, 0,
423 0, 0, 0, 0, 0, 45, 0, 11, 0, 107,
424 35, 0, 0, 2, 0, 0, 0, 0, 0, 0,
425 0, 0, 0, 0, 0, 0, 5, 0, 55, 0,
426
427 0, 0, 0, 0, 0, 57, 0, 0, 0, 0,
428 0, 0, 47, 0, 0, 69, 73, 71, 72, 70,
429 68, 49, 0, 0, 93, 0, 0, 0, 48, 54,
430 21, 0, 0, 0, 0, 0, 81, 0, 0, 0,
431 90, 0, 44, 0, 0, 0, 0, 0, 0, 56,
432 30, 24, 0, 0, 43, 0, 7, 0, 0, 0,
433 86, 0, 32, 89, 37, 59, 0, 0, 77, 0,
434 0, 85, 27, 28, 0, 0, 87, 50, 82, 80,
435 0, 0, 0, 0, 42, 6, 29, 0, 0, 0,
436 0, 0, 0, 0, 0, 0, 0, 0, 36, 0,
437
438 0, 0, 0, 0, 0, 0, 8, 0, 0, 0,
439 17, 0, 0, 0, 0, 9, 10, 0, 0, 0,
440 0, 0, 34, 0, 12, 14, 13, 0, 0, 0,
441 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
442 0, 0, 0, 0, 0, 39, 0, 0, 0, 15,
443 0, 0, 0, 0, 31, 0, 0, 88, 0, 0,
444 0, 0, 0, 0, 0, 0, 0, 94, 0, 96,
445 97, 16, 0, 95, 18, 0, 19, 0
Reid Spencer68a24bd2005-08-27 18:50:39 +0000446 } ;
447
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000448static yyconst flex_int32_t yy_ec[256] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000449 { 0,
450 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
451 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
454 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
455 11, 11, 11, 11, 11, 11, 11, 12, 13, 1,
456 1, 1, 1, 1, 14, 14, 14, 14, 15, 14,
457 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
458 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
459 1, 1, 1, 1, 16, 1, 17, 18, 19, 20,
460
461 21, 22, 23, 24, 25, 5, 26, 27, 28, 29,
462 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
463 40, 41, 1, 1, 1, 1, 1, 1, 1, 1,
464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
471
472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1
478 } ;
479
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000480static yyconst flex_int32_t yy_meta[42] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000481 { 0,
482 1, 1, 2, 1, 3, 1, 1, 3, 3, 3,
483 3, 4, 1, 3, 3, 3, 3, 3, 3, 3,
484 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
485 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
486 3
487 } ;
488
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000489static yyconst flex_int16_t yy_base[484] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000490 { 0,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000491 0, 0, 998, 999, 999, 999, 993, 984, 34, 36,
Chris Lattner8335e842006-01-23 23:05:42 +0000492 38, 42, 46, 50, 0, 52, 57, 54, 68, 62,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000493 80, 82, 87, 93, 94, 40, 88, 84, 56, 121,
494 108, 150, 105, 115, 114, 116, 991, 999, 982, 999,
495 0, 139, 141, 144, 154, 120, 159, 176, 179, 0,
496 55, 180, 92, 164, 155, 135, 149, 190, 981, 191,
497 192, 194, 196, 197, 198, 200, 201, 161, 203, 205,
498 212, 122, 214, 218, 202, 219, 222, 229, 233, 224,
499 232, 234, 231, 243, 248, 980, 247, 251, 245, 235,
500 255, 256, 257, 259, 266, 270, 269, 273, 979, 274,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000501
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000502 277, 265, 280, 285, 291, 41, 301, 295, 302, 288,
503 290, 978, 0, 315, 317, 977, 324, 336, 0, 976,
504 289, 319, 975, 321, 974, 325, 973, 328, 329, 339,
505 972, 340, 341, 342, 345, 346, 971, 355, 347, 352,
506 349, 350, 354, 356, 367, 357, 369, 374, 370, 373,
507 375, 377, 381, 383, 386, 388, 387, 389, 391, 970,
508 969, 392, 31, 968, 393, 967, 966, 418, 399, 406,
509 394, 430, 965, 411, 964, 402, 405, 413, 963, 408,
510 418, 435, 400, 440, 442, 436, 437, 438, 443, 444,
511 448, 450, 453, 462, 454, 456, 458, 464, 468, 962,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000512
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000513 470, 999, 474, 491, 480, 493, 496, 480, 474, 484,
514 485, 961, 960, 959, 498, 476, 500, 503, 504, 506,
515 509, 507, 510, 511, 513, 514, 512, 520, 516, 958,
516 526, 524, 528, 531, 532, 535, 536, 538, 540, 957,
517 956, 542, 543, 955, 544, 546, 0, 545, 548, 550,
518 547, 562, 563, 564, 559, 565, 570, 574, 577, 954,
519 578, 566, 953, 952, 580, 951, 588, 590, 591, 592,
520 576, 594, 595, 596, 598, 950, 601, 949, 605, 604,
521 948, 606, 609, 947, 612, 608, 614, 610, 620, 622,
522 623, 627, 628, 629, 630, 632, 946, 633, 945, 634,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000523
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000524 635, 637, 638, 646, 648, 944, 649, 651, 655, 656,
525 658, 659, 943, 654, 664, 942, 941, 940, 939, 938,
526 937, 936, 669, 670, 935, 671, 673, 676, 934, 933,
527 932, 674, 675, 678, 677, 679, 931, 681, 688, 689,
528 930, 692, 929, 691, 695, 694, 693, 698, 699, 928,
529 927, 926, 707, 709, 925, 710, 924, 713, 714, 719,
530 923, 718, 922, 921, 920, 919, 720, 721, 918, 727,
531 729, 917, 916, 915, 730, 728, 914, 913, 912, 911,
532 731, 734, 733, 735, 910, 907, 898, 742, 744, 745,
533 737, 748, 751, 749, 753, 754, 755, 756, 896, 759,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000534
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000535 761, 762, 772, 773, 774, 775, 895, 776, 779, 780,
536 894, 781, 783, 785, 792, 893, 891, 790, 795, 787,
537 791, 805, 890, 807, 888, 887, 884, 788, 809, 798,
538 810, 812, 813, 816, 814, 817, 819, 822, 824, 825,
539 826, 829, 831, 835, 832, 882, 833, 839, 836, 881,
540 847, 843, 846, 850, 880, 853, 849, 876, 857, 860,
541 854, 861, 863, 864, 865, 868, 869, 644, 872, 518,
542 401, 292, 874, 207, 170, 878, 166, 999, 911, 913,
543 137, 917, 99
Reid Spencer68a24bd2005-08-27 18:50:39 +0000544 } ;
545
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000546static yyconst flex_int16_t yy_def[484] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000547 { 0,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000548 478, 1, 478, 478, 478, 478, 479, 480, 481, 478,
549 480, 480, 480, 480, 482, 480, 480, 480, 480, 480,
550 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
551 480, 480, 480, 480, 480, 480, 479, 478, 480, 478,
552 483, 483, 478, 478, 480, 480, 480, 480, 480, 482,
553 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
554 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
555 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
556 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
557 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000558
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000559 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
560 480, 478, 483, 483, 478, 480, 480, 480, 49, 480,
561 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
562 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
563 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
564 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
565 480, 480, 480, 480, 480, 480, 480, 49, 480, 480,
566 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
567 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
568 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000569
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000570 480, 478, 478, 478, 478, 480, 480, 480, 480, 480,
571 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
572 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
573 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
574 480, 480, 480, 480, 480, 480, 168, 480, 480, 480,
575 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
576 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
577 480, 480, 480, 480, 480, 480, 480, 480, 480, 478,
578 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
579 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000580
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000581 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
582 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
583 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
584 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
585 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
586 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
587 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
588 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
589 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
590 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000591
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000592 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
593 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
594 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
595 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
596 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
597 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
598 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
599 480, 480, 480, 480, 480, 480, 480, 0, 478, 478,
600 478, 478, 478
Reid Spencer68a24bd2005-08-27 18:50:39 +0000601 } ;
602
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000603static yyconst flex_int16_t yy_nxt[1041] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000604 { 0,
605 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
606 14, 4, 15, 8, 8, 8, 16, 17, 18, 19,
607 20, 21, 22, 8, 23, 8, 24, 25, 26, 27,
608 28, 8, 29, 30, 31, 32, 33, 34, 35, 8,
609 36, 42, 40, 43, 43, 44, 44, 45, 45, 40,
Chris Lattner8335e842006-01-23 23:05:42 +0000610 46, 40, 40, 40, 47, 48, 48, 40, 47, 48,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000611 48, 40, 245, 40, 193, 40, 40, 40, 40, 83,
612 60, 51, 61, 40, 120, 84, 89, 56, 52, 40,
Chris Lattner75466192006-05-19 21:28:53 +0000613 53, 57, 54, 62, 49, 55, 58, 63, 64, 59,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000614 68, 40, 65, 40, 66, 40, 70, 67, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000615
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000616 69, 113, 73, 40, 40, 40, 71, 87, 74, 77,
617 80, 123, 72, 88, 75, 76, 40, 78, 85, 40,
618 86, 107, 79, 81, 98, 40, 40, 40, 116, 82,
619 90, 40, 40, 40, 108, 109, 111, 99, 91, 41,
620 100, 92, 146, 110, 93, 94, 40, 101, 114, 114,
621 43, 43, 115, 44, 44, 95, 96, 126, 97, 90,
622 40, 40, 47, 45, 45, 40, 40, 102, 117, 117,
623 40, 127, 40, 118, 103, 40, 104, 40, 105, 118,
624 140, 40, 125, 106, 47, 48, 48, 40, 119, 119,
625 40, 40, 119, 119, 124, 119, 119, 119, 119, 119,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000626
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000627 119, 40, 40, 40, 121, 40, 122, 40, 40, 40,
628 131, 40, 40, 40, 40, 135, 40, 129, 40, 128,
629 132, 141, 133, 40, 130, 40, 138, 136, 134, 40,
630 40, 143, 149, 40, 137, 40, 139, 142, 144, 153,
631 40, 145, 40, 40, 40, 40, 40, 148, 147, 156,
632 158, 159, 150, 151, 40, 152, 40, 154, 40, 40,
633 160, 157, 40, 155, 163, 161, 40, 40, 40, 162,
634 40, 164, 166, 168, 170, 165, 40, 40, 177, 167,
635 40, 40, 171, 173, 40, 40, 174, 179, 40, 175,
636 172, 40, 176, 180, 169, 178, 40, 181, 183, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000637
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000638 40, 40, 40, 40, 186, 182, 40, 185, 187, 184,
639 189, 208, 40, 40, 188, 190, 194, 195, 199, 197,
640 200, 198, 201, 191, 114, 114, 203, 203, 192, 196,
641 40, 204, 40, 117, 117, 40, 40, 204, 118, 40,
642 40, 210, 205, 206, 118, 207, 207, 40, 209, 211,
643 40, 40, 40, 40, 212, 213, 40, 40, 40, 215,
644 40, 40, 217, 40, 222, 40, 40, 40, 40, 224,
645 225, 218, 219, 214, 216, 220, 223, 230, 40, 221,
646 40, 40, 226, 229, 40, 40, 40, 227, 40, 231,
647 228, 232, 40, 234, 40, 235, 233, 40, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000648
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000649 40, 237, 40, 40, 40, 40, 236, 240, 238, 241,
650 40, 40, 40, 40, 250, 242, 40, 40, 244, 40,
651 239, 246, 40, 256, 40, 257, 243, 247, 247, 40,
652 262, 247, 247, 248, 247, 247, 247, 247, 247, 247,
653 249, 40, 259, 255, 260, 258, 40, 40, 40, 40,
654 251, 40, 252, 40, 40, 40, 253, 261, 254, 40,
655 263, 40, 264, 268, 40, 40, 267, 40, 270, 40,
656 265, 266, 269, 40, 271, 40, 275, 276, 273, 40,
657 277, 40, 272, 203, 203, 40, 274, 40, 204, 280,
658 280, 40, 282, 278, 204, 40, 40, 205, 205, 279,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000659
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000660 280, 280, 207, 207, 40, 207, 207, 40, 281, 40,
661 286, 40, 283, 284, 40, 40, 285, 40, 40, 288,
662 40, 40, 40, 40, 40, 40, 293, 40, 289, 40,
663 296, 40, 297, 292, 287, 40, 291, 40, 298, 40,
664 301, 294, 40, 40, 290, 295, 40, 40, 302, 40,
665 299, 40, 300, 40, 40, 40, 40, 40, 40, 40,
666 305, 40, 306, 303, 304, 313, 308, 307, 315, 310,
667 40, 309, 314, 40, 40, 40, 40, 40, 316, 311,
668 312, 40, 317, 319, 321, 40, 323, 40, 40, 40,
669 324, 40, 328, 322, 325, 326, 318, 320, 327, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000670
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000671 329, 40, 40, 40, 334, 40, 40, 40, 333, 40,
672 330, 331, 40, 280, 280, 332, 40, 40, 337, 40,
673 40, 40, 341, 40, 344, 40, 335, 336, 342, 340,
674 343, 40, 345, 40, 40, 339, 338, 347, 40, 40,
675 40, 40, 346, 40, 40, 40, 40, 350, 40, 40,
676 354, 355, 348, 349, 356, 40, 351, 40, 353, 40,
677 40, 357, 40, 352, 358, 40, 40, 40, 361, 40,
678 40, 363, 359, 364, 360, 40, 365, 362, 366, 367,
679 40, 40, 40, 368, 40, 40, 40, 40, 40, 40,
680 40, 371, 40, 376, 372, 370, 374, 377, 369, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000681
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000682 40, 379, 40, 40, 40, 40, 40, 373, 375, 40,
683 40, 378, 381, 385, 386, 380, 383, 382, 40, 384,
684 40, 40, 390, 391, 40, 40, 387, 388, 389, 40,
685 40, 40, 40, 394, 395, 396, 397, 393, 40, 40,
686 40, 40, 40, 392, 40, 40, 40, 400, 40, 399,
687 401, 403, 398, 40, 402, 40, 40, 404, 405, 40,
688 40, 406, 40, 411, 40, 40, 40, 40, 412, 407,
689 40, 413, 40, 40, 408, 417, 409, 414, 421, 415,
690 416, 420, 410, 40, 40, 40, 40, 40, 422, 418,
691 40, 40, 40, 423, 40, 419, 40, 425, 40, 40,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000692
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000693 428, 40, 40, 40, 439, 435, 40, 429, 424, 40,
694 426, 430, 432, 427, 433, 434, 40, 436, 40, 431,
695 40, 40, 437, 40, 40, 40, 442, 40, 40, 440,
696 40, 438, 441, 40, 445, 40, 40, 40, 449, 443,
697 40, 447, 40, 40, 40, 448, 40, 40, 446, 450,
698 40, 454, 451, 444, 40, 455, 452, 40, 40, 458,
699 40, 40, 459, 453, 40, 40, 456, 460, 40, 465,
700 462, 40, 40, 457, 40, 40, 40, 461, 463, 40,
701 40, 466, 464, 40, 472, 40, 468, 40, 467, 40,
702 469, 40, 40, 40, 476, 40, 471, 470, 40, 40,
Chris Lattnere869eef2005-11-12 00:11:49 +0000703
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000704 475, 40, 40, 474, 40, 40, 40, 40, 473, 40,
705 477, 37, 37, 37, 37, 39, 39, 50, 40, 50,
706 50, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattner0e9c3762006-01-25 22:27:16 +0000707 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattnerd5efe842006-04-08 01:18:56 +0000708 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
709 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Chris Lattner75466192006-05-19 21:28:53 +0000710 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
711 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000712 40, 40, 40, 40, 40, 40, 40, 40, 40, 202,
713 40, 40, 40, 40, 112, 40, 38, 478, 3, 478,
Chris Lattner75466192006-05-19 21:28:53 +0000714
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000715 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
716 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
717 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
718 478, 478, 478, 478, 478, 478, 478, 478, 478, 478
Reid Spencer68a24bd2005-08-27 18:50:39 +0000719 } ;
720
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000721static yyconst flex_int16_t yy_chk[1041] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000722 { 0,
723 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
724 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
725 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
726 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000727 1, 9, 163, 9, 9, 10, 10, 11, 11, 11,
728 12, 26, 106, 12, 13, 13, 13, 13, 14, 14,
729 14, 14, 163, 16, 106, 18, 51, 29, 17, 26,
Chris Lattner8335e842006-01-23 23:05:42 +0000730 18, 16, 18, 20, 51, 26, 29, 17, 16, 19,
Chris Lattner75466192006-05-19 21:28:53 +0000731 16, 17, 16, 18, 13, 16, 17, 18, 19, 17,
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000732 20, 21, 19, 22, 19, 28, 21, 19, 23, 27,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000733
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000734 20, 483, 22, 53, 24, 25, 21, 28, 22, 24,
735 25, 53, 21, 28, 23, 23, 33, 24, 27, 31,
736 27, 33, 24, 25, 31, 35, 34, 36, 46, 25,
737 30, 46, 30, 72, 33, 34, 36, 31, 30, 481,
738 31, 30, 72, 35, 30, 30, 56, 31, 42, 42,
739 43, 43, 44, 44, 44, 30, 30, 56, 30, 32,
740 57, 32, 45, 45, 45, 45, 55, 32, 47, 47,
741 47, 57, 68, 47, 32, 54, 32, 477, 32, 47,
742 68, 475, 55, 32, 48, 48, 48, 48, 49, 49,
743 49, 52, 49, 49, 54, 49, 49, 49, 49, 49,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000744
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000745 49, 58, 60, 61, 52, 62, 52, 63, 64, 65,
746 61, 66, 67, 75, 69, 64, 70, 60, 474, 58,
747 62, 69, 62, 71, 60, 73, 66, 64, 63, 74,
748 76, 70, 75, 77, 65, 80, 67, 69, 70, 77,
749 78, 71, 83, 81, 79, 82, 90, 74, 73, 79,
750 80, 81, 76, 76, 84, 76, 89, 78, 87, 85,
751 82, 79, 88, 78, 85, 83, 91, 92, 93, 84,
752 94, 87, 89, 90, 92, 88, 102, 95, 94, 89,
753 97, 96, 92, 93, 98, 100, 93, 96, 101, 93,
754 92, 103, 93, 97, 91, 95, 104, 98, 100, 110,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000755
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000756 121, 111, 105, 472, 102, 98, 108, 101, 103, 100,
757 105, 121, 107, 109, 104, 105, 107, 107, 109, 108,
758 110, 108, 111, 105, 114, 114, 115, 115, 105, 107,
759 122, 115, 124, 117, 117, 117, 126, 115, 117, 128,
760 129, 124, 118, 118, 117, 118, 118, 118, 122, 126,
761 130, 132, 133, 134, 128, 129, 135, 136, 139, 132,
762 141, 142, 134, 140, 139, 143, 138, 144, 146, 141,
763 142, 135, 136, 130, 133, 138, 140, 146, 145, 138,
764 147, 149, 142, 145, 150, 148, 151, 143, 152, 147,
765 144, 148, 153, 150, 154, 151, 149, 155, 157, 156,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000766
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000767 158, 153, 159, 162, 165, 171, 152, 156, 154, 157,
768 169, 183, 471, 176, 171, 158, 177, 170, 162, 180,
769 155, 165, 174, 176, 178, 177, 159, 168, 168, 181,
770 183, 168, 168, 169, 168, 168, 168, 168, 168, 168,
771 170, 172, 180, 174, 181, 178, 182, 186, 187, 188,
772 172, 184, 172, 185, 189, 190, 172, 182, 172, 191,
773 184, 192, 185, 189, 193, 195, 188, 196, 191, 197,
774 186, 187, 190, 194, 192, 198, 196, 197, 194, 199,
775 198, 201, 193, 203, 203, 209, 195, 216, 203, 205,
776 205, 208, 209, 199, 203, 210, 211, 204, 204, 201,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000777
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000778 204, 204, 206, 206, 206, 207, 207, 207, 208, 215,
779 216, 217, 210, 211, 218, 219, 215, 220, 222, 218,
780 221, 223, 224, 227, 225, 226, 223, 229, 219, 470,
781 226, 228, 227, 222, 217, 232, 221, 231, 228, 233,
782 232, 224, 234, 235, 220, 225, 236, 237, 233, 238,
783 229, 239, 231, 242, 243, 245, 248, 246, 251, 249,
784 236, 250, 237, 234, 235, 248, 239, 238, 250, 243,
785 255, 242, 249, 252, 253, 254, 256, 262, 251, 245,
786 246, 257, 252, 253, 254, 258, 256, 271, 259, 261,
787 257, 265, 262, 255, 258, 259, 252, 253, 261, 267,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000788
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000789 265, 268, 269, 270, 271, 272, 273, 274, 270, 275,
790 267, 268, 277, 280, 280, 269, 279, 282, 274, 286,
791 283, 288, 282, 285, 286, 287, 272, 273, 283, 279,
792 285, 289, 287, 290, 291, 277, 275, 289, 292, 293,
793 294, 295, 288, 296, 298, 300, 301, 292, 302, 303,
794 296, 298, 290, 291, 300, 468, 293, 304, 295, 305,
795 307, 301, 308, 294, 302, 314, 309, 310, 305, 311,
796 312, 308, 303, 309, 304, 315, 310, 307, 311, 312,
797 323, 324, 326, 314, 327, 332, 333, 328, 335, 334,
798 336, 324, 338, 333, 326, 323, 328, 334, 315, 339,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000799
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000800 340, 336, 344, 342, 347, 346, 345, 327, 332, 348,
801 349, 335, 339, 345, 346, 338, 342, 340, 353, 344,
802 354, 356, 353, 353, 358, 359, 347, 348, 349, 362,
803 360, 367, 368, 358, 359, 360, 362, 356, 370, 376,
804 371, 375, 381, 354, 383, 382, 384, 370, 391, 368,
805 371, 376, 367, 388, 375, 389, 390, 381, 382, 392,
806 394, 383, 393, 391, 395, 396, 397, 398, 392, 384,
807 400, 393, 401, 402, 388, 397, 389, 394, 402, 395,
808 396, 401, 390, 403, 404, 405, 406, 408, 403, 398,
809 409, 410, 412, 404, 413, 400, 414, 406, 420, 428,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000810
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000811 410, 418, 421, 415, 428, 420, 419, 412, 405, 430,
812 408, 413, 415, 409, 418, 419, 422, 421, 424, 414,
813 429, 431, 422, 432, 433, 435, 431, 434, 436, 429,
814 437, 424, 430, 438, 434, 439, 440, 441, 438, 432,
815 442, 436, 443, 445, 447, 437, 444, 449, 435, 439,
816 448, 443, 440, 433, 452, 444, 441, 453, 451, 448,
817 457, 454, 449, 442, 456, 461, 445, 451, 459, 457,
818 453, 460, 462, 447, 463, 464, 465, 452, 454, 466,
819 467, 459, 456, 469, 465, 473, 461, 458, 460, 476,
820 462, 455, 450, 446, 473, 427, 464, 463, 426, 425,
Chris Lattnere869eef2005-11-12 00:11:49 +0000821
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000822 469, 423, 417, 467, 416, 411, 407, 399, 466, 387,
823 476, 479, 479, 479, 479, 480, 480, 482, 386, 482,
824 482, 385, 380, 379, 378, 377, 374, 373, 372, 369,
825 366, 365, 364, 363, 361, 357, 355, 352, 351, 350,
826 343, 341, 337, 331, 330, 329, 325, 322, 321, 320,
827 319, 318, 317, 316, 313, 306, 299, 297, 284, 281,
828 278, 276, 266, 264, 263, 260, 244, 241, 240, 230,
829 214, 213, 212, 200, 179, 175, 173, 167, 166, 164,
830 161, 160, 137, 131, 127, 125, 123, 120, 116, 112,
831 99, 86, 59, 39, 37, 8, 7, 3, 478, 478,
Chris Lattner75466192006-05-19 21:28:53 +0000832
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000833 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
834 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
835 478, 478, 478, 478, 478, 478, 478, 478, 478, 478,
836 478, 478, 478, 478, 478, 478, 478, 478, 478, 478
Reid Spencer68a24bd2005-08-27 18:50:39 +0000837 } ;
838
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000839/* Table of booleans, true if rule could match eol. */
840static yyconst flex_int32_t yy_rule_can_match_eol[112] =
841 { 0,
8420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
843 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
844 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
845 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
846 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
847 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
848
849static yy_state_type yy_last_accepting_state;
850static char *yy_last_accepting_cpos;
851
852extern int llvmAsm_flex_debug;
853int llvmAsm_flex_debug = 0;
854
855/* The intent behind this definition is that it'll catch
856 * any uses of REJECT which flex missed.
857 */
858#define REJECT reject_used_but_not_detected
Reid Spencer68a24bd2005-08-27 18:50:39 +0000859#define yymore() yymore_used_but_not_detected
860#define YY_MORE_ADJ 0
861#define YY_RESTORE_YY_MORE_OFFSET
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000862char *llvmAsmtext;
863#line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000864/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
865//
866// The LLVM Compiler Infrastructure
867//
868// This file was developed by the LLVM research group and is distributed under
869// the University of Illinois Open Source License. See LICENSE.TXT for details.
870//
871//===----------------------------------------------------------------------===//
872//
873// This file implements the flex scanner for LLVM assembly languages files.
874//
875//===----------------------------------------------------------------------===*/
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000876#line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000877#include "ParserInternals.h"
878#include "llvm/Module.h"
879#include <list>
880#include "llvmAsmParser.h"
881#include <cctype>
882#include <cstdlib>
883
884void set_scan_file(FILE * F){
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000885 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000886}
887void set_scan_string (const char * str) {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000888 llvmAsm_scan_string (str);
Reid Spencer68a24bd2005-08-27 18:50:39 +0000889}
890
891#define RET_TOK(type, Enum, sym) \
892 llvmAsmlval.type = Instruction::Enum; return sym
893
894namespace llvm {
895
896// TODO: All of the static identifiers are figured out by the lexer,
897// these should be hashed to reduce the lexer size
898
899
900// atoull - Convert an ascii string of decimal digits into the unsigned long
901// long representation... this does not have to do input error checking,
902// because we know that the input will be matched by a suitable regex...
903//
904static uint64_t atoull(const char *Buffer) {
905 uint64_t Result = 0;
906 for (; *Buffer; Buffer++) {
907 uint64_t OldRes = Result;
908 Result *= 10;
909 Result += *Buffer-'0';
910 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +0000911 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +0000912 }
913 return Result;
914}
915
916static uint64_t HexIntToVal(const char *Buffer) {
917 uint64_t Result = 0;
918 for (; *Buffer; ++Buffer) {
919 uint64_t OldRes = Result;
920 Result *= 16;
921 char C = *Buffer;
922 if (C >= '0' && C <= '9')
923 Result += C-'0';
924 else if (C >= 'A' && C <= 'F')
925 Result += C-'A'+10;
926 else if (C >= 'a' && C <= 'f')
927 Result += C-'a'+10;
928
929 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +0000930 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +0000931 }
932 return Result;
933}
934
935
936// HexToFP - Convert the ascii string in hexidecimal format to the floating
937// point representation of it.
938//
939static double HexToFP(const char *Buffer) {
940 // Behave nicely in the face of C TBAA rules... see:
941 // http://www.nullstone.com/htmls/category/aliastyp.htm
942 union {
943 uint64_t UI;
944 double FP;
945 } UIntToFP;
946 UIntToFP.UI = HexIntToVal(Buffer);
947
948 assert(sizeof(double) == sizeof(uint64_t) &&
949 "Data sizes incompatible on this target!");
950 return UIntToFP.FP; // Cast Hex constant to double
951}
952
953
954// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
955// appropriate character. If AllowNull is set to false, a \00 value will cause
956// an exception to be thrown.
957//
958// If AllowNull is set to true, the return value of the function points to the
959// last character of the string in memory.
960//
961char *UnEscapeLexed(char *Buffer, bool AllowNull) {
962 char *BOut = Buffer;
963 for (char *BIn = Buffer; *BIn; ) {
964 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
965 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
966 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
967 if (!AllowNull && !*BOut)
Reid Spencer61c83e02006-08-18 08:43:06 +0000968 GenerateError("String literal cannot accept \\00 escape!");
Reid Spencer68a24bd2005-08-27 18:50:39 +0000969
970 BIn[3] = Tmp; // Restore character
971 BIn += 3; // Skip over handled chars
972 ++BOut;
973 } else {
974 *BOut++ = *BIn++;
975 }
976 }
977
978 return BOut;
979}
980
981} // End llvm namespace
982
983using namespace llvm;
984
985#define YY_NEVER_INTERACTIVE 1
986/* Comments start with a ; and go till end of line */
987/* Variable(Value) identifiers start with a % sign */
988/* Label identifiers end with a colon */
989/* Quoted names can contain any character except " and \ */
990/* [PN]Integer: match positive and negative literal integer values that
991 * are preceeded by a '%' character. These represent unnamed variable slots.
992 */
993/* E[PN]Integer: match positive and negative literal integer values */
994/* FPConstant - A Floating point constant.
995 */
996/* HexFPConstant - Floating point constant represented in IEEE format as a
997 * hexadecimal number for when exponential notation is not precise enough.
998 */
999/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1000 * it to deal with 64 bit numbers.
1001 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001002#line 1003 "Lexer.cpp"
1003
1004#define INITIAL 0
1005
1006#ifndef YY_NO_UNISTD_H
1007/* Special case for "unistd.h", since it is non-ANSI. We include it way
1008 * down here because we want the user's section 1 to have been scanned first.
1009 * The user has a chance to override it with an option.
1010 */
1011#include <unistd.h>
1012#endif
1013
1014#ifndef YY_EXTRA_TYPE
1015#define YY_EXTRA_TYPE void *
1016#endif
1017
1018static int yy_init_globals (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001019
1020/* Macros after this point can all be overridden by user definitions in
1021 * section 1.
1022 */
1023
1024#ifndef YY_SKIP_YYWRAP
1025#ifdef __cplusplus
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001026extern "C" int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001027#else
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001028extern int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001029#endif
1030#endif
1031
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001032 static inline void yyunput (int c,char *buf_ptr );
1033
Reid Spencer68a24bd2005-08-27 18:50:39 +00001034#ifndef yytext_ptr
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001035static void yy_flex_strncpy (char *,yyconst char *,int );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001036#endif
1037
1038#ifdef YY_NEED_STRLEN
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001039static int yy_flex_strlen (yyconst char * );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001040#endif
1041
1042#ifndef YY_NO_INPUT
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001043
Reid Spencer68a24bd2005-08-27 18:50:39 +00001044#ifdef __cplusplus
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001045static int yyinput (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001046#else
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001047static int input (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001048#endif
1049
Reid Spencer68a24bd2005-08-27 18:50:39 +00001050#endif
1051
1052/* Amount of stuff to slurp up with each read. */
1053#ifndef YY_READ_BUF_SIZE
1054#define YY_READ_BUF_SIZE 8192
1055#endif
1056
1057/* Copy whatever the last rule matched to the standard output. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001058#ifndef ECHO
1059/* This used to be an fputs(), but since the string might contain NUL's,
1060 * we now use fwrite().
1061 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001062#define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001063#endif
1064
1065/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1066 * is returned in "result".
1067 */
1068#ifndef YY_INPUT
1069#define YY_INPUT(buf,result,max_size) \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001070 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001071 { \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001072 int c = '*'; \
1073 size_t n; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001074 for ( n = 0; n < max_size && \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001075 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001076 buf[n] = (char) c; \
1077 if ( c == '\n' ) \
1078 buf[n++] = (char) c; \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001079 if ( c == EOF && ferror( llvmAsmin ) ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001080 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1081 result = n; \
1082 } \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001083 else \
1084 { \
1085 errno=0; \
1086 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
1087 { \
1088 if( errno != EINTR) \
1089 { \
1090 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1091 break; \
1092 } \
1093 errno=0; \
1094 clearerr(llvmAsmin); \
1095 } \
1096 }\
1097\
1098
Reid Spencer68a24bd2005-08-27 18:50:39 +00001099#endif
1100
1101/* No semi-colon after return; correct usage is to write "yyterminate();" -
1102 * we don't want an extra ';' after the "return" because that will cause
1103 * some compilers to complain about unreachable statements.
1104 */
1105#ifndef yyterminate
1106#define yyterminate() return YY_NULL
1107#endif
1108
1109/* Number of entries by which start-condition stack grows. */
1110#ifndef YY_START_STACK_INCR
1111#define YY_START_STACK_INCR 25
1112#endif
1113
1114/* Report a fatal error. */
1115#ifndef YY_FATAL_ERROR
1116#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1117#endif
1118
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001119/* end tables serialization structures and prototypes */
1120
Reid Spencer68a24bd2005-08-27 18:50:39 +00001121/* Default declaration of generated scanner - a define so the user can
1122 * easily add parameters.
1123 */
1124#ifndef YY_DECL
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001125#define YY_DECL_IS_OURS 1
Reid Spencer68a24bd2005-08-27 18:50:39 +00001126
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001127extern int llvmAsmlex (void);
1128
1129#define YY_DECL int llvmAsmlex (void)
1130#endif /* !YY_DECL */
1131
1132/* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
Reid Spencer68a24bd2005-08-27 18:50:39 +00001133 * have been set up.
1134 */
1135#ifndef YY_USER_ACTION
1136#define YY_USER_ACTION
1137#endif
1138
1139/* Code executed at the end of each rule. */
1140#ifndef YY_BREAK
1141#define YY_BREAK break;
1142#endif
1143
1144#define YY_RULE_SETUP \
1145 YY_USER_ACTION
1146
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001147/** The main scanner function which does all the work.
1148 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001149YY_DECL
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001150{
Reid Spencer68a24bd2005-08-27 18:50:39 +00001151 register yy_state_type yy_current_state;
Chris Lattner224f84f2006-08-18 17:34:45 +00001152 register char *yy_cp, *yy_bp;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001153 register int yy_act;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001154
1155#line 179 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001156
1157
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001158#line 1159 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001159
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001160 if ( !(yy_init) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001161 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001162 (yy_init) = 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001163
1164#ifdef YY_USER_INIT
1165 YY_USER_INIT;
1166#endif
1167
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001168 if ( ! (yy_start) )
1169 (yy_start) = 1; /* first start state */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001170
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001171 if ( ! llvmAsmin )
1172 llvmAsmin = stdin;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001173
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001174 if ( ! llvmAsmout )
1175 llvmAsmout = stdout;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001176
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001177 if ( ! YY_CURRENT_BUFFER ) {
1178 llvmAsmensure_buffer_stack ();
1179 YY_CURRENT_BUFFER_LVALUE =
1180 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
1181 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001182
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001183 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001184 }
1185
1186 while ( 1 ) /* loops until end-of-file is reached */
1187 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001188 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001189
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001190 /* Support of llvmAsmtext. */
1191 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001192
1193 /* yy_bp points to the position in yy_ch_buf of the start of
1194 * the current run.
1195 */
1196 yy_bp = yy_cp;
1197
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001198 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001199yy_match:
1200 do
1201 {
1202 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001203 if ( yy_accept[yy_current_state] )
1204 {
1205 (yy_last_accepting_state) = yy_current_state;
1206 (yy_last_accepting_cpos) = yy_cp;
1207 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001208 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1209 {
1210 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001211 if ( yy_current_state >= 479 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001212 yy_c = yy_meta[(unsigned int) yy_c];
1213 }
1214 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001215 ++yy_cp;
1216 }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001217 while ( yy_current_state != 478 );
1218 yy_cp = (yy_last_accepting_cpos);
1219 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001220
1221yy_find_action:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001222 yy_act = yy_accept[yy_current_state];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001223
1224 YY_DO_BEFORE_ACTION;
1225
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001226 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001227 {
1228 int yyl;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001229 for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
1230 if ( llvmAsmtext[yyl] == '\n' )
1231
1232 llvmAsmlineno++;
1233;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001234 }
1235
1236do_action: /* This label is used only to access EOF actions. */
1237
Reid Spencer68a24bd2005-08-27 18:50:39 +00001238 switch ( yy_act )
1239 { /* beginning of action switch */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001240 case 0: /* must back up */
1241 /* undo the effects of YY_DO_BEFORE_ACTION */
1242 *yy_cp = (yy_hold_char);
1243 yy_cp = (yy_last_accepting_cpos);
1244 yy_current_state = (yy_last_accepting_state);
1245 goto yy_find_action;
1246
Reid Spencer68a24bd2005-08-27 18:50:39 +00001247case 1:
1248YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001249#line 181 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001250{ /* Ignore comments for now */ }
1251 YY_BREAK
1252case 2:
1253YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001254#line 183 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001255{ return BEGINTOK; }
1256 YY_BREAK
1257case 3:
1258YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001259#line 184 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001260{ return ENDTOK; }
1261 YY_BREAK
1262case 4:
1263YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001264#line 185 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001265{ return TRUETOK; }
1266 YY_BREAK
1267case 5:
1268YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001269#line 186 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001270{ return FALSETOK; }
1271 YY_BREAK
1272case 6:
1273YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001274#line 187 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001275{ return DECLARE; }
1276 YY_BREAK
1277case 7:
1278YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001279#line 188 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001280{ return GLOBAL; }
1281 YY_BREAK
1282case 8:
1283YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001284#line 189 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001285{ return CONSTANT; }
1286 YY_BREAK
1287case 9:
1288YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001289#line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001290{ return INTERNAL; }
1291 YY_BREAK
1292case 10:
1293YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001294#line 191 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001295{ return LINKONCE; }
1296 YY_BREAK
1297case 11:
1298YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001299#line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001300{ return WEAK; }
1301 YY_BREAK
1302case 12:
1303YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001304#line 193 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001305{ return APPENDING; }
1306 YY_BREAK
1307case 13:
1308YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001309#line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1310{ return DLLIMPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001311 YY_BREAK
1312case 14:
1313YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001314#line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1315{ return DLLEXPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001316 YY_BREAK
1317case 15:
1318YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001319#line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1320{ return EXTERN_WEAK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001321 YY_BREAK
1322case 16:
1323YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001324#line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1325{ return EXTERNAL; } /* Deprecated, turn into external */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001326 YY_BREAK
1327case 17:
1328YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001329#line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1330{ return EXTERNAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001331 YY_BREAK
1332case 18:
1333YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001334#line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1335{ return IMPLEMENTATION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001336 YY_BREAK
1337case 19:
1338YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001339#line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1340{ return ZEROINITIALIZER; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001341 YY_BREAK
1342case 20:
1343YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001344#line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1345{ return DOTDOTDOT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001346 YY_BREAK
1347case 21:
1348YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001349#line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1350{ return UNDEF; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001351 YY_BREAK
1352case 22:
1353YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001354#line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1355{ return NULL_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001356 YY_BREAK
1357case 23:
1358YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001359#line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1360{ return TO; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001361 YY_BREAK
1362case 24:
1363YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001364#line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1365{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001366 YY_BREAK
1367case 25:
1368YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001369#line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1370{ return NOT; } /* Deprecated, turned into XOR */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001371 YY_BREAK
1372case 26:
1373YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001374#line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1375{ return TAIL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001376 YY_BREAK
1377case 27:
1378YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001379#line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1380{ return TARGET; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001381 YY_BREAK
1382case 28:
1383YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001384#line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1385{ return TRIPLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001386 YY_BREAK
1387case 29:
1388YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001389#line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1390{ return DEPLIBS; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001391 YY_BREAK
1392case 30:
1393YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001394#line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1395{ return ENDIAN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001396 YY_BREAK
1397case 31:
1398YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001399#line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1400{ return POINTERSIZE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001401 YY_BREAK
1402case 32:
1403YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001404#line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1405{ return LITTLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001406 YY_BREAK
1407case 33:
1408YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001409#line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1410{ return BIG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001411 YY_BREAK
1412case 34:
1413YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001414#line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1415{ return VOLATILE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001416 YY_BREAK
1417case 35:
1418YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001419#line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1420{ return ALIGN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001421 YY_BREAK
1422case 36:
1423YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001424#line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1425{ return SECTION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001426 YY_BREAK
1427case 37:
1428YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001429#line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1430{ return MODULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001431 YY_BREAK
1432case 38:
1433YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001434#line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1435{ return ASM_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001436 YY_BREAK
1437case 39:
1438YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001439#line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1440{ return SIDEEFFECT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001441 YY_BREAK
1442case 40:
1443YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001444#line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1445{ return CC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001446 YY_BREAK
1447case 41:
1448YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001449#line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1450{ return CCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001451 YY_BREAK
1452case 42:
1453YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001454#line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1455{ return CSRETCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001456 YY_BREAK
1457case 43:
1458YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001459#line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1460{ return FASTCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001461 YY_BREAK
1462case 44:
1463YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001464#line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1465{ return COLDCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001466 YY_BREAK
1467case 45:
1468YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001469#line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1470{ llvmAsmlval.PrimType = Type::VoidTy ; return VOID; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001471 YY_BREAK
1472case 46:
1473YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001474#line 229 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1475{ llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001476 YY_BREAK
1477case 47:
1478YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001479#line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1480{ llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001481 YY_BREAK
1482case 48:
1483YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001484#line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1485{ llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001486 YY_BREAK
1487case 49:
1488YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001489#line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1490{ llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001491 YY_BREAK
1492case 50:
1493YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001494#line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1495{ llvmAsmlval.PrimType = Type::UShortTy; return USHORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001496 YY_BREAK
1497case 51:
1498YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001499#line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1500{ llvmAsmlval.PrimType = Type::IntTy ; return INT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001501 YY_BREAK
1502case 52:
1503YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001504#line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1505{ llvmAsmlval.PrimType = Type::UIntTy ; return UINT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001506 YY_BREAK
1507case 53:
1508YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001509#line 236 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1510{ llvmAsmlval.PrimType = Type::LongTy ; return LONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001511 YY_BREAK
1512case 54:
1513YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001514#line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1515{ llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001516 YY_BREAK
1517case 55:
1518YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001519#line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1520{ llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001521 YY_BREAK
1522case 56:
1523YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001524#line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1525{ llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001526 YY_BREAK
1527case 57:
1528YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001529#line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1530{ llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001531 YY_BREAK
1532case 58:
1533YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001534#line 241 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1535{ return TYPE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001536 YY_BREAK
1537case 59:
1538YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001539#line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1540{ return OPAQUE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001541 YY_BREAK
1542case 60:
1543YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001544#line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1545{ RET_TOK(BinaryOpVal, Add, ADD); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001546 YY_BREAK
1547case 61:
1548YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001549#line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1550{ RET_TOK(BinaryOpVal, Sub, SUB); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001551 YY_BREAK
1552case 62:
1553YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001554#line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1555{ RET_TOK(BinaryOpVal, Mul, MUL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001556 YY_BREAK
1557case 63:
1558YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001559#line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1560{ RET_TOK(BinaryOpVal, Div, DIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001561 YY_BREAK
1562case 64:
1563YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001564#line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1565{ RET_TOK(BinaryOpVal, Rem, REM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001566 YY_BREAK
1567case 65:
1568YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001569#line 249 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1570{ RET_TOK(BinaryOpVal, And, AND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001571 YY_BREAK
1572case 66:
1573YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001574#line 250 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1575{ RET_TOK(BinaryOpVal, Or , OR ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001576 YY_BREAK
1577case 67:
1578YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001579#line 251 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1580{ RET_TOK(BinaryOpVal, Xor, XOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001581 YY_BREAK
1582case 68:
1583YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001584#line 252 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1585{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001586 YY_BREAK
1587case 69:
1588YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001589#line 253 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1590{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001591 YY_BREAK
1592case 70:
1593YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001594#line 254 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1595{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001596 YY_BREAK
1597case 71:
1598YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001599#line 255 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1600{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001601 YY_BREAK
1602case 72:
1603YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001604#line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1605{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001606 YY_BREAK
1607case 73:
1608YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001609#line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1610{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001611 YY_BREAK
1612case 74:
1613YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001614#line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1615{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001616 YY_BREAK
1617case 75:
1618YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001619#line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1620{ RET_TOK(OtherOpVal, Call, CALL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001621 YY_BREAK
1622case 76:
1623YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001624#line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1625{ RET_TOK(OtherOpVal, Cast, CAST); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001626 YY_BREAK
1627case 77:
1628YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001629#line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1630{ RET_TOK(OtherOpVal, Select, SELECT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001631 YY_BREAK
1632case 78:
1633YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001634#line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1635{ RET_TOK(OtherOpVal, Shl, SHL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001636 YY_BREAK
1637case 79:
1638YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001639#line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1640{ RET_TOK(OtherOpVal, Shr, SHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001641 YY_BREAK
1642case 80:
1643YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001644#line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1645{ return VANEXT_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001646 YY_BREAK
1647case 81:
1648YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001649#line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1650{ return VAARG_old; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001651 YY_BREAK
1652case 82:
1653YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001654#line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1655{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001656 YY_BREAK
1657case 83:
1658YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001659#line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1660{ RET_TOK(TermOpVal, Ret, RET); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001661 YY_BREAK
1662case 84:
1663YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001664#line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1665{ RET_TOK(TermOpVal, Br, BR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001666 YY_BREAK
1667case 85:
1668YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001669#line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1670{ RET_TOK(TermOpVal, Switch, SWITCH); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001671 YY_BREAK
1672case 86:
1673YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001674#line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1675{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Nate Begeman14b05292005-11-05 09:21:28 +00001676 YY_BREAK
1677case 87:
1678YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001679#line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1680{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Chris Lattnere869eef2005-11-12 00:11:49 +00001681 YY_BREAK
1682case 88:
1683YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001684#line 273 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1685{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Robert Bocchino9c62b562006-01-10 19:04:32 +00001686 YY_BREAK
1687case 89:
1688YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001689#line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1690{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Robert Bocchino2def1b32006-01-17 20:06:25 +00001691 YY_BREAK
1692case 90:
1693YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001694#line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1695{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Chris Lattner8335e842006-01-23 23:05:42 +00001696 YY_BREAK
1697case 91:
1698YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001699#line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1700{ RET_TOK(MemOpVal, Free, FREE); }
Chris Lattner66316012006-01-24 04:14:29 +00001701 YY_BREAK
1702case 92:
1703YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001704#line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1705{ RET_TOK(MemOpVal, Load, LOAD); }
Chris Lattner0e9c3762006-01-25 22:27:16 +00001706 YY_BREAK
1707case 93:
1708YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001709#line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1710{ RET_TOK(MemOpVal, Store, STORE); }
Chris Lattnerd5efe842006-04-08 01:18:56 +00001711 YY_BREAK
1712case 94:
1713YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001714#line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1715{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
Chris Lattner75466192006-05-19 21:28:53 +00001716 YY_BREAK
1717case 95:
1718YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001719#line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1720{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001721 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001722case 96:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001723YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001724#line 283 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1725{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001726 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001727case 97:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001728YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001729#line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1730{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001731 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001732case 98:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001733YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001734#line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1735{
1736 UnEscapeLexed(llvmAsmtext+1);
1737 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip %
1738 return VAR_ID;
1739 }
1740 YY_BREAK
1741case 99:
1742YY_RULE_SETUP
1743#line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1744{
1745 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon
1746 UnEscapeLexed(llvmAsmtext);
1747 llvmAsmlval.StrVal = strdup(llvmAsmtext);
1748 return LABELSTR;
1749 }
1750 YY_BREAK
1751case 100:
1752/* rule 100 can match eol */
1753YY_RULE_SETUP
1754#line 298 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1755{
1756 llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote
1757 UnEscapeLexed(llvmAsmtext+1);
1758 llvmAsmlval.StrVal = strdup(llvmAsmtext+1);
1759 return LABELSTR;
1760 }
1761 YY_BREAK
1762case 101:
1763/* rule 101 can match eol */
1764YY_RULE_SETUP
1765#line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001766{ // Note that we cannot unescape a string constant here! The
1767 // string constant might contain a \00 which would not be
1768 // understood by the string stuff. It is valid to make a
1769 // [sbyte] c"Hello World\00" constant, for example.
1770 //
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001771 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1772 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote
Reid Spencer68a24bd2005-08-27 18:50:39 +00001773 return STRINGCONSTANT;
1774 }
1775 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001776case 102:
Chris Lattnerd5efe842006-04-08 01:18:56 +00001777YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001778#line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1779{ llvmAsmlval.UInt64Val = atoull(llvmAsmtext); return EUINT64VAL; }
Chris Lattner75466192006-05-19 21:28:53 +00001780 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001781case 103:
Chris Lattner75466192006-05-19 21:28:53 +00001782YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001783#line 317 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001784{
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001785 uint64_t Val = atoull(llvmAsmtext+1);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001786 // +1: we have bigger negative range
1787 if (Val > (uint64_t)INT64_MAX+1)
Reid Spencer61c83e02006-08-18 08:43:06 +00001788 GenerateError("Constant too large for signed 64 bits!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001789 llvmAsmlval.SInt64Val = -Val;
1790 return ESINT64VAL;
1791 }
1792 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001793case 104:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001794YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001795#line 325 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001796{
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001797 llvmAsmlval.UInt64Val = HexIntToVal(llvmAsmtext+3);
1798 return llvmAsmtext[0] == 's' ? ESINT64VAL : EUINT64VAL;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001799 }
1800 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001801case 105:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001802YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001803#line 330 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001804{
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001805 uint64_t Val = atoull(llvmAsmtext+1);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001806 if ((unsigned)Val != Val)
Reid Spencer61c83e02006-08-18 08:43:06 +00001807 GenerateError("Invalid value number (too large)!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001808 llvmAsmlval.UIntVal = unsigned(Val);
1809 return UINTVAL;
1810 }
1811 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001812case 106:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001813YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001814#line 337 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001815{
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001816 uint64_t Val = atoull(llvmAsmtext+2);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001817 // +1: we have bigger negative range
1818 if (Val > (uint64_t)INT32_MAX+1)
Reid Spencer61c83e02006-08-18 08:43:06 +00001819 GenerateError("Constant too large for signed 32 bits!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001820 llvmAsmlval.SIntVal = (int)-Val;
1821 return SINTVAL;
1822 }
1823 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001824case 107:
Chris Lattnerd5efe842006-04-08 01:18:56 +00001825YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001826#line 346 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1827{ llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; }
Chris Lattner75466192006-05-19 21:28:53 +00001828 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001829case 108:
Chris Lattner75466192006-05-19 21:28:53 +00001830YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001831#line 347 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1832{ llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001833 YY_BREAK
1834case YY_STATE_EOF(INITIAL):
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001835#line 349 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001836{
1837 /* Make sure to free the internal buffers for flex when we are
1838 * done reading our input!
1839 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001840 llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001841 return EOF;
1842 }
1843 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001844case 109:
1845/* rule 109 can match eol */
Chris Lattner0e9c3762006-01-25 22:27:16 +00001846YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001847#line 357 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Chris Lattner75466192006-05-19 21:28:53 +00001848{ /* Ignore whitespace */ }
Chris Lattnerd5efe842006-04-08 01:18:56 +00001849 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001850case 110:
Chris Lattnerd5efe842006-04-08 01:18:56 +00001851YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001852#line 358 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1853{ return llvmAsmtext[0]; }
Chris Lattner75466192006-05-19 21:28:53 +00001854 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001855case 111:
Chris Lattner75466192006-05-19 21:28:53 +00001856YY_RULE_SETUP
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001857#line 360 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001858YY_FATAL_ERROR( "flex scanner jammed" );
1859 YY_BREAK
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001860#line 1861 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001861
1862 case YY_END_OF_BUFFER:
1863 {
1864 /* Amount of text matched not including the EOB char. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001865 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001866
1867 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001868 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001869 YY_RESTORE_YY_MORE_OFFSET
1870
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001871 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001872 {
1873 /* We're scanning a new file or input source. It's
1874 * possible that this happened because the user
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001875 * just pointed llvmAsmin at a new source and called
1876 * llvmAsmlex(). If so, then we have to assure
1877 * consistency between YY_CURRENT_BUFFER and our
Reid Spencer68a24bd2005-08-27 18:50:39 +00001878 * globals. Here is the right place to do so, because
1879 * this is the first action (other than possibly a
1880 * back-up) that will match for the new input source.
1881 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001882 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1883 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
1884 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001885 }
1886
1887 /* Note that here we test for yy_c_buf_p "<=" to the position
1888 * of the first EOB in the buffer, since yy_c_buf_p will
1889 * already have been incremented past the NUL character
1890 * (since all states make transitions on EOB to the
1891 * end-of-buffer state). Contrast this with the test
1892 * in input().
1893 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001894 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001895 { /* This was really a NUL. */
1896 yy_state_type yy_next_state;
1897
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001898 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001899
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001900 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001901
1902 /* Okay, we're now positioned to make the NUL
1903 * transition. We couldn't have
1904 * yy_get_previous_state() go ahead and do it
1905 * for us because it doesn't know how to deal
1906 * with the possibility of jamming (and we don't
1907 * want to build jamming into it because then it
1908 * will run more slowly).
1909 */
1910
1911 yy_next_state = yy_try_NUL_trans( yy_current_state );
1912
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001913 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001914
1915 if ( yy_next_state )
1916 {
1917 /* Consume the NUL. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001918 yy_cp = ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001919 yy_current_state = yy_next_state;
1920 goto yy_match;
1921 }
1922
1923 else
1924 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001925 yy_cp = (yy_last_accepting_cpos);
1926 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001927 goto yy_find_action;
1928 }
1929 }
1930
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001931 else switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001932 {
1933 case EOB_ACT_END_OF_FILE:
1934 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001935 (yy_did_buffer_switch_on_eof) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001936
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001937 if ( llvmAsmwrap( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001938 {
1939 /* Note: because we've taken care in
1940 * yy_get_next_buffer() to have set up
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001941 * llvmAsmtext, we can now set up
Reid Spencer68a24bd2005-08-27 18:50:39 +00001942 * yy_c_buf_p so that if some total
1943 * hoser (like flex itself) wants to
1944 * call the scanner after we return the
1945 * YY_NULL, it'll still work - another
1946 * YY_NULL will get returned.
1947 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001948 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001949
1950 yy_act = YY_STATE_EOF(YY_START);
1951 goto do_action;
1952 }
1953
1954 else
1955 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001956 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001957 YY_NEW_FILE;
1958 }
1959 break;
1960 }
1961
1962 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001963 (yy_c_buf_p) =
1964 (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001965
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001966 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001967
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001968 yy_cp = (yy_c_buf_p);
1969 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001970 goto yy_match;
1971
1972 case EOB_ACT_LAST_MATCH:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001973 (yy_c_buf_p) =
1974 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001975
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001976 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001977
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001978 yy_cp = (yy_c_buf_p);
1979 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001980 goto yy_find_action;
1981 }
1982 break;
1983 }
1984
1985 default:
1986 YY_FATAL_ERROR(
1987 "fatal flex scanner internal error--no action found" );
1988 } /* end of action switch */
1989 } /* end of scanning one token */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001990} /* end of llvmAsmlex */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001991
1992/* yy_get_next_buffer - try to read in a new buffer
1993 *
1994 * Returns a code representing an action:
1995 * EOB_ACT_LAST_MATCH -
1996 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1997 * EOB_ACT_END_OF_FILE - end of file
1998 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001999static int yy_get_next_buffer (void)
2000{
2001 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2002 register char *source = (yytext_ptr);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002003 register int number_to_move, i;
2004 int ret_val;
2005
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002006 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002007 YY_FATAL_ERROR(
2008 "fatal flex scanner internal error--end of buffer missed" );
2009
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002010 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002011 { /* Don't try to fill the buffer, so this is an EOF. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002012 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002013 {
2014 /* We matched a single character, the EOB, so
2015 * treat this as a final EOF.
2016 */
2017 return EOB_ACT_END_OF_FILE;
2018 }
2019
2020 else
2021 {
2022 /* We matched some text prior to the EOB, first
2023 * process it.
2024 */
2025 return EOB_ACT_LAST_MATCH;
2026 }
2027 }
2028
2029 /* Try to read more data. */
2030
2031 /* First move last chars to start of buffer. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002032 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002033
2034 for ( i = 0; i < number_to_move; ++i )
2035 *(dest++) = *(source++);
2036
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002037 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002038 /* don't do the read, it's not guaranteed to return an EOF,
2039 * just force an EOF
2040 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002041 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002042
2043 else
2044 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002045 int num_to_read =
2046 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002047
2048 while ( num_to_read <= 0 )
2049 { /* Not enough room in the buffer - grow it. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002050
2051 /* just a shorter name for the current buffer */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002052 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002053
2054 int yy_c_buf_p_offset =
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002055 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002056
2057 if ( b->yy_is_our_buffer )
2058 {
2059 int new_size = b->yy_buf_size * 2;
2060
2061 if ( new_size <= 0 )
2062 b->yy_buf_size += b->yy_buf_size / 8;
2063 else
2064 b->yy_buf_size *= 2;
2065
2066 b->yy_ch_buf = (char *)
2067 /* Include room in for 2 EOB chars. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002068 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002069 }
2070 else
2071 /* Can't grow it, we don't own it. */
2072 b->yy_ch_buf = 0;
2073
2074 if ( ! b->yy_ch_buf )
2075 YY_FATAL_ERROR(
2076 "fatal error - scanner input buffer overflow" );
2077
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002078 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002079
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002080 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Reid Spencer68a24bd2005-08-27 18:50:39 +00002081 number_to_move - 1;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002082
Reid Spencer68a24bd2005-08-27 18:50:39 +00002083 }
2084
2085 if ( num_to_read > YY_READ_BUF_SIZE )
2086 num_to_read = YY_READ_BUF_SIZE;
2087
2088 /* Read in more data. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002089 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2090 (yy_n_chars), num_to_read );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002091
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002092 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002093 }
2094
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002095 if ( (yy_n_chars) == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002096 {
2097 if ( number_to_move == YY_MORE_ADJ )
2098 {
2099 ret_val = EOB_ACT_END_OF_FILE;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002100 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002101 }
2102
2103 else
2104 {
2105 ret_val = EOB_ACT_LAST_MATCH;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002106 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Reid Spencer68a24bd2005-08-27 18:50:39 +00002107 YY_BUFFER_EOF_PENDING;
2108 }
2109 }
2110
2111 else
2112 ret_val = EOB_ACT_CONTINUE_SCAN;
2113
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002114 (yy_n_chars) += number_to_move;
2115 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2116 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002117
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002118 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002119
2120 return ret_val;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002121}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002122
2123/* yy_get_previous_state - get the state just before the EOB char was reached */
2124
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002125 static yy_state_type yy_get_previous_state (void)
2126{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002127 register yy_state_type yy_current_state;
2128 register char *yy_cp;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002129
2130 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002131
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002132 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002133 {
2134 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002135 if ( yy_accept[yy_current_state] )
2136 {
2137 (yy_last_accepting_state) = yy_current_state;
2138 (yy_last_accepting_cpos) = yy_cp;
2139 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002140 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2141 {
2142 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002143 if ( yy_current_state >= 479 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002144 yy_c = yy_meta[(unsigned int) yy_c];
2145 }
2146 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002147 }
2148
2149 return yy_current_state;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002150}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002151
2152/* yy_try_NUL_trans - try to make a transition on the NUL character
2153 *
2154 * synopsis
2155 * next_state = yy_try_NUL_trans( current_state );
2156 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002157 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2158{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002159 register int yy_is_jam;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002160 register char *yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002161
2162 register YY_CHAR yy_c = 1;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002163 if ( yy_accept[yy_current_state] )
2164 {
2165 (yy_last_accepting_state) = yy_current_state;
2166 (yy_last_accepting_cpos) = yy_cp;
2167 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002168 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2169 {
2170 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002171 if ( yy_current_state >= 479 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002172 yy_c = yy_meta[(unsigned int) yy_c];
2173 }
2174 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002175 yy_is_jam = (yy_current_state == 478);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002176
2177 return yy_is_jam ? 0 : yy_current_state;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002178}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002179
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002180 static inline void yyunput (int c, register char * yy_bp )
2181{
2182 register char *yy_cp;
2183
2184 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002185
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002186 /* undo effects of setting up llvmAsmtext */
2187 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002188
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002189 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002190 { /* need to shift things up to make room */
2191 /* +2 for EOB chars. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002192 register int number_to_move = (yy_n_chars) + 2;
2193 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2194 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002195 register char *source =
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002196 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002197
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002198 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002199 *--dest = *--source;
2200
2201 yy_cp += (int) (dest - source);
2202 yy_bp += (int) (dest - source);
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002203 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2204 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002205
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002206 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002207 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2208 }
2209
2210 *--yy_cp = (char) c;
2211
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002212 if ( c == '\n' ){
2213 --llvmAsmlineno;
2214 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002215
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002216 (yytext_ptr) = yy_bp;
2217 (yy_hold_char) = *yy_cp;
2218 (yy_c_buf_p) = yy_cp;
2219}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002220
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002221#ifndef YY_NO_INPUT
Reid Spencer68a24bd2005-08-27 18:50:39 +00002222#ifdef __cplusplus
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002223 static int yyinput (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002224#else
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002225 static int input (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002226#endif
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002227
2228{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002229 int c;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002230
2231 *(yy_c_buf_p) = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002232
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002233 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002234 {
2235 /* yy_c_buf_p now points to the character we want to return.
2236 * If this occurs *before* the EOB characters, then it's a
2237 * valid NUL; if not, then we've hit the end of the buffer.
2238 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002239 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002240 /* This was really a NUL. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002241 *(yy_c_buf_p) = '\0';
Reid Spencer68a24bd2005-08-27 18:50:39 +00002242
2243 else
2244 { /* need more input */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002245 int offset = (yy_c_buf_p) - (yytext_ptr);
2246 ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002247
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002248 switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002249 {
2250 case EOB_ACT_LAST_MATCH:
2251 /* This happens because yy_g_n_b()
2252 * sees that we've accumulated a
2253 * token and flags that we need to
2254 * try matching the token before
2255 * proceeding. But for input(),
2256 * there's no matching to consider.
2257 * So convert the EOB_ACT_LAST_MATCH
2258 * to EOB_ACT_END_OF_FILE.
2259 */
2260
2261 /* Reset buffer status. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002262 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002263
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002264 /*FALLTHROUGH*/
Reid Spencer68a24bd2005-08-27 18:50:39 +00002265
2266 case EOB_ACT_END_OF_FILE:
2267 {
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002268 if ( llvmAsmwrap( ) )
Reid Spencer61c83e02006-08-18 08:43:06 +00002269 return EOF;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002270
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002271 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002272 YY_NEW_FILE;
2273#ifdef __cplusplus
2274 return yyinput();
2275#else
2276 return input();
2277#endif
2278 }
2279
2280 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002281 (yy_c_buf_p) = (yytext_ptr) + offset;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002282 break;
2283 }
2284 }
2285 }
2286
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002287 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2288 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */
2289 (yy_hold_char) = *++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002290
2291 if ( c == '\n' )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002292
2293 llvmAsmlineno++;
2294;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002295
2296 return c;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002297}
2298#endif /* ifndef YY_NO_INPUT */
2299
2300/** Immediately switch to a different input stream.
2301 * @param input_file A readable stream.
2302 *
2303 * @note This function does not reset the start condition to @c INITIAL .
2304 */
2305 void llvmAsmrestart (FILE * input_file )
2306{
2307
2308 if ( ! YY_CURRENT_BUFFER ){
2309 llvmAsmensure_buffer_stack ();
2310 YY_CURRENT_BUFFER_LVALUE =
2311 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002312 }
Chris Lattner224f84f2006-08-18 17:34:45 +00002313
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002314 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
2315 llvmAsm_load_buffer_state( );
2316}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002317
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002318/** Switch to a different input buffer.
2319 * @param new_buffer The new input buffer.
2320 *
2321 */
2322 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2323{
2324
2325 /* TODO. We should be able to replace this entire function body
2326 * with
2327 * llvmAsmpop_buffer_state();
2328 * llvmAsmpush_buffer_state(new_buffer);
2329 */
2330 llvmAsmensure_buffer_stack ();
2331 if ( YY_CURRENT_BUFFER == new_buffer )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002332 return;
2333
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002334 if ( YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002335 {
2336 /* Flush out information for old buffer. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002337 *(yy_c_buf_p) = (yy_hold_char);
2338 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2339 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002340 }
2341
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002342 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2343 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002344
2345 /* We don't actually know whether we did this switch during
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002346 * EOF (llvmAsmwrap()) processing, but the only time this flag
2347 * is looked at is after llvmAsmwrap() is called, so it's safe
Reid Spencer68a24bd2005-08-27 18:50:39 +00002348 * to go ahead and always set it.
2349 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002350 (yy_did_buffer_switch_on_eof) = 1;
2351}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002352
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002353static void llvmAsm_load_buffer_state (void)
2354{
2355 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2356 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2357 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2358 (yy_hold_char) = *(yy_c_buf_p);
2359}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002360
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002361/** Allocate and initialize an input buffer state.
2362 * @param file A readable stream.
2363 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2364 *
2365 * @return the allocated buffer state.
2366 */
2367 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size )
2368{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002369 YY_BUFFER_STATE b;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002370
2371 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002372 if ( ! b )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002373 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002374
2375 b->yy_buf_size = size;
2376
2377 /* yy_ch_buf has to be 2 characters longer than the size given because
2378 * we need to put in 2 end-of-buffer characters.
2379 */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002380 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002381 if ( ! b->yy_ch_buf )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002382 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002383
2384 b->yy_is_our_buffer = 1;
2385
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002386 llvmAsm_init_buffer(b,file );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002387
2388 return b;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002389}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002390
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002391/** Destroy the buffer.
2392 * @param b a buffer created with llvmAsm_create_buffer()
2393 *
2394 */
2395 void llvmAsm_delete_buffer (YY_BUFFER_STATE b )
2396{
2397
Reid Spencer68a24bd2005-08-27 18:50:39 +00002398 if ( ! b )
2399 return;
2400
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002401 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2402 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002403
2404 if ( b->yy_is_our_buffer )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002405 llvmAsmfree((void *) b->yy_ch_buf );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002406
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002407 llvmAsmfree((void *) b );
2408}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002409
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002410/* Initializes or reinitializes a buffer.
2411 * This function is sometimes called more than once on the same buffer,
2412 * such as during a llvmAsmrestart() or at EOF.
2413 */
2414 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002415
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002416{
2417 int oerrno = errno;
2418
2419 llvmAsm_flush_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002420
2421 b->yy_input_file = file;
2422 b->yy_fill_buffer = 1;
2423
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002424 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
2425 * called from llvmAsmrestart() or through yy_get_next_buffer.
2426 * In that case, we don't want to reset the lineno or column.
2427 */
2428 if (b != YY_CURRENT_BUFFER){
2429 b->yy_bs_lineno = 1;
2430 b->yy_bs_column = 0;
2431 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002432
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002433 b->yy_is_interactive = 0;
2434
2435 errno = oerrno;
2436}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002437
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002438/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2439 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2440 *
2441 */
2442 void llvmAsm_flush_buffer (YY_BUFFER_STATE b )
2443{
2444 if ( ! b )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002445 return;
2446
2447 b->yy_n_chars = 0;
2448
2449 /* We always need two end-of-buffer characters. The first causes
2450 * a transition to the end-of-buffer state. The second causes
2451 * a jam in that state.
2452 */
2453 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2454 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2455
2456 b->yy_buf_pos = &b->yy_ch_buf[0];
2457
2458 b->yy_at_bol = 1;
2459 b->yy_buffer_status = YY_BUFFER_NEW;
2460
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002461 if ( b == YY_CURRENT_BUFFER )
2462 llvmAsm_load_buffer_state( );
2463}
2464
2465/** Pushes the new state onto the stack. The new state becomes
2466 * the current state. This function will allocate the stack
2467 * if necessary.
2468 * @param new_buffer The new state.
2469 *
2470 */
2471void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
2472{
2473 if (new_buffer == NULL)
2474 return;
2475
2476 llvmAsmensure_buffer_stack();
2477
2478 /* This block is copied from llvmAsm_switch_to_buffer. */
2479 if ( YY_CURRENT_BUFFER )
2480 {
2481 /* Flush out information for old buffer. */
2482 *(yy_c_buf_p) = (yy_hold_char);
2483 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2484 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2485 }
2486
2487 /* Only push if top exists. Otherwise, replace top. */
2488 if (YY_CURRENT_BUFFER)
2489 (yy_buffer_stack_top)++;
2490 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2491
2492 /* copied from llvmAsm_switch_to_buffer. */
2493 llvmAsm_load_buffer_state( );
2494 (yy_did_buffer_switch_on_eof) = 1;
2495}
2496
2497/** Removes and deletes the top of the stack, if present.
2498 * The next element becomes the new top.
2499 *
2500 */
2501void llvmAsmpop_buffer_state (void)
2502{
2503 if (!YY_CURRENT_BUFFER)
2504 return;
2505
2506 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2507 YY_CURRENT_BUFFER_LVALUE = NULL;
2508 if ((yy_buffer_stack_top) > 0)
2509 --(yy_buffer_stack_top);
2510
2511 if (YY_CURRENT_BUFFER) {
2512 llvmAsm_load_buffer_state( );
2513 (yy_did_buffer_switch_on_eof) = 1;
2514 }
2515}
2516
2517/* Allocates the stack if it does not exist.
2518 * Guarantees space for at least one push.
2519 */
2520static void llvmAsmensure_buffer_stack (void)
2521{
2522 int num_to_alloc;
2523
2524 if (!(yy_buffer_stack)) {
2525
2526 /* First allocation is just for 2 elements, since we don't know if this
2527 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2528 * immediate realloc on the next call.
2529 */
2530 num_to_alloc = 1;
2531 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
2532 (num_to_alloc * sizeof(struct yy_buffer_state*)
2533 );
2534
2535 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2536
2537 (yy_buffer_stack_max) = num_to_alloc;
2538 (yy_buffer_stack_top) = 0;
2539 return;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002540 }
2541
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002542 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Reid Spencer68a24bd2005-08-27 18:50:39 +00002543
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002544 /* Increase the buffer to prepare for a possible push. */
2545 int grow_size = 8 /* arbitrary grow size */;
2546
2547 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2548 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
2549 ((yy_buffer_stack),
2550 num_to_alloc * sizeof(struct yy_buffer_state*)
2551 );
2552
2553 /* zero only the new slots.*/
2554 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2555 (yy_buffer_stack_max) = num_to_alloc;
2556 }
2557}
2558
2559/** Setup the input buffer state to scan directly from a user-specified character buffer.
2560 * @param base the character buffer
2561 * @param size the size in bytes of the character buffer
2562 *
2563 * @return the newly allocated buffer state object.
2564 */
2565YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size )
2566{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002567 YY_BUFFER_STATE b;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002568
Reid Spencer68a24bd2005-08-27 18:50:39 +00002569 if ( size < 2 ||
2570 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2571 base[size-1] != YY_END_OF_BUFFER_CHAR )
2572 /* They forgot to leave room for the EOB's. */
2573 return 0;
2574
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002575 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002576 if ( ! b )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002577 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002578
2579 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2580 b->yy_buf_pos = b->yy_ch_buf = base;
2581 b->yy_is_our_buffer = 0;
2582 b->yy_input_file = 0;
2583 b->yy_n_chars = b->yy_buf_size;
2584 b->yy_is_interactive = 0;
2585 b->yy_at_bol = 1;
2586 b->yy_fill_buffer = 0;
2587 b->yy_buffer_status = YY_BUFFER_NEW;
2588
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002589 llvmAsm_switch_to_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002590
2591 return b;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002592}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002593
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002594/** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
2595 * scan from a @e copy of @a str.
2596 * @param str a NUL-terminated string to scan
2597 *
2598 * @return the newly allocated buffer state object.
2599 * @note If you want to scan bytes that may contain NUL values, then use
2600 * llvmAsm_scan_bytes() instead.
2601 */
2602YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
2603{
2604
2605 return llvmAsm_scan_bytes(yystr,strlen(yystr) );
2606}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002607
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002608/** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
2609 * scan from a @e copy of @a bytes.
2610 * @param bytes the byte buffer to scan
2611 * @param len the number of bytes in the buffer pointed to by @a bytes.
2612 *
2613 * @return the newly allocated buffer state object.
2614 */
2615YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2616{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002617 YY_BUFFER_STATE b;
2618 char *buf;
2619 yy_size_t n;
2620 int i;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002621
Reid Spencer68a24bd2005-08-27 18:50:39 +00002622 /* Get memory for full buffer, including space for trailing EOB's. */
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002623 n = _yybytes_len + 2;
2624 buf = (char *) llvmAsmalloc(n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002625 if ( ! buf )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002626 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002627
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002628 for ( i = 0; i < _yybytes_len; ++i )
2629 buf[i] = yybytes[i];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002630
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002631 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002632
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002633 b = llvmAsm_scan_buffer(buf,n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002634 if ( ! b )
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002635 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002636
2637 /* It's okay to grow etc. this buffer, and we should throw it
2638 * away when we're done.
2639 */
2640 b->yy_is_our_buffer = 1;
2641
2642 return b;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002643}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002644
2645#ifndef YY_EXIT_FAILURE
2646#define YY_EXIT_FAILURE 2
2647#endif
2648
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002649static void yy_fatal_error (yyconst char* msg )
2650{
2651 (void) fprintf( stderr, "%s\n", msg );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002652 exit( YY_EXIT_FAILURE );
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002653}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002654
2655/* Redefine yyless() so it works in section 3 code. */
2656
2657#undef yyless
2658#define yyless(n) \
2659 do \
2660 { \
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002661 /* Undo effects of setting up llvmAsmtext. */ \
2662 int yyless_macro_arg = (n); \
2663 YY_LESS_LINENO(yyless_macro_arg);\
2664 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
2665 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
2666 (yy_hold_char) = *(yy_c_buf_p); \
2667 *(yy_c_buf_p) = '\0'; \
2668 llvmAsmleng = yyless_macro_arg; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00002669 } \
2670 while ( 0 )
2671
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002672/* Accessor methods (get/set functions) to struct members. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002673
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002674/** Get the current line number.
2675 *
2676 */
2677int llvmAsmget_lineno (void)
2678{
2679
2680 return llvmAsmlineno;
2681}
2682
2683/** Get the input stream.
2684 *
2685 */
2686FILE *llvmAsmget_in (void)
2687{
2688 return llvmAsmin;
2689}
2690
2691/** Get the output stream.
2692 *
2693 */
2694FILE *llvmAsmget_out (void)
2695{
2696 return llvmAsmout;
2697}
2698
2699/** Get the length of the current token.
2700 *
2701 */
2702int llvmAsmget_leng (void)
2703{
2704 return llvmAsmleng;
2705}
2706
2707/** Get the current token.
2708 *
2709 */
2710
2711char *llvmAsmget_text (void)
2712{
2713 return llvmAsmtext;
2714}
2715
2716/** Set the current line number.
2717 * @param line_number
2718 *
2719 */
2720void llvmAsmset_lineno (int line_number )
2721{
2722
2723 llvmAsmlineno = line_number;
2724}
2725
2726/** Set the input stream. This does not discard the current
2727 * input buffer.
2728 * @param in_str A readable stream.
2729 *
2730 * @see llvmAsm_switch_to_buffer
2731 */
2732void llvmAsmset_in (FILE * in_str )
2733{
2734 llvmAsmin = in_str ;
2735}
2736
2737void llvmAsmset_out (FILE * out_str )
2738{
2739 llvmAsmout = out_str ;
2740}
2741
2742int llvmAsmget_debug (void)
2743{
2744 return llvmAsm_flex_debug;
2745}
2746
2747void llvmAsmset_debug (int bdebug )
2748{
2749 llvmAsm_flex_debug = bdebug ;
2750}
2751
2752static int yy_init_globals (void)
2753{
2754 /* Initialization is the same as for the non-reentrant scanner.
2755 * This function is called from llvmAsmlex_destroy(), so don't allocate here.
2756 */
2757
2758 /* We do not touch llvmAsmlineno unless the option is enabled. */
2759 llvmAsmlineno = 1;
2760
2761 (yy_buffer_stack) = 0;
2762 (yy_buffer_stack_top) = 0;
2763 (yy_buffer_stack_max) = 0;
2764 (yy_c_buf_p) = (char *) 0;
2765 (yy_init) = 0;
2766 (yy_start) = 0;
2767
2768/* Defined in main.c */
2769#ifdef YY_STDINIT
2770 llvmAsmin = stdin;
2771 llvmAsmout = stdout;
2772#else
2773 llvmAsmin = (FILE *) 0;
2774 llvmAsmout = (FILE *) 0;
2775#endif
2776
2777 /* For future reference: Set errno on error, since we are called by
2778 * llvmAsmlex_init()
2779 */
2780 return 0;
2781}
2782
2783/* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
2784int llvmAsmlex_destroy (void)
2785{
2786
2787 /* Pop the buffer stack, destroying each element. */
2788 while(YY_CURRENT_BUFFER){
2789 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2790 YY_CURRENT_BUFFER_LVALUE = NULL;
2791 llvmAsmpop_buffer_state();
2792 }
2793
2794 /* Destroy the stack itself. */
2795 llvmAsmfree((yy_buffer_stack) );
2796 (yy_buffer_stack) = NULL;
2797
2798 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2799 * llvmAsmlex() is called, initialization will occur. */
2800 yy_init_globals( );
2801
2802 return 0;
2803}
2804
2805/*
2806 * Internal utility routines.
2807 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002808
2809#ifndef yytext_ptr
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002810static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2811{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002812 register int i;
2813 for ( i = 0; i < n; ++i )
2814 s1[i] = s2[i];
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002815}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002816#endif
2817
2818#ifdef YY_NEED_STRLEN
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002819static int yy_flex_strlen (yyconst char * s )
2820{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002821 register int n;
2822 for ( n = 0; s[n]; ++n )
2823 ;
2824
2825 return n;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002826}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002827#endif
2828
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002829void *llvmAsmalloc (yy_size_t size )
2830{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002831 return (void *) malloc( size );
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002832}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002833
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002834void *llvmAsmrealloc (void * ptr, yy_size_t size )
2835{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002836 /* The cast to (char *) in the following accommodates both
2837 * implementations that use char* generic pointers, and those
2838 * that use void* generic pointers. It works with the latter
2839 * because both ANSI C and C++ allow castless assignment from
2840 * any pointer type to void*, and deal with argument conversions
2841 * as though doing an assignment.
2842 */
2843 return (void *) realloc( (char *) ptr, size );
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002844}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002845
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002846void llvmAsmfree (void * ptr )
2847{
2848 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */
2849}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002850
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00002851#define YYTABLES_NAME "yytables"
2852
2853#line 360 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2854
2855
Chris Lattner2fecc0f2006-02-15 07:02:59 +00002856