blob: 4522aa84c3704f7058dd925242add7d027a20aad [file] [log] [blame]
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001#line 2 "Lexer.cpp"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003#line 4 "Lexer.cpp"
4
5#define YY_INT_ALIGNED short int
6
David Greene9145dd22007-08-01 03:59:32 +00007/* A lexical scanner generated by flex */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Anton Korobeynikov66e28652007-11-14 09:53:48 +000012#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016
Anton Korobeynikov66e28652007-11-14 09:53:48 +000017/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020#include <stdio.h>
Anton Korobeynikov66e28652007-11-14 09:53:48 +000021#include <string.h>
22#include <errno.h>
23#include <stdlib.h>
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024
Anton Korobeynikov66e28652007-11-14 09:53:48 +000025/* end standard C headers. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026
Anton Korobeynikov66e28652007-11-14 09:53:48 +000027/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000041#endif
42
Anton Korobeynikov66e28652007-11-14 09:53:48 +000043#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57#endif /* ! C99 */
58
59/* Limits of integral types. */
60#ifndef INT8_MIN
61#define INT8_MIN (-128)
62#endif
63#ifndef INT16_MIN
64#define INT16_MIN (-32767-1)
65#endif
66#ifndef INT32_MIN
67#define INT32_MIN (-2147483647-1)
68#endif
69#ifndef INT8_MAX
70#define INT8_MAX (127)
71#endif
72#ifndef INT16_MAX
73#define INT16_MAX (32767)
74#endif
75#ifndef INT32_MAX
76#define INT32_MAX (2147483647)
77#endif
78#ifndef UINT8_MAX
79#define UINT8_MAX (255U)
80#endif
81#ifndef UINT16_MAX
82#define UINT16_MAX (65535U)
83#endif
84#ifndef UINT32_MAX
85#define UINT32_MAX (4294967295U)
86#endif
87
88#endif /* ! FLEXINT_H */
Dan Gohmanf17a25c2007-07-18 16:29:46 +000089
90#ifdef __cplusplus
91
Dan Gohmanf17a25c2007-07-18 16:29:46 +000092/* The "const" storage-class-modifier is valid. */
93#define YY_USE_CONST
94
95#else /* ! __cplusplus */
96
97#if __STDC__
98
Dan Gohmanf17a25c2007-07-18 16:29:46 +000099#define YY_USE_CONST
100
101#endif /* __STDC__ */
102#endif /* ! __cplusplus */
103
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
113/* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120/* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
123 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000124#define BEGIN (yy_start) = 1 + 2 *
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000125
126/* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
128 * compatibility.
129 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000130#define YY_START (((yy_start) - 1) / 2)
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000137#define YY_NEW_FILE llvmAsmrestart(llvmAsmin )
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000142#ifndef YY_BUF_SIZE
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000143#define YY_BUF_SIZE (16384*64)
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000144#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000145
Anton Korobeynikov66e28652007-11-14 09:53:48 +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
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000152typedef struct yy_buffer_state *YY_BUFFER_STATE;
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000153#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000154
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000155extern int llvmAsmleng;
156
157extern FILE *llvmAsmin, *llvmAsmout;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
Anton Korobeynikov66e28652007-11-14 09:53:48 +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. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000179#define yyless(n) \
180 do \
181 { \
Anton Korobeynikov66e28652007-11-14 09:53:48 +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); \
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000186 YY_RESTORE_YY_MORE_OFFSET \
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000189 } \
190 while ( 0 )
191
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000193
194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000198
199#ifndef YY_TYPEDEF_YY_SIZE_T
200#define YY_TYPEDEF_YY_SIZE_T
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000201typedef unsigned int yy_size_t;
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000202#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000203
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000206struct yy_buffer_state
207 {
208 FILE *yy_input_file;
209
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
212
213 /* Size of input buffer in bytes, not including room for EOB
214 * characters.
215 */
216 yy_size_t yy_buf_size;
217
218 /* Number of characters read into yy_ch_buf, not including EOB
219 * characters.
220 */
221 int yy_n_chars;
222
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
225 * delete it.
226 */
227 int yy_is_our_buffer;
228
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
232 * each newline.
233 */
234 int yy_is_interactive;
235
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
238 * not.
239 */
240 int yy_at_bol;
241
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000245 /* Whether to try to fill the input buffer when we reach the
246 * end of it.
247 */
248 int yy_fill_buffer;
249
250 int yy_buffer_status;
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000251
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000252#define YY_BUFFER_NEW 0
253#define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
259 *
260 * When we actually see the EOF, we change the status to "new"
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000261 * (via llvmAsmrestart()), so that the user can continue scanning by
262 * just pointing llvmAsmin at a new input file.
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000263 */
264#define YY_BUFFER_EOF_PENDING 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000265
Anton Korobeynikov66e28652007-11-14 09:53:48 +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. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000273
274/* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000277 *
278 * Returns the top of the stack, or NULL.
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000279 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000283
Anton Korobeynikov66e28652007-11-14 09:53:48 +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)]
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000288
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000289/* yy_hold_char holds the character lost when llvmAsmtext is formed. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000290static char yy_hold_char;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000291static int yy_n_chars; /* number of characters read into yy_ch_buf */
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000292int llvmAsmleng;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = (char *) 0;
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000296static int yy_init = 0; /* whether we need to initialize */
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000297static int yy_start = 0; /* start state number */
298
Anton Korobeynikov66e28652007-11-14 09:53:48 +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 ...
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000301 */
302static int yy_did_buffer_switch_on_eof;
303
Anton Korobeynikov66e28652007-11-14 09:53:48 +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 );
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000311
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000312static void llvmAsmensure_buffer_stack (void );
313static void llvmAsm_load_buffer_state (void );
314static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file );
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000315
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000316#define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000317
Anton Korobeynikov66e28652007-11-14 09:53:48 +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 );
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000321
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000322void *llvmAsmalloc (yy_size_t );
323void *llvmAsmrealloc (void *,yy_size_t );
324void llvmAsmfree (void * );
325
326#define yy_new_buffer llvmAsm_create_buffer
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000327
328#define yy_set_interactive(is_interactive) \
329 { \
Anton Korobeynikov66e28652007-11-14 09:53:48 +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; \
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000336 }
337
338#define yy_set_bol(at_bol) \
339 { \
Anton Korobeynikov66e28652007-11-14 09:53:48 +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; \
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000346 }
347
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000349
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000350/* Begin user sect3 */
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000351
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000352#define llvmAsmwrap(n) 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000353#define YY_SKIP_YYWRAP
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000354
Anton Korobeynikov66e28652007-11-14 09:53:48 +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[] );
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000372
373/* Done after the current pattern has been matched and before the
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000374 * corresponding action - sets up llvmAsmtext.
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000377 (yytext_ptr) = yy_bp; \
378 llvmAsmleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000380 *yy_cp = '\0'; \
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000381 (yy_c_buf_p) = yy_cp;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000382
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000383#define YY_NUM_RULES 154
384#define YY_END_OF_BUFFER 155
385/* This struct is not used in this scanner,
386 but its presence is necessary. */
387struct yy_trans_info
388 {
389 flex_int32_t yy_verify;
390 flex_int32_t yy_nxt;
391 };
392static yyconst flex_int16_t yy_accept[609] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000393 { 0,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000394 0, 0, 155, 153, 152, 152, 153, 153, 153, 153,
395 153, 153, 142, 142, 1, 153, 153, 153, 153, 153,
396 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
397 153, 153, 153, 153, 153, 153, 153, 153, 0, 139,
398 0, 137, 0, 135, 145, 0, 143, 0, 147, 142,
399 0, 1, 0, 136, 146, 0, 0, 0, 0, 0,
400 0, 0, 121, 0, 0, 38, 0, 0, 0, 0,
401 0, 0, 84, 0, 0, 0, 0, 0, 0, 0,
402 0, 0, 0, 66, 0, 0, 0, 0, 0, 0,
403 0, 0, 0, 85, 0, 0, 0, 0, 0, 0,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000404
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000405 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
407 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
408 0, 0, 0, 0, 0, 0, 0, 139, 0, 141,
409 135, 147, 22, 147, 0, 148, 0, 0, 0, 0,
410 140, 136, 67, 0, 0, 79, 0, 0, 36, 0,
411 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
412 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
414 0, 0, 0, 0, 0, 0, 0, 69, 0, 0,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000415
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000416 0, 0, 0, 94, 99, 97, 98, 96, 95, 0,
417 100, 104, 0, 0, 0, 0, 120, 0, 0, 0,
418 0, 0, 89, 87, 76, 0, 0, 0, 0, 88,
419 86, 0, 0, 68, 0, 0, 0, 0, 0, 0,
420 0, 0, 102, 93, 91, 0, 92, 90, 0, 103,
421 101, 0, 0, 0, 0, 0, 0, 0, 0, 81,
422 0, 0, 138, 147, 0, 0, 0, 147, 149, 150,
423 151, 0, 0, 0, 0, 78, 0, 0, 0, 105,
424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
425 0, 0, 0, 83, 72, 0, 0, 0, 0, 0,
426
427 128, 75, 0, 0, 0, 82, 0, 0, 0, 0,
428 0, 0, 0, 129, 77, 0, 0, 52, 0, 0,
429 0, 24, 0, 0, 0, 0, 53, 144, 71, 0,
430 0, 108, 0, 0, 0, 0, 74, 47, 0, 0,
431 26, 0, 0, 0, 4, 0, 64, 70, 0, 0,
432 0, 0, 73, 0, 57, 0, 12, 0, 0, 107,
433 147, 34, 32, 0, 0, 2, 0, 51, 0, 54,
434 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
435 0, 58, 61, 110, 0, 0, 0, 0, 0, 0,
436 46, 0, 0, 0, 0, 63, 0, 0, 0, 0,
437
438 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
439 0, 0, 0, 0, 130, 0, 0, 0, 0, 106,
440 0, 23, 0, 0, 0, 0, 0, 0, 0, 0,
441 0, 56, 127, 0, 0, 41, 0, 0, 0, 7,
442 0, 0, 0, 59, 0, 0, 40, 114, 113, 0,
443 0, 8, 16, 0, 0, 0, 123, 0, 126, 35,
444 0, 0, 0, 65, 0, 0, 0, 0, 118, 0,
445 0, 0, 112, 122, 27, 0, 28, 111, 0, 124,
446 119, 0, 0, 0, 0, 0, 0, 0, 117, 0,
447 0, 6, 29, 0, 0, 0, 0, 0, 109, 0,
448
449 0, 0, 0, 0, 50, 0, 0, 0, 0, 0,
450 33, 0, 0, 44, 0, 0, 0, 0, 0, 0,
451 45, 0, 0, 9, 0, 0, 0, 0, 19, 0,
452 0, 0, 10, 115, 11, 49, 48, 0, 0, 116,
453 0, 0, 0, 0, 31, 0, 60, 0, 0, 13,
454 0, 15, 14, 0, 0, 0, 0, 62, 17, 0,
455 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
456 0, 0, 37, 0, 0, 0, 0, 0, 18, 0,
457 0, 0, 0, 0, 125, 0, 0, 0, 0, 0,
458 0, 0, 20, 0, 0, 0, 0, 131, 133, 134,
459
460 0, 42, 0, 132, 43, 0, 21, 0
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000461 } ;
462
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000463static yyconst flex_int32_t yy_ec[256] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000464 { 0,
465 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
466 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
Dale Johannesenf325d9f2007-08-03 01:03:46 +0000469 1, 1, 7, 1, 8, 9, 1, 10, 11, 12,
470 13, 13, 13, 14, 13, 15, 13, 16, 17, 1,
471 1, 1, 1, 18, 19, 19, 19, 19, 20, 19,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000472 5, 5, 5, 5, 21, 22, 23, 5, 5, 5,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000473 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000474 1, 1, 1, 1, 24, 1, 25, 26, 27, 28,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000475
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000476 29, 30, 31, 32, 33, 5, 34, 35, 36, 37,
477 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
478 48, 49, 1, 1, 1, 1, 1, 1, 1, 1,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
488 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1
493 } ;
494
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000495static yyconst flex_int32_t yy_meta[50] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000496 { 0,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000497 1, 1, 2, 3, 4, 1, 5, 6, 4, 7,
498 7, 7, 7, 7, 7, 8, 1, 1, 4, 9,
499 4, 4, 4, 4, 4, 4, 4, 4, 9, 4,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000500 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000501 4, 4, 4, 4, 4, 4, 4, 4, 4
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000502 } ;
503
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000504static yyconst flex_int16_t yy_base[620] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000505 { 0,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000506 0, 0, 1387, 1388, 1388, 1388, 1382, 1369, 46, 52,
507 58, 66, 74, 1337, 0, 87, 76, 79, 78, 94,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000508 77, 106, 109, 63, 138, 130, 141, 140, 151, 155,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000509 110, 190, 179, 227, 145, 114, 38, 144, 1379, 1388,
510 1366, 1388, 1377, 0, 234, 260, 266, 119, 304, 1333,
511 324, 0, 1375, 0, 272, 146, 175, 148, 39, 161,
512 185, 64, 1362, 36, 124, 186, 189, 93, 212, 219,
513 165, 187, 1361, 198, 224, 196, 234, 191, 278, 236,
514 214, 272, 274, 226, 275, 284, 277, 121, 276, 280,
515 288, 281, 306, 35, 315, 326, 290, 339, 341, 279,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000516
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000517 342, 332, 346, 347, 348, 349, 350, 289, 353, 355,
518 360, 356, 357, 365, 373, 381, 367, 378, 382, 387,
519 390, 1360, 393, 222, 396, 395, 398, 397, 401, 405,
520 403, 423, 420, 429, 361, 407, 409, 1359, 1370, 1388,
521 0, 429, 1357, 0, 452, 448, 462, 483, 504, 1368,
522 1388, 0, 1355, 510, 441, 1354, 470, 464, 1353, 445,
523 509, 512, 469, 1352, 511, 504, 522, 505, 467, 526,
524 527, 426, 1351, 528, 506, 529, 468, 283, 533, 406,
525 534, 535, 538, 536, 537, 543, 539, 546, 548, 550,
526 552, 554, 564, 566, 568, 569, 570, 1350, 572, 571,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000527
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000528 573, 575, 576, 1349, 1348, 1347, 1346, 1345, 1344, 579,
529 1343, 1342, 581, 580, 583, 584, 1341, 617, 594, 591,
530 587, 592, 1340, 1339, 1338, 408, 604, 585, 602, 1337,
531 1336, 605, 608, 1335, 609, 622, 634, 635, 637, 638,
532 639, 640, 1334, 1333, 1332, 642, 1331, 1330, 643, 1329,
533 1328, 644, 645, 646, 654, 653, 658, 650, 647, 1327,
534 661, 670, 1388, 667, 681, 680, 690, 693, 0, 0,
535 0, 686, 687, 688, 689, 1326, 690, 691, 694, 1325,
536 692, 693, 695, 696, 698, 701, 702, 704, 706, 707,
537 717, 709, 716, 1324, 1323, 715, 729, 721, 723, 730,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000538
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000539 1322, 1321, 731, 734, 739, 1320, 738, 735, 736, 737,
540 744, 745, 741, 1319, 1318, 746, 747, 1317, 740, 754,
541 755, 1316, 756, 765, 767, 769, 1315, 0, 1314, 770,
542 771, 786, 774, 776, 777, 778, 1313, 1312, 783, 793,
543 1311, 794, 797, 795, 1310, 798, 1309, 1308, 799, 801,
544 802, 800, 1307, 803, 1306, 805, 1305, 808, 810, 830,
545 841, 1304, 1303, 820, 812, 1302, 818, 1301, 831, 841,
546 843, 826, 833, 845, 825, 847, 849, 853, 854, 1300,
547 856, 1299, 1298, 1297, 858, 859, 857, 860, 861, 863,
548 1296, 864, 866, 869, 868, 1295, 872, 871, 877, 879,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000549
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000550 883, 885, 886, 889, 894, 896, 895, 897, 914, 1388,
551 903, 904, 898, 907, 1294, 909, 906, 908, 910, 1293,
552 914, 1292, 915, 916, 919, 921, 927, 931, 932, 935,
553 953, 1388, 1291, 942, 941, 1290, 943, 944, 947, 1289,
554 945, 948, 951, 1288, 946, 952, 1287, 1286, 1285, 961,
555 949, 1284, 1283, 953, 965, 957, 1282, 967, 1281, 1280,
556 962, 975, 977, 1279, 490, 980, 981, 982, 1278, 983,
557 985, 986, 1273, 1270, 1267, 987, 1255, 1252, 989, 1240,
558 1237, 990, 991, 993, 994, 997, 1001, 1004, 1227, 1008,
559 1010, 1224, 1221, 1011, 1012, 1014, 1015, 1016, 1214, 1020,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000560
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000561 1019, 1021, 1022, 1026, 1202, 1027, 1030, 1045, 1043, 1023,
562 1201, 1028, 1046, 1200, 1049, 1051, 1052, 1031, 1061, 1053,
563 1199, 1054, 1062, 1198, 1063, 1066, 1067, 1069, 1197, 1070,
564 1071, 1072, 1196, 1195, 1194, 1193, 1192, 1074, 1075, 1190,
565 1083, 1079, 1076, 1078, 1189, 1084, 1187, 1097, 1086, 1185,
566 1080, 1184, 1183, 1099, 1100, 1101, 1102, 1181, 1180, 1104,
567 1105, 1109, 1110, 1112, 1111, 1114, 1179, 1116, 1117, 1118,
568 1125, 1119, 1163, 1124, 1126, 1131, 1135, 1136, 1161, 1127,
569 1142, 1143, 1144, 1148, 819, 1149, 1145, 1153, 1151, 1152,
570 1147, 1157, 775, 1160, 1162, 1158, 1159, 601, 364, 362,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000571
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000572 1165, 282, 1175, 173, 126, 1178, 90, 1388, 1219, 1225,
573 1232, 1241, 1248, 1257, 1263, 1272, 1278, 1281, 1286
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000574 } ;
575
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000576static yyconst flex_int16_t yy_def[620] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000577 { 0,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000578 608, 1, 608, 608, 608, 608, 609, 610, 611, 608,
579 610, 610, 610, 13, 612, 613, 610, 610, 610, 610,
580 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
581 610, 610, 610, 610, 610, 610, 610, 610, 609, 608,
582 610, 608, 614, 615, 608, 608, 13, 610, 610, 13,
583 49, 612, 616, 617, 608, 610, 610, 610, 610, 610,
584 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
585 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
586 610, 610, 610, 25, 610, 610, 610, 610, 610, 610,
587 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000588
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000589 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
590 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
591 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
592 610, 610, 610, 610, 610, 610, 610, 608, 614, 608,
593 615, 618, 610, 49, 610, 51, 49, 49, 49, 616,
594 608, 617, 610, 610, 610, 610, 610, 610, 610, 610,
595 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
596 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
597 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
598 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000599
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000600 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
601 610, 610, 610, 610, 610, 610, 610, 49, 610, 610,
602 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
603 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
604 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
605 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
606 610, 610, 608, 618, 619, 608, 145, 145, 147, 148,
607 149, 610, 610, 610, 610, 610, 610, 610, 610, 610,
608 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
609 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000610
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000611 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
612 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
613 610, 610, 610, 610, 610, 610, 610, 218, 610, 610,
614 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
615 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
616 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
617 608, 610, 610, 610, 610, 610, 610, 610, 610, 610,
618 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
619 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
620 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000621
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000622 610, 610, 610, 610, 610, 610, 610, 610, 608, 608,
623 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
624 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
625 608, 608, 610, 610, 610, 610, 610, 610, 610, 610,
626 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
627 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
628 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
629 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
630 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
631 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000632
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000633 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
634 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
635 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
636 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
637 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
638 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
639 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
640 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
641 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
642 610, 610, 610, 610, 610, 610, 610, 610, 610, 610,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000643
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000644 610, 610, 610, 610, 610, 610, 610, 0, 608, 608,
645 608, 608, 608, 608, 608, 608, 608, 608, 608
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000646 } ;
647
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000648static yyconst flex_int16_t yy_nxt[1438] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000649 { 0,
650 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Dale Johannesenf325d9f2007-08-03 01:03:46 +0000651 14, 14, 14, 14, 14, 4, 15, 16, 8, 8,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000652 8, 8, 8, 8, 17, 18, 19, 20, 21, 22,
653 23, 24, 25, 8, 26, 27, 28, 29, 30, 8,
654 31, 32, 33, 34, 35, 36, 37, 8, 38, 43,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000655 42, 42, 135, 42, 42, 45, 45, 45, 45, 45,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000656 45, 46, 46, 46, 46, 46, 46, 47, 47, 47,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000657 47, 47, 47, 42, 48, 136, 199, 157, 42, 42,
658 162, 42, 49, 50, 50, 50, 50, 50, 50, 42,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000659 53, 42, 42, 42, 42, 83, 55, 55, 55, 55,
660
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000661 55, 55, 65, 56, 66, 42, 161, 61, 42, 42,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000662 57, 62, 58, 72, 59, 67, 73, 60, 68, 63,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000663 51, 42, 69, 74, 42, 42, 64, 143, 70, 42,
664 75, 71, 76, 77, 42, 167, 42, 81, 108, 42,
665 78, 42, 134, 82, 79, 42, 80, 84, 84, 84,
666 84, 84, 84, 42, 87, 42, 42, 193, 163, 42,
667 42, 42, 88, 42, 85, 91, 42, 89, 94, 132,
668 42, 90, 137, 153, 86, 156, 42, 95, 92, 97,
669 42, 98, 133, 96, 93, 99, 103, 100, 42, 101,
670 42, 102, 158, 104, 42, 105, 159, 106, 107, 109,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000671
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000672 42, 42, 42, 120, 42, 42, 42, 154, 172, 155,
673 121, 42, 164, 42, 173, 160, 122, 110, 111, 123,
674 112, 113, 114, 165, 115, 166, 124, 42, 179, 42,
675 116, 177, 117, 118, 42, 119, 109, 42, 168, 42,
676 174, 169, 42, 45, 45, 45, 45, 45, 45, 42,
677 170, 42, 41, 171, 125, 126, 184, 127, 175, 128,
678 241, 129, 41, 130, 183, 176, 178, 131, 142, 46,
679 46, 46, 46, 46, 46, 47, 47, 47, 47, 47,
680 47, 55, 55, 55, 55, 55, 55, 42, 180, 42,
681 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000682
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000683 194, 186, 192, 42, 42, 42, 181, 209, 197, 185,
684 187, 195, 41, 144, 144, 144, 144, 144, 144, 42,
685 182, 42, 196, 145, 188, 189, 190, 295, 191, 204,
686 42, 217, 145, 146, 146, 146, 146, 146, 146, 200,
687 198, 42, 146, 146, 147, 148, 149, 42, 146, 146,
688 146, 146, 146, 146, 42, 201, 42, 42, 202, 211,
689 203, 42, 42, 42, 42, 42, 210, 205, 42, 207,
690 42, 42, 42, 213, 259, 42, 42, 42, 212, 42,
691 42, 206, 42, 208, 223, 214, 220, 219, 42, 215,
692 216, 225, 227, 42, 221, 228, 42, 42, 224, 218,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000693
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000694 226, 230, 42, 234, 233, 42, 222, 229, 42, 232,
695 42, 42, 42, 42, 235, 231, 42, 297, 42, 236,
696 42, 42, 42, 42, 42, 239, 244, 237, 242, 247,
697 238, 254, 249, 250, 243, 42, 240, 333, 42, 246,
698 245, 42, 251, 248, 42, 252, 255, 260, 265, 261,
699 253, 289, 256, 258, 257, 262, 42, 265, 266, 267,
700 42, 268, 268, 268, 268, 268, 268, 42, 41, 41,
701 41, 269, 269, 269, 269, 269, 269, 277, 274, 42,
702 269, 269, 42, 42, 42, 42, 269, 269, 269, 269,
703 269, 269, 270, 270, 270, 270, 270, 270, 275, 285,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000704
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000705 508, 270, 270, 280, 276, 42, 294, 270, 270, 270,
706 270, 270, 270, 271, 271, 271, 271, 271, 271, 42,
707 42, 42, 271, 271, 42, 42, 42, 42, 271, 271,
708 271, 271, 271, 271, 272, 278, 279, 42, 281, 284,
709 273, 42, 42, 42, 42, 282, 283, 292, 42, 42,
710 42, 42, 42, 42, 42, 287, 290, 296, 42, 288,
711 286, 42, 304, 42, 303, 42, 301, 42, 291, 42,
712 305, 293, 299, 302, 307, 300, 308, 306, 309, 42,
713 298, 42, 312, 42, 42, 42, 42, 42, 42, 311,
714 42, 42, 310, 314, 42, 42, 42, 313, 42, 42,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000715
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000716 42, 320, 42, 316, 324, 319, 42, 42, 315, 42,
717 322, 321, 327, 317, 318, 331, 42, 42, 323, 42,
718 42, 335, 325, 42, 42, 326, 328, 328, 328, 328,
719 328, 328, 334, 330, 332, 328, 328, 42, 329, 336,
720 337, 328, 328, 328, 328, 328, 328, 338, 339, 42,
721 42, 340, 42, 42, 42, 42, 341, 42, 42, 42,
722 42, 42, 42, 343, 342, 42, 345, 347, 42, 42,
723 358, 350, 351, 42, 346, 344, 42, 352, 354, 349,
724 355, 353, 356, 357, 348, 42, 265, 266, 266, 361,
725 361, 361, 361, 361, 361, 265, 608, 41, 359, 608,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000726
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000727 41, 42, 42, 42, 42, 42, 42, 42, 42, 42,
728 42, 42, 360, 42, 364, 367, 42, 42, 369, 42,
729 372, 42, 42, 363, 42, 365, 366, 362, 368, 371,
730 42, 42, 42, 374, 373, 370, 42, 380, 42, 376,
731 377, 379, 381, 383, 42, 42, 42, 378, 375, 42,
732 42, 42, 42, 42, 42, 42, 42, 382, 389, 42,
733 42, 42, 42, 384, 385, 388, 386, 390, 391, 42,
734 42, 42, 400, 387, 394, 392, 393, 395, 397, 396,
735 42, 399, 42, 398, 42, 42, 42, 409, 410, 42,
736 42, 42, 42, 42, 404, 405, 401, 408, 42, 403,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000737
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000738 402, 42, 407, 411, 412, 413, 406, 414, 42, 42,
739 42, 415, 42, 42, 42, 42, 42, 42, 42, 416,
740 42, 418, 417, 42, 420, 42, 423, 42, 421, 419,
741 422, 431, 432, 42, 42, 42, 424, 427, 429, 434,
742 42, 42, 430, 425, 433, 42, 42, 426, 42, 428,
743 361, 361, 361, 361, 361, 361, 42, 436, 42, 435,
744 42, 440, 42, 442, 42, 437, 439, 438, 42, 42,
745 441, 42, 42, 42, 42, 42, 42, 444, 42, 42,
746 446, 42, 447, 42, 42, 443, 42, 42, 451, 445,
747 448, 449, 42, 450, 42, 452, 457, 459, 42, 453,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000748
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000749 42, 42, 455, 461, 42, 460, 454, 456, 458, 42,
750 42, 42, 42, 42, 464, 409, 410, 463, 42, 42,
751 466, 42, 42, 42, 42, 42, 462, 465, 467, 42,
752 42, 42, 468, 471, 42, 476, 42, 470, 477, 469,
753 474, 479, 42, 480, 472, 473, 42, 42, 475, 481,
754 42, 483, 478, 482, 431, 432, 42, 42, 42, 42,
755 42, 42, 42, 42, 42, 484, 42, 42, 42, 496,
756 497, 487, 42, 485, 488, 492, 42, 42, 486, 490,
757 42, 501, 42, 489, 500, 494, 493, 499, 495, 502,
758 42, 491, 42, 504, 498, 42, 42, 42, 42, 503,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000759
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000760 42, 42, 42, 505, 42, 42, 42, 519, 42, 42,
761 515, 512, 42, 507, 513, 506, 42, 510, 511, 42,
762 516, 520, 509, 42, 517, 42, 42, 42, 514, 42,
763 42, 42, 518, 522, 42, 42, 42, 42, 42, 521,
764 523, 42, 42, 42, 530, 42, 42, 525, 531, 529,
765 524, 526, 527, 532, 535, 533, 538, 537, 42, 528,
766 42, 42, 534, 536, 42, 540, 42, 42, 42, 42,
767 547, 539, 541, 546, 542, 544, 42, 42, 42, 548,
768 545, 42, 42, 543, 42, 42, 42, 42, 558, 42,
769 42, 42, 550, 42, 42, 42, 549, 554, 42, 42,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000770
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000771 557, 42, 559, 563, 555, 561, 551, 556, 552, 553,
772 564, 560, 42, 562, 42, 42, 42, 42, 566, 42,
773 42, 565, 567, 568, 42, 42, 42, 42, 569, 42,
774 572, 42, 42, 42, 42, 574, 576, 571, 578, 42,
775 42, 42, 42, 570, 575, 577, 42, 573, 584, 579,
776 42, 42, 580, 582, 585, 589, 581, 42, 42, 42,
777 42, 583, 42, 42, 42, 586, 42, 42, 42, 587,
778 588, 595, 42, 42, 42, 42, 42, 42, 42, 591,
779 42, 592, 593, 594, 590, 596, 601, 597, 602, 599,
780 42, 605, 598, 42, 42, 42, 42, 600, 42, 42,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000781
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000782 42, 604, 42, 606, 42, 42, 603, 42, 42, 42,
783 42, 42, 42, 42, 42, 42, 42, 42, 607, 39,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000784 39, 39, 39, 39, 39, 39, 39, 39, 41, 42,
785 41, 41, 41, 41, 44, 44, 42, 44, 44, 42,
786 44, 52, 42, 52, 52, 52, 52, 52, 52, 52,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000787 54, 54, 42, 54, 54, 42, 54, 139, 139, 139,
788 139, 139, 139, 139, 139, 139, 141, 42, 141, 141,
789 42, 141, 150, 150, 150, 150, 150, 150, 150, 150,
790 150, 152, 42, 152, 152, 42, 152, 264, 42, 264,
791 361, 361, 361, 42, 42, 42, 42, 42, 42, 42,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000792
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000793 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000794 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
795 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000796 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
797 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
798 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000799 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
800 42, 151, 42, 140, 263, 42, 42, 42, 151, 41,
801 140, 42, 138, 41, 42, 40, 608, 3, 608, 608,
802 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
Reid Spenceraa8ae282007-07-31 03:50:36 +0000803
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000804 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
805 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
806 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
807 608, 608, 608, 608, 608, 608, 608
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000808 } ;
809
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000810static yyconst flex_int16_t yy_chk[1438] =
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000811 { 0,
812 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
813 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
814 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
815 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000816 1, 1, 1, 1, 1, 1, 1, 1, 1, 9,
817 94, 64, 37, 37, 59, 9, 9, 9, 9, 9,
818 9, 10, 10, 10, 10, 10, 10, 11, 11, 11,
819 11, 11, 11, 11, 12, 37, 94, 59, 24, 62,
820 64, 12, 13, 13, 13, 13, 13, 13, 13, 13,
821 16, 17, 21, 19, 18, 24, 16, 16, 16, 16,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000822
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000823 16, 16, 19, 17, 19, 607, 62, 18, 68, 20,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000824 17, 18, 17, 21, 17, 19, 21, 17, 20, 18,
825 13, 22, 20, 21, 23, 31, 18, 48, 20, 36,
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000826 22, 20, 22, 22, 48, 68, 88, 23, 31, 65,
827 22, 605, 36, 23, 22, 26, 22, 25, 25, 25,
828 25, 25, 25, 25, 26, 28, 27, 88, 65, 38,
829 35, 56, 26, 58, 25, 27, 29, 26, 28, 35,
830 30, 26, 38, 56, 25, 58, 60, 28, 27, 29,
831 71, 29, 35, 28, 27, 29, 30, 29, 604, 29,
832 57, 29, 60, 30, 33, 30, 60, 30, 30, 32,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000833
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000834 61, 66, 72, 33, 67, 32, 78, 57, 71, 57,
835 33, 76, 66, 74, 72, 61, 33, 32, 32, 33,
836 32, 32, 32, 67, 32, 67, 33, 69, 78, 81,
837 32, 76, 32, 32, 70, 32, 34, 124, 69, 75,
838 74, 69, 34, 45, 45, 45, 45, 45, 45, 77,
839 69, 80, 84, 70, 34, 34, 81, 34, 75, 34,
840 124, 34, 84, 34, 80, 75, 77, 34, 46, 46,
841 46, 46, 46, 46, 46, 47, 47, 47, 47, 47,
842 47, 55, 55, 55, 55, 55, 55, 82, 79, 83,
843 85, 89, 87, 79, 100, 90, 92, 602, 178, 86,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000844
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000845 89, 83, 87, 91, 108, 97, 79, 100, 92, 82,
846 85, 90, 47, 49, 49, 49, 49, 49, 49, 49,
847 79, 93, 91, 49, 86, 86, 86, 178, 86, 97,
848 95, 108, 49, 51, 51, 51, 51, 51, 51, 95,
849 93, 96, 51, 51, 51, 51, 51, 102, 51, 51,
850 51, 51, 51, 51, 98, 95, 99, 101, 95, 102,
851 96, 103, 104, 105, 106, 107, 101, 98, 109, 99,
852 110, 112, 113, 104, 135, 111, 135, 600, 103, 599,
853 114, 98, 117, 99, 112, 105, 111, 110, 115, 106,
854 107, 113, 114, 118, 111, 114, 116, 119, 112, 109,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000855
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000856 113, 115, 120, 118, 117, 121, 111, 114, 123, 116,
857 126, 125, 128, 127, 119, 115, 129, 180, 131, 120,
858 130, 180, 136, 226, 137, 123, 127, 120, 125, 129,
859 121, 131, 130, 130, 126, 133, 123, 226, 132, 128,
860 127, 172, 130, 129, 134, 130, 132, 136, 142, 137,
861 130, 172, 133, 134, 133, 137, 155, 142, 145, 145,
862 160, 145, 145, 145, 145, 145, 145, 145, 146, 146,
863 146, 147, 147, 147, 147, 147, 147, 160, 155, 158,
864 147, 147, 169, 177, 163, 157, 147, 147, 147, 147,
865 147, 147, 148, 148, 148, 148, 148, 148, 157, 169,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000866
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000867 465, 148, 148, 163, 158, 465, 177, 148, 148, 148,
868 148, 148, 148, 149, 149, 149, 149, 149, 149, 166,
869 168, 175, 149, 149, 161, 154, 165, 162, 149, 149,
870 149, 149, 149, 149, 154, 161, 162, 167, 165, 168,
871 154, 170, 171, 174, 176, 166, 167, 175, 179, 181,
872 182, 184, 185, 183, 187, 171, 174, 179, 186, 171,
873 170, 188, 185, 189, 184, 190, 183, 191, 174, 192,
874 186, 176, 182, 183, 188, 182, 189, 187, 190, 193,
875 181, 194, 192, 195, 196, 197, 200, 199, 201, 191,
876 202, 203, 190, 194, 210, 214, 213, 193, 215, 216,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000877
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000878 228, 201, 221, 196, 213, 200, 220, 222, 195, 219,
879 203, 202, 216, 197, 199, 221, 598, 229, 210, 227,
880 232, 228, 214, 233, 235, 215, 218, 218, 218, 218,
881 218, 218, 227, 220, 222, 218, 218, 236, 219, 229,
882 232, 218, 218, 218, 218, 218, 218, 232, 233, 237,
883 238, 235, 239, 240, 241, 242, 236, 246, 249, 252,
884 253, 254, 259, 238, 237, 258, 240, 241, 256, 255,
885 259, 249, 252, 257, 240, 239, 261, 253, 255, 246,
886 256, 254, 257, 258, 242, 262, 264, 265, 265, 266,
887 266, 266, 266, 266, 266, 264, 267, 267, 261, 268,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000888
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000889 268, 272, 273, 274, 275, 277, 278, 281, 282, 279,
890 283, 284, 262, 285, 274, 278, 286, 287, 281, 288,
891 284, 289, 290, 273, 292, 275, 277, 272, 279, 283,
892 296, 293, 291, 286, 285, 282, 298, 292, 299, 288,
893 289, 291, 293, 297, 297, 300, 303, 290, 287, 304,
894 308, 309, 310, 307, 305, 319, 313, 296, 304, 311,
895 312, 316, 317, 298, 299, 303, 299, 305, 307, 320,
896 321, 323, 319, 300, 310, 308, 309, 311, 313, 312,
897 324, 317, 325, 316, 326, 330, 331, 332, 332, 333,
898 593, 334, 335, 336, 324, 325, 320, 331, 339, 323,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000899
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000900 321, 332, 330, 333, 334, 335, 326, 336, 340, 342,
901 344, 339, 343, 346, 349, 352, 350, 351, 354, 340,
902 356, 343, 342, 358, 346, 359, 351, 365, 349, 344,
903 350, 360, 360, 367, 585, 364, 352, 358, 359, 365,
904 375, 372, 359, 354, 364, 360, 369, 356, 373, 358,
905 361, 361, 361, 361, 361, 361, 370, 369, 371, 367,
906 374, 373, 376, 375, 377, 370, 372, 371, 378, 379,
907 374, 381, 387, 385, 386, 388, 389, 377, 390, 392,
908 379, 393, 381, 395, 394, 376, 398, 397, 388, 378,
909 385, 386, 399, 387, 400, 389, 395, 398, 401, 390,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000910
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000911 402, 403, 393, 400, 404, 399, 392, 394, 397, 405,
912 407, 406, 408, 413, 403, 409, 409, 402, 411, 412,
913 405, 417, 414, 418, 416, 419, 401, 404, 406, 421,
914 423, 424, 407, 412, 425, 418, 426, 411, 419, 408,
915 416, 423, 427, 424, 413, 414, 428, 429, 417, 425,
916 430, 427, 421, 426, 431, 431, 435, 434, 437, 438,
917 441, 445, 439, 442, 451, 427, 443, 446, 454, 445,
918 445, 430, 456, 428, 434, 439, 450, 461, 429, 437,
919 455, 454, 458, 435, 451, 442, 441, 450, 443, 455,
920 462, 438, 463, 458, 446, 466, 467, 468, 470, 456,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000921
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000922 471, 472, 476, 461, 479, 482, 483, 484, 484, 485,
923 476, 470, 486, 463, 471, 462, 487, 467, 468, 488,
924 479, 485, 466, 490, 482, 491, 494, 495, 472, 496,
925 497, 498, 483, 487, 501, 500, 502, 503, 510, 486,
926 488, 504, 506, 512, 498, 507, 518, 491, 500, 497,
927 490, 494, 495, 501, 504, 502, 508, 507, 509, 496,
928 508, 513, 503, 506, 515, 510, 516, 517, 520, 522,
929 519, 509, 512, 518, 513, 516, 519, 523, 525, 520,
930 517, 526, 527, 515, 528, 530, 531, 532, 538, 538,
931 539, 543, 523, 544, 542, 551, 522, 528, 541, 546,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000932
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000933 532, 549, 539, 544, 530, 542, 525, 531, 526, 527,
934 546, 541, 548, 543, 554, 555, 556, 557, 549, 560,
935 561, 548, 551, 554, 562, 563, 565, 564, 555, 566,
936 560, 568, 569, 570, 572, 562, 564, 557, 566, 574,
937 571, 575, 580, 556, 563, 565, 576, 561, 574, 568,
938 577, 578, 569, 571, 575, 580, 570, 581, 582, 583,
939 587, 572, 591, 584, 586, 576, 589, 590, 588, 577,
940 578, 587, 592, 596, 597, 594, 579, 595, 573, 582,
941 601, 583, 584, 586, 581, 588, 594, 589, 595, 591,
942 603, 601, 590, 606, 567, 559, 558, 592, 553, 552,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000943
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000944 550, 597, 547, 603, 545, 540, 596, 537, 536, 535,
945 534, 533, 529, 524, 521, 514, 511, 505, 606, 609,
946 609, 609, 609, 609, 609, 609, 609, 609, 610, 499,
947 610, 610, 610, 610, 611, 611, 493, 611, 611, 492,
948 611, 612, 489, 612, 612, 612, 612, 612, 612, 612,
949 613, 613, 481, 613, 613, 480, 613, 614, 614, 614,
950 614, 614, 614, 614, 614, 614, 615, 478, 615, 615,
951 477, 615, 616, 616, 616, 616, 616, 616, 616, 616,
952 616, 617, 475, 617, 617, 474, 617, 618, 473, 618,
953 619, 619, 619, 469, 464, 460, 459, 457, 453, 452,
Dale Johannesen255b8fe2007-09-11 18:33:39 +0000954
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000955 449, 448, 447, 444, 440, 436, 433, 422, 420, 415,
956 396, 391, 384, 383, 382, 380, 368, 366, 363, 362,
957 357, 355, 353, 348, 347, 345, 341, 338, 337, 329,
958 327, 322, 318, 315, 314, 306, 302, 301, 295, 294,
959 280, 276, 260, 251, 250, 248, 247, 245, 244, 243,
960 234, 231, 230, 225, 224, 223, 217, 212, 211, 209,
961 208, 207, 206, 205, 204, 198, 173, 164, 159, 156,
962 153, 150, 143, 139, 138, 122, 73, 63, 53, 50,
963 43, 41, 39, 14, 8, 7, 3, 608, 608, 608,
964 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000965
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000966 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
967 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
968 608, 608, 608, 608, 608, 608, 608, 608, 608, 608,
969 608, 608, 608, 608, 608, 608, 608
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000970 } ;
971
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000972/* Table of booleans, true if rule could match eol. */
973static yyconst flex_int32_t yy_rule_can_match_eol[155] =
974 { 0,
9750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
977 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
979 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
981 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
982 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
983
984static yy_state_type yy_last_accepting_state;
985static char *yy_last_accepting_cpos;
986
987extern int llvmAsm_flex_debug;
988int llvmAsm_flex_debug = 0;
989
990/* The intent behind this definition is that it'll catch
991 * any uses of REJECT which flex missed.
992 */
993#define REJECT reject_used_but_not_detected
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000994#define yymore() yymore_used_but_not_detected
995#define YY_MORE_ADJ 0
996#define YY_RESTORE_YY_MORE_OFFSET
Anton Korobeynikov66e28652007-11-14 09:53:48 +0000997char *llvmAsmtext;
998#line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000999/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
1000//
1001// The LLVM Compiler Infrastructure
1002//
1003// This file was developed by the LLVM research group and is distributed under
1004// the University of Illinois Open Source License. See LICENSE.TXT for details.
1005//
1006//===----------------------------------------------------------------------===//
1007//
1008// This file implements the flex scanner for LLVM assembly languages files.
1009//
1010//===----------------------------------------------------------------------===*/
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001011#line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001012#include "ParserInternals.h"
1013#include "llvm/Module.h"
1014#include "llvm/Support/MathExtras.h"
1015#include <list>
1016#include "llvmAsmParser.h"
1017#include <cctype>
1018#include <cstdlib>
1019
1020void set_scan_file(FILE * F){
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001021 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001022}
1023void set_scan_string (const char * str) {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001024 llvmAsm_scan_string (str);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001025}
1026
1027// Construct a token value for a non-obsolete token
1028#define RET_TOK(type, Enum, sym) \
1029 llvmAsmlval.type = Instruction::Enum; \
1030 return sym
1031
1032// Construct a token value for an obsolete token
1033#define RET_TY(CTYPE, SYM) \
1034 llvmAsmlval.PrimType = CTYPE;\
1035 return SYM
1036
1037namespace llvm {
1038
1039// TODO: All of the static identifiers are figured out by the lexer,
1040// these should be hashed to reduce the lexer size
1041
1042
1043// atoull - Convert an ascii string of decimal digits into the unsigned long
1044// long representation... this does not have to do input error checking,
1045// because we know that the input will be matched by a suitable regex...
1046//
1047static uint64_t atoull(const char *Buffer) {
1048 uint64_t Result = 0;
1049 for (; *Buffer; Buffer++) {
1050 uint64_t OldRes = Result;
1051 Result *= 10;
1052 Result += *Buffer-'0';
1053 if (Result < OldRes) // Uh, oh, overflow detected!!!
1054 GenerateError("constant bigger than 64 bits detected!");
1055 }
1056 return Result;
1057}
1058
1059static uint64_t HexIntToVal(const char *Buffer) {
1060 uint64_t Result = 0;
1061 for (; *Buffer; ++Buffer) {
1062 uint64_t OldRes = Result;
1063 Result *= 16;
1064 char C = *Buffer;
1065 if (C >= '0' && C <= '9')
1066 Result += C-'0';
1067 else if (C >= 'A' && C <= 'F')
1068 Result += C-'A'+10;
1069 else if (C >= 'a' && C <= 'f')
1070 Result += C-'a'+10;
1071
1072 if (Result < OldRes) // Uh, oh, overflow detected!!!
1073 GenerateError("constant bigger than 64 bits detected!");
1074 }
1075 return Result;
1076}
1077
Dale Johannesen255b8fe2007-09-11 18:33:39 +00001078// HexToFP - Convert the ascii string in hexadecimal format to the floating
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001079// point representation of it.
1080//
1081static double HexToFP(const char *Buffer) {
1082 return BitsToDouble(HexIntToVal(Buffer)); // Cast Hex constant to double
1083}
1084
Dale Johannesen255b8fe2007-09-11 18:33:39 +00001085static void HexToIntPair(const char *Buffer, uint64_t Pair[2]) {
1086 Pair[0] = 0;
1087 for (int i=0; i<16; i++, Buffer++) {
1088 assert(*Buffer);
1089 Pair[0] *= 16;
1090 char C = *Buffer;
1091 if (C >= '0' && C <= '9')
1092 Pair[0] += C-'0';
1093 else if (C >= 'A' && C <= 'F')
1094 Pair[0] += C-'A'+10;
1095 else if (C >= 'a' && C <= 'f')
1096 Pair[0] += C-'a'+10;
1097 }
1098 Pair[1] = 0;
1099 for (int i=0; i<16 && *Buffer; i++, Buffer++) {
1100 Pair[1] *= 16;
1101 char C = *Buffer;
1102 if (C >= '0' && C <= '9')
1103 Pair[1] += C-'0';
1104 else if (C >= 'A' && C <= 'F')
1105 Pair[1] += C-'A'+10;
1106 else if (C >= 'a' && C <= 'f')
1107 Pair[1] += C-'a'+10;
1108 }
1109 if (*Buffer)
1110 GenerateError("constant bigger than 128 bits detected!");
1111}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001112
1113// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1114// appropriate character.
1115char *UnEscapeLexed(char *Buffer, char* EndBuffer) {
1116 char *BOut = Buffer;
1117 for (char *BIn = Buffer; *BIn; ) {
1118 if (BIn[0] == '\\') {
1119 if (BIn < EndBuffer-1 && BIn[1] == '\\') {
1120 *BOut++ = '\\'; // Two \ becomes one
1121 BIn += 2;
1122 } else if (BIn < EndBuffer-2 && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1123 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1124 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1125 BIn[3] = Tmp; // Restore character
1126 BIn += 3; // Skip over handled chars
1127 ++BOut;
1128 } else {
1129 *BOut++ = *BIn++;
1130 }
1131 } else {
1132 *BOut++ = *BIn++;
1133 }
1134 }
1135 return BOut;
1136}
1137
1138} // End llvm namespace
1139
1140using namespace llvm;
1141
1142#define YY_NEVER_INTERACTIVE 1
1143/* Comments start with a ; and go till end of line */
1144/* Local Values and Type identifiers start with a % sign */
1145/* Global Value identifiers start with an @ sign */
1146/* Label identifiers end with a colon */
1147/* Quoted names can contain any character except " and \ */
1148/* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
1149/* Integer types are specified with i and a bitwidth */
1150/* E[PN]Integer: match positive and negative literal integer values. */
Dale Johannesen255b8fe2007-09-11 18:33:39 +00001151/* FPConstant - A Floating point constant. Float and double only.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001152 */
1153/* HexFPConstant - Floating point constant represented in IEEE format as a
1154 * hexadecimal number for when exponential notation is not precise enough.
Dale Johannesen255b8fe2007-09-11 18:33:39 +00001155 * Float and double only.
1156 */
1157/* F80HexFPConstant - x87 long double in hexadecimal format (10 bytes)
1158 */
1159/* F128HexFPConstant - IEEE 128-bit in hexadecimal format (16 bytes)
1160 */
1161/* PPC128HexFPConstant - PowerPC 128-bit in hexadecimal format (16 bytes)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001162 */
1163/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1164 * it to deal with 64 bit numbers.
1165 */
Reid Spencer51dbabe2007-07-31 03:55:56 +00001166/* WSNL - shorthand for whitespace followed by newline */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001167#line 1168 "Lexer.cpp"
1168
1169#define INITIAL 0
1170
1171#ifndef YY_NO_UNISTD_H
1172/* Special case for "unistd.h", since it is non-ANSI. We include it way
1173 * down here because we want the user's section 1 to have been scanned first.
1174 * The user has a chance to override it with an option.
1175 */
1176#include <unistd.h>
1177#endif
1178
1179#ifndef YY_EXTRA_TYPE
1180#define YY_EXTRA_TYPE void *
1181#endif
1182
1183static int yy_init_globals (void );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001184
1185/* Macros after this point can all be overridden by user definitions in
1186 * section 1.
1187 */
1188
1189#ifndef YY_SKIP_YYWRAP
1190#ifdef __cplusplus
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001191extern "C" int llvmAsmwrap (void );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001192#else
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001193extern int llvmAsmwrap (void );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001194#endif
1195#endif
1196
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001197 static inline void yyunput (int c,char *buf_ptr );
1198
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001199#ifndef yytext_ptr
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001200static void yy_flex_strncpy (char *,yyconst char *,int );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001201#endif
1202
1203#ifdef YY_NEED_STRLEN
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001204static int yy_flex_strlen (yyconst char * );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001205#endif
1206
1207#ifndef YY_NO_INPUT
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001208
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001209#ifdef __cplusplus
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001210static int yyinput (void );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001211#else
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001212static int input (void );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001213#endif
1214
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001215#endif
1216
1217/* Amount of stuff to slurp up with each read. */
1218#ifndef YY_READ_BUF_SIZE
1219#define YY_READ_BUF_SIZE 8192
1220#endif
1221
1222/* Copy whatever the last rule matched to the standard output. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001223#ifndef ECHO
1224/* This used to be an fputs(), but since the string might contain NUL's,
1225 * we now use fwrite().
1226 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001227#define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001228#endif
1229
1230/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1231 * is returned in "result".
1232 */
1233#ifndef YY_INPUT
1234#define YY_INPUT(buf,result,max_size) \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001235 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001236 { \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001237 int c = '*'; \
1238 size_t n; \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001239 for ( n = 0; n < max_size && \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001240 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001241 buf[n] = (char) c; \
1242 if ( c == '\n' ) \
1243 buf[n++] = (char) c; \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001244 if ( c == EOF && ferror( llvmAsmin ) ) \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001245 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1246 result = n; \
1247 } \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001248 else \
1249 { \
1250 errno=0; \
1251 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
1252 { \
1253 if( errno != EINTR) \
1254 { \
1255 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1256 break; \
1257 } \
1258 errno=0; \
1259 clearerr(llvmAsmin); \
1260 } \
1261 }\
1262\
1263
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001264#endif
1265
1266/* No semi-colon after return; correct usage is to write "yyterminate();" -
1267 * we don't want an extra ';' after the "return" because that will cause
1268 * some compilers to complain about unreachable statements.
1269 */
1270#ifndef yyterminate
1271#define yyterminate() return YY_NULL
1272#endif
1273
1274/* Number of entries by which start-condition stack grows. */
1275#ifndef YY_START_STACK_INCR
1276#define YY_START_STACK_INCR 25
1277#endif
1278
1279/* Report a fatal error. */
1280#ifndef YY_FATAL_ERROR
1281#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1282#endif
1283
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001284/* end tables serialization structures and prototypes */
1285
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001286/* Default declaration of generated scanner - a define so the user can
1287 * easily add parameters.
1288 */
1289#ifndef YY_DECL
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001290#define YY_DECL_IS_OURS 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001291
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001292extern int llvmAsmlex (void);
1293
1294#define YY_DECL int llvmAsmlex (void)
1295#endif /* !YY_DECL */
1296
1297/* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001298 * have been set up.
1299 */
1300#ifndef YY_USER_ACTION
1301#define YY_USER_ACTION
1302#endif
1303
1304/* Code executed at the end of each rule. */
1305#ifndef YY_BREAK
1306#define YY_BREAK break;
1307#endif
1308
1309#define YY_RULE_SETUP \
1310 YY_USER_ACTION
1311
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001312/** The main scanner function which does all the work.
1313 */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001314YY_DECL
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001315{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001316 register yy_state_type yy_current_state;
Dale Johannesenf325d9f2007-08-03 01:03:46 +00001317 register char *yy_cp, *yy_bp;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001318 register int yy_act;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001319
1320#line 221 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001321
1322
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001323#line 1324 "Lexer.cpp"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001324
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001325 if ( !(yy_init) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001326 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001327 (yy_init) = 1;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001328
1329#ifdef YY_USER_INIT
1330 YY_USER_INIT;
1331#endif
1332
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001333 if ( ! (yy_start) )
1334 (yy_start) = 1; /* first start state */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001335
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001336 if ( ! llvmAsmin )
1337 llvmAsmin = stdin;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001338
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001339 if ( ! llvmAsmout )
1340 llvmAsmout = stdout;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001341
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001342 if ( ! YY_CURRENT_BUFFER ) {
1343 llvmAsmensure_buffer_stack ();
1344 YY_CURRENT_BUFFER_LVALUE =
1345 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
1346 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001347
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001348 llvmAsm_load_buffer_state( );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001349 }
1350
1351 while ( 1 ) /* loops until end-of-file is reached */
1352 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001353 yy_cp = (yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001354
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001355 /* Support of llvmAsmtext. */
1356 *yy_cp = (yy_hold_char);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001357
1358 /* yy_bp points to the position in yy_ch_buf of the start of
1359 * the current run.
1360 */
1361 yy_bp = yy_cp;
1362
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001363 yy_current_state = (yy_start);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001364yy_match:
1365 do
1366 {
1367 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001368 if ( yy_accept[yy_current_state] )
1369 {
1370 (yy_last_accepting_state) = yy_current_state;
1371 (yy_last_accepting_cpos) = yy_cp;
1372 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001373 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1374 {
1375 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001376 if ( yy_current_state >= 609 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001377 yy_c = yy_meta[(unsigned int) yy_c];
1378 }
1379 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001380 ++yy_cp;
1381 }
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001382 while ( yy_current_state != 608 );
1383 yy_cp = (yy_last_accepting_cpos);
1384 yy_current_state = (yy_last_accepting_state);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001385
1386yy_find_action:
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001387 yy_act = yy_accept[yy_current_state];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001388
1389 YY_DO_BEFORE_ACTION;
1390
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001391 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001392 {
1393 int yyl;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001394 for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
1395 if ( llvmAsmtext[yyl] == '\n' )
1396
1397 llvmAsmlineno++;
1398;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001399 }
1400
1401do_action: /* This label is used only to access EOF actions. */
1402
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001403 switch ( yy_act )
1404 { /* beginning of action switch */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001405 case 0: /* must back up */
1406 /* undo the effects of YY_DO_BEFORE_ACTION */
1407 *yy_cp = (yy_hold_char);
1408 yy_cp = (yy_last_accepting_cpos);
1409 yy_current_state = (yy_last_accepting_state);
1410 goto yy_find_action;
1411
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001412case 1:
1413YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001414#line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001415{ /* Ignore comments for now */ }
1416 YY_BREAK
1417case 2:
1418YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001419#line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001420{ return BEGINTOK; }
1421 YY_BREAK
1422case 3:
1423YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001424#line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001425{ return ENDTOK; }
1426 YY_BREAK
1427case 4:
1428YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001429#line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001430{ return TRUETOK; }
1431 YY_BREAK
1432case 5:
1433YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001434#line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001435{ return FALSETOK; }
1436 YY_BREAK
1437case 6:
1438YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001439#line 229 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001440{ return DECLARE; }
1441 YY_BREAK
1442case 7:
1443YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001444#line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001445{ return DEFINE; }
1446 YY_BREAK
1447case 8:
1448YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001449#line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001450{ return GLOBAL; }
1451 YY_BREAK
1452case 9:
1453YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001454#line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001455{ return CONSTANT; }
1456 YY_BREAK
1457case 10:
1458YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001459#line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001460{ return INTERNAL; }
1461 YY_BREAK
1462case 11:
1463YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001464#line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001465{ return LINKONCE; }
1466 YY_BREAK
1467case 12:
1468YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001469#line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001470{ return WEAK; }
1471 YY_BREAK
1472case 13:
1473YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001474#line 236 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001475{ return APPENDING; }
1476 YY_BREAK
1477case 14:
1478YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001479#line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001480{ return DLLIMPORT; }
1481 YY_BREAK
1482case 15:
1483YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001484#line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001485{ return DLLEXPORT; }
1486 YY_BREAK
1487case 16:
1488YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001489#line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001490{ return HIDDEN; }
1491 YY_BREAK
1492case 17:
1493YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001494#line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001495{ return PROTECTED; }
1496 YY_BREAK
1497case 18:
1498YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001499#line 241 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001500{ return EXTERN_WEAK; }
1501 YY_BREAK
1502case 19:
1503YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001504#line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001505{ return EXTERNAL; }
1506 YY_BREAK
1507case 20:
1508YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001509#line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001510{ return THREAD_LOCAL; }
1511 YY_BREAK
1512case 21:
1513YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001514#line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001515{ return ZEROINITIALIZER; }
1516 YY_BREAK
1517case 22:
1518YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001519#line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001520{ return DOTDOTDOT; }
1521 YY_BREAK
1522case 23:
1523YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001524#line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001525{ return UNDEF; }
1526 YY_BREAK
1527case 24:
1528YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001529#line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001530{ return NULL_TOK; }
1531 YY_BREAK
1532case 25:
1533YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001534#line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001535{ return TO; }
1536 YY_BREAK
1537case 26:
1538YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001539#line 249 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001540{ return TAIL; }
1541 YY_BREAK
1542case 27:
1543YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001544#line 250 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001545{ return TARGET; }
1546 YY_BREAK
1547case 28:
1548YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001549#line 251 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001550{ return TRIPLE; }
1551 YY_BREAK
1552case 29:
1553YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001554#line 252 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001555{ return DEPLIBS; }
1556 YY_BREAK
1557case 30:
1558YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001559#line 253 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001560{ return DATALAYOUT; }
1561 YY_BREAK
1562case 31:
1563YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001564#line 254 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001565{ return VOLATILE; }
1566 YY_BREAK
1567case 32:
1568YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001569#line 255 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001570{ return ALIGN; }
1571 YY_BREAK
1572case 33:
1573YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001574#line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001575{ return SECTION; }
1576 YY_BREAK
1577case 34:
1578YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001579#line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001580{ return ALIAS; }
1581 YY_BREAK
1582case 35:
1583YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001584#line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001585{ return MODULE; }
1586 YY_BREAK
1587case 36:
1588YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001589#line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001590{ return ASM_TOK; }
1591 YY_BREAK
1592case 37:
1593YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001594#line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001595{ return SIDEEFFECT; }
1596 YY_BREAK
1597case 38:
1598YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001599#line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001600{ return CC_TOK; }
1601 YY_BREAK
1602case 39:
1603YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001604#line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001605{ return CCC_TOK; }
1606 YY_BREAK
1607case 40:
1608YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001609#line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001610{ return FASTCC_TOK; }
1611 YY_BREAK
1612case 41:
1613YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001614#line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001615{ return COLDCC_TOK; }
1616 YY_BREAK
1617case 42:
1618YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001619#line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001620{ return X86_STDCALLCC_TOK; }
1621 YY_BREAK
1622case 43:
1623YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001624#line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001625{ return X86_FASTCALLCC_TOK; }
1626 YY_BREAK
1627case 44:
1628YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001629#line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001630{ return SIGNEXT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001631 YY_BREAK
1632case 45:
1633YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001634#line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001635{ return ZEROEXT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001636 YY_BREAK
1637case 46:
1638YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001639#line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001640{ return INREG; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001641 YY_BREAK
1642case 47:
1643YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001644#line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001645{ return SRET; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001646 YY_BREAK
1647case 48:
1648YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001649#line 273 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001650{ return NOUNWIND; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001651 YY_BREAK
1652case 49:
1653YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001654#line 274 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001655{ return NORETURN; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001656 YY_BREAK
1657case 50:
1658YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001659#line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001660{ return NOALIAS; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001661 YY_BREAK
1662case 51:
1663YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001664#line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001665{ return BYVAL; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001666 YY_BREAK
1667case 52:
1668YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001669#line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001670{ return NEST; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001671 YY_BREAK
1672case 53:
1673YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001674#line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1675{ return PURE; }
1676 YY_BREAK
1677case 54:
1678YY_RULE_SETUP
1679#line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1680{ return CONST; }
1681 YY_BREAK
1682case 55:
1683*yy_cp = (yy_hold_char); /* undo effects of setting up llvmAsmtext */
1684(yy_c_buf_p) = yy_cp -= 1;
1685YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */
1686YY_RULE_SETUP
1687#line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001688{ // For auto-upgrade only, drop in LLVM 3.0
1689 return SIGNEXT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001690 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001691case 56:
1692*yy_cp = (yy_hold_char); /* undo effects of setting up llvmAsmtext */
1693(yy_c_buf_p) = yy_cp -= 1;
1694YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001695YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001696#line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spenceraa8ae282007-07-31 03:50:36 +00001697{ // For auto-upgrade only, drop in LLVM 3.0
1698 return ZEROEXT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001699 YY_BREAK
Reid Spenceraa8ae282007-07-31 03:50:36 +00001700case 57:
1701YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001702#line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1703{ RET_TY(Type::VoidTy, VOID); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00001704 YY_BREAK
1705case 58:
1706YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001707#line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1708{ RET_TY(Type::FloatTy, FLOAT); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00001709 YY_BREAK
1710case 59:
1711YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001712#line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1713{ RET_TY(Type::DoubleTy,DOUBLE);}
Reid Spenceraa8ae282007-07-31 03:50:36 +00001714 YY_BREAK
1715case 60:
1716YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001717#line 288 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1718{ RET_TY(Type::X86_FP80Ty, X86_FP80);}
Reid Spenceraa8ae282007-07-31 03:50:36 +00001719 YY_BREAK
1720case 61:
1721YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001722#line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1723{ RET_TY(Type::FP128Ty, FP128);}
Dale Johannesenf325d9f2007-08-03 01:03:46 +00001724 YY_BREAK
1725case 62:
1726YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001727#line 290 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1728{ RET_TY(Type::PPC_FP128Ty, PPC_FP128);}
Dale Johannesenf325d9f2007-08-03 01:03:46 +00001729 YY_BREAK
1730case 63:
1731YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001732#line 291 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1733{ RET_TY(Type::LabelTy, LABEL); }
Dale Johannesenf325d9f2007-08-03 01:03:46 +00001734 YY_BREAK
1735case 64:
1736YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001737#line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1738{ return TYPE; }
1739 YY_BREAK
1740case 65:
1741YY_RULE_SETUP
1742#line 293 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1743{ return OPAQUE; }
1744 YY_BREAK
1745case 66:
1746YY_RULE_SETUP
1747#line 294 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1748{ uint64_t NumBits = atoull(llvmAsmtext+1);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001749 if (NumBits < IntegerType::MIN_INT_BITS ||
1750 NumBits > IntegerType::MAX_INT_BITS)
1751 GenerateError("Bitwidth for integer type out of range!");
1752 const Type* Ty = IntegerType::get(NumBits);
1753 RET_TY(Ty, INTTYPE);
1754 }
1755 YY_BREAK
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001756case 67:
1757YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001758#line 302 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1759{ RET_TOK(BinaryOpVal, Add, ADD); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001760 YY_BREAK
1761case 68:
1762YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001763#line 303 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1764{ RET_TOK(BinaryOpVal, Sub, SUB); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001765 YY_BREAK
1766case 69:
1767YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001768#line 304 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1769{ RET_TOK(BinaryOpVal, Mul, MUL); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001770 YY_BREAK
1771case 70:
1772YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001773#line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1774{ RET_TOK(BinaryOpVal, UDiv, UDIV); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001775 YY_BREAK
1776case 71:
1777YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001778#line 306 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1779{ RET_TOK(BinaryOpVal, SDiv, SDIV); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001780 YY_BREAK
1781case 72:
1782YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001783#line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1784{ RET_TOK(BinaryOpVal, FDiv, FDIV); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001785 YY_BREAK
1786case 73:
1787YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001788#line 308 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1789{ RET_TOK(BinaryOpVal, URem, UREM); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001790 YY_BREAK
1791case 74:
1792YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001793#line 309 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1794{ RET_TOK(BinaryOpVal, SRem, SREM); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001795 YY_BREAK
1796case 75:
1797YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001798#line 310 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1799{ RET_TOK(BinaryOpVal, FRem, FREM); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001800 YY_BREAK
1801case 76:
1802YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001803#line 311 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1804{ RET_TOK(BinaryOpVal, Shl, SHL); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001805 YY_BREAK
1806case 77:
1807YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001808#line 312 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1809{ RET_TOK(BinaryOpVal, LShr, LSHR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001810 YY_BREAK
1811case 78:
1812YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001813#line 313 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1814{ RET_TOK(BinaryOpVal, AShr, ASHR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001815 YY_BREAK
1816case 79:
1817YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001818#line 314 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1819{ RET_TOK(BinaryOpVal, And, AND); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001820 YY_BREAK
1821case 80:
1822YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001823#line 315 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1824{ RET_TOK(BinaryOpVal, Or , OR ); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001825 YY_BREAK
1826case 81:
1827YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001828#line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1829{ RET_TOK(BinaryOpVal, Xor, XOR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001830 YY_BREAK
1831case 82:
1832YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001833#line 317 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1834{ RET_TOK(OtherOpVal, ICmp, ICMP); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001835 YY_BREAK
1836case 83:
1837YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001838#line 318 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1839{ RET_TOK(OtherOpVal, FCmp, FCMP); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001840 YY_BREAK
1841case 84:
1842YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001843#line 320 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1844{ return EQ; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001845 YY_BREAK
1846case 85:
1847YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001848#line 321 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1849{ return NE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001850 YY_BREAK
1851case 86:
1852YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001853#line 322 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1854{ return SLT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001855 YY_BREAK
1856case 87:
1857YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001858#line 323 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1859{ return SGT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001860 YY_BREAK
1861case 88:
1862YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001863#line 324 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1864{ return SLE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001865 YY_BREAK
1866case 89:
1867YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001868#line 325 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1869{ return SGE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001870 YY_BREAK
1871case 90:
1872YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001873#line 326 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1874{ return ULT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001875 YY_BREAK
1876case 91:
1877YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001878#line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1879{ return UGT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001880 YY_BREAK
1881case 92:
1882YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001883#line 328 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1884{ return ULE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001885 YY_BREAK
1886case 93:
1887YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001888#line 329 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1889{ return UGE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001890 YY_BREAK
1891case 94:
1892YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001893#line 330 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1894{ return OEQ; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001895 YY_BREAK
1896case 95:
1897YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001898#line 331 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1899{ return ONE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001900 YY_BREAK
1901case 96:
1902YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001903#line 332 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1904{ return OLT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001905 YY_BREAK
1906case 97:
1907YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001908#line 333 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1909{ return OGT; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001910 YY_BREAK
1911case 98:
1912YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001913#line 334 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1914{ return OLE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001915 YY_BREAK
1916case 99:
1917YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001918#line 335 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1919{ return OGE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001920 YY_BREAK
1921case 100:
1922YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001923#line 336 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1924{ return ORD; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001925 YY_BREAK
1926case 101:
1927YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001928#line 337 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1929{ return UNO; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001930 YY_BREAK
1931case 102:
1932YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001933#line 338 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1934{ return UEQ; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001935 YY_BREAK
1936case 103:
1937YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001938#line 339 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1939{ return UNE; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001940 YY_BREAK
1941case 104:
1942YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001943#line 341 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1944{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001945 YY_BREAK
1946case 105:
1947YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001948#line 342 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1949{ RET_TOK(OtherOpVal, Call, CALL); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001950 YY_BREAK
1951case 106:
1952YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001953#line 343 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1954{ RET_TOK(CastOpVal, Trunc, TRUNC); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001955 YY_BREAK
1956case 107:
1957YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001958#line 344 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1959{ RET_TOK(CastOpVal, ZExt, ZEXT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001960 YY_BREAK
1961case 108:
1962YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001963#line 345 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1964{ RET_TOK(CastOpVal, SExt, SEXT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001965 YY_BREAK
1966case 109:
1967YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001968#line 346 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1969{ RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001970 YY_BREAK
1971case 110:
1972YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001973#line 347 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1974{ RET_TOK(CastOpVal, FPExt, FPEXT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001975 YY_BREAK
1976case 111:
1977YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001978#line 348 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1979{ RET_TOK(CastOpVal, UIToFP, UITOFP); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001980 YY_BREAK
1981case 112:
1982YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001983#line 349 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1984{ RET_TOK(CastOpVal, SIToFP, SITOFP); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001985 YY_BREAK
1986case 113:
1987YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001988#line 350 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1989{ RET_TOK(CastOpVal, FPToUI, FPTOUI); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001990 YY_BREAK
1991case 114:
1992YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001993#line 351 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1994{ RET_TOK(CastOpVal, FPToSI, FPTOSI); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001995 YY_BREAK
1996case 115:
1997YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00001998#line 352 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1999{ RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002000 YY_BREAK
2001case 116:
2002YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002003#line 353 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2004{ RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002005 YY_BREAK
2006case 117:
2007YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002008#line 354 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2009{ RET_TOK(CastOpVal, BitCast, BITCAST); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002010 YY_BREAK
2011case 118:
2012YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002013#line 355 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2014{ RET_TOK(OtherOpVal, Select, SELECT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002015 YY_BREAK
2016case 119:
2017YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002018#line 356 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2019{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002020 YY_BREAK
2021case 120:
2022YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002023#line 357 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2024{ RET_TOK(TermOpVal, Ret, RET); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002025 YY_BREAK
2026case 121:
2027YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002028#line 358 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2029{ RET_TOK(TermOpVal, Br, BR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002030 YY_BREAK
2031case 122:
2032YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002033#line 359 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2034{ RET_TOK(TermOpVal, Switch, SWITCH); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002035 YY_BREAK
2036case 123:
2037YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002038#line 360 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2039{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002040 YY_BREAK
2041case 124:
2042YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002043#line 361 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2044{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002045 YY_BREAK
2046case 125:
2047YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002048#line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2049{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002050 YY_BREAK
2051case 126:
2052YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002053#line 364 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2054{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002055 YY_BREAK
2056case 127:
2057YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002058#line 365 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2059{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002060 YY_BREAK
2061case 128:
2062YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002063#line 366 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2064{ RET_TOK(MemOpVal, Free, FREE); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002065 YY_BREAK
2066case 129:
2067YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002068#line 367 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2069{ RET_TOK(MemOpVal, Load, LOAD); }
Reid Spenceraa8ae282007-07-31 03:50:36 +00002070 YY_BREAK
2071case 130:
2072YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002073#line 368 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2074{ RET_TOK(MemOpVal, Store, STORE); }
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002075 YY_BREAK
2076case 131:
2077YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002078#line 369 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2079{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002080 YY_BREAK
2081case 132:
2082YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002083#line 371 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2084{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002085 YY_BREAK
2086case 133:
2087YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002088#line 372 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2089{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002090 YY_BREAK
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002091case 134:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002092YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002093#line 373 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2094{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002095 YY_BREAK
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002096case 135:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002097YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002098#line 376 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002099{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002100 llvmAsmlval.StrVal = new std::string(llvmAsmtext+1); // Skip %
2101 return LOCALVAR;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002102 }
2103 YY_BREAK
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002104case 136:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002105YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002106#line 380 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002107{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002108 llvmAsmlval.StrVal = new std::string(llvmAsmtext+1); // Skip @
2109 return GLOBALVAR;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002110 }
2111 YY_BREAK
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002112case 137:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002113YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002114#line 384 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2115{
2116 llvmAsmtext[llvmAsmleng-1] = 0; // nuke colon
2117 llvmAsmlval.StrVal = new std::string(llvmAsmtext);
2118 return LABELSTR;
2119 }
2120 YY_BREAK
2121case 138:
2122/* rule 138 can match eol */
2123YY_RULE_SETUP
2124#line 389 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2125{
2126 llvmAsmtext[llvmAsmleng-2] = 0; // nuke colon, end quote
2127 const char* EndChar = UnEscapeLexed(llvmAsmtext+1, llvmAsmtext+llvmAsmleng);
2128 llvmAsmlval.StrVal =
2129 new std::string(llvmAsmtext+1, EndChar - llvmAsmtext - 1);
2130 return LABELSTR;
2131 }
2132 YY_BREAK
2133case 139:
2134/* rule 139 can match eol */
2135YY_RULE_SETUP
2136#line 397 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2137{ llvmAsmtext[llvmAsmleng-1] = 0; // nuke end quote
2138 const char* EndChar = UnEscapeLexed(llvmAsmtext+1, llvmAsmtext+llvmAsmleng);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002139 llvmAsmlval.StrVal =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002140 new std::string(llvmAsmtext+1, EndChar - llvmAsmtext - 1);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002141 return STRINGCONSTANT;
2142 }
2143 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002144case 140:
2145/* rule 140 can match eol */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002146YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002147#line 403 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002148{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002149 llvmAsmtext[llvmAsmleng-1] = 0; // nuke end quote
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002150 const char* EndChar =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002151 UnEscapeLexed(llvmAsmtext+2, llvmAsmtext+llvmAsmleng);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002152 llvmAsmlval.StrVal =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002153 new std::string(llvmAsmtext+2, EndChar - llvmAsmtext - 2);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002154 return ATSTRINGCONSTANT;
2155 }
2156 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002157case 141:
2158/* rule 141 can match eol */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002159YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002160#line 411 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002161{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002162 llvmAsmtext[llvmAsmleng-1] = 0; // nuke end quote
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002163 const char* EndChar =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002164 UnEscapeLexed(llvmAsmtext+2, llvmAsmtext+llvmAsmleng);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002165 llvmAsmlval.StrVal =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002166 new std::string(llvmAsmtext+2, EndChar - llvmAsmtext - 2);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002167 return PCTSTRINGCONSTANT;
2168 }
2169 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002170case 142:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002171YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002172#line 419 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002173{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002174 uint32_t numBits = ((llvmAsmleng * 64) / 19) + 1;
2175 APInt Tmp(numBits, llvmAsmtext, llvmAsmleng, 10);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002176 uint32_t activeBits = Tmp.getActiveBits();
2177 if (activeBits > 0 && activeBits < numBits)
2178 Tmp.trunc(activeBits);
2179 if (Tmp.getBitWidth() > 64) {
2180 llvmAsmlval.APIntVal = new APInt(Tmp);
2181 return EUAPINTVAL;
2182 } else {
2183 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2184 return EUINT64VAL;
2185 }
2186 }
2187 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002188case 143:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002189YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002190#line 433 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002191{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002192 uint32_t numBits = (((llvmAsmleng-1) * 64) / 19) + 2;
2193 APInt Tmp(numBits, llvmAsmtext, llvmAsmleng, 10);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002194 uint32_t minBits = Tmp.getMinSignedBits();
2195 if (minBits > 0 && minBits < numBits)
2196 Tmp.trunc(minBits);
2197 if (Tmp.getBitWidth() > 64) {
2198 llvmAsmlval.APIntVal = new APInt(Tmp);
2199 return ESAPINTVAL;
2200 } else {
2201 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2202 return ESINT64VAL;
2203 }
2204 }
2205 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002206case 144:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002207YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002208#line 448 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2209{ int len = llvmAsmleng - 3;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002210 uint32_t bits = len * 4;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002211 APInt Tmp(bits, llvmAsmtext+3, len, 16);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002212 uint32_t activeBits = Tmp.getActiveBits();
2213 if (activeBits > 0 && activeBits < bits)
2214 Tmp.trunc(activeBits);
2215 if (Tmp.getBitWidth() > 64) {
2216 llvmAsmlval.APIntVal = new APInt(Tmp);
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002217 return llvmAsmtext[0] == 's' ? ESAPINTVAL : EUAPINTVAL;
2218 } else if (llvmAsmtext[0] == 's') {
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002219 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2220 return ESINT64VAL;
2221 } else {
2222 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2223 return EUINT64VAL;
2224 }
2225 }
2226 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002227case 145:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002228YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002229#line 466 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002230{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002231 uint64_t Val = atoull(llvmAsmtext+1);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002232 if ((unsigned)Val != Val)
2233 GenerateError("Invalid value number (too large)!");
2234 llvmAsmlval.UIntVal = unsigned(Val);
2235 return LOCALVAL_ID;
2236 }
2237 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002238case 146:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002239YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002240#line 473 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002241{
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002242 uint64_t Val = atoull(llvmAsmtext+1);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002243 if ((unsigned)Val != Val)
2244 GenerateError("Invalid value number (too large)!");
2245 llvmAsmlval.UIntVal = unsigned(Val);
2246 return GLOBALVAL_ID;
2247 }
2248 YY_BREAK
Dale Johannesen255b8fe2007-09-11 18:33:39 +00002249case 147:
2250YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002251#line 481 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2252{ llvmAsmlval.FPVal = new APFloat(atof(llvmAsmtext)); return FPVAL; }
Dale Johannesen255b8fe2007-09-11 18:33:39 +00002253 YY_BREAK
2254case 148:
2255YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002256#line 482 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2257{ llvmAsmlval.FPVal = new APFloat(HexToFP(llvmAsmtext+2));
2258 return FPVAL;
Dale Johannesen255b8fe2007-09-11 18:33:39 +00002259 }
2260 YY_BREAK
2261case 149:
2262YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002263#line 485 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dale Johannesen255b8fe2007-09-11 18:33:39 +00002264{ uint64_t Pair[2];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002265 HexToIntPair(llvmAsmtext+3, Pair);
2266 llvmAsmlval.FPVal = new APFloat(APInt(80, 2, Pair));
2267 return FPVAL;
2268 }
2269 YY_BREAK
2270case 150:
2271YY_RULE_SETUP
2272#line 490 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2273{ uint64_t Pair[2];
2274 HexToIntPair(llvmAsmtext+3, Pair);
2275 llvmAsmlval.FPVal = new APFloat(APInt(128, 2, Pair), true);
2276 return FPVAL;
2277 }
2278 YY_BREAK
2279case 151:
2280YY_RULE_SETUP
2281#line 495 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2282{ uint64_t Pair[2];
2283 HexToIntPair(llvmAsmtext+3, Pair);
Dale Johannesen255b8fe2007-09-11 18:33:39 +00002284 llvmAsmlval.FPVal = new APFloat(APInt(128, 2, Pair));
2285 return FPVAL;
2286 }
2287 YY_BREAK
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002288case YY_STATE_EOF(INITIAL):
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002289#line 501 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002290{
2291 /* Make sure to free the internal buffers for flex when we are
2292 * done reading our input!
2293 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002294 llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002295 return EOF;
2296 }
2297 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002298case 152:
2299/* rule 152 can match eol */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002300YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002301#line 509 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002302{ /* Ignore whitespace */ }
2303 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002304case 153:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002305YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002306#line 510 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2307{ return llvmAsmtext[0]; }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002308 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002309case 154:
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002310YY_RULE_SETUP
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002311#line 512 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002312YY_FATAL_ERROR( "flex scanner jammed" );
2313 YY_BREAK
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002314#line 2315 "Lexer.cpp"
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002315
2316 case YY_END_OF_BUFFER:
2317 {
2318 /* Amount of text matched not including the EOB char. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002319 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002320
2321 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002322 *yy_cp = (yy_hold_char);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002323 YY_RESTORE_YY_MORE_OFFSET
2324
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002325 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002326 {
2327 /* We're scanning a new file or input source. It's
2328 * possible that this happened because the user
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002329 * just pointed llvmAsmin at a new source and called
2330 * llvmAsmlex(). If so, then we have to assure
2331 * consistency between YY_CURRENT_BUFFER and our
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002332 * globals. Here is the right place to do so, because
2333 * this is the first action (other than possibly a
2334 * back-up) that will match for the new input source.
2335 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002336 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2337 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
2338 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002339 }
2340
2341 /* Note that here we test for yy_c_buf_p "<=" to the position
2342 * of the first EOB in the buffer, since yy_c_buf_p will
2343 * already have been incremented past the NUL character
2344 * (since all states make transitions on EOB to the
2345 * end-of-buffer state). Contrast this with the test
2346 * in input().
2347 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002348 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002349 { /* This was really a NUL. */
2350 yy_state_type yy_next_state;
2351
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002352 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002353
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002354 yy_current_state = yy_get_previous_state( );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002355
2356 /* Okay, we're now positioned to make the NUL
2357 * transition. We couldn't have
2358 * yy_get_previous_state() go ahead and do it
2359 * for us because it doesn't know how to deal
2360 * with the possibility of jamming (and we don't
2361 * want to build jamming into it because then it
2362 * will run more slowly).
2363 */
2364
2365 yy_next_state = yy_try_NUL_trans( yy_current_state );
2366
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002367 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002368
2369 if ( yy_next_state )
2370 {
2371 /* Consume the NUL. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002372 yy_cp = ++(yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002373 yy_current_state = yy_next_state;
2374 goto yy_match;
2375 }
2376
2377 else
2378 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002379 yy_cp = (yy_last_accepting_cpos);
2380 yy_current_state = (yy_last_accepting_state);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002381 goto yy_find_action;
2382 }
2383 }
2384
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002385 else switch ( yy_get_next_buffer( ) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002386 {
2387 case EOB_ACT_END_OF_FILE:
2388 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002389 (yy_did_buffer_switch_on_eof) = 0;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002390
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002391 if ( llvmAsmwrap( ) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002392 {
2393 /* Note: because we've taken care in
2394 * yy_get_next_buffer() to have set up
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002395 * llvmAsmtext, we can now set up
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002396 * yy_c_buf_p so that if some total
2397 * hoser (like flex itself) wants to
2398 * call the scanner after we return the
2399 * YY_NULL, it'll still work - another
2400 * YY_NULL will get returned.
2401 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002402 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002403
2404 yy_act = YY_STATE_EOF(YY_START);
2405 goto do_action;
2406 }
2407
2408 else
2409 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002410 if ( ! (yy_did_buffer_switch_on_eof) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002411 YY_NEW_FILE;
2412 }
2413 break;
2414 }
2415
2416 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002417 (yy_c_buf_p) =
2418 (yytext_ptr) + yy_amount_of_matched_text;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002419
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002420 yy_current_state = yy_get_previous_state( );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002421
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002422 yy_cp = (yy_c_buf_p);
2423 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002424 goto yy_match;
2425
2426 case EOB_ACT_LAST_MATCH:
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002427 (yy_c_buf_p) =
2428 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002429
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002430 yy_current_state = yy_get_previous_state( );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002431
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002432 yy_cp = (yy_c_buf_p);
2433 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002434 goto yy_find_action;
2435 }
2436 break;
2437 }
2438
2439 default:
2440 YY_FATAL_ERROR(
2441 "fatal flex scanner internal error--no action found" );
2442 } /* end of action switch */
2443 } /* end of scanning one token */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002444} /* end of llvmAsmlex */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002445
2446/* yy_get_next_buffer - try to read in a new buffer
2447 *
2448 * Returns a code representing an action:
2449 * EOB_ACT_LAST_MATCH -
2450 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2451 * EOB_ACT_END_OF_FILE - end of file
2452 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002453static int yy_get_next_buffer (void)
2454{
2455 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2456 register char *source = (yytext_ptr);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002457 register int number_to_move, i;
2458 int ret_val;
2459
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002460 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002461 YY_FATAL_ERROR(
2462 "fatal flex scanner internal error--end of buffer missed" );
2463
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002464 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002465 { /* Don't try to fill the buffer, so this is an EOF. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002466 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002467 {
2468 /* We matched a single character, the EOB, so
2469 * treat this as a final EOF.
2470 */
2471 return EOB_ACT_END_OF_FILE;
2472 }
2473
2474 else
2475 {
2476 /* We matched some text prior to the EOB, first
2477 * process it.
2478 */
2479 return EOB_ACT_LAST_MATCH;
2480 }
2481 }
2482
2483 /* Try to read more data. */
2484
2485 /* First move last chars to start of buffer. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002486 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002487
2488 for ( i = 0; i < number_to_move; ++i )
2489 *(dest++) = *(source++);
2490
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002491 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002492 /* don't do the read, it's not guaranteed to return an EOF,
2493 * just force an EOF
2494 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002495 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002496
2497 else
2498 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002499 int num_to_read =
2500 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002501
2502 while ( num_to_read <= 0 )
2503 { /* Not enough room in the buffer - grow it. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002504
2505 /* just a shorter name for the current buffer */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002506 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002507
2508 int yy_c_buf_p_offset =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002509 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002510
2511 if ( b->yy_is_our_buffer )
2512 {
2513 int new_size = b->yy_buf_size * 2;
2514
2515 if ( new_size <= 0 )
2516 b->yy_buf_size += b->yy_buf_size / 8;
2517 else
2518 b->yy_buf_size *= 2;
2519
2520 b->yy_ch_buf = (char *)
2521 /* Include room in for 2 EOB chars. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002522 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002523 }
2524 else
2525 /* Can't grow it, we don't own it. */
2526 b->yy_ch_buf = 0;
2527
2528 if ( ! b->yy_ch_buf )
2529 YY_FATAL_ERROR(
2530 "fatal error - scanner input buffer overflow" );
2531
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002532 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002533
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002534 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002535 number_to_move - 1;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002536
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002537 }
2538
2539 if ( num_to_read > YY_READ_BUF_SIZE )
2540 num_to_read = YY_READ_BUF_SIZE;
2541
2542 /* Read in more data. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002543 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2544 (yy_n_chars), num_to_read );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002545
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002546 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002547 }
2548
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002549 if ( (yy_n_chars) == 0 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002550 {
2551 if ( number_to_move == YY_MORE_ADJ )
2552 {
2553 ret_val = EOB_ACT_END_OF_FILE;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002554 llvmAsmrestart(llvmAsmin );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002555 }
2556
2557 else
2558 {
2559 ret_val = EOB_ACT_LAST_MATCH;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002560 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002561 YY_BUFFER_EOF_PENDING;
2562 }
2563 }
2564
2565 else
2566 ret_val = EOB_ACT_CONTINUE_SCAN;
2567
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002568 (yy_n_chars) += number_to_move;
2569 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2570 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002571
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002572 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002573
2574 return ret_val;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002575}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002576
2577/* yy_get_previous_state - get the state just before the EOB char was reached */
2578
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002579 static yy_state_type yy_get_previous_state (void)
2580{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002581 register yy_state_type yy_current_state;
2582 register char *yy_cp;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002583
2584 yy_current_state = (yy_start);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002585
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002586 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002587 {
2588 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002589 if ( yy_accept[yy_current_state] )
2590 {
2591 (yy_last_accepting_state) = yy_current_state;
2592 (yy_last_accepting_cpos) = yy_cp;
2593 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002594 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2595 {
2596 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002597 if ( yy_current_state >= 609 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002598 yy_c = yy_meta[(unsigned int) yy_c];
2599 }
2600 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002601 }
2602
2603 return yy_current_state;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002604}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002605
2606/* yy_try_NUL_trans - try to make a transition on the NUL character
2607 *
2608 * synopsis
2609 * next_state = yy_try_NUL_trans( current_state );
2610 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002611 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2612{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002613 register int yy_is_jam;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002614 register char *yy_cp = (yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002615
2616 register YY_CHAR yy_c = 1;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002617 if ( yy_accept[yy_current_state] )
2618 {
2619 (yy_last_accepting_state) = yy_current_state;
2620 (yy_last_accepting_cpos) = yy_cp;
2621 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002622 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2623 {
2624 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002625 if ( yy_current_state >= 609 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002626 yy_c = yy_meta[(unsigned int) yy_c];
2627 }
2628 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002629 yy_is_jam = (yy_current_state == 608);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002630
2631 return yy_is_jam ? 0 : yy_current_state;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002632}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002633
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002634 static inline void yyunput (int c, register char * yy_bp )
2635{
2636 register char *yy_cp;
2637
2638 yy_cp = (yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002639
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002640 /* undo effects of setting up llvmAsmtext */
2641 *yy_cp = (yy_hold_char);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002642
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002643 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002644 { /* need to shift things up to make room */
2645 /* +2 for EOB chars. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002646 register int number_to_move = (yy_n_chars) + 2;
2647 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2648 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002649 register char *source =
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002650 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002651
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002652 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002653 *--dest = *--source;
2654
2655 yy_cp += (int) (dest - source);
2656 yy_bp += (int) (dest - source);
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002657 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2658 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002659
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002660 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002661 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2662 }
2663
2664 *--yy_cp = (char) c;
2665
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002666 if ( c == '\n' ){
2667 --llvmAsmlineno;
2668 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002669
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002670 (yytext_ptr) = yy_bp;
2671 (yy_hold_char) = *yy_cp;
2672 (yy_c_buf_p) = yy_cp;
2673}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002674
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002675#ifndef YY_NO_INPUT
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002676#ifdef __cplusplus
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002677 static int yyinput (void)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002678#else
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002679 static int input (void)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002680#endif
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002681
2682{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002683 int c;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002684
2685 *(yy_c_buf_p) = (yy_hold_char);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002686
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002687 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002688 {
2689 /* yy_c_buf_p now points to the character we want to return.
2690 * If this occurs *before* the EOB characters, then it's a
2691 * valid NUL; if not, then we've hit the end of the buffer.
2692 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002693 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002694 /* This was really a NUL. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002695 *(yy_c_buf_p) = '\0';
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002696
2697 else
2698 { /* need more input */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002699 int offset = (yy_c_buf_p) - (yytext_ptr);
2700 ++(yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002701
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002702 switch ( yy_get_next_buffer( ) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002703 {
2704 case EOB_ACT_LAST_MATCH:
2705 /* This happens because yy_g_n_b()
2706 * sees that we've accumulated a
2707 * token and flags that we need to
2708 * try matching the token before
2709 * proceeding. But for input(),
2710 * there's no matching to consider.
2711 * So convert the EOB_ACT_LAST_MATCH
2712 * to EOB_ACT_END_OF_FILE.
2713 */
2714
2715 /* Reset buffer status. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002716 llvmAsmrestart(llvmAsmin );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002717
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002718 /*FALLTHROUGH*/
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002719
2720 case EOB_ACT_END_OF_FILE:
2721 {
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002722 if ( llvmAsmwrap( ) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002723 return EOF;
2724
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002725 if ( ! (yy_did_buffer_switch_on_eof) )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002726 YY_NEW_FILE;
2727#ifdef __cplusplus
2728 return yyinput();
2729#else
2730 return input();
2731#endif
2732 }
2733
2734 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002735 (yy_c_buf_p) = (yytext_ptr) + offset;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002736 break;
2737 }
2738 }
2739 }
2740
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002741 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2742 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */
2743 (yy_hold_char) = *++(yy_c_buf_p);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002744
2745 if ( c == '\n' )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002746
2747 llvmAsmlineno++;
2748;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002749
2750 return c;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002751}
2752#endif /* ifndef YY_NO_INPUT */
2753
2754/** Immediately switch to a different input stream.
2755 * @param input_file A readable stream.
2756 *
2757 * @note This function does not reset the start condition to @c INITIAL .
2758 */
2759 void llvmAsmrestart (FILE * input_file )
2760{
2761
2762 if ( ! YY_CURRENT_BUFFER ){
2763 llvmAsmensure_buffer_stack ();
2764 YY_CURRENT_BUFFER_LVALUE =
2765 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002766 }
Dale Johannesenf325d9f2007-08-03 01:03:46 +00002767
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002768 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
2769 llvmAsm_load_buffer_state( );
2770}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002771
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002772/** Switch to a different input buffer.
2773 * @param new_buffer The new input buffer.
2774 *
2775 */
2776 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2777{
2778
2779 /* TODO. We should be able to replace this entire function body
2780 * with
2781 * llvmAsmpop_buffer_state();
2782 * llvmAsmpush_buffer_state(new_buffer);
2783 */
2784 llvmAsmensure_buffer_stack ();
2785 if ( YY_CURRENT_BUFFER == new_buffer )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002786 return;
2787
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002788 if ( YY_CURRENT_BUFFER )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002789 {
2790 /* Flush out information for old buffer. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002791 *(yy_c_buf_p) = (yy_hold_char);
2792 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2793 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002794 }
2795
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002796 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2797 llvmAsm_load_buffer_state( );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002798
2799 /* We don't actually know whether we did this switch during
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002800 * EOF (llvmAsmwrap()) processing, but the only time this flag
2801 * is looked at is after llvmAsmwrap() is called, so it's safe
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002802 * to go ahead and always set it.
2803 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002804 (yy_did_buffer_switch_on_eof) = 1;
2805}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002806
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002807static void llvmAsm_load_buffer_state (void)
2808{
2809 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2810 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2811 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2812 (yy_hold_char) = *(yy_c_buf_p);
2813}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002814
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002815/** Allocate and initialize an input buffer state.
2816 * @param file A readable stream.
2817 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2818 *
2819 * @return the allocated buffer state.
2820 */
2821 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size )
2822{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002823 YY_BUFFER_STATE b;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002824
2825 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002826 if ( ! b )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002827 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002828
2829 b->yy_buf_size = size;
2830
2831 /* yy_ch_buf has to be 2 characters longer than the size given because
2832 * we need to put in 2 end-of-buffer characters.
2833 */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002834 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002835 if ( ! b->yy_ch_buf )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002836 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002837
2838 b->yy_is_our_buffer = 1;
2839
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002840 llvmAsm_init_buffer(b,file );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002841
2842 return b;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002843}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002844
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002845/** Destroy the buffer.
2846 * @param b a buffer created with llvmAsm_create_buffer()
2847 *
2848 */
2849 void llvmAsm_delete_buffer (YY_BUFFER_STATE b )
2850{
2851
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002852 if ( ! b )
2853 return;
2854
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002855 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2856 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002857
2858 if ( b->yy_is_our_buffer )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002859 llvmAsmfree((void *) b->yy_ch_buf );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002860
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002861 llvmAsmfree((void *) b );
2862}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002863
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002864/* Initializes or reinitializes a buffer.
2865 * This function is sometimes called more than once on the same buffer,
2866 * such as during a llvmAsmrestart() or at EOF.
2867 */
2868 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002869
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002870{
2871 int oerrno = errno;
2872
2873 llvmAsm_flush_buffer(b );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002874
2875 b->yy_input_file = file;
2876 b->yy_fill_buffer = 1;
2877
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002878 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
2879 * called from llvmAsmrestart() or through yy_get_next_buffer.
2880 * In that case, we don't want to reset the lineno or column.
2881 */
2882 if (b != YY_CURRENT_BUFFER){
2883 b->yy_bs_lineno = 1;
2884 b->yy_bs_column = 0;
2885 }
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002886
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002887 b->yy_is_interactive = 0;
2888
2889 errno = oerrno;
2890}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002891
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002892/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2893 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2894 *
2895 */
2896 void llvmAsm_flush_buffer (YY_BUFFER_STATE b )
2897{
2898 if ( ! b )
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002899 return;
2900
2901 b->yy_n_chars = 0;
2902
2903 /* We always need two end-of-buffer characters. The first causes
2904 * a transition to the end-of-buffer state. The second causes
2905 * a jam in that state.
2906 */
2907 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2908 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2909
2910 b->yy_buf_pos = &b->yy_ch_buf[0];
2911
2912 b->yy_at_bol = 1;
2913 b->yy_buffer_status = YY_BUFFER_NEW;
2914
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002915 if ( b == YY_CURRENT_BUFFER )
2916 llvmAsm_load_buffer_state( );
2917}
2918
2919/** Pushes the new state onto the stack. The new state becomes
2920 * the current state. This function will allocate the stack
2921 * if necessary.
2922 * @param new_buffer The new state.
2923 *
2924 */
2925void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
2926{
2927 if (new_buffer == NULL)
2928 return;
2929
2930 llvmAsmensure_buffer_stack();
2931
2932 /* This block is copied from llvmAsm_switch_to_buffer. */
2933 if ( YY_CURRENT_BUFFER )
2934 {
2935 /* Flush out information for old buffer. */
2936 *(yy_c_buf_p) = (yy_hold_char);
2937 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2938 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2939 }
2940
2941 /* Only push if top exists. Otherwise, replace top. */
2942 if (YY_CURRENT_BUFFER)
2943 (yy_buffer_stack_top)++;
2944 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2945
2946 /* copied from llvmAsm_switch_to_buffer. */
2947 llvmAsm_load_buffer_state( );
2948 (yy_did_buffer_switch_on_eof) = 1;
2949}
2950
2951/** Removes and deletes the top of the stack, if present.
2952 * The next element becomes the new top.
2953 *
2954 */
2955void llvmAsmpop_buffer_state (void)
2956{
2957 if (!YY_CURRENT_BUFFER)
2958 return;
2959
2960 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2961 YY_CURRENT_BUFFER_LVALUE = NULL;
2962 if ((yy_buffer_stack_top) > 0)
2963 --(yy_buffer_stack_top);
2964
2965 if (YY_CURRENT_BUFFER) {
2966 llvmAsm_load_buffer_state( );
2967 (yy_did_buffer_switch_on_eof) = 1;
2968 }
2969}
2970
2971/* Allocates the stack if it does not exist.
2972 * Guarantees space for at least one push.
2973 */
2974static void llvmAsmensure_buffer_stack (void)
2975{
2976 int num_to_alloc;
2977
2978 if (!(yy_buffer_stack)) {
2979
2980 /* First allocation is just for 2 elements, since we don't know if this
2981 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2982 * immediate realloc on the next call.
2983 */
2984 num_to_alloc = 1;
2985 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
2986 (num_to_alloc * sizeof(struct yy_buffer_state*)
2987 );
2988
2989 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2990
2991 (yy_buffer_stack_max) = num_to_alloc;
2992 (yy_buffer_stack_top) = 0;
2993 return;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002994 }
2995
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002996 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002997
Anton Korobeynikov66e28652007-11-14 09:53:48 +00002998 /* Increase the buffer to prepare for a possible push. */
2999 int grow_size = 8 /* arbitrary grow size */;
3000
3001 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3002 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
3003 ((yy_buffer_stack),
3004 num_to_alloc * sizeof(struct yy_buffer_state*)
3005 );
3006
3007 /* zero only the new slots.*/
3008 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3009 (yy_buffer_stack_max) = num_to_alloc;
3010 }
3011}
3012
3013/** Setup the input buffer state to scan directly from a user-specified character buffer.
3014 * @param base the character buffer
3015 * @param size the size in bytes of the character buffer
3016 *
3017 * @return the newly allocated buffer state object.
3018 */
3019YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size )
3020{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003021 YY_BUFFER_STATE b;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003022
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003023 if ( size < 2 ||
3024 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3025 base[size-1] != YY_END_OF_BUFFER_CHAR )
3026 /* They forgot to leave room for the EOB's. */
3027 return 0;
3028
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003029 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003030 if ( ! b )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003031 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003032
3033 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3034 b->yy_buf_pos = b->yy_ch_buf = base;
3035 b->yy_is_our_buffer = 0;
3036 b->yy_input_file = 0;
3037 b->yy_n_chars = b->yy_buf_size;
3038 b->yy_is_interactive = 0;
3039 b->yy_at_bol = 1;
3040 b->yy_fill_buffer = 0;
3041 b->yy_buffer_status = YY_BUFFER_NEW;
3042
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003043 llvmAsm_switch_to_buffer(b );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003044
3045 return b;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003046}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003047
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003048/** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
3049 * scan from a @e copy of @a str.
3050 * @param str a NUL-terminated string to scan
3051 *
3052 * @return the newly allocated buffer state object.
3053 * @note If you want to scan bytes that may contain NUL values, then use
3054 * llvmAsm_scan_bytes() instead.
3055 */
3056YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
3057{
3058
3059 return llvmAsm_scan_bytes(yystr,strlen(yystr) );
3060}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003061
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003062/** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
3063 * scan from a @e copy of @a bytes.
3064 * @param bytes the byte buffer to scan
3065 * @param len the number of bytes in the buffer pointed to by @a bytes.
3066 *
3067 * @return the newly allocated buffer state object.
3068 */
3069YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
3070{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003071 YY_BUFFER_STATE b;
3072 char *buf;
3073 yy_size_t n;
3074 int i;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003075
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003076 /* Get memory for full buffer, including space for trailing EOB's. */
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003077 n = _yybytes_len + 2;
3078 buf = (char *) llvmAsmalloc(n );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003079 if ( ! buf )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003080 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003081
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003082 for ( i = 0; i < _yybytes_len; ++i )
3083 buf[i] = yybytes[i];
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003084
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003085 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003086
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003087 b = llvmAsm_scan_buffer(buf,n );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003088 if ( ! b )
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003089 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003090
3091 /* It's okay to grow etc. this buffer, and we should throw it
3092 * away when we're done.
3093 */
3094 b->yy_is_our_buffer = 1;
3095
3096 return b;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003097}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003098
3099#ifndef YY_EXIT_FAILURE
3100#define YY_EXIT_FAILURE 2
3101#endif
3102
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003103static void yy_fatal_error (yyconst char* msg )
3104{
3105 (void) fprintf( stderr, "%s\n", msg );
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003106 exit( YY_EXIT_FAILURE );
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003107}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003108
3109/* Redefine yyless() so it works in section 3 code. */
3110
3111#undef yyless
3112#define yyless(n) \
3113 do \
3114 { \
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003115 /* Undo effects of setting up llvmAsmtext. */ \
3116 int yyless_macro_arg = (n); \
3117 YY_LESS_LINENO(yyless_macro_arg);\
3118 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
3119 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
3120 (yy_hold_char) = *(yy_c_buf_p); \
3121 *(yy_c_buf_p) = '\0'; \
3122 llvmAsmleng = yyless_macro_arg; \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003123 } \
3124 while ( 0 )
3125
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003126/* Accessor methods (get/set functions) to struct members. */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003127
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003128/** Get the current line number.
3129 *
3130 */
3131int llvmAsmget_lineno (void)
3132{
3133
3134 return llvmAsmlineno;
3135}
3136
3137/** Get the input stream.
3138 *
3139 */
3140FILE *llvmAsmget_in (void)
3141{
3142 return llvmAsmin;
3143}
3144
3145/** Get the output stream.
3146 *
3147 */
3148FILE *llvmAsmget_out (void)
3149{
3150 return llvmAsmout;
3151}
3152
3153/** Get the length of the current token.
3154 *
3155 */
3156int llvmAsmget_leng (void)
3157{
3158 return llvmAsmleng;
3159}
3160
3161/** Get the current token.
3162 *
3163 */
3164
3165char *llvmAsmget_text (void)
3166{
3167 return llvmAsmtext;
3168}
3169
3170/** Set the current line number.
3171 * @param line_number
3172 *
3173 */
3174void llvmAsmset_lineno (int line_number )
3175{
3176
3177 llvmAsmlineno = line_number;
3178}
3179
3180/** Set the input stream. This does not discard the current
3181 * input buffer.
3182 * @param in_str A readable stream.
3183 *
3184 * @see llvmAsm_switch_to_buffer
3185 */
3186void llvmAsmset_in (FILE * in_str )
3187{
3188 llvmAsmin = in_str ;
3189}
3190
3191void llvmAsmset_out (FILE * out_str )
3192{
3193 llvmAsmout = out_str ;
3194}
3195
3196int llvmAsmget_debug (void)
3197{
3198 return llvmAsm_flex_debug;
3199}
3200
3201void llvmAsmset_debug (int bdebug )
3202{
3203 llvmAsm_flex_debug = bdebug ;
3204}
3205
3206static int yy_init_globals (void)
3207{
3208 /* Initialization is the same as for the non-reentrant scanner.
3209 * This function is called from llvmAsmlex_destroy(), so don't allocate here.
3210 */
3211
3212 /* We do not touch llvmAsmlineno unless the option is enabled. */
3213 llvmAsmlineno = 1;
3214
3215 (yy_buffer_stack) = 0;
3216 (yy_buffer_stack_top) = 0;
3217 (yy_buffer_stack_max) = 0;
3218 (yy_c_buf_p) = (char *) 0;
3219 (yy_init) = 0;
3220 (yy_start) = 0;
3221
3222/* Defined in main.c */
3223#ifdef YY_STDINIT
3224 llvmAsmin = stdin;
3225 llvmAsmout = stdout;
3226#else
3227 llvmAsmin = (FILE *) 0;
3228 llvmAsmout = (FILE *) 0;
3229#endif
3230
3231 /* For future reference: Set errno on error, since we are called by
3232 * llvmAsmlex_init()
3233 */
3234 return 0;
3235}
3236
3237/* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
3238int llvmAsmlex_destroy (void)
3239{
3240
3241 /* Pop the buffer stack, destroying each element. */
3242 while(YY_CURRENT_BUFFER){
3243 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
3244 YY_CURRENT_BUFFER_LVALUE = NULL;
3245 llvmAsmpop_buffer_state();
3246 }
3247
3248 /* Destroy the stack itself. */
3249 llvmAsmfree((yy_buffer_stack) );
3250 (yy_buffer_stack) = NULL;
3251
3252 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3253 * llvmAsmlex() is called, initialization will occur. */
3254 yy_init_globals( );
3255
3256 return 0;
3257}
3258
3259/*
3260 * Internal utility routines.
3261 */
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003262
3263#ifndef yytext_ptr
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003264static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3265{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003266 register int i;
3267 for ( i = 0; i < n; ++i )
3268 s1[i] = s2[i];
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003269}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003270#endif
3271
3272#ifdef YY_NEED_STRLEN
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003273static int yy_flex_strlen (yyconst char * s )
3274{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003275 register int n;
3276 for ( n = 0; s[n]; ++n )
3277 ;
3278
3279 return n;
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003280}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003281#endif
3282
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003283void *llvmAsmalloc (yy_size_t size )
3284{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003285 return (void *) malloc( size );
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003286}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003287
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003288void *llvmAsmrealloc (void * ptr, yy_size_t size )
3289{
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003290 /* The cast to (char *) in the following accommodates both
3291 * implementations that use char* generic pointers, and those
3292 * that use void* generic pointers. It works with the latter
3293 * because both ANSI C and C++ allow castless assignment from
3294 * any pointer type to void*, and deal with argument conversions
3295 * as though doing an assignment.
3296 */
3297 return (void *) realloc( (char *) ptr, size );
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003298}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003299
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003300void llvmAsmfree (void * ptr )
3301{
3302 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */
3303}
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003304
Anton Korobeynikov66e28652007-11-14 09:53:48 +00003305#define YYTABLES_NAME "yytables"
3306
3307#line 512 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
3308
3309
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003310