blob: 752ba0152d8b7cbe0cb73de247d9f74cafec755e [file] [log] [blame]
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001#line 2 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003#line 4 "Lexer.cpp"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00004
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00005#define YY_INT_ALIGNED short int
6
7/* 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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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>
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +000021#include <string.h>
22#include <errno.h>
Reid Spencer832254e2007-02-02 02:16:23 +000023#include <stdlib.h>
24
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +000025/* end standard C headers. */
26
27/* 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
41#endif
42
43#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 */
89
90#ifdef __cplusplus
Reid Spencer832254e2007-02-02 02:16:23 +000091
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 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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". */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000142#ifndef YY_BUF_SIZE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000143#define YY_BUF_SIZE (16384*64)
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000144#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000145
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000153#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000154
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 { \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Reid Spencer6f407902007-01-13 05:00:46 +0000193
Reid Spencer68a24bd2005-08-27 18:50:39 +0000194/* 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 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000202#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000203
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000265
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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".
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000277 *
278 * Returns the top of the stack, or NULL.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000279 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000316#define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000317
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 { \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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 { \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000350/* Begin user sect3 */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000351
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000352#define llvmAsmwrap(n) 1
Reid Spencer68a24bd2005-08-27 18:50:39 +0000353#define YY_SKIP_YYWRAP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000354
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000374 * corresponding action - sets up llvmAsmtext.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +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'; \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000381 (yy_c_buf_p) = yy_cp;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000382
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000383#define YY_NUM_RULES 137
384#define YY_END_OF_BUFFER 138
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000385/* 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 };
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000392static yyconst flex_int16_t yy_accept[552] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000393 { 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000394 0, 0, 138, 136, 135, 135, 136, 136, 136, 136,
395 136, 136, 128, 128, 1, 136, 136, 136, 136, 136,
396 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
397 136, 136, 136, 136, 136, 136, 136, 136, 0, 126,
398 0, 124, 122, 131, 0, 129, 0, 133, 128, 0,
399 1, 0, 123, 132, 0, 0, 0, 0, 0, 0,
400 0, 108, 0, 37, 0, 0, 0, 0, 0, 0,
401 71, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 53, 0, 0, 0, 0, 0, 0, 0, 0,
403 0, 72, 0, 0, 0, 0, 0, 0, 0, 67,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000404
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 24, 0, 0, 0,
407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000408 0, 0, 126, 122, 133, 21, 133, 0, 134, 0,
409 127, 123, 54, 0, 0, 66, 0, 0, 35, 0,
410 0, 0, 38, 0, 0, 0, 0, 0, 0, 0,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000411 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000413 0, 0, 0, 0, 0, 56, 0, 0, 0, 81,
414 86, 84, 85, 83, 82, 0, 87, 91, 0, 107,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000415
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000416 0, 0, 0, 0, 0, 76, 74, 63, 0, 0,
417 0, 75, 73, 0, 0, 55, 0, 0, 0, 0,
418 0, 0, 0, 0, 89, 80, 78, 0, 79, 77,
419 0, 90, 88, 0, 0, 0, 0, 0, 0, 0,
420 0, 68, 0, 0, 125, 133, 0, 0, 0, 133,
421 0, 0, 0, 0, 65, 0, 0, 92, 0, 0,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000423 0, 70, 59, 0, 0, 0, 0, 115, 62, 0,
424 0, 0, 69, 0, 0, 0, 0, 0, 0, 0,
425 116, 64, 0, 0, 0, 0, 23, 0, 0, 130,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000426
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000427 58, 0, 0, 95, 0, 0, 0, 61, 44, 0,
428 0, 25, 0, 0, 0, 4, 0, 51, 57, 0,
429 0, 0, 0, 60, 0, 47, 0, 12, 0, 0,
430 94, 133, 33, 31, 0, 0, 2, 0, 0, 0,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
432 0, 48, 97, 0, 0, 0, 0, 0, 0, 43,
433 0, 0, 0, 0, 50, 0, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 117, 0, 0,
435 0, 0, 93, 0, 22, 0, 0, 0, 0, 0,
436 0, 0, 114, 0, 0, 40, 0, 0, 0, 7,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000437
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000438 0, 0, 0, 49, 0, 0, 39, 101, 100, 0,
439 0, 8, 16, 0, 0, 0, 110, 0, 113, 34,
440 0, 0, 52, 0, 0, 105, 0, 0, 99, 109,
441 26, 0, 27, 98, 0, 111, 106, 0, 0, 0,
442 0, 0, 104, 0, 0, 6, 28, 0, 0, 0,
443 0, 0, 96, 0, 0, 0, 0, 0, 0, 0,
444 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,
445 0, 9, 0, 0, 0, 0, 18, 0, 0, 0,
446 10, 102, 11, 46, 45, 103, 0, 0, 0, 0,
447 30, 0, 0, 0, 13, 0, 15, 14, 0, 0,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000448
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000449 0, 0, 0, 0, 0, 0, 0, 0, 0, 29,
450 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
451 0, 17, 0, 0, 0, 0, 0, 112, 0, 0,
452 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
453 118, 120, 121, 0, 41, 0, 119, 42, 0, 20,
454 0
Reid Spencer68a24bd2005-08-27 18:50:39 +0000455 } ;
456
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000457static yyconst flex_int32_t yy_ec[256] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000458 { 0,
459 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
460 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
Reid Spencera54b7cb2007-01-12 07:05:14 +0000463 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
464 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000465 1, 1, 1, 16, 17, 17, 17, 17, 18, 17,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000466 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
467 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000468 1, 1, 1, 1, 19, 1, 20, 21, 22, 23,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000469
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000470 24, 25, 26, 27, 28, 5, 29, 30, 31, 32,
471 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
472 43, 44, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000473 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, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1
487 } ;
488
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000489static yyconst flex_int32_t yy_meta[45] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000490 { 0,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000491 1, 1, 2, 3, 4, 1, 1, 4, 4, 4,
492 4, 4, 4, 5, 1, 1, 4, 4, 4, 4,
493 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
494 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
495 4, 4, 4, 4
Reid Spencer68a24bd2005-08-27 18:50:39 +0000496 } ;
497
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000498static yyconst flex_int16_t yy_base[560] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000499 { 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000500 0, 0, 1201, 1202, 1202, 1202, 1196, 1185, 35, 39,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000501 43, 49, 55, 61, 0, 72, 64, 67, 66, 86,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000502 76, 106, 91, 65, 133, 121, 117, 99, 152, 95,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000503 78, 179, 137, 211, 139, 90, 148, 93, 1194, 1202,
504 1183, 1202, 0, 49, 185, 217, 116, 238, 254, 259,
505 0, 1192, 0, 200, 125, 149, 146, 153, 177, 63,
506 154, 1181, 160, 161, 208, 185, 264, 171, 113, 210,
507 1180, 222, 260, 228, 186, 261, 271, 110, 273, 274,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000508 230, 289, 277, 278, 240, 290, 292, 205, 291, 232,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000509 296, 1179, 299, 303, 305, 306, 310, 313, 309, 318,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000510
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000511 311, 314, 317, 322, 328, 329, 338, 331, 335, 339,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000512 333, 332, 346, 340, 352, 355, 1178, 358, 360, 361,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000513 364, 368, 365, 369, 381, 376, 382, 388, 367, 396,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000514 384, 395, 1177, 0, 414, 1176, 429, 447, 0, 1185,
515 1202, 0, 1174, 409, 397, 1173, 420, 414, 1172, 405,
516 399, 422, 1171, 442, 431, 449, 432, 450, 437, 452,
517 456, 1170, 457, 435, 459, 460, 461, 465, 370, 469,
518 468, 472, 470, 475, 473, 476, 489, 490, 492, 494,
519 481, 497, 495, 502, 498, 1169, 503, 501, 505, 1168,
520 1167, 1166, 1165, 1164, 1163, 507, 1162, 1161, 508, 1160,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000521
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000522 537, 512, 515, 510, 525, 1159, 1158, 1157, 516, 542,
523 531, 1156, 1155, 537, 529, 1154, 553, 555, 231, 556,
524 558, 557, 559, 560, 1153, 1152, 1151, 562, 1150, 1149,
525 563, 1148, 1147, 564, 565, 509, 524, 576, 582, 568,
526 584, 1146, 572, 570, 1202, 599, 608, 614, 618, 623,
527 608, 624, 592, 625, 1145, 626, 587, 1144, 627, 628,
528 629, 630, 632, 633, 634, 637, 639, 638, 640, 580,
529 641, 1143, 1142, 648, 651, 653, 656, 1141, 1140, 657,
530 658, 659, 1139, 665, 661, 663, 667, 674, 666, 668,
531 1138, 1137, 671, 679, 670, 680, 1136, 684, 691, 0,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000532
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000533 1135, 688, 692, 1134, 693, 696, 697, 1133, 1132, 701,
534 705, 1131, 712, 714, 699, 1130, 716, 1129, 1128, 717,
535 718, 719, 703, 1127, 723, 1126, 726, 1125, 730, 732,
536 1124, 737, 1123, 1122, 731, 738, 1121, 739, 740, 743,
537 751, 742, 744, 752, 755, 756, 758, 760, 761, 1120,
538 763, 1119, 1118, 765, 766, 767, 772, 770, 773, 1117,
539 774, 777, 781, 783, 1116, 784, 788, 787, 789, 790,
540 799, 792, 794, 800, 803, 805, 807, 1115, 808, 810,
541 811, 812, 1114, 815, 1113, 817, 823, 818, 826, 831,
542 828, 829, 1112, 836, 833, 1111, 838, 698, 839, 1110,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000543
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000544 841, 842, 843, 1109, 848, 844, 1108, 1107, 1106, 851,
545 846, 1105, 1104, 845, 860, 858, 1103, 865, 1102, 1101,
546 867, 869, 1100, 870, 872, 1099, 871, 874, 1098, 1097,
547 1096, 875, 1095, 1094, 878, 1093, 1092, 876, 877, 884,
548 883, 886, 1091, 879, 894, 1090, 1089, 895, 896, 898,
549 899, 901, 1088, 902, 905, 906, 907, 909, 908, 914,
550 910, 1087, 916, 920, 924, 927, 928, 931, 935, 932,
551 936, 1086, 937, 939, 941, 944, 1085, 945, 946, 947,
552 1074, 1064, 1063, 1062, 1061, 1060, 949, 950, 951, 953,
553 1059, 966, 967, 968, 1058, 952, 1057, 1056, 969, 971,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000554
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000555 972, 977, 978, 979, 980, 983, 984, 985, 987, 1055,
556 989, 991, 992, 995, 997, 1053, 1000, 1007, 998, 1002,
557 1009, 1049, 1010, 1011, 1013, 1015, 1016, 1046, 1022, 1019,
558 1023, 1024, 1026, 1028, 1029, 1045, 1033, 1036, 371, 1030,
559 599, 522, 474, 1039, 434, 1040, 282, 279, 1043, 244,
560 1202, 1079, 1081, 212, 1086, 1089, 167, 1093, 108
Reid Spencer68a24bd2005-08-27 18:50:39 +0000561 } ;
562
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000563static yyconst flex_int16_t yy_def[560] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000564 { 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000565 551, 1, 551, 551, 551, 551, 552, 553, 554, 551,
566 553, 553, 553, 553, 555, 556, 553, 553, 553, 553,
567 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
568 553, 553, 553, 553, 553, 553, 553, 553, 552, 551,
569 553, 551, 557, 551, 551, 553, 553, 553, 553, 553,
570 555, 558, 559, 551, 553, 553, 553, 553, 553, 553,
571 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
572 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
573 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
574 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000575
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000576 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
577 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
578 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
579 553, 553, 551, 557, 551, 553, 553, 553, 50, 558,
580 551, 559, 553, 553, 553, 553, 553, 553, 553, 553,
581 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
582 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
583 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
584 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
585 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000586
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000587 50, 553, 553, 553, 553, 553, 553, 553, 553, 553,
588 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
589 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
590 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
591 553, 553, 553, 553, 551, 551, 551, 551, 553, 553,
592 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
593 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
594 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
595 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
596 553, 553, 553, 553, 553, 553, 553, 553, 553, 201,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000597
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000598 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
599 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
600 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
601 553, 551, 553, 553, 553, 553, 553, 553, 553, 553,
602 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
603 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
604 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
605 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
606 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
607 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000608
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000609 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
610 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
611 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
612 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
613 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
614 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
615 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
616 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
617 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
618 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000619
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000620 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
621 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
622 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
623 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
624 553, 553, 553, 553, 553, 553, 553, 553, 553, 553,
625 0, 551, 551, 551, 551, 551, 551, 551, 551
Reid Spencer68a24bd2005-08-27 18:50:39 +0000626 } ;
627
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000628static yyconst flex_int16_t yy_nxt[1247] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000629 { 0,
630 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000631 14, 14, 14, 4, 15, 16, 8, 8, 8, 17,
632 18, 19, 20, 21, 22, 23, 24, 25, 8, 26,
633 27, 28, 29, 30, 8, 31, 32, 33, 34, 35,
634 36, 37, 8, 38, 44, 44, 44, 44, 45, 45,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000635 45, 45, 46, 46, 46, 46, 42, 47, 44, 44,
636 44, 44, 42, 48, 49, 49, 49, 49, 42, 48,
637 49, 49, 49, 49, 42, 52, 42, 42, 42, 42,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000638 42, 54, 54, 54, 54, 63, 55, 64, 150, 42,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000639 60, 42, 81, 56, 61, 57, 50, 58, 65, 42,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000640
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000641 59, 103, 62, 42, 42, 66, 42, 70, 42, 67,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000642 71, 142, 42, 129, 79, 68, 132, 72, 69, 42,
643 80, 101, 92, 42, 136, 73, 42, 74, 75, 42,
644 42, 93, 102, 171, 42, 76, 89, 94, 42, 77,
645 85, 78, 82, 82, 82, 82, 42, 143, 86, 90,
646 42, 161, 42, 87, 83, 91, 115, 88, 127, 42,
647 130, 42, 42, 116, 84, 42, 42, 42, 146, 117,
648 134, 128, 118, 42, 42, 95, 144, 96, 145, 119,
649 131, 97, 153, 98, 42, 99, 147, 100, 104, 152,
650 42, 151, 42, 135, 45, 45, 45, 45, 42, 42,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000651
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000652 160, 105, 106, 148, 107, 108, 109, 149, 110, 54,
653 54, 54, 54, 167, 111, 43, 112, 113, 42, 114,
654 104, 42, 156, 42, 42, 48, 46, 46, 46, 46,
655 42, 183, 162, 120, 121, 42, 122, 154, 123, 155,
656 124, 42, 125, 42, 42, 42, 126, 137, 137, 137,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000657 137, 42, 174, 42, 185, 138, 313, 42, 166, 163,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000658 180, 138, 48, 49, 49, 49, 49, 42, 139, 139,
659 139, 139, 42, 42, 42, 139, 139, 42, 139, 139,
660 139, 139, 139, 139, 42, 157, 42, 42, 158, 164,
661 42, 42, 42, 168, 169, 42, 165, 159, 82, 82,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000662
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000663 82, 82, 42, 42, 42, 42, 173, 175, 170, 42,
664 172, 182, 42, 176, 177, 178, 42, 179, 42, 42,
665 184, 181, 42, 42, 42, 186, 42, 42, 196, 191,
666 42, 42, 189, 193, 187, 42, 195, 188, 198, 190,
667 197, 42, 42, 192, 42, 42, 42, 194, 42, 199,
668 203, 42, 42, 42, 200, 202, 214, 210, 204, 42,
669 208, 206, 212, 201, 215, 42, 216, 217, 42, 209,
670 205, 42, 211, 42, 42, 207, 213, 42, 42, 218,
671 42, 42, 42, 42, 42, 221, 240, 219, 224, 42,
672 220, 226, 229, 223, 42, 42, 222, 42, 225, 236,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000673
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000674 237, 42, 228, 231, 232, 227, 230, 241, 42, 42,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000675 42, 275, 42, 233, 546, 238, 234, 239, 42, 242,
676 257, 235, 42, 246, 246, 246, 246, 42, 251, 253,
677 243, 247, 256, 42, 252, 42, 244, 247, 137, 137,
678 137, 137, 42, 254, 42, 42, 138, 42, 42, 255,
679 42, 258, 138, 248, 249, 42, 250, 250, 250, 250,
680 42, 262, 42, 42, 259, 42, 264, 260, 261, 42,
681 42, 270, 42, 42, 42, 265, 267, 263, 42, 266,
682 268, 42, 42, 42, 274, 42, 42, 42, 42, 42,
683 281, 278, 269, 272, 42, 280, 271, 282, 279, 284,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000684
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000685 273, 276, 42, 42, 277, 42, 283, 42, 42, 290,
686 42, 42, 285, 286, 42, 42, 42, 289, 42, 291,
687 42, 42, 42, 42, 288, 42, 295, 287, 42, 42,
688 292, 293, 296, 303, 297, 42, 294, 42, 42, 324,
689 305, 298, 42, 325, 42, 299, 300, 300, 300, 300,
690 42, 301, 302, 300, 300, 42, 300, 300, 300, 300,
691 300, 300, 304, 307, 310, 306, 42, 308, 42, 42,
692 42, 42, 42, 42, 309, 42, 42, 42, 42, 314,
693 316, 42, 318, 42, 312, 42, 321, 322, 317, 42,
694 311, 315, 323, 42, 320, 42, 328, 42, 326, 319,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000695
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000696 42, 327, 329, 350, 330, 42, 338, 331, 246, 246,
697 246, 246, 42, 335, 248, 248, 247, 332, 332, 332,
698 332, 42, 247, 332, 332, 332, 332, 250, 250, 250,
699 250, 42, 250, 250, 250, 250, 42, 42, 42, 42,
700 42, 42, 42, 42, 333, 42, 42, 42, 339, 342,
701 42, 42, 42, 42, 42, 334, 336, 337, 341, 349,
702 344, 42, 351, 343, 42, 340, 42, 346, 347, 42,
703 42, 42, 42, 348, 42, 345, 42, 358, 42, 42,
704 42, 42, 359, 42, 42, 352, 357, 42, 353, 354,
705 360, 355, 42, 42, 356, 365, 361, 42, 362, 363,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000706
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000707 366, 42, 364, 367, 42, 42, 42, 369, 368, 42,
708 42, 42, 42, 374, 42, 373, 42, 375, 42, 376,
709 370, 377, 371, 372, 378, 42, 379, 42, 382, 42,
710 42, 42, 42, 381, 387, 380, 42, 383, 386, 42,
711 445, 384, 385, 42, 42, 42, 332, 332, 332, 332,
712 393, 42, 42, 42, 390, 42, 42, 42, 388, 392,
713 394, 396, 397, 389, 42, 42, 391, 400, 42, 42,
714 398, 42, 401, 42, 42, 395, 42, 399, 42, 42,
715 42, 404, 406, 42, 407, 42, 42, 42, 402, 403,
716 42, 405, 408, 409, 42, 411, 42, 42, 410, 412,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000717
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000718 42, 42, 42, 42, 413, 42, 417, 42, 415, 419,
719 420, 414, 42, 42, 416, 418, 42, 422, 42, 424,
720 42, 42, 423, 42, 42, 42, 425, 421, 42, 428,
721 42, 42, 427, 432, 430, 433, 42, 426, 435, 42,
722 429, 42, 42, 437, 42, 436, 42, 431, 434, 42,
723 439, 42, 42, 438, 42, 42, 42, 42, 42, 42,
724 441, 42, 446, 442, 42, 440, 450, 451, 455, 444,
725 443, 42, 453, 42, 448, 449, 454, 447, 42, 456,
726 42, 452, 42, 42, 42, 42, 458, 42, 42, 42,
727 42, 42, 42, 465, 463, 457, 42, 42, 464, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000728
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000729 460, 461, 459, 462, 466, 467, 469, 42, 42, 42,
730 470, 42, 42, 468, 42, 42, 472, 471, 42, 42,
731 42, 42, 42, 42, 478, 479, 473, 42, 477, 42,
732 474, 475, 483, 42, 480, 481, 485, 42, 476, 484,
733 42, 42, 482, 488, 42, 42, 490, 486, 42, 42,
734 42, 491, 42, 489, 42, 487, 493, 42, 42, 42,
735 42, 495, 42, 42, 42, 42, 42, 499, 492, 494,
736 502, 504, 503, 506, 500, 496, 497, 501, 498, 42,
737 42, 42, 42, 505, 42, 42, 508, 507, 511, 510,
738 42, 42, 42, 42, 512, 509, 42, 42, 42, 515,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000739
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000740 42, 517, 42, 519, 42, 42, 521, 514, 42, 513,
741 42, 42, 518, 42, 520, 42, 516, 522, 525, 527,
742 42, 523, 42, 42, 42, 524, 42, 529, 42, 42,
743 528, 530, 42, 532, 526, 42, 42, 42, 531, 42,
744 538, 42, 42, 42, 534, 536, 42, 535, 533, 42,
745 539, 537, 42, 42, 544, 540, 42, 545, 42, 42,
746 548, 541, 42, 549, 543, 542, 42, 547, 42, 42,
747 42, 42, 42, 42, 42, 42, 42, 42, 550, 39,
748 39, 39, 39, 39, 41, 41, 51, 42, 51, 51,
749 51, 53, 53, 140, 140, 140, 140, 140, 42, 42,
Reid Spencer14310612006-12-31 05:40:51 +0000750
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000751 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
752 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
753 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
754 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
755 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
756 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000757 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
758 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000759 42, 42, 42, 42, 42, 42, 42, 42, 141, 42,
760 245, 42, 42, 42, 42, 141, 42, 133, 42, 40,
Chris Lattner75466192006-05-19 21:28:53 +0000761
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000762 551, 3, 551, 551, 551, 551, 551, 551, 551, 551,
763 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
764 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
765 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
766 551, 551, 551, 551, 551, 551
Reid Spencer68a24bd2005-08-27 18:50:39 +0000767 } ;
768
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000769static yyconst flex_int16_t yy_chk[1247] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000770 { 0,
771 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
772 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
773 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
774 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000775 1, 1, 1, 1, 9, 9, 9, 9, 10, 10,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000776 10, 10, 11, 11, 11, 11, 11, 12, 44, 44,
777 44, 44, 12, 13, 13, 13, 13, 13, 13, 14,
778 14, 14, 14, 14, 14, 16, 60, 17, 24, 19,
779 18, 16, 16, 16, 16, 19, 17, 19, 60, 21,
780 18, 31, 24, 17, 18, 17, 13, 17, 19, 20,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000781
Reid Spencer3025dfd2007-03-29 18:50:01 +0000782 17, 31, 18, 36, 23, 20, 38, 21, 30, 20,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000783 21, 559, 28, 36, 23, 20, 38, 21, 20, 22,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000784 23, 30, 28, 78, 47, 22, 69, 22, 22, 47,
785 27, 28, 30, 78, 26, 22, 27, 28, 55, 22,
786 26, 22, 25, 25, 25, 25, 25, 55, 26, 27,
787 33, 69, 35, 26, 25, 27, 33, 26, 35, 57,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000788 37, 37, 56, 33, 25, 29, 58, 61, 57, 33,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000789 557, 35, 33, 63, 64, 29, 56, 29, 56, 33,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000790 37, 29, 64, 29, 68, 29, 58, 29, 32, 63,
791 59, 61, 32, 45, 45, 45, 45, 45, 66, 75,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000792
Reid Spencer3025dfd2007-03-29 18:50:01 +0000793 68, 32, 32, 59, 32, 32, 32, 59, 32, 54,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000794 54, 54, 54, 75, 32, 554, 32, 32, 88, 32,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000795 34, 65, 66, 70, 34, 46, 46, 46, 46, 46,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000796 46, 88, 70, 34, 34, 72, 34, 65, 34, 65,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000797 34, 74, 34, 81, 219, 90, 34, 48, 48, 48,
798 48, 48, 81, 85, 90, 48, 219, 550, 74, 72,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000799 85, 48, 49, 49, 49, 49, 49, 49, 50, 50,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000800 50, 50, 50, 73, 76, 50, 50, 67, 50, 50,
801 50, 50, 50, 50, 77, 67, 79, 80, 67, 73,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000802 83, 84, 548, 76, 77, 547, 73, 67, 82, 82,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000803
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000804 82, 82, 82, 86, 89, 87, 80, 83, 77, 91,
805 79, 87, 93, 84, 84, 84, 94, 84, 95, 96,
806 89, 86, 99, 97, 101, 91, 98, 102, 99, 96,
807 103, 100, 94, 97, 93, 104, 98, 93, 101, 95,
808 100, 105, 106, 96, 108, 112, 111, 97, 109, 102,
809 106, 107, 110, 114, 103, 105, 111, 109, 106, 113,
810 108, 107, 110, 104, 112, 115, 113, 114, 116, 108,
811 106, 118, 109, 119, 120, 107, 110, 121, 123, 115,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000812 129, 122, 124, 169, 539, 118, 129, 115, 120, 126,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000813 116, 122, 124, 119, 125, 127, 118, 131, 121, 126,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000814
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000815 127, 128, 123, 125, 125, 122, 124, 130, 132, 130,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000816 145, 169, 151, 125, 539, 128, 125, 128, 150, 131,
817 151, 125, 144, 135, 135, 135, 135, 148, 144, 145,
818 132, 135, 150, 147, 144, 152, 132, 135, 137, 137,
819 137, 137, 137, 147, 155, 157, 137, 545, 164, 148,
820 159, 152, 137, 138, 138, 154, 138, 138, 138, 138,
821 138, 157, 156, 158, 154, 160, 159, 155, 156, 161,
822 163, 164, 165, 166, 167, 160, 161, 158, 168, 160,
823 163, 171, 170, 173, 168, 172, 175, 543, 174, 176,
824 173, 171, 163, 166, 181, 172, 165, 174, 171, 176,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000825
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000826 167, 170, 177, 178, 170, 179, 175, 180, 183, 181,
827 182, 185, 177, 178, 188, 184, 187, 180, 189, 182,
828 196, 199, 236, 204, 179, 202, 187, 178, 203, 209,
829 183, 184, 188, 204, 189, 542, 185, 237, 205, 236,
830 209, 196, 215, 237, 211, 199, 201, 201, 201, 201,
831 214, 202, 203, 201, 201, 210, 201, 201, 201, 201,
832 201, 201, 205, 211, 215, 210, 217, 214, 218, 220,
833 222, 221, 223, 224, 214, 228, 231, 234, 235, 220,
834 222, 240, 223, 244, 218, 243, 231, 234, 222, 238,
835 217, 221, 235, 270, 228, 239, 240, 241, 238, 224,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000836
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000837 257, 239, 241, 270, 243, 253, 257, 244, 246, 246,
838 246, 246, 541, 253, 247, 247, 246, 247, 247, 247,
839 247, 251, 246, 248, 248, 248, 248, 249, 249, 249,
840 249, 249, 250, 250, 250, 250, 250, 252, 254, 256,
841 259, 260, 261, 262, 251, 263, 264, 265, 259, 262,
842 266, 268, 267, 269, 271, 252, 254, 256, 261, 269,
843 264, 274, 271, 263, 275, 260, 276, 266, 267, 277,
844 280, 281, 282, 268, 285, 265, 286, 281, 284, 289,
845 287, 290, 282, 295, 293, 274, 280, 288, 275, 276,
846 284, 276, 294, 296, 277, 289, 285, 298, 286, 287,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000847
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000848 290, 302, 288, 293, 299, 303, 305, 295, 294, 306,
849 307, 398, 315, 303, 310, 302, 323, 305, 311, 306,
850 296, 307, 298, 299, 310, 313, 311, 314, 315, 317,
851 320, 321, 322, 314, 323, 313, 325, 317, 322, 327,
852 398, 320, 321, 329, 335, 330, 332, 332, 332, 332,
853 335, 336, 338, 339, 329, 342, 340, 343, 325, 330,
854 336, 339, 340, 327, 341, 344, 329, 343, 345, 346,
855 341, 347, 344, 348, 349, 338, 351, 342, 354, 355,
856 356, 347, 349, 358, 351, 357, 359, 361, 345, 346,
857 362, 348, 354, 355, 363, 357, 364, 366, 356, 358,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000858
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000859 368, 367, 369, 370, 359, 372, 364, 373, 362, 367,
860 368, 361, 371, 374, 363, 366, 375, 370, 376, 372,
861 377, 379, 371, 380, 381, 382, 373, 369, 384, 376,
862 386, 388, 375, 381, 379, 382, 387, 374, 386, 389,
863 377, 391, 392, 388, 390, 387, 395, 380, 384, 394,
864 390, 397, 399, 389, 401, 402, 403, 406, 414, 411,
865 392, 405, 399, 394, 410, 391, 405, 405, 414, 397,
866 395, 416, 410, 415, 402, 403, 411, 401, 418, 415,
867 421, 406, 422, 424, 427, 425, 418, 428, 432, 438,
868 439, 435, 444, 432, 427, 416, 441, 440, 428, 442,
Chris Lattnere869eef2005-11-12 00:11:49 +0000869
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000870 422, 424, 421, 425, 435, 438, 440, 445, 448, 449,
871 441, 450, 451, 439, 452, 454, 444, 442, 455, 456,
872 457, 459, 458, 461, 452, 454, 445, 460, 451, 463,
873 448, 449, 458, 464, 455, 456, 460, 465, 450, 459,
874 466, 467, 457, 464, 468, 470, 466, 461, 469, 471,
875 473, 467, 474, 465, 475, 463, 469, 476, 478, 479,
876 480, 471, 487, 488, 489, 496, 490, 476, 468, 470,
877 480, 488, 487, 490, 478, 473, 474, 479, 475, 492,
878 493, 494, 499, 489, 500, 501, 493, 492, 499, 496,
879 502, 503, 504, 505, 500, 494, 506, 507, 508, 503,
Chris Lattner75466192006-05-19 21:28:53 +0000880
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000881 509, 505, 511, 507, 512, 513, 509, 502, 514, 501,
882 515, 519, 506, 517, 508, 520, 504, 511, 514, 517,
883 518, 512, 521, 523, 524, 513, 525, 519, 526, 527,
884 518, 520, 530, 523, 515, 529, 531, 532, 521, 533,
885 530, 534, 535, 540, 525, 527, 537, 526, 524, 538,
886 531, 529, 544, 546, 537, 532, 549, 538, 536, 528,
887 544, 533, 522, 546, 535, 534, 516, 540, 510, 498,
888 497, 495, 491, 486, 485, 484, 483, 482, 549, 552,
889 552, 552, 552, 552, 553, 553, 555, 481, 555, 555,
890 555, 556, 556, 558, 558, 558, 558, 558, 477, 472,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000891
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000892 462, 453, 447, 446, 443, 437, 436, 434, 433, 431,
893 430, 429, 426, 423, 420, 419, 417, 413, 412, 409,
894 408, 407, 404, 400, 396, 393, 385, 383, 378, 365,
895 360, 353, 352, 350, 337, 334, 333, 331, 328, 326,
896 324, 319, 318, 316, 312, 309, 308, 304, 301, 297,
897 292, 291, 283, 279, 278, 273, 272, 258, 255, 242,
898 233, 232, 230, 229, 227, 226, 225, 216, 213, 212,
899 208, 207, 206, 200, 198, 197, 195, 194, 193, 192,
900 191, 190, 186, 162, 153, 149, 146, 143, 140, 136,
901 133, 117, 92, 71, 62, 52, 41, 39, 8, 7,
Reid Spencer3da59db2006-11-27 01:05:10 +0000902
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000903 3, 551, 551, 551, 551, 551, 551, 551, 551, 551,
904 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
905 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
906 551, 551, 551, 551, 551, 551, 551, 551, 551, 551,
907 551, 551, 551, 551, 551, 551
Reid Spencer68a24bd2005-08-27 18:50:39 +0000908 } ;
909
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000910/* Table of booleans, true if rule could match eol. */
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000911static yyconst flex_int32_t yy_rule_can_match_eol[138] =
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000912 { 0,
9130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
915 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
917 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000919 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000920
921static yy_state_type yy_last_accepting_state;
922static char *yy_last_accepting_cpos;
923
924extern int llvmAsm_flex_debug;
925int llvmAsm_flex_debug = 0;
926
927/* The intent behind this definition is that it'll catch
928 * any uses of REJECT which flex missed.
929 */
930#define REJECT reject_used_but_not_detected
Reid Spencer68a24bd2005-08-27 18:50:39 +0000931#define yymore() yymore_used_but_not_detected
932#define YY_MORE_ADJ 0
933#define YY_RESTORE_YY_MORE_OFFSET
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000934char *llvmAsmtext;
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000935#line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000936/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
937//
938// The LLVM Compiler Infrastructure
939//
940// This file was developed by the LLVM research group and is distributed under
941// the University of Illinois Open Source License. See LICENSE.TXT for details.
942//
943//===----------------------------------------------------------------------===//
944//
945// This file implements the flex scanner for LLVM assembly languages files.
946//
947//===----------------------------------------------------------------------===*/
Anton Korobeynikov77d0f972007-04-25 14:29:12 +0000948#line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000949#include "ParserInternals.h"
950#include "llvm/Module.h"
951#include <list>
952#include "llvmAsmParser.h"
953#include <cctype>
954#include <cstdlib>
955
956void set_scan_file(FILE * F){
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000957 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000958}
959void set_scan_string (const char * str) {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000960 llvmAsm_scan_string (str);
Reid Spencer68a24bd2005-08-27 18:50:39 +0000961}
962
Reid Spencer3ed469c2006-11-02 20:25:50 +0000963// Construct a token value for a non-obsolete token
Reid Spencer68a24bd2005-08-27 18:50:39 +0000964#define RET_TOK(type, Enum, sym) \
Reid Spencera132e042006-12-03 05:46:11 +0000965 llvmAsmlval.type = Instruction::Enum; \
966 return sym
967
Reid Spencer3ed469c2006-11-02 20:25:50 +0000968// Construct a token value for an obsolete token
Reid Spencera132e042006-12-03 05:46:11 +0000969#define RET_TY(CTYPE, SYM) \
970 llvmAsmlval.PrimType = CTYPE;\
Reid Spencer481169e2006-12-01 00:33:46 +0000971 return SYM
Reid Spencer68a24bd2005-08-27 18:50:39 +0000972
973namespace llvm {
974
975// TODO: All of the static identifiers are figured out by the lexer,
976// these should be hashed to reduce the lexer size
977
978
979// atoull - Convert an ascii string of decimal digits into the unsigned long
980// long representation... this does not have to do input error checking,
981// because we know that the input will be matched by a suitable regex...
982//
983static uint64_t atoull(const char *Buffer) {
984 uint64_t Result = 0;
985 for (; *Buffer; Buffer++) {
986 uint64_t OldRes = Result;
987 Result *= 10;
988 Result += *Buffer-'0';
989 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +0000990 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +0000991 }
992 return Result;
993}
994
995static uint64_t HexIntToVal(const char *Buffer) {
996 uint64_t Result = 0;
997 for (; *Buffer; ++Buffer) {
998 uint64_t OldRes = Result;
999 Result *= 16;
1000 char C = *Buffer;
1001 if (C >= '0' && C <= '9')
1002 Result += C-'0';
1003 else if (C >= 'A' && C <= 'F')
1004 Result += C-'A'+10;
1005 else if (C >= 'a' && C <= 'f')
1006 Result += C-'a'+10;
1007
1008 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +00001009 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001010 }
1011 return Result;
1012}
1013
1014
1015// HexToFP - Convert the ascii string in hexidecimal format to the floating
1016// point representation of it.
1017//
1018static double HexToFP(const char *Buffer) {
1019 // Behave nicely in the face of C TBAA rules... see:
1020 // http://www.nullstone.com/htmls/category/aliastyp.htm
1021 union {
1022 uint64_t UI;
1023 double FP;
1024 } UIntToFP;
1025 UIntToFP.UI = HexIntToVal(Buffer);
1026
1027 assert(sizeof(double) == sizeof(uint64_t) &&
1028 "Data sizes incompatible on this target!");
1029 return UIntToFP.FP; // Cast Hex constant to double
1030}
1031
1032
1033// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1034// appropriate character. If AllowNull is set to false, a \00 value will cause
1035// an exception to be thrown.
1036//
1037// If AllowNull is set to true, the return value of the function points to the
1038// last character of the string in memory.
1039//
1040char *UnEscapeLexed(char *Buffer, bool AllowNull) {
1041 char *BOut = Buffer;
1042 for (char *BIn = Buffer; *BIn; ) {
1043 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1044 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1045 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1046 if (!AllowNull && !*BOut)
Reid Spencer61c83e02006-08-18 08:43:06 +00001047 GenerateError("String literal cannot accept \\00 escape!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001048
1049 BIn[3] = Tmp; // Restore character
1050 BIn += 3; // Skip over handled chars
1051 ++BOut;
1052 } else {
1053 *BOut++ = *BIn++;
1054 }
1055 }
1056
1057 return BOut;
1058}
1059
1060} // End llvm namespace
1061
1062using namespace llvm;
1063
1064#define YY_NEVER_INTERACTIVE 1
1065/* Comments start with a ; and go till end of line */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001066/* Local Values and Type identifiers start with a % sign */
1067/* Global Value identifiers start with an @ sign */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001068/* Label identifiers end with a colon */
1069/* Quoted names can contain any character except " and \ */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001070/* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
1071/* Integer types are specified with i and a bitwidth */
1072/* E[PN]Integer: match positive and negative literal integer values. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001073/* FPConstant - A Floating point constant.
1074 */
1075/* HexFPConstant - Floating point constant represented in IEEE format as a
1076 * hexadecimal number for when exponential notation is not precise enough.
1077 */
1078/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1079 * it to deal with 64 bit numbers.
1080 */
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001081#line 1082 "Lexer.cpp"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001082
1083#define INITIAL 0
1084
1085#ifndef YY_NO_UNISTD_H
1086/* Special case for "unistd.h", since it is non-ANSI. We include it way
1087 * down here because we want the user's section 1 to have been scanned first.
1088 * The user has a chance to override it with an option.
1089 */
1090#include <unistd.h>
1091#endif
1092
1093#ifndef YY_EXTRA_TYPE
1094#define YY_EXTRA_TYPE void *
1095#endif
1096
1097static int yy_init_globals (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001098
1099/* Macros after this point can all be overridden by user definitions in
1100 * section 1.
1101 */
1102
1103#ifndef YY_SKIP_YYWRAP
1104#ifdef __cplusplus
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001105extern "C" int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001106#else
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001107extern int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001108#endif
1109#endif
1110
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001111 static inline void yyunput (int c,char *buf_ptr );
1112
Reid Spencer68a24bd2005-08-27 18:50:39 +00001113#ifndef yytext_ptr
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001114static void yy_flex_strncpy (char *,yyconst char *,int );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001115#endif
1116
1117#ifdef YY_NEED_STRLEN
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001118static int yy_flex_strlen (yyconst char * );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001119#endif
1120
1121#ifndef YY_NO_INPUT
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001122
Reid Spencer68a24bd2005-08-27 18:50:39 +00001123#ifdef __cplusplus
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001124static int yyinput (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001125#else
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001126static int input (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001127#endif
1128
Reid Spencer68a24bd2005-08-27 18:50:39 +00001129#endif
1130
1131/* Amount of stuff to slurp up with each read. */
1132#ifndef YY_READ_BUF_SIZE
1133#define YY_READ_BUF_SIZE 8192
1134#endif
1135
1136/* Copy whatever the last rule matched to the standard output. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001137#ifndef ECHO
1138/* This used to be an fputs(), but since the string might contain NUL's,
1139 * we now use fwrite().
1140 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001141#define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001142#endif
1143
1144/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1145 * is returned in "result".
1146 */
1147#ifndef YY_INPUT
1148#define YY_INPUT(buf,result,max_size) \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001149 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001150 { \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001151 int c = '*'; \
1152 size_t n; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001153 for ( n = 0; n < max_size && \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001154 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001155 buf[n] = (char) c; \
1156 if ( c == '\n' ) \
1157 buf[n++] = (char) c; \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001158 if ( c == EOF && ferror( llvmAsmin ) ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001159 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1160 result = n; \
1161 } \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001162 else \
1163 { \
1164 errno=0; \
1165 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
1166 { \
1167 if( errno != EINTR) \
1168 { \
1169 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1170 break; \
1171 } \
1172 errno=0; \
1173 clearerr(llvmAsmin); \
1174 } \
1175 }\
1176\
1177
Reid Spencer68a24bd2005-08-27 18:50:39 +00001178#endif
1179
1180/* No semi-colon after return; correct usage is to write "yyterminate();" -
1181 * we don't want an extra ';' after the "return" because that will cause
1182 * some compilers to complain about unreachable statements.
1183 */
1184#ifndef yyterminate
1185#define yyterminate() return YY_NULL
1186#endif
1187
1188/* Number of entries by which start-condition stack grows. */
1189#ifndef YY_START_STACK_INCR
1190#define YY_START_STACK_INCR 25
1191#endif
1192
1193/* Report a fatal error. */
1194#ifndef YY_FATAL_ERROR
1195#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1196#endif
1197
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001198/* end tables serialization structures and prototypes */
1199
Reid Spencer68a24bd2005-08-27 18:50:39 +00001200/* Default declaration of generated scanner - a define so the user can
1201 * easily add parameters.
1202 */
1203#ifndef YY_DECL
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001204#define YY_DECL_IS_OURS 1
Reid Spencer68a24bd2005-08-27 18:50:39 +00001205
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001206extern int llvmAsmlex (void);
1207
1208#define YY_DECL int llvmAsmlex (void)
1209#endif /* !YY_DECL */
1210
1211/* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
Reid Spencer68a24bd2005-08-27 18:50:39 +00001212 * have been set up.
1213 */
1214#ifndef YY_USER_ACTION
1215#define YY_USER_ACTION
1216#endif
1217
1218/* Code executed at the end of each rule. */
1219#ifndef YY_BREAK
1220#define YY_BREAK break;
1221#endif
1222
1223#define YY_RULE_SETUP \
1224 YY_USER_ACTION
1225
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001226/** The main scanner function which does all the work.
1227 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001228YY_DECL
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001229{
Reid Spencer68a24bd2005-08-27 18:50:39 +00001230 register yy_state_type yy_current_state;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001231 register char *yy_cp, *yy_bp;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001232 register int yy_act;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001233
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001234#line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001235
1236
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001237#line 1238 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001238
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001239 if ( !(yy_init) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001240 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001241 (yy_init) = 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001242
1243#ifdef YY_USER_INIT
1244 YY_USER_INIT;
1245#endif
1246
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001247 if ( ! (yy_start) )
1248 (yy_start) = 1; /* first start state */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001249
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001250 if ( ! llvmAsmin )
1251 llvmAsmin = stdin;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001252
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001253 if ( ! llvmAsmout )
1254 llvmAsmout = stdout;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001255
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001256 if ( ! YY_CURRENT_BUFFER ) {
1257 llvmAsmensure_buffer_stack ();
1258 YY_CURRENT_BUFFER_LVALUE =
1259 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
1260 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001261
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001262 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001263 }
1264
1265 while ( 1 ) /* loops until end-of-file is reached */
1266 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001267 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001268
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001269 /* Support of llvmAsmtext. */
1270 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001271
1272 /* yy_bp points to the position in yy_ch_buf of the start of
1273 * the current run.
1274 */
1275 yy_bp = yy_cp;
1276
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001277 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001278yy_match:
1279 do
1280 {
1281 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001282 if ( yy_accept[yy_current_state] )
1283 {
1284 (yy_last_accepting_state) = yy_current_state;
1285 (yy_last_accepting_cpos) = yy_cp;
1286 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001287 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1288 {
1289 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001290 if ( yy_current_state >= 552 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001291 yy_c = yy_meta[(unsigned int) yy_c];
1292 }
1293 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001294 ++yy_cp;
1295 }
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001296 while ( yy_current_state != 551 );
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001297 yy_cp = (yy_last_accepting_cpos);
1298 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001299
1300yy_find_action:
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001301 yy_act = yy_accept[yy_current_state];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001302
1303 YY_DO_BEFORE_ACTION;
1304
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001305 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001306 {
1307 int yyl;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001308 for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
1309 if ( llvmAsmtext[yyl] == '\n' )
1310
1311 llvmAsmlineno++;
1312;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001313 }
1314
1315do_action: /* This label is used only to access EOF actions. */
1316
Reid Spencer68a24bd2005-08-27 18:50:39 +00001317 switch ( yy_act )
1318 { /* beginning of action switch */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001319 case 0: /* must back up */
1320 /* undo the effects of YY_DO_BEFORE_ACTION */
1321 *yy_cp = (yy_hold_char);
1322 yy_cp = (yy_last_accepting_cpos);
1323 yy_current_state = (yy_last_accepting_state);
1324 goto yy_find_action;
1325
Reid Spencer68a24bd2005-08-27 18:50:39 +00001326case 1:
1327YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001328#line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001329{ /* Ignore comments for now */ }
1330 YY_BREAK
1331case 2:
1332YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001333#line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001334{ return BEGINTOK; }
1335 YY_BREAK
1336case 3:
1337YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001338#line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001339{ return ENDTOK; }
1340 YY_BREAK
1341case 4:
1342YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001343#line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001344{ return TRUETOK; }
1345 YY_BREAK
1346case 5:
1347YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001348#line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001349{ return FALSETOK; }
1350 YY_BREAK
1351case 6:
1352YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001353#line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001354{ return DECLARE; }
1355 YY_BREAK
1356case 7:
1357YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001358#line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001359{ return DEFINE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001360 YY_BREAK
1361case 8:
1362YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001363#line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001364{ return GLOBAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001365 YY_BREAK
1366case 9:
1367YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001368#line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001369{ return CONSTANT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001370 YY_BREAK
1371case 10:
1372YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001373#line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001374{ return INTERNAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001375 YY_BREAK
1376case 11:
1377YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001378#line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001379{ return LINKONCE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001380 YY_BREAK
1381case 12:
1382YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001383#line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001384{ return WEAK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001385 YY_BREAK
1386case 13:
1387YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001388#line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001389{ return APPENDING; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001390 YY_BREAK
1391case 14:
1392YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001393#line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001394{ return DLLIMPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001395 YY_BREAK
1396case 15:
1397YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001398#line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001399{ return DLLEXPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001400 YY_BREAK
1401case 16:
1402YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001403#line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov178a3522007-01-12 19:22:51 +00001404{ return HIDDEN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001405 YY_BREAK
1406case 17:
1407YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001408#line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov178a3522007-01-12 19:22:51 +00001409{ return EXTERN_WEAK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001410 YY_BREAK
1411case 18:
1412YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001413#line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov178a3522007-01-12 19:22:51 +00001414{ return EXTERNAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001415 YY_BREAK
1416case 19:
1417YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001418#line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001419{ return THREAD_LOCAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001420 YY_BREAK
1421case 20:
1422YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001423#line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001424{ return ZEROINITIALIZER; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001425 YY_BREAK
1426case 21:
1427YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001428#line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001429{ return DOTDOTDOT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001430 YY_BREAK
1431case 22:
1432YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001433#line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001434{ return UNDEF; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001435 YY_BREAK
1436case 23:
1437YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001438#line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001439{ return NULL_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001440 YY_BREAK
1441case 24:
1442YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001443#line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001444{ return TO; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001445 YY_BREAK
1446case 25:
1447YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001448#line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001449{ return TAIL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001450 YY_BREAK
1451case 26:
1452YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001453#line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001454{ return TARGET; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001455 YY_BREAK
1456case 27:
1457YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001458#line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001459{ return TRIPLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001460 YY_BREAK
1461case 28:
1462YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001463#line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001464{ return DEPLIBS; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001465 YY_BREAK
1466case 29:
1467YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001468#line 221 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001469{ return DATALAYOUT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001470 YY_BREAK
1471case 30:
1472YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001473#line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001474{ return VOLATILE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001475 YY_BREAK
1476case 31:
1477YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001478#line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001479{ return ALIGN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001480 YY_BREAK
1481case 32:
1482YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001483#line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001484{ return SECTION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001485 YY_BREAK
1486case 33:
1487YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001488#line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1489{ return ALIAS; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001490 YY_BREAK
1491case 34:
1492YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001493#line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1494{ return MODULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001495 YY_BREAK
1496case 35:
1497YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001498#line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1499{ return ASM_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001500 YY_BREAK
1501case 36:
1502YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001503#line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1504{ return SIDEEFFECT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001505 YY_BREAK
1506case 37:
1507YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001508#line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1509{ return CC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001510 YY_BREAK
1511case 38:
1512YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001513#line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1514{ return CCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001515 YY_BREAK
1516case 39:
1517YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001518#line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1519{ return FASTCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001520 YY_BREAK
1521case 40:
1522YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001523#line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1524{ return COLDCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001525 YY_BREAK
1526case 41:
1527YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001528#line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1529{ return X86_STDCALLCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001530 YY_BREAK
1531case 42:
1532YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001533#line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1534{ return X86_FASTCALLCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001535 YY_BREAK
1536case 43:
1537YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001538#line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1539{ return INREG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001540 YY_BREAK
1541case 44:
1542YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001543#line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1544{ return SRET; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001545 YY_BREAK
1546case 45:
1547YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001548#line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1549{ return NOUNWIND; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001550 YY_BREAK
1551case 46:
1552YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001553#line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1554{ return NORETURN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001555 YY_BREAK
1556case 47:
1557YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001558#line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1559{ RET_TY(Type::VoidTy, VOID); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001560 YY_BREAK
1561case 48:
1562YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001563#line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1564{ RET_TY(Type::FloatTy, FLOAT); }
Reid Spencer832254e2007-02-02 02:16:23 +00001565 YY_BREAK
1566case 49:
1567YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001568#line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1569{ RET_TY(Type::DoubleTy,DOUBLE);}
Reid Spencer832254e2007-02-02 02:16:23 +00001570 YY_BREAK
1571case 50:
1572YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001573#line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1574{ RET_TY(Type::LabelTy, LABEL); }
Reid Spencer67d8ed92007-03-22 02:14:08 +00001575 YY_BREAK
1576case 51:
1577YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001578#line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1579{ return TYPE; }
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001580 YY_BREAK
1581case 52:
1582YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001583#line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1584{ return OPAQUE; }
1585 YY_BREAK
1586case 53:
1587YY_RULE_SETUP
1588#line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001589{ uint64_t NumBits = atoull(llvmAsmtext+1);
Reid Spencera54b7cb2007-01-12 07:05:14 +00001590 if (NumBits < IntegerType::MIN_INT_BITS ||
1591 NumBits > IntegerType::MAX_INT_BITS)
1592 GenerateError("Bitwidth for integer type out of range!");
1593 const Type* Ty = IntegerType::get(NumBits);
1594 RET_TY(Ty, INTTYPE);
1595 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001596 YY_BREAK
Reid Spencer6f407902007-01-13 05:00:46 +00001597case 54:
1598YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001599#line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1600{ RET_TOK(BinaryOpVal, Add, ADD); }
Reid Spencer6f407902007-01-13 05:00:46 +00001601 YY_BREAK
Reid Spencer68a24bd2005-08-27 18:50:39 +00001602case 55:
1603YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001604#line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1605{ RET_TOK(BinaryOpVal, Sub, SUB); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001606 YY_BREAK
1607case 56:
1608YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001609#line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1610{ RET_TOK(BinaryOpVal, Mul, MUL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001611 YY_BREAK
1612case 57:
1613YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001614#line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1615{ RET_TOK(BinaryOpVal, UDiv, UDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001616 YY_BREAK
1617case 58:
1618YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001619#line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1620{ RET_TOK(BinaryOpVal, SDiv, SDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001621 YY_BREAK
1622case 59:
1623YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001624#line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1625{ RET_TOK(BinaryOpVal, FDiv, FDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001626 YY_BREAK
1627case 60:
1628YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001629#line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1630{ RET_TOK(BinaryOpVal, URem, UREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001631 YY_BREAK
1632case 61:
1633YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001634#line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1635{ RET_TOK(BinaryOpVal, SRem, SREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001636 YY_BREAK
1637case 62:
1638YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001639#line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1640{ RET_TOK(BinaryOpVal, FRem, FREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001641 YY_BREAK
1642case 63:
1643YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001644#line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1645{ RET_TOK(BinaryOpVal, Shl, SHL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001646 YY_BREAK
1647case 64:
1648YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001649#line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1650{ RET_TOK(BinaryOpVal, LShr, LSHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001651 YY_BREAK
1652case 65:
1653YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001654#line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1655{ RET_TOK(BinaryOpVal, AShr, ASHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001656 YY_BREAK
1657case 66:
1658YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001659#line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1660{ RET_TOK(BinaryOpVal, And, AND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001661 YY_BREAK
1662case 67:
1663YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001664#line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1665{ RET_TOK(BinaryOpVal, Or , OR ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001666 YY_BREAK
1667case 68:
1668YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001669#line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1670{ RET_TOK(BinaryOpVal, Xor, XOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001671 YY_BREAK
1672case 69:
1673YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001674#line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1675{ RET_TOK(OtherOpVal, ICmp, ICMP); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001676 YY_BREAK
1677case 70:
1678YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001679#line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1680{ RET_TOK(OtherOpVal, FCmp, FCMP); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001681 YY_BREAK
1682case 71:
1683YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001684#line 274 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1685{ return EQ; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001686 YY_BREAK
1687case 72:
1688YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001689#line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1690{ return NE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001691 YY_BREAK
1692case 73:
1693YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001694#line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1695{ return SLT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001696 YY_BREAK
1697case 74:
1698YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001699#line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1700{ return SGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001701 YY_BREAK
1702case 75:
1703YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001704#line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1705{ return SLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001706 YY_BREAK
1707case 76:
1708YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001709#line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1710{ return SGE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001711 YY_BREAK
1712case 77:
1713YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001714#line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1715{ return ULT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001716 YY_BREAK
1717case 78:
1718YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001719#line 281 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1720{ return UGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001721 YY_BREAK
1722case 79:
1723YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001724#line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1725{ return ULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001726 YY_BREAK
1727case 80:
1728YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001729#line 283 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1730{ return UGE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001731 YY_BREAK
1732case 81:
1733YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001734#line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1735{ return OEQ; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001736 YY_BREAK
1737case 82:
1738YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001739#line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1740{ return ONE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001741 YY_BREAK
1742case 83:
1743YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001744#line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1745{ return OLT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001746 YY_BREAK
1747case 84:
1748YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001749#line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1750{ return OGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001751 YY_BREAK
1752case 85:
1753YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001754#line 288 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1755{ return OLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001756 YY_BREAK
1757case 86:
1758YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001759#line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1760{ return OGE; }
Nate Begeman14b05292005-11-05 09:21:28 +00001761 YY_BREAK
1762case 87:
1763YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001764#line 290 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1765{ return ORD; }
Chris Lattnere869eef2005-11-12 00:11:49 +00001766 YY_BREAK
1767case 88:
1768YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001769#line 291 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1770{ return UNO; }
Robert Bocchino9c62b562006-01-10 19:04:32 +00001771 YY_BREAK
1772case 89:
1773YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001774#line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1775{ return UEQ; }
Robert Bocchino2def1b32006-01-17 20:06:25 +00001776 YY_BREAK
1777case 90:
1778YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001779#line 293 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1780{ return UNE; }
Chris Lattner8335e842006-01-23 23:05:42 +00001781 YY_BREAK
1782case 91:
1783YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001784#line 295 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1785{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Chris Lattner66316012006-01-24 04:14:29 +00001786 YY_BREAK
1787case 92:
1788YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001789#line 296 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1790{ RET_TOK(OtherOpVal, Call, CALL); }
Chris Lattner0e9c3762006-01-25 22:27:16 +00001791 YY_BREAK
1792case 93:
1793YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001794#line 297 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1795{ RET_TOK(CastOpVal, Trunc, TRUNC); }
Chris Lattnerd5efe842006-04-08 01:18:56 +00001796 YY_BREAK
1797case 94:
1798YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001799#line 298 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1800{ RET_TOK(CastOpVal, ZExt, ZEXT); }
Chris Lattner75466192006-05-19 21:28:53 +00001801 YY_BREAK
1802case 95:
1803YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001804#line 299 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1805{ RET_TOK(CastOpVal, SExt, SEXT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001806 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001807case 96:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001808YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001809#line 300 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1810{ RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001811 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001812case 97:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001813YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001814#line 301 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1815{ RET_TOK(CastOpVal, FPExt, FPEXT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001816 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001817case 98:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001818YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001819#line 302 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1820{ RET_TOK(CastOpVal, UIToFP, UITOFP); }
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001821 YY_BREAK
1822case 99:
1823YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001824#line 303 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1825{ RET_TOK(CastOpVal, SIToFP, SITOFP); }
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001826 YY_BREAK
1827case 100:
1828YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001829#line 304 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1830{ RET_TOK(CastOpVal, FPToUI, FPTOUI); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001831 YY_BREAK
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001832case 101:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001833YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001834#line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1835{ RET_TOK(CastOpVal, FPToSI, FPTOSI); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001836 YY_BREAK
1837case 102:
1838YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001839#line 306 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1840{ RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001841 YY_BREAK
1842case 103:
1843YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001844#line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1845{ RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001846 YY_BREAK
1847case 104:
1848YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001849#line 308 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1850{ RET_TOK(CastOpVal, BitCast, BITCAST); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001851 YY_BREAK
1852case 105:
1853YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001854#line 309 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1855{ RET_TOK(OtherOpVal, Select, SELECT); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001856 YY_BREAK
1857case 106:
1858YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001859#line 310 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1860{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001861 YY_BREAK
1862case 107:
1863YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001864#line 311 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1865{ RET_TOK(TermOpVal, Ret, RET); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001866 YY_BREAK
1867case 108:
1868YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001869#line 312 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1870{ RET_TOK(TermOpVal, Br, BR); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001871 YY_BREAK
1872case 109:
1873YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001874#line 313 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1875{ RET_TOK(TermOpVal, Switch, SWITCH); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001876 YY_BREAK
1877case 110:
1878YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001879#line 314 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1880{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001881 YY_BREAK
1882case 111:
1883YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001884#line 315 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1885{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001886 YY_BREAK
1887case 112:
1888YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001889#line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1890{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001891 YY_BREAK
1892case 113:
1893YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001894#line 318 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1895{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001896 YY_BREAK
1897case 114:
1898YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001899#line 319 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1900{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001901 YY_BREAK
1902case 115:
1903YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001904#line 320 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1905{ RET_TOK(MemOpVal, Free, FREE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001906 YY_BREAK
1907case 116:
1908YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001909#line 321 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1910{ RET_TOK(MemOpVal, Load, LOAD); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001911 YY_BREAK
1912case 117:
1913YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001914#line 322 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1915{ RET_TOK(MemOpVal, Store, STORE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001916 YY_BREAK
1917case 118:
1918YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001919#line 323 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1920{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001921 YY_BREAK
Reid Spencer41dff5e2007-01-26 08:05:27 +00001922case 119:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001923YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001924#line 325 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1925{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
Reid Spencer67d8ed92007-03-22 02:14:08 +00001926 YY_BREAK
1927case 120:
1928YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001929#line 326 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1930{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001931 YY_BREAK
Reid Spencer3d6b71e2007-04-09 01:56:05 +00001932case 121:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001933YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001934#line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1935{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
1936 YY_BREAK
1937case 122:
1938YY_RULE_SETUP
1939#line 330 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Owen Anderson1dc69692006-10-18 02:21:48 +00001940{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001941 UnEscapeLexed(llvmAsmtext+1);
1942 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip %
1943 return LOCALVAR;
Owen Anderson1dc69692006-10-18 02:21:48 +00001944 }
1945 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001946case 123:
Owen Anderson1dc69692006-10-18 02:21:48 +00001947YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001948#line 335 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001949{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001950 UnEscapeLexed(llvmAsmtext+1);
1951 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip @
1952 return GLOBALVAR;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001953 }
1954 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001955case 124:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001956YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001957#line 340 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001958{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001959 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon
1960 UnEscapeLexed(llvmAsmtext);
1961 llvmAsmlval.StrVal = strdup(llvmAsmtext);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001962 return LABELSTR;
1963 }
1964 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001965case 125:
1966/* rule 125 can match eol */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001967YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001968#line 346 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001969{
1970 llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote
1971 UnEscapeLexed(llvmAsmtext+1);
1972 llvmAsmlval.StrVal = strdup(llvmAsmtext+1);
1973 return LABELSTR;
1974 }
1975 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001976case 126:
1977/* rule 126 can match eol */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001978YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001979#line 353 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001980{ // Note that we cannot unescape a string constant here! The
1981 // string constant might contain a \00 which would not be
1982 // understood by the string stuff. It is valid to make a
1983 // [sbyte] c"Hello World\00" constant, for example.
1984 //
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001985 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1986 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote
Reid Spencer68a24bd2005-08-27 18:50:39 +00001987 return STRINGCONSTANT;
1988 }
1989 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001990case 127:
1991/* rule 127 can match eol */
Reid Spencer6f407902007-01-13 05:00:46 +00001992YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001993#line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001994{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001995 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1996 llvmAsmlval.StrVal = strdup(llvmAsmtext+2); // Nuke @, quote
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001997 return ATSTRINGCONSTANT;
1998 }
1999 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002000case 128:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002001YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002002#line 368 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002003{ int len = strlen(llvmAsmtext);
Reid Spencer38c91a92007-02-28 02:24:54 +00002004 uint32_t numBits = ((len * 64) / 19) + 1;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002005 APInt Tmp(numBits, llvmAsmtext, len, 10);
Reid Spencer38c91a92007-02-28 02:24:54 +00002006 uint32_t activeBits = Tmp.getActiveBits();
2007 if (activeBits > 0 && activeBits < numBits)
2008 Tmp.trunc(activeBits);
2009 if (Tmp.getBitWidth() > 64) {
2010 llvmAsmlval.APIntVal = new APInt(Tmp);
2011 return EUAPINTVAL;
2012 } else {
2013 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2014 return EUINT64VAL;
2015 }
2016 }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002017 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002018case 129:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002019YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002020#line 382 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002021{ int len = strlen(llvmAsmtext);
Reid Spencerafc37822007-03-09 21:19:09 +00002022 uint32_t numBits = (((len-1) * 64) / 19) + 2;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002023 APInt Tmp(numBits, llvmAsmtext, len, 10);
Reid Spencer38c91a92007-02-28 02:24:54 +00002024 uint32_t minBits = Tmp.getMinSignedBits();
2025 if (minBits > 0 && minBits < numBits)
2026 Tmp.trunc(minBits);
2027 if (Tmp.getBitWidth() > 64) {
2028 llvmAsmlval.APIntVal = new APInt(Tmp);
2029 return ESAPINTVAL;
2030 } else {
2031 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2032 return ESINT64VAL;
2033 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002034 }
2035 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002036case 130:
Reid Spencer6f407902007-01-13 05:00:46 +00002037YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002038#line 397 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002039{ int len = strlen(llvmAsmtext+3) - 3;
Reid Spencer38c91a92007-02-28 02:24:54 +00002040 uint32_t bits = len * 4;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002041 APInt Tmp(bits, llvmAsmtext+3, len, 16);
Reid Spencer38c91a92007-02-28 02:24:54 +00002042 uint32_t activeBits = Tmp.getActiveBits();
2043 if (activeBits > 0 && activeBits < bits)
2044 Tmp.trunc(activeBits);
2045 if (Tmp.getBitWidth() > 64) {
2046 llvmAsmlval.APIntVal = new APInt(Tmp);
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002047 return llvmAsmtext[0] == 's' ? ESAPINTVAL : EUAPINTVAL;
2048 } else if (llvmAsmtext[0] == 's') {
Reid Spencer38c91a92007-02-28 02:24:54 +00002049 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2050 return ESINT64VAL;
2051 } else {
2052 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2053 return EUINT64VAL;
2054 }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002055 }
Reid Spencer6f407902007-01-13 05:00:46 +00002056 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002057case 131:
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002058YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002059#line 415 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002060{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002061 uint64_t Val = atoull(llvmAsmtext+1);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002062 if ((unsigned)Val != Val)
2063 GenerateError("Invalid value number (too large)!");
2064 llvmAsmlval.UIntVal = unsigned(Val);
2065 return LOCALVAL_ID;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002066 }
2067 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002068case 132:
Owen Anderson1dc69692006-10-18 02:21:48 +00002069YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002070#line 422 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002071{
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002072 uint64_t Val = atoull(llvmAsmtext+1);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002073 if ((unsigned)Val != Val)
2074 GenerateError("Invalid value number (too large)!");
2075 llvmAsmlval.UIntVal = unsigned(Val);
2076 return GLOBALVAL_ID;
2077 }
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002078 YY_BREAK
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002079case 133:
2080YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002081#line 430 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2082{ llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; }
2083 YY_BREAK
2084case 134:
2085YY_RULE_SETUP
2086#line 431 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002087{ llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002088 YY_BREAK
2089case YY_STATE_EOF(INITIAL):
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002090#line 433 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002091{
2092 /* Make sure to free the internal buffers for flex when we are
2093 * done reading our input!
2094 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002095 llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002096 return EOF;
2097 }
2098 YY_BREAK
Reid Spencer67d8ed92007-03-22 02:14:08 +00002099case 135:
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002100/* rule 135 can match eol */
Reid Spencer67d8ed92007-03-22 02:14:08 +00002101YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002102#line 441 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2103{ /* Ignore whitespace */ }
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002104 YY_BREAK
2105case 136:
2106YY_RULE_SETUP
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002107#line 442 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2108{ return llvmAsmtext[0]; }
2109 YY_BREAK
2110case 137:
2111YY_RULE_SETUP
2112#line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002113YY_FATAL_ERROR( "flex scanner jammed" );
2114 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002115#line 2116 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002116
2117 case YY_END_OF_BUFFER:
2118 {
2119 /* Amount of text matched not including the EOB char. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002120 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002121
2122 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002123 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002124 YY_RESTORE_YY_MORE_OFFSET
2125
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002126 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002127 {
2128 /* We're scanning a new file or input source. It's
2129 * possible that this happened because the user
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002130 * just pointed llvmAsmin at a new source and called
2131 * llvmAsmlex(). If so, then we have to assure
2132 * consistency between YY_CURRENT_BUFFER and our
Reid Spencer68a24bd2005-08-27 18:50:39 +00002133 * globals. Here is the right place to do so, because
2134 * this is the first action (other than possibly a
2135 * back-up) that will match for the new input source.
2136 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002137 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2138 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
2139 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002140 }
2141
2142 /* Note that here we test for yy_c_buf_p "<=" to the position
2143 * of the first EOB in the buffer, since yy_c_buf_p will
2144 * already have been incremented past the NUL character
2145 * (since all states make transitions on EOB to the
2146 * end-of-buffer state). Contrast this with the test
2147 * in input().
2148 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002149 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002150 { /* This was really a NUL. */
2151 yy_state_type yy_next_state;
2152
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002153 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002154
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002155 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002156
2157 /* Okay, we're now positioned to make the NUL
2158 * transition. We couldn't have
2159 * yy_get_previous_state() go ahead and do it
2160 * for us because it doesn't know how to deal
2161 * with the possibility of jamming (and we don't
2162 * want to build jamming into it because then it
2163 * will run more slowly).
2164 */
2165
2166 yy_next_state = yy_try_NUL_trans( yy_current_state );
2167
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002168 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002169
2170 if ( yy_next_state )
2171 {
2172 /* Consume the NUL. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002173 yy_cp = ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002174 yy_current_state = yy_next_state;
2175 goto yy_match;
2176 }
2177
2178 else
2179 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002180 yy_cp = (yy_last_accepting_cpos);
2181 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002182 goto yy_find_action;
2183 }
2184 }
2185
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002186 else switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002187 {
2188 case EOB_ACT_END_OF_FILE:
2189 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002190 (yy_did_buffer_switch_on_eof) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002191
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002192 if ( llvmAsmwrap( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002193 {
2194 /* Note: because we've taken care in
2195 * yy_get_next_buffer() to have set up
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002196 * llvmAsmtext, we can now set up
Reid Spencer68a24bd2005-08-27 18:50:39 +00002197 * yy_c_buf_p so that if some total
2198 * hoser (like flex itself) wants to
2199 * call the scanner after we return the
2200 * YY_NULL, it'll still work - another
2201 * YY_NULL will get returned.
2202 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002203 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002204
2205 yy_act = YY_STATE_EOF(YY_START);
2206 goto do_action;
2207 }
2208
2209 else
2210 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002211 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002212 YY_NEW_FILE;
2213 }
2214 break;
2215 }
2216
2217 case EOB_ACT_CONTINUE_SCAN:
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002218 (yy_c_buf_p) =
2219 (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002220
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002221 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002222
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002223 yy_cp = (yy_c_buf_p);
2224 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002225 goto yy_match;
2226
2227 case EOB_ACT_LAST_MATCH:
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002228 (yy_c_buf_p) =
2229 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002230
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002231 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002232
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002233 yy_cp = (yy_c_buf_p);
2234 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002235 goto yy_find_action;
2236 }
2237 break;
2238 }
2239
2240 default:
2241 YY_FATAL_ERROR(
2242 "fatal flex scanner internal error--no action found" );
2243 } /* end of action switch */
2244 } /* end of scanning one token */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002245} /* end of llvmAsmlex */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002246
2247/* yy_get_next_buffer - try to read in a new buffer
2248 *
2249 * Returns a code representing an action:
2250 * EOB_ACT_LAST_MATCH -
2251 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2252 * EOB_ACT_END_OF_FILE - end of file
2253 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002254static int yy_get_next_buffer (void)
2255{
2256 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2257 register char *source = (yytext_ptr);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002258 register int number_to_move, i;
2259 int ret_val;
2260
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002261 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002262 YY_FATAL_ERROR(
2263 "fatal flex scanner internal error--end of buffer missed" );
2264
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002265 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002266 { /* Don't try to fill the buffer, so this is an EOF. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002267 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002268 {
2269 /* We matched a single character, the EOB, so
2270 * treat this as a final EOF.
2271 */
2272 return EOB_ACT_END_OF_FILE;
2273 }
2274
2275 else
2276 {
2277 /* We matched some text prior to the EOB, first
2278 * process it.
2279 */
2280 return EOB_ACT_LAST_MATCH;
2281 }
2282 }
2283
2284 /* Try to read more data. */
2285
2286 /* First move last chars to start of buffer. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002287 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002288
2289 for ( i = 0; i < number_to_move; ++i )
2290 *(dest++) = *(source++);
2291
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002292 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002293 /* don't do the read, it's not guaranteed to return an EOF,
2294 * just force an EOF
2295 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002296 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002297
2298 else
2299 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002300 int num_to_read =
2301 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002302
2303 while ( num_to_read <= 0 )
2304 { /* Not enough room in the buffer - grow it. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002305
2306 /* just a shorter name for the current buffer */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002307 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002308
2309 int yy_c_buf_p_offset =
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002310 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002311
2312 if ( b->yy_is_our_buffer )
2313 {
2314 int new_size = b->yy_buf_size * 2;
2315
2316 if ( new_size <= 0 )
2317 b->yy_buf_size += b->yy_buf_size / 8;
2318 else
2319 b->yy_buf_size *= 2;
2320
2321 b->yy_ch_buf = (char *)
2322 /* Include room in for 2 EOB chars. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002323 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002324 }
2325 else
2326 /* Can't grow it, we don't own it. */
2327 b->yy_ch_buf = 0;
2328
2329 if ( ! b->yy_ch_buf )
2330 YY_FATAL_ERROR(
2331 "fatal error - scanner input buffer overflow" );
2332
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002333 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002334
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002335 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Reid Spencer68a24bd2005-08-27 18:50:39 +00002336 number_to_move - 1;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002337
Reid Spencer68a24bd2005-08-27 18:50:39 +00002338 }
2339
2340 if ( num_to_read > YY_READ_BUF_SIZE )
2341 num_to_read = YY_READ_BUF_SIZE;
2342
2343 /* Read in more data. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002344 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2345 (yy_n_chars), num_to_read );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002346
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002347 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002348 }
2349
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002350 if ( (yy_n_chars) == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002351 {
2352 if ( number_to_move == YY_MORE_ADJ )
2353 {
2354 ret_val = EOB_ACT_END_OF_FILE;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002355 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002356 }
2357
2358 else
2359 {
2360 ret_val = EOB_ACT_LAST_MATCH;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002361 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Reid Spencer68a24bd2005-08-27 18:50:39 +00002362 YY_BUFFER_EOF_PENDING;
2363 }
2364 }
2365
2366 else
2367 ret_val = EOB_ACT_CONTINUE_SCAN;
2368
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002369 (yy_n_chars) += number_to_move;
2370 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2371 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002372
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002373 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002374
2375 return ret_val;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002376}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002377
2378/* yy_get_previous_state - get the state just before the EOB char was reached */
2379
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002380 static yy_state_type yy_get_previous_state (void)
2381{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002382 register yy_state_type yy_current_state;
2383 register char *yy_cp;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002384
2385 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002386
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002387 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002388 {
2389 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002390 if ( yy_accept[yy_current_state] )
2391 {
2392 (yy_last_accepting_state) = yy_current_state;
2393 (yy_last_accepting_cpos) = yy_cp;
2394 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002395 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2396 {
2397 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002398 if ( yy_current_state >= 552 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002399 yy_c = yy_meta[(unsigned int) yy_c];
2400 }
2401 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002402 }
2403
2404 return yy_current_state;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002405}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002406
2407/* yy_try_NUL_trans - try to make a transition on the NUL character
2408 *
2409 * synopsis
2410 * next_state = yy_try_NUL_trans( current_state );
2411 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002412 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2413{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002414 register int yy_is_jam;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002415 register char *yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002416
2417 register YY_CHAR yy_c = 1;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002418 if ( yy_accept[yy_current_state] )
2419 {
2420 (yy_last_accepting_state) = yy_current_state;
2421 (yy_last_accepting_cpos) = yy_cp;
2422 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002423 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2424 {
2425 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002426 if ( yy_current_state >= 552 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002427 yy_c = yy_meta[(unsigned int) yy_c];
2428 }
2429 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002430 yy_is_jam = (yy_current_state == 551);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002431
2432 return yy_is_jam ? 0 : yy_current_state;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002433}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002434
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002435 static inline void yyunput (int c, register char * yy_bp )
2436{
2437 register char *yy_cp;
2438
2439 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002440
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002441 /* undo effects of setting up llvmAsmtext */
2442 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002443
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002444 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002445 { /* need to shift things up to make room */
2446 /* +2 for EOB chars. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002447 register int number_to_move = (yy_n_chars) + 2;
2448 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2449 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002450 register char *source =
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002451 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002452
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002453 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002454 *--dest = *--source;
2455
2456 yy_cp += (int) (dest - source);
2457 yy_bp += (int) (dest - source);
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002458 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2459 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002460
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002461 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002462 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2463 }
2464
2465 *--yy_cp = (char) c;
2466
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002467 if ( c == '\n' ){
2468 --llvmAsmlineno;
2469 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002470
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002471 (yytext_ptr) = yy_bp;
2472 (yy_hold_char) = *yy_cp;
2473 (yy_c_buf_p) = yy_cp;
2474}
Reid Spencer6f407902007-01-13 05:00:46 +00002475
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002476#ifndef YY_NO_INPUT
Reid Spencer68a24bd2005-08-27 18:50:39 +00002477#ifdef __cplusplus
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002478 static int yyinput (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002479#else
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002480 static int input (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002481#endif
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002482
2483{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002484 int c;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002485
2486 *(yy_c_buf_p) = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002487
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002488 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002489 {
2490 /* yy_c_buf_p now points to the character we want to return.
2491 * If this occurs *before* the EOB characters, then it's a
2492 * valid NUL; if not, then we've hit the end of the buffer.
2493 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002494 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002495 /* This was really a NUL. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002496 *(yy_c_buf_p) = '\0';
Reid Spencer68a24bd2005-08-27 18:50:39 +00002497
2498 else
2499 { /* need more input */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002500 int offset = (yy_c_buf_p) - (yytext_ptr);
2501 ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002502
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002503 switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002504 {
2505 case EOB_ACT_LAST_MATCH:
2506 /* This happens because yy_g_n_b()
2507 * sees that we've accumulated a
2508 * token and flags that we need to
2509 * try matching the token before
2510 * proceeding. But for input(),
2511 * there's no matching to consider.
2512 * So convert the EOB_ACT_LAST_MATCH
2513 * to EOB_ACT_END_OF_FILE.
2514 */
2515
2516 /* Reset buffer status. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002517 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002518
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002519 /*FALLTHROUGH*/
Reid Spencer68a24bd2005-08-27 18:50:39 +00002520
2521 case EOB_ACT_END_OF_FILE:
2522 {
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002523 if ( llvmAsmwrap( ) )
Reid Spencer61c83e02006-08-18 08:43:06 +00002524 return EOF;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002525
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002526 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002527 YY_NEW_FILE;
2528#ifdef __cplusplus
2529 return yyinput();
2530#else
2531 return input();
2532#endif
2533 }
2534
2535 case EOB_ACT_CONTINUE_SCAN:
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002536 (yy_c_buf_p) = (yytext_ptr) + offset;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002537 break;
2538 }
2539 }
2540 }
2541
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002542 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2543 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */
2544 (yy_hold_char) = *++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002545
2546 if ( c == '\n' )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002547
2548 llvmAsmlineno++;
2549;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002550
2551 return c;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002552}
2553#endif /* ifndef YY_NO_INPUT */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002554
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002555/** Immediately switch to a different input stream.
2556 * @param input_file A readable stream.
2557 *
2558 * @note This function does not reset the start condition to @c INITIAL .
2559 */
2560 void llvmAsmrestart (FILE * input_file )
2561{
2562
2563 if ( ! YY_CURRENT_BUFFER ){
2564 llvmAsmensure_buffer_stack ();
2565 YY_CURRENT_BUFFER_LVALUE =
2566 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
Reid Spencer6f407902007-01-13 05:00:46 +00002567 }
Reid Spencer41dff5e2007-01-26 08:05:27 +00002568
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002569 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
2570 llvmAsm_load_buffer_state( );
2571}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002572
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002573/** Switch to a different input buffer.
2574 * @param new_buffer The new input buffer.
2575 *
2576 */
2577 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2578{
2579
2580 /* TODO. We should be able to replace this entire function body
2581 * with
2582 * llvmAsmpop_buffer_state();
2583 * llvmAsmpush_buffer_state(new_buffer);
2584 */
2585 llvmAsmensure_buffer_stack ();
2586 if ( YY_CURRENT_BUFFER == new_buffer )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002587 return;
2588
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002589 if ( YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002590 {
2591 /* Flush out information for old buffer. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002592 *(yy_c_buf_p) = (yy_hold_char);
2593 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2594 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002595 }
2596
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002597 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2598 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002599
2600 /* We don't actually know whether we did this switch during
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002601 * EOF (llvmAsmwrap()) processing, but the only time this flag
2602 * is looked at is after llvmAsmwrap() is called, so it's safe
Reid Spencer68a24bd2005-08-27 18:50:39 +00002603 * to go ahead and always set it.
2604 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002605 (yy_did_buffer_switch_on_eof) = 1;
2606}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002607
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002608static void llvmAsm_load_buffer_state (void)
2609{
2610 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2611 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2612 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2613 (yy_hold_char) = *(yy_c_buf_p);
2614}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002615
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002616/** Allocate and initialize an input buffer state.
2617 * @param file A readable stream.
2618 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2619 *
2620 * @return the allocated buffer state.
2621 */
2622 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size )
2623{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002624 YY_BUFFER_STATE b;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002625
2626 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002627 if ( ! b )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002628 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002629
2630 b->yy_buf_size = size;
2631
2632 /* yy_ch_buf has to be 2 characters longer than the size given because
2633 * we need to put in 2 end-of-buffer characters.
2634 */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002635 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002636 if ( ! b->yy_ch_buf )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002637 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002638
2639 b->yy_is_our_buffer = 1;
2640
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002641 llvmAsm_init_buffer(b,file );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002642
2643 return b;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002644}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002645
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002646/** Destroy the buffer.
2647 * @param b a buffer created with llvmAsm_create_buffer()
2648 *
2649 */
2650 void llvmAsm_delete_buffer (YY_BUFFER_STATE b )
2651{
2652
Reid Spencer68a24bd2005-08-27 18:50:39 +00002653 if ( ! b )
2654 return;
2655
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002656 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2657 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002658
2659 if ( b->yy_is_our_buffer )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002660 llvmAsmfree((void *) b->yy_ch_buf );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002661
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002662 llvmAsmfree((void *) b );
2663}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002664
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002665/* Initializes or reinitializes a buffer.
2666 * This function is sometimes called more than once on the same buffer,
2667 * such as during a llvmAsmrestart() or at EOF.
2668 */
2669 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002670
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002671{
2672 int oerrno = errno;
2673
2674 llvmAsm_flush_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002675
2676 b->yy_input_file = file;
2677 b->yy_fill_buffer = 1;
2678
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002679 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
2680 * called from llvmAsmrestart() or through yy_get_next_buffer.
2681 * In that case, we don't want to reset the lineno or column.
2682 */
2683 if (b != YY_CURRENT_BUFFER){
2684 b->yy_bs_lineno = 1;
2685 b->yy_bs_column = 0;
2686 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002687
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002688 b->yy_is_interactive = 0;
2689
2690 errno = oerrno;
2691}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002692
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002693/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2694 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2695 *
2696 */
2697 void llvmAsm_flush_buffer (YY_BUFFER_STATE b )
2698{
2699 if ( ! b )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002700 return;
2701
2702 b->yy_n_chars = 0;
2703
2704 /* We always need two end-of-buffer characters. The first causes
2705 * a transition to the end-of-buffer state. The second causes
2706 * a jam in that state.
2707 */
2708 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2709 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2710
2711 b->yy_buf_pos = &b->yy_ch_buf[0];
2712
2713 b->yy_at_bol = 1;
2714 b->yy_buffer_status = YY_BUFFER_NEW;
2715
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002716 if ( b == YY_CURRENT_BUFFER )
2717 llvmAsm_load_buffer_state( );
2718}
2719
2720/** Pushes the new state onto the stack. The new state becomes
2721 * the current state. This function will allocate the stack
2722 * if necessary.
2723 * @param new_buffer The new state.
2724 *
2725 */
2726void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
2727{
2728 if (new_buffer == NULL)
2729 return;
2730
2731 llvmAsmensure_buffer_stack();
2732
2733 /* This block is copied from llvmAsm_switch_to_buffer. */
2734 if ( YY_CURRENT_BUFFER )
2735 {
2736 /* Flush out information for old buffer. */
2737 *(yy_c_buf_p) = (yy_hold_char);
2738 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2739 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2740 }
2741
2742 /* Only push if top exists. Otherwise, replace top. */
2743 if (YY_CURRENT_BUFFER)
2744 (yy_buffer_stack_top)++;
2745 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2746
2747 /* copied from llvmAsm_switch_to_buffer. */
2748 llvmAsm_load_buffer_state( );
2749 (yy_did_buffer_switch_on_eof) = 1;
2750}
2751
2752/** Removes and deletes the top of the stack, if present.
2753 * The next element becomes the new top.
2754 *
2755 */
2756void llvmAsmpop_buffer_state (void)
2757{
2758 if (!YY_CURRENT_BUFFER)
2759 return;
2760
2761 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2762 YY_CURRENT_BUFFER_LVALUE = NULL;
2763 if ((yy_buffer_stack_top) > 0)
2764 --(yy_buffer_stack_top);
2765
2766 if (YY_CURRENT_BUFFER) {
2767 llvmAsm_load_buffer_state( );
2768 (yy_did_buffer_switch_on_eof) = 1;
2769 }
2770}
2771
2772/* Allocates the stack if it does not exist.
2773 * Guarantees space for at least one push.
2774 */
2775static void llvmAsmensure_buffer_stack (void)
2776{
2777 int num_to_alloc;
2778
2779 if (!(yy_buffer_stack)) {
2780
2781 /* First allocation is just for 2 elements, since we don't know if this
2782 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2783 * immediate realloc on the next call.
2784 */
2785 num_to_alloc = 1;
2786 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
2787 (num_to_alloc * sizeof(struct yy_buffer_state*)
2788 );
2789
2790 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2791
2792 (yy_buffer_stack_max) = num_to_alloc;
2793 (yy_buffer_stack_top) = 0;
2794 return;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002795 }
2796
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002797 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Reid Spencer68a24bd2005-08-27 18:50:39 +00002798
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002799 /* Increase the buffer to prepare for a possible push. */
2800 int grow_size = 8 /* arbitrary grow size */;
2801
2802 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2803 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
2804 ((yy_buffer_stack),
2805 num_to_alloc * sizeof(struct yy_buffer_state*)
2806 );
2807
2808 /* zero only the new slots.*/
2809 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2810 (yy_buffer_stack_max) = num_to_alloc;
2811 }
2812}
2813
2814/** Setup the input buffer state to scan directly from a user-specified character buffer.
2815 * @param base the character buffer
2816 * @param size the size in bytes of the character buffer
2817 *
2818 * @return the newly allocated buffer state object.
2819 */
2820YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size )
2821{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002822 YY_BUFFER_STATE b;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002823
Reid Spencer68a24bd2005-08-27 18:50:39 +00002824 if ( size < 2 ||
2825 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2826 base[size-1] != YY_END_OF_BUFFER_CHAR )
2827 /* They forgot to leave room for the EOB's. */
2828 return 0;
2829
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002830 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002831 if ( ! b )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002832 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002833
2834 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2835 b->yy_buf_pos = b->yy_ch_buf = base;
2836 b->yy_is_our_buffer = 0;
2837 b->yy_input_file = 0;
2838 b->yy_n_chars = b->yy_buf_size;
2839 b->yy_is_interactive = 0;
2840 b->yy_at_bol = 1;
2841 b->yy_fill_buffer = 0;
2842 b->yy_buffer_status = YY_BUFFER_NEW;
2843
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002844 llvmAsm_switch_to_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002845
2846 return b;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002847}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002848
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002849/** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
2850 * scan from a @e copy of @a str.
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002851 * @param str a NUL-terminated string to scan
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002852 *
2853 * @return the newly allocated buffer state object.
2854 * @note If you want to scan bytes that may contain NUL values, then use
2855 * llvmAsm_scan_bytes() instead.
2856 */
2857YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
2858{
2859
2860 return llvmAsm_scan_bytes(yystr,strlen(yystr) );
2861}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002862
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002863/** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
2864 * scan from a @e copy of @a bytes.
2865 * @param bytes the byte buffer to scan
2866 * @param len the number of bytes in the buffer pointed to by @a bytes.
2867 *
2868 * @return the newly allocated buffer state object.
2869 */
2870YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2871{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002872 YY_BUFFER_STATE b;
2873 char *buf;
2874 yy_size_t n;
2875 int i;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002876
Reid Spencer68a24bd2005-08-27 18:50:39 +00002877 /* Get memory for full buffer, including space for trailing EOB's. */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002878 n = _yybytes_len + 2;
2879 buf = (char *) llvmAsmalloc(n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002880 if ( ! buf )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002881 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002882
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002883 for ( i = 0; i < _yybytes_len; ++i )
2884 buf[i] = yybytes[i];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002885
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002886 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002887
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002888 b = llvmAsm_scan_buffer(buf,n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002889 if ( ! b )
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002890 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002891
2892 /* It's okay to grow etc. this buffer, and we should throw it
2893 * away when we're done.
2894 */
2895 b->yy_is_our_buffer = 1;
2896
2897 return b;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002898}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002899
2900#ifndef YY_EXIT_FAILURE
2901#define YY_EXIT_FAILURE 2
2902#endif
2903
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002904static void yy_fatal_error (yyconst char* msg )
2905{
2906 (void) fprintf( stderr, "%s\n", msg );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002907 exit( YY_EXIT_FAILURE );
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002908}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002909
2910/* Redefine yyless() so it works in section 3 code. */
2911
2912#undef yyless
2913#define yyless(n) \
2914 do \
2915 { \
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002916 /* Undo effects of setting up llvmAsmtext. */ \
2917 int yyless_macro_arg = (n); \
2918 YY_LESS_LINENO(yyless_macro_arg);\
2919 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
2920 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
2921 (yy_hold_char) = *(yy_c_buf_p); \
2922 *(yy_c_buf_p) = '\0'; \
2923 llvmAsmleng = yyless_macro_arg; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00002924 } \
2925 while ( 0 )
2926
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002927/* Accessor methods (get/set functions) to struct members. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002928
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002929/** Get the current line number.
2930 *
2931 */
2932int llvmAsmget_lineno (void)
2933{
2934
2935 return llvmAsmlineno;
2936}
2937
2938/** Get the input stream.
2939 *
2940 */
2941FILE *llvmAsmget_in (void)
2942{
2943 return llvmAsmin;
2944}
2945
2946/** Get the output stream.
2947 *
2948 */
2949FILE *llvmAsmget_out (void)
2950{
2951 return llvmAsmout;
2952}
2953
2954/** Get the length of the current token.
2955 *
2956 */
2957int llvmAsmget_leng (void)
2958{
2959 return llvmAsmleng;
2960}
2961
2962/** Get the current token.
2963 *
2964 */
2965
2966char *llvmAsmget_text (void)
2967{
2968 return llvmAsmtext;
2969}
2970
2971/** Set the current line number.
2972 * @param line_number
2973 *
2974 */
2975void llvmAsmset_lineno (int line_number )
2976{
2977
2978 llvmAsmlineno = line_number;
2979}
2980
2981/** Set the input stream. This does not discard the current
2982 * input buffer.
2983 * @param in_str A readable stream.
2984 *
2985 * @see llvmAsm_switch_to_buffer
2986 */
2987void llvmAsmset_in (FILE * in_str )
2988{
2989 llvmAsmin = in_str ;
2990}
2991
2992void llvmAsmset_out (FILE * out_str )
2993{
2994 llvmAsmout = out_str ;
2995}
2996
2997int llvmAsmget_debug (void)
2998{
2999 return llvmAsm_flex_debug;
3000}
3001
3002void llvmAsmset_debug (int bdebug )
3003{
3004 llvmAsm_flex_debug = bdebug ;
3005}
3006
3007static int yy_init_globals (void)
3008{
3009 /* Initialization is the same as for the non-reentrant scanner.
3010 * This function is called from llvmAsmlex_destroy(), so don't allocate here.
3011 */
3012
3013 /* We do not touch llvmAsmlineno unless the option is enabled. */
3014 llvmAsmlineno = 1;
3015
3016 (yy_buffer_stack) = 0;
3017 (yy_buffer_stack_top) = 0;
3018 (yy_buffer_stack_max) = 0;
3019 (yy_c_buf_p) = (char *) 0;
3020 (yy_init) = 0;
3021 (yy_start) = 0;
3022
3023/* Defined in main.c */
3024#ifdef YY_STDINIT
3025 llvmAsmin = stdin;
3026 llvmAsmout = stdout;
3027#else
3028 llvmAsmin = (FILE *) 0;
3029 llvmAsmout = (FILE *) 0;
3030#endif
3031
3032 /* For future reference: Set errno on error, since we are called by
3033 * llvmAsmlex_init()
3034 */
3035 return 0;
3036}
3037
3038/* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
3039int llvmAsmlex_destroy (void)
3040{
3041
3042 /* Pop the buffer stack, destroying each element. */
3043 while(YY_CURRENT_BUFFER){
3044 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
3045 YY_CURRENT_BUFFER_LVALUE = NULL;
3046 llvmAsmpop_buffer_state();
3047 }
3048
3049 /* Destroy the stack itself. */
3050 llvmAsmfree((yy_buffer_stack) );
3051 (yy_buffer_stack) = NULL;
3052
3053 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3054 * llvmAsmlex() is called, initialization will occur. */
3055 yy_init_globals( );
3056
3057 return 0;
3058}
3059
3060/*
3061 * Internal utility routines.
3062 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00003063
3064#ifndef yytext_ptr
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003065static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3066{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003067 register int i;
3068 for ( i = 0; i < n; ++i )
3069 s1[i] = s2[i];
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003070}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003071#endif
3072
3073#ifdef YY_NEED_STRLEN
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003074static int yy_flex_strlen (yyconst char * s )
3075{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003076 register int n;
3077 for ( n = 0; s[n]; ++n )
3078 ;
3079
3080 return n;
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003081}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003082#endif
3083
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003084void *llvmAsmalloc (yy_size_t size )
3085{
Reid Spencer832254e2007-02-02 02:16:23 +00003086 return (void *) malloc( size );
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003087}
Reid Spencer832254e2007-02-02 02:16:23 +00003088
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003089void *llvmAsmrealloc (void * ptr, yy_size_t size )
3090{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003091 /* The cast to (char *) in the following accommodates both
3092 * implementations that use char* generic pointers, and those
3093 * that use void* generic pointers. It works with the latter
3094 * because both ANSI C and C++ allow castless assignment from
3095 * any pointer type to void*, and deal with argument conversions
3096 * as though doing an assignment.
3097 */
3098 return (void *) realloc( (char *) ptr, size );
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003099}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003100
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003101void llvmAsmfree (void * ptr )
3102{
3103 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */
3104}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003105
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003106#define YYTABLES_NAME "yytables"
3107
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00003108#line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00003109
3110
Chris Lattner2fecc0f2006-02-15 07:02:59 +00003111