blob: 7a29accb12d8204c060628f1d3499bfd99196515 [file] [log] [blame]
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001#line 2 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003#line 4 "Lexer.cpp"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00004
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00005#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
Reid Spencer68a24bd2005-08-27 18:50:39 +00008
Reid Spencer68a24bd2005-08-27 18:50:39 +00009#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Anton Korobeynikovf52e6082007-04-29 18:38:24 +000012#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +000016
Anton Korobeynikovf52e6082007-04-29 18:38:24 +000017/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
Reid Spencer68a24bd2005-08-27 18:50:39 +000020#include <stdio.h>
Anton Korobeynikovf52e6082007-04-29 18:38:24 +000021#include <string.h>
22#include <errno.h>
Reid Spencer9c9b63a2007-04-28 16:07:31 +000023#include <stdlib.h>
24
Anton Korobeynikovf52e6082007-04-29 18:38:24 +000025/* end standard C headers. */
26
27/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
41#endif
42
43#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57#endif /* ! C99 */
58
59/* Limits of integral types. */
60#ifndef INT8_MIN
61#define INT8_MIN (-128)
62#endif
63#ifndef INT16_MIN
64#define INT16_MIN (-32767-1)
65#endif
66#ifndef INT32_MIN
67#define INT32_MIN (-2147483647-1)
68#endif
69#ifndef INT8_MAX
70#define INT8_MAX (127)
71#endif
72#ifndef INT16_MAX
73#define INT16_MAX (32767)
74#endif
75#ifndef INT32_MAX
76#define INT32_MAX (2147483647)
77#endif
78#ifndef UINT8_MAX
79#define UINT8_MAX (255U)
80#endif
81#ifndef UINT16_MAX
82#define UINT16_MAX (65535U)
83#endif
84#ifndef UINT32_MAX
85#define UINT32_MAX (4294967295U)
86#endif
87
88#endif /* ! FLEXINT_H */
89
90#ifdef __cplusplus
Reid Spencer9c9b63a2007-04-28 16:07:31 +000091
Reid Spencer68a24bd2005-08-27 18:50:39 +000092/* The "const" storage-class-modifier is valid. */
93#define YY_USE_CONST
94
95#else /* ! __cplusplus */
96
97#if __STDC__
98
Reid Spencer68a24bd2005-08-27 18:50:39 +000099#define YY_USE_CONST
100
101#endif /* __STDC__ */
102#endif /* ! __cplusplus */
103
Reid Spencer68a24bd2005-08-27 18:50:39 +0000104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
Reid Spencer68a24bd2005-08-27 18:50:39 +0000110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
113/* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120/* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
123 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000124#define BEGIN (yy_start) = 1 + 2 *
Reid Spencer68a24bd2005-08-27 18:50:39 +0000125
126/* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
128 * compatibility.
129 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000130#define YY_START (((yy_start) - 1) / 2)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000137#define YY_NEW_FILE llvmAsmrestart(llvmAsmin )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000142#ifndef YY_BUF_SIZE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000143#define YY_BUF_SIZE (16384*64)
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000144#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000145
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000146/* The state buf must be large enough to hold one state per character in the main buffer.
147 */
148#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151#define YY_TYPEDEF_YY_BUFFER_STATE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000152typedef struct yy_buffer_state *YY_BUFFER_STATE;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000153#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000154
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000155extern int llvmAsmleng;
156
157extern FILE *llvmAsmin, *llvmAsmout;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE llvmAsmlex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
169 */
170 #define YY_LESS_LINENO(n) \
171 do { \
172 int yyl;\
173 for ( yyl = n; yyl < llvmAsmleng; ++yyl )\
174 if ( llvmAsmtext[yyl] == '\n' )\
175 --llvmAsmlineno;\
176 }while(0)
177
178/* Return all but the first "n" matched characters back to the input stream. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000179#define yyless(n) \
180 do \
181 { \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000182 /* Undo effects of setting up llvmAsmtext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000186 YY_RESTORE_YY_MORE_OFFSET \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000189 } \
190 while ( 0 )
191
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Reid Spencer6f407902007-01-13 05:00:46 +0000193
Reid Spencer68a24bd2005-08-27 18:50:39 +0000194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000198
199#ifndef YY_TYPEDEF_YY_SIZE_T
200#define YY_TYPEDEF_YY_SIZE_T
Reid Spencer68a24bd2005-08-27 18:50:39 +0000201typedef unsigned int yy_size_t;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000202#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000203
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
Reid Spencer68a24bd2005-08-27 18:50:39 +0000206struct yy_buffer_state
207 {
208 FILE *yy_input_file;
209
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
212
213 /* Size of input buffer in bytes, not including room for EOB
214 * characters.
215 */
216 yy_size_t yy_buf_size;
217
218 /* Number of characters read into yy_ch_buf, not including EOB
219 * characters.
220 */
221 int yy_n_chars;
222
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
225 * delete it.
226 */
227 int yy_is_our_buffer;
228
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
232 * each newline.
233 */
234 int yy_is_interactive;
235
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
238 * not.
239 */
240 int yy_at_bol;
241
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
Reid Spencer68a24bd2005-08-27 18:50:39 +0000245 /* Whether to try to fill the input buffer when we reach the
246 * end of it.
247 */
248 int yy_fill_buffer;
249
250 int yy_buffer_status;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000251
Reid Spencer68a24bd2005-08-27 18:50:39 +0000252#define YY_BUFFER_NEW 0
253#define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
259 *
260 * When we actually see the EOF, we change the status to "new"
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000261 * (via llvmAsmrestart()), so that the user can continue scanning by
262 * just pointing llvmAsmin at a new input file.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000263 */
264#define YY_BUFFER_EOF_PENDING 2
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000265
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000266 };
267#endif /* !YY_STRUCT_YY_BUFFER_STATE */
268
269/* Stack of input buffers. */
270static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000273
274/* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000277 *
278 * Returns the top of the stack, or NULL.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000279 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000283
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000284/* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
286 */
287#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
Reid Spencer68a24bd2005-08-27 18:50:39 +0000288
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000289/* yy_hold_char holds the character lost when llvmAsmtext is formed. */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000290static char yy_hold_char;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000291static int yy_n_chars; /* number of characters read into yy_ch_buf */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000292int llvmAsmleng;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = (char *) 0;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000296static int yy_init = 0; /* whether we need to initialize */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000297static int yy_start = 0; /* start state number */
298
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000299/* Flag which is used to allow llvmAsmwrap()'s to do buffer switches
300 * instead of setting up a fresh llvmAsmin. A bit of a hack ...
Reid Spencer68a24bd2005-08-27 18:50:39 +0000301 */
302static int yy_did_buffer_switch_on_eof;
303
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000304void llvmAsmrestart (FILE *input_file );
305void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size );
307void llvmAsm_delete_buffer (YY_BUFFER_STATE b );
308void llvmAsm_flush_buffer (YY_BUFFER_STATE b );
309void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer );
310void llvmAsmpop_buffer_state (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000311
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000312static void llvmAsmensure_buffer_stack (void );
313static void llvmAsm_load_buffer_state (void );
314static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000315
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000316#define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +0000317
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000318YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size );
319YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str );
320YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000321
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000322void *llvmAsmalloc (yy_size_t );
323void *llvmAsmrealloc (void *,yy_size_t );
324void llvmAsmfree (void * );
325
326#define yy_new_buffer llvmAsm_create_buffer
Reid Spencer68a24bd2005-08-27 18:50:39 +0000327
328#define yy_set_interactive(is_interactive) \
329 { \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000330 if ( ! YY_CURRENT_BUFFER ){ \
331 llvmAsmensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000336 }
337
338#define yy_set_bol(at_bol) \
339 { \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000340 if ( ! YY_CURRENT_BUFFER ){\
341 llvmAsmensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \
344 } \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000346 }
347
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000350/* Begin user sect3 */
Reid Spencer68a24bd2005-08-27 18:50:39 +0000351
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000352#define llvmAsmwrap(n) 1
Reid Spencer68a24bd2005-08-27 18:50:39 +0000353#define YY_SKIP_YYWRAP
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000354
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000355typedef unsigned char YY_CHAR;
356
357FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0;
358
359typedef int yy_state_type;
360
361extern int llvmAsmlineno;
362
363int llvmAsmlineno = 1;
364
365extern char *llvmAsmtext;
366#define yytext_ptr llvmAsmtext
367
368static yy_state_type yy_get_previous_state (void );
369static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
370static int yy_get_next_buffer (void );
371static void yy_fatal_error (yyconst char msg[] );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000372
373/* Done after the current pattern has been matched and before the
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000374 * corresponding action - sets up llvmAsmtext.
Reid Spencer68a24bd2005-08-27 18:50:39 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000377 (yytext_ptr) = yy_bp; \
378 llvmAsmleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
Reid Spencer68a24bd2005-08-27 18:50:39 +0000380 *yy_cp = '\0'; \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000381 (yy_c_buf_p) = yy_cp;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000382
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000383#define YY_NUM_RULES 138
384#define YY_END_OF_BUFFER 139
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[560] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000393 { 0,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000394 0, 0, 139, 137, 136, 136, 137, 137, 137, 137,
395 137, 137, 129, 129, 1, 137, 137, 137, 137, 137,
396 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
397 137, 137, 137, 137, 137, 137, 137, 137, 0, 127,
398 0, 125, 123, 132, 0, 130, 0, 134, 129, 0,
399 1, 0, 124, 133, 0, 0, 0, 0, 0, 0,
400 0, 109, 0, 38, 0, 0, 0, 0, 0, 0,
401 72, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 54, 0, 0, 0, 0, 0, 0, 0, 0,
403 0, 73, 0, 0, 0, 0, 0, 0, 0, 68,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000404
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 0, 25, 0, 0,
407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
408 0, 0, 0, 127, 123, 134, 22, 134, 0, 135,
409 0, 128, 124, 55, 0, 0, 67, 0, 0, 36,
410 0, 0, 0, 39, 0, 0, 0, 0, 0, 0,
411 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
413 0, 0, 0, 0, 0, 0, 57, 0, 0, 0,
414 82, 87, 85, 86, 84, 83, 0, 88, 92, 0,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000415
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000416 0, 108, 0, 0, 0, 0, 0, 77, 75, 64,
417 0, 0, 0, 76, 74, 0, 0, 56, 0, 0,
418 0, 0, 0, 0, 0, 0, 90, 81, 79, 0,
419 80, 78, 0, 91, 89, 0, 0, 0, 0, 0,
420 0, 0, 0, 69, 0, 0, 126, 134, 0, 0,
421 0, 134, 0, 0, 0, 0, 66, 0, 0, 93,
422 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
423 0, 0, 0, 71, 60, 0, 0, 0, 0, 116,
424 63, 0, 0, 0, 70, 0, 0, 0, 0, 0,
425 0, 0, 117, 65, 0, 0, 0, 0, 24, 0,
426
427 0, 0, 131, 59, 0, 0, 96, 0, 0, 0,
428 62, 45, 0, 0, 26, 0, 0, 0, 4, 0,
429 52, 58, 0, 0, 0, 0, 61, 0, 48, 0,
430 12, 0, 0, 95, 134, 34, 32, 0, 0, 2,
431 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
432 0, 0, 5, 0, 49, 98, 0, 0, 0, 0,
433 0, 0, 44, 0, 0, 0, 0, 51, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
435 0, 118, 0, 0, 0, 0, 94, 0, 23, 0,
436 0, 0, 0, 0, 0, 0, 115, 0, 0, 41,
437
438 0, 0, 0, 7, 0, 0, 0, 50, 0, 0,
439 40, 102, 101, 0, 0, 8, 16, 0, 0, 0,
440 111, 0, 114, 35, 0, 0, 53, 0, 0, 0,
441 106, 0, 0, 100, 110, 27, 0, 28, 99, 0,
442 112, 107, 0, 0, 0, 0, 0, 105, 0, 0,
443 6, 29, 0, 0, 0, 0, 0, 97, 0, 0,
444 0, 0, 0, 0, 0, 0, 0, 33, 0, 0,
445 0, 0, 0, 0, 0, 0, 0, 9, 0, 0,
446 0, 0, 19, 0, 0, 0, 10, 103, 11, 47,
447 46, 0, 104, 0, 0, 0, 0, 31, 0, 0,
448
449 0, 13, 0, 15, 14, 0, 0, 0, 0, 17,
450 0, 0, 0, 0, 0, 0, 0, 30, 0, 0,
451 0, 0, 0, 37, 0, 0, 0, 0, 0, 18,
452 0, 0, 0, 0, 0, 113, 0, 0, 0, 0,
453 0, 0, 0, 20, 0, 0, 0, 0, 119, 121,
454 122, 0, 42, 0, 120, 43, 0, 21, 0
Reid Spencer68a24bd2005-08-27 18:50:39 +0000455 } ;
456
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000457static yyconst flex_int32_t yy_ec[256] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000458 { 0,
459 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
460 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
461 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
Reid Spencera54b7cb2007-01-12 07:05:14 +0000463 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
464 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000465 1, 1, 1, 16, 17, 17, 17, 17, 18, 17,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000466 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
467 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000468 1, 1, 1, 1, 19, 1, 20, 21, 22, 23,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000469
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000470 24, 25, 26, 27, 28, 5, 29, 30, 31, 32,
471 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
472 43, 44, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486 1, 1, 1, 1, 1
487 } ;
488
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000489static yyconst flex_int32_t yy_meta[45] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000490 { 0,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000491 1, 1, 2, 3, 4, 1, 1, 4, 4, 4,
492 4, 4, 4, 5, 1, 1, 4, 4, 4, 4,
493 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
494 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
495 4, 4, 4, 4
Reid Spencer68a24bd2005-08-27 18:50:39 +0000496 } ;
497
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000498static yyconst flex_int16_t yy_base[568] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000499 { 0,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000500 0, 0, 1217, 1218, 1218, 1218, 1212, 1201, 35, 39,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000501 43, 49, 55, 61, 0, 72, 64, 67, 66, 86,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000502 76, 106, 91, 65, 133, 121, 117, 99, 152, 125,
503 78, 179, 137, 211, 139, 90, 154, 93, 1210, 1218,
504 1199, 1218, 0, 49, 185, 217, 113, 238, 254, 259,
505 0, 1208, 0, 200, 110, 155, 111, 75, 148, 134,
506 163, 1197, 160, 177, 208, 178, 264, 194, 205, 200,
507 1196, 219, 260, 222, 218, 167, 261, 231, 273, 228,
508 277, 282, 274, 287, 288, 98, 240, 289, 290, 292,
509 296, 1195, 293, 298, 299, 307, 316, 294, 319, 321,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000510
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000511 308, 305, 323, 303, 300, 329, 333, 332, 334, 338,
512 336, 344, 339, 348, 337, 352, 335, 1194, 353, 363,
513 365, 364, 370, 368, 371, 377, 372, 384, 391, 369,
514 390, 376, 393, 1193, 0, 404, 1192, 426, 444, 0,
515 1201, 1218, 0, 1190, 406, 397, 1189, 409, 410, 1188,
516 413, 420, 417, 1187, 439, 411, 429, 431, 445, 446,
517 450, 449, 1186, 451, 452, 453, 454, 455, 457, 458,
518 465, 466, 468, 472, 471, 469, 482, 485, 488, 490,
519 491, 493, 494, 496, 497, 499, 1185, 500, 502, 505,
520 1184, 1183, 1182, 1181, 1180, 1179, 504, 1178, 1177, 506,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000521
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000522 507, 1176, 536, 511, 514, 516, 517, 1175, 1174, 1173,
523 548, 519, 536, 1172, 1171, 549, 528, 1170, 527, 552,
524 553, 554, 556, 557, 560, 558, 1169, 1168, 1167, 561,
525 1166, 1165, 562, 1164, 1163, 569, 563, 571, 581, 574,
526 585, 578, 589, 1162, 582, 586, 1218, 599, 618, 608,
527 622, 627, 590, 628, 515, 629, 1161, 630, 602, 1160,
528 592, 631, 633, 632, 634, 636, 635, 637, 640, 639,
529 645, 643, 657, 1159, 1158, 642, 644, 658, 659, 1157,
530 1156, 660, 664, 662, 1155, 667, 669, 671, 673, 674,
531 678, 677, 1154, 1153, 680, 682, 685, 675, 1152, 686,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000532
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000533 687, 688, 0, 1151, 690, 695, 1150, 701, 700, 705,
534 1149, 1148, 708, 706, 1147, 713, 715, 717, 1146, 719,
535 1145, 1144, 720, 724, 722, 725, 1143, 726, 1142, 729,
536 1141, 734, 730, 1140, 740, 1139, 1138, 740, 732, 1137,
537 742, 747, 750, 752, 749, 751, 759, 754, 760, 762,
538 763, 767, 1136, 768, 1135, 1134, 764, 769, 770, 777,
539 773, 779, 1133, 782, 784, 785, 786, 1132, 790, 791,
540 793, 792, 795, 794, 807, 798, 800, 801, 810, 811,
541 813, 1131, 814, 816, 820, 818, 1130, 821, 1129, 823,
542 830, 824, 832, 837, 834, 835, 1128, 838, 842, 1127,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000543
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000544 844, 845, 847, 1126, 848, 849, 850, 1125, 854, 851,
545 1124, 1123, 1122, 855, 856, 1121, 1120, 867, 864, 861,
546 1119, 872, 1118, 1117, 865, 876, 1116, 878, 879, 881,
547 1115, 882, 884, 1114, 1113, 1112, 883, 1111, 1110, 890,
548 1109, 1108, 889, 886, 891, 893, 896, 1107, 898, 901,
549 1106, 1105, 904, 906, 908, 911, 913, 1104, 915, 916,
550 917, 912, 919, 918, 921, 931, 924, 1103, 937, 939,
551 938, 940, 942, 943, 945, 944, 947, 1102, 950, 955,
552 956, 951, 1101, 957, 958, 960, 1090, 1079, 1078, 1077,
553 1076, 962, 1074, 964, 969, 965, 978, 1073, 981, 966,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000554
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000555 982, 1072, 983, 1071, 1070, 986, 987, 988, 991, 1069,
556 990, 993, 994, 995, 999, 1000, 1003, 1064, 1004, 1001,
557 1006, 1010, 1013, 1062, 1015, 1014, 1022, 1023, 1025, 1061,
558 1030, 1027, 1028, 1029, 1031, 910, 1033, 1034, 1036, 1035,
559 1032, 1043, 1044, 641, 1052, 1055, 1045, 1056, 599, 522,
560 470, 1057, 467, 1058, 373, 245, 1059, 244, 1218, 1095,
561 1097, 200, 1102, 1105, 167, 1109, 73
Reid Spencer68a24bd2005-08-27 18:50:39 +0000562 } ;
563
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000564static yyconst flex_int16_t yy_def[568] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000565 { 0,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000566 559, 1, 559, 559, 559, 559, 560, 561, 562, 559,
567 561, 561, 561, 561, 563, 564, 561, 561, 561, 561,
568 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
569 561, 561, 561, 561, 561, 561, 561, 561, 560, 559,
570 561, 559, 565, 559, 559, 561, 561, 561, 561, 561,
571 563, 566, 567, 559, 561, 561, 561, 561, 561, 561,
572 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
573 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
574 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
575 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000576
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000577 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
578 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
579 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
580 561, 561, 561, 559, 565, 559, 561, 561, 561, 50,
581 566, 559, 567, 561, 561, 561, 561, 561, 561, 561,
582 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
583 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
584 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
585 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
586 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000587
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000588 561, 561, 50, 561, 561, 561, 561, 561, 561, 561,
589 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
590 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
591 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
592 561, 561, 561, 561, 561, 561, 559, 559, 559, 559,
593 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
594 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
595 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
596 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
597 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000598
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000599 561, 561, 203, 561, 561, 561, 561, 561, 561, 561,
600 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
601 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
602 561, 561, 561, 561, 559, 561, 561, 561, 561, 561,
603 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
604 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
605 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
606 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
607 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
608 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000609
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000610 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
611 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
612 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
613 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
614 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
615 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
616 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
617 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
618 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
619 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000620
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000621 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
622 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
623 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
624 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
625 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
626 561, 561, 561, 561, 561, 561, 561, 561, 0, 559,
627 559, 559, 559, 559, 559, 559, 559
Reid Spencer68a24bd2005-08-27 18:50:39 +0000628 } ;
629
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000630static yyconst flex_int16_t yy_nxt[1263] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000631 { 0,
632 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000633 14, 14, 14, 4, 15, 16, 8, 8, 8, 17,
634 18, 19, 20, 21, 22, 23, 24, 25, 8, 26,
635 27, 28, 29, 30, 8, 31, 32, 33, 34, 35,
636 36, 37, 8, 38, 44, 44, 44, 44, 45, 45,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000637 45, 45, 46, 46, 46, 46, 42, 47, 44, 44,
638 44, 44, 42, 48, 49, 49, 49, 49, 42, 48,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000639 49, 49, 49, 49, 42, 52, 143, 42, 42, 42,
640 42, 54, 54, 54, 54, 63, 55, 64, 42, 42,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000641 60, 42, 81, 56, 61, 57, 50, 58, 65, 42,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000642
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000643 59, 104, 62, 42, 42, 66, 42, 70, 148, 67,
644 71, 42, 42, 130, 79, 68, 133, 72, 69, 42,
645 80, 137, 92, 42, 42, 73, 42, 74, 75, 182,
646 42, 93, 144, 147, 42, 76, 89, 94, 42, 77,
647 85, 78, 82, 82, 82, 82, 42, 42, 86, 90,
648 42, 101, 42, 87, 83, 91, 116, 88, 128, 151,
649 102, 42, 103, 117, 84, 42, 131, 42, 42, 118,
650 135, 129, 119, 42, 149, 95, 42, 96, 150, 120,
651 42, 97, 145, 98, 146, 99, 132, 100, 105, 153,
652 42, 42, 42, 136, 45, 45, 45, 45, 154, 169,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000653
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000654 152, 106, 107, 43, 108, 109, 110, 42, 111, 54,
655 54, 54, 54, 42, 112, 157, 113, 114, 42, 115,
656 105, 42, 163, 161, 42, 48, 46, 46, 46, 46,
657 42, 42, 42, 121, 122, 42, 123, 155, 124, 156,
658 125, 42, 126, 162, 42, 168, 127, 138, 138, 138,
659 138, 42, 167, 42, 172, 139, 164, 42, 42, 183,
660 174, 139, 48, 49, 49, 49, 49, 42, 140, 140,
661 140, 140, 42, 42, 42, 140, 140, 42, 140, 140,
662 140, 140, 140, 140, 170, 158, 42, 42, 159, 165,
663 42, 82, 82, 82, 82, 42, 166, 160, 171, 175,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000664
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000665 42, 42, 42, 42, 176, 42, 42, 42, 181, 42,
666 173, 42, 42, 42, 186, 184, 42, 196, 42, 185,
667 42, 42, 177, 178, 179, 187, 180, 190, 188, 42,
668 192, 189, 42, 191, 42, 199, 42, 200, 197, 194,
669 202, 203, 42, 198, 193, 42, 42, 42, 42, 42,
670 42, 42, 42, 195, 205, 208, 204, 42, 201, 214,
671 212, 42, 206, 210, 219, 42, 42, 216, 218, 209,
672 222, 217, 211, 215, 207, 213, 42, 42, 42, 220,
673 223, 42, 42, 42, 42, 42, 42, 221, 242, 42,
674 42, 224, 226, 228, 231, 238, 225, 42, 227, 233,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000675
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000676 234, 243, 239, 42, 42, 230, 42, 229, 232, 235,
677 42, 244, 236, 248, 248, 248, 248, 237, 240, 42,
678 241, 249, 42, 42, 42, 253, 42, 249, 245, 255,
679 42, 254, 256, 42, 246, 138, 138, 138, 138, 42,
680 258, 259, 42, 139, 42, 257, 260, 262, 263, 139,
681 250, 251, 42, 252, 252, 252, 252, 42, 42, 42,
682 264, 261, 42, 42, 42, 42, 42, 42, 42, 269,
683 42, 42, 265, 267, 270, 266, 276, 268, 42, 42,
684 42, 42, 42, 42, 42, 42, 271, 274, 272, 280,
685 273, 282, 283, 284, 275, 42, 281, 278, 42, 277,
Reid Spencer6fd36ab2006-12-29 20:35:03 +0000686
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000687 279, 42, 285, 42, 42, 286, 42, 42, 287, 42,
688 42, 288, 42, 42, 291, 42, 293, 42, 42, 42,
689 42, 292, 290, 297, 42, 289, 295, 42, 42, 42,
690 42, 294, 42, 298, 299, 42, 338, 296, 300, 306,
691 42, 42, 309, 301, 302, 303, 303, 303, 303, 42,
692 304, 305, 303, 303, 307, 303, 303, 303, 303, 303,
693 303, 42, 42, 313, 314, 42, 42, 42, 310, 42,
694 42, 42, 308, 42, 42, 42, 42, 317, 316, 311,
695 319, 315, 42, 321, 42, 324, 312, 42, 320, 318,
696 326, 42, 325, 323, 42, 42, 329, 322, 42, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000697
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000698 328, 327, 42, 42, 330, 42, 331, 332, 248, 248,
699 248, 248, 42, 342, 333, 42, 249, 335, 335, 335,
700 335, 341, 249, 334, 250, 250, 336, 335, 335, 335,
701 335, 252, 252, 252, 252, 42, 252, 252, 252, 252,
702 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
703 42, 345, 42, 42, 42, 42, 42, 42, 42, 337,
704 339, 340, 344, 347, 352, 346, 353, 349, 343, 350,
705 42, 42, 42, 42, 351, 42, 348, 42, 354, 355,
706 42, 356, 42, 361, 42, 362, 42, 42, 42, 360,
707 42, 42, 363, 42, 357, 42, 358, 359, 42, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000708
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000709 42, 42, 367, 42, 364, 366, 365, 368, 42, 369,
710 375, 371, 370, 42, 42, 373, 378, 377, 42, 42,
711 376, 42, 372, 380, 374, 379, 42, 383, 42, 381,
712 42, 382, 42, 42, 385, 42, 384, 42, 42, 42,
713 387, 390, 42, 42, 388, 42, 386, 42, 389, 335,
714 335, 335, 335, 42, 398, 42, 391, 396, 394, 397,
715 42, 392, 42, 42, 42, 42, 393, 42, 400, 401,
716 395, 402, 42, 42, 404, 42, 42, 42, 399, 405,
717 42, 42, 42, 42, 403, 408, 42, 406, 410, 411,
718 42, 412, 42, 407, 409, 42, 413, 42, 42, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000719
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000720 415, 414, 416, 42, 42, 42, 42, 42, 42, 421,
721 417, 42, 423, 42, 42, 419, 424, 427, 420, 418,
722 42, 422, 426, 42, 42, 429, 42, 42, 428, 42,
723 425, 42, 430, 42, 42, 433, 42, 42, 431, 432,
724 435, 438, 437, 42, 440, 42, 434, 42, 42, 442,
725 42, 42, 441, 436, 439, 42, 444, 42, 42, 443,
726 42, 42, 42, 42, 42, 447, 446, 42, 42, 42,
727 451, 445, 455, 456, 42, 449, 458, 42, 42, 448,
728 42, 453, 454, 461, 452, 42, 459, 450, 457, 42,
729 460, 42, 42, 463, 42, 42, 42, 42, 462, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000730
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000731 464, 471, 42, 42, 42, 469, 42, 465, 470, 42,
732 467, 42, 468, 475, 42, 466, 472, 42, 473, 42,
733 476, 42, 474, 42, 42, 42, 42, 477, 42, 42,
734 42, 42, 42, 479, 42, 478, 484, 42, 485, 480,
735 483, 481, 489, 491, 42, 486, 487, 488, 482, 490,
736 42, 42, 42, 42, 492, 42, 42, 42, 42, 497,
737 42, 493, 495, 42, 42, 498, 500, 496, 42, 42,
738 42, 42, 502, 42, 506, 42, 494, 42, 42, 42,
739 499, 501, 42, 509, 510, 516, 507, 511, 503, 508,
740 512, 42, 504, 505, 42, 42, 42, 513, 514, 42,
Reid Spencer3d6b71e2007-04-09 01:56:05 +0000741
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000742 42, 42, 515, 42, 42, 519, 42, 42, 42, 517,
743 520, 523, 42, 42, 42, 525, 42, 42, 527, 42,
744 518, 522, 529, 42, 526, 521, 42, 42, 42, 528,
745 524, 531, 530, 533, 535, 42, 42, 536, 42, 532,
746 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
747 534, 537, 538, 540, 539, 546, 42, 42, 42, 542,
748 544, 543, 545, 547, 541, 42, 548, 549, 42, 42,
749 42, 42, 42, 552, 42, 42, 553, 42, 556, 551,
750 550, 557, 42, 42, 42, 42, 42, 42, 554, 42,
751 42, 42, 42, 555, 558, 39, 39, 39, 39, 39,
Reid Spencer14310612006-12-31 05:40:51 +0000752
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000753 41, 41, 51, 42, 51, 51, 51, 53, 53, 141,
754 141, 141, 141, 141, 42, 42, 42, 42, 42, 42,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000755 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
756 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
757 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
758 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
759 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
760 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +0000761 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
762 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
Chris Lattner75466192006-05-19 21:28:53 +0000763
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000764 42, 42, 42, 42, 142, 42, 247, 42, 42, 42,
765 42, 142, 42, 134, 42, 40, 559, 3, 559, 559,
766 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
767 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
768 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
769 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
770 559, 559
Reid Spencer68a24bd2005-08-27 18:50:39 +0000771 } ;
772
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000773static yyconst flex_int16_t yy_chk[1263] =
Reid Spencer68a24bd2005-08-27 18:50:39 +0000774 { 0,
775 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
776 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
777 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
778 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000779 1, 1, 1, 1, 9, 9, 9, 9, 10, 10,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000780 10, 10, 11, 11, 11, 11, 11, 12, 44, 44,
781 44, 44, 12, 13, 13, 13, 13, 13, 13, 14,
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000782 14, 14, 14, 14, 14, 16, 567, 17, 24, 19,
783 18, 16, 16, 16, 16, 19, 17, 19, 58, 21,
Reid Spencer3025dfd2007-03-29 18:50:01 +0000784 18, 31, 24, 17, 18, 17, 13, 17, 19, 20,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000785
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000786 17, 31, 18, 36, 23, 20, 38, 21, 58, 20,
787 21, 86, 28, 36, 23, 20, 38, 21, 20, 22,
788 23, 47, 28, 55, 57, 22, 47, 22, 22, 86,
789 27, 28, 55, 57, 26, 22, 27, 28, 30, 22,
790 26, 22, 25, 25, 25, 25, 25, 60, 26, 27,
791 33, 30, 35, 26, 25, 27, 33, 26, 35, 60,
792 30, 59, 30, 33, 25, 29, 37, 37, 56, 33,
793 565, 35, 33, 63, 59, 29, 61, 29, 59, 33,
794 76, 29, 56, 29, 56, 29, 37, 29, 32, 63,
795 64, 66, 32, 45, 45, 45, 45, 45, 64, 76,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000796
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000797 61, 32, 32, 562, 32, 32, 32, 68, 32, 54,
798 54, 54, 54, 70, 32, 66, 32, 32, 69, 32,
799 34, 65, 70, 68, 34, 46, 46, 46, 46, 46,
800 46, 75, 72, 34, 34, 74, 34, 65, 34, 65,
801 34, 80, 34, 69, 78, 75, 34, 48, 48, 48,
802 48, 48, 74, 87, 78, 48, 72, 558, 556, 87,
803 80, 48, 49, 49, 49, 49, 49, 49, 50, 50,
804 50, 50, 50, 73, 77, 50, 50, 67, 50, 50,
805 50, 50, 50, 50, 77, 67, 79, 83, 67, 73,
806 81, 82, 82, 82, 82, 82, 73, 67, 77, 81,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000807
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000808 84, 85, 88, 89, 83, 90, 93, 98, 85, 91,
809 79, 94, 95, 105, 90, 88, 104, 98, 102, 89,
810 96, 101, 84, 84, 84, 91, 84, 94, 93, 97,
811 96, 93, 99, 95, 100, 101, 103, 102, 99, 97,
812 104, 105, 106, 100, 96, 108, 107, 109, 117, 111,
813 115, 110, 113, 97, 107, 108, 106, 112, 103, 111,
814 110, 114, 107, 109, 115, 116, 119, 112, 114, 108,
815 117, 113, 109, 111, 107, 110, 120, 122, 121, 116,
816 119, 124, 130, 123, 125, 127, 555, 116, 130, 132,
817 126, 119, 121, 123, 125, 127, 120, 128, 122, 126,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000818
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000819 126, 131, 128, 131, 129, 124, 133, 123, 125, 126,
820 146, 132, 126, 136, 136, 136, 136, 126, 129, 145,
821 129, 136, 148, 149, 156, 145, 151, 136, 133, 146,
822 153, 145, 148, 152, 133, 138, 138, 138, 138, 138,
823 151, 152, 157, 138, 158, 149, 153, 156, 157, 138,
824 139, 139, 155, 139, 139, 139, 139, 139, 159, 160,
825 158, 155, 162, 161, 164, 165, 166, 167, 168, 162,
826 169, 170, 159, 161, 164, 160, 169, 161, 171, 172,
827 553, 173, 176, 551, 175, 174, 164, 167, 165, 172,
828 166, 173, 174, 175, 168, 177, 172, 171, 178, 170,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000829
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000830 171, 179, 176, 180, 181, 177, 182, 183, 178, 184,
831 185, 179, 186, 188, 181, 189, 183, 197, 190, 200,
832 201, 182, 180, 188, 204, 179, 185, 205, 255, 206,
833 207, 184, 212, 189, 190, 550, 255, 186, 197, 206,
834 219, 217, 212, 200, 201, 203, 203, 203, 203, 213,
835 204, 205, 203, 203, 207, 203, 203, 203, 203, 203,
836 203, 211, 216, 217, 219, 220, 221, 222, 213, 223,
837 224, 226, 211, 225, 230, 233, 237, 222, 221, 216,
838 224, 220, 236, 225, 238, 233, 216, 240, 224, 223,
839 237, 242, 236, 230, 239, 245, 240, 226, 241, 246,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000840
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000841 239, 238, 243, 253, 241, 261, 242, 243, 248, 248,
842 248, 248, 549, 261, 245, 259, 248, 250, 250, 250,
843 250, 259, 248, 246, 249, 249, 253, 249, 249, 249,
844 249, 251, 251, 251, 251, 251, 252, 252, 252, 252,
845 252, 254, 256, 258, 262, 264, 263, 265, 267, 266,
846 268, 264, 270, 269, 544, 276, 272, 277, 271, 254,
847 256, 258, 263, 266, 271, 265, 272, 268, 262, 269,
848 273, 278, 279, 282, 270, 284, 267, 283, 273, 276,
849 286, 277, 287, 283, 288, 284, 289, 290, 298, 282,
850 292, 291, 286, 295, 278, 296, 278, 279, 297, 300,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000851
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000852 301, 302, 290, 305, 287, 289, 288, 291, 306, 292,
853 301, 296, 295, 309, 308, 298, 306, 305, 310, 314,
854 302, 313, 297, 309, 300, 308, 316, 314, 317, 310,
855 318, 313, 320, 323, 317, 325, 316, 324, 326, 328,
856 320, 325, 330, 333, 323, 339, 318, 332, 324, 335,
857 335, 335, 335, 338, 339, 341, 326, 333, 332, 338,
858 342, 328, 345, 343, 346, 344, 330, 348, 342, 343,
859 332, 344, 347, 349, 346, 350, 351, 357, 341, 347,
860 352, 354, 358, 359, 345, 350, 361, 348, 352, 354,
861 360, 357, 362, 349, 351, 364, 358, 365, 366, 367,
Reid Spencer68a24bd2005-08-27 18:50:39 +0000862
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000863 360, 359, 361, 369, 370, 372, 371, 374, 373, 367,
864 362, 376, 370, 377, 378, 365, 371, 374, 366, 364,
865 375, 369, 373, 379, 380, 376, 381, 383, 375, 384,
866 372, 386, 377, 385, 388, 380, 390, 392, 378, 379,
867 383, 386, 385, 391, 390, 393, 381, 395, 396, 392,
868 394, 398, 391, 384, 388, 399, 394, 401, 402, 393,
869 403, 405, 406, 407, 410, 398, 396, 409, 414, 415,
870 403, 395, 409, 409, 420, 401, 414, 419, 425, 399,
871 418, 406, 407, 419, 405, 422, 415, 402, 410, 426,
872 418, 428, 429, 422, 430, 432, 437, 433, 420, 444,
Chris Lattnere869eef2005-11-12 00:11:49 +0000873
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000874 425, 437, 443, 440, 445, 432, 446, 426, 433, 447,
875 429, 449, 430, 445, 450, 428, 440, 453, 443, 454,
876 446, 455, 444, 536, 456, 462, 457, 447, 459, 460,
877 461, 464, 463, 450, 465, 449, 457, 467, 459, 453,
878 456, 454, 463, 465, 466, 460, 461, 462, 455, 464,
879 469, 471, 470, 472, 466, 473, 474, 476, 475, 472,
880 477, 467, 470, 479, 482, 473, 475, 471, 480, 481,
881 484, 485, 477, 486, 482, 492, 469, 494, 496, 500,
882 474, 476, 495, 486, 492, 500, 484, 494, 479, 485,
883 495, 497, 480, 481, 499, 501, 503, 496, 497, 506,
Chris Lattner75466192006-05-19 21:28:53 +0000884
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000885 507, 508, 499, 511, 509, 506, 512, 513, 514, 501,
886 507, 511, 515, 516, 520, 513, 517, 519, 515, 521,
887 503, 509, 517, 522, 514, 508, 523, 526, 525, 516,
888 512, 520, 519, 522, 525, 527, 528, 526, 529, 521,
889 532, 533, 534, 531, 535, 541, 537, 538, 540, 539,
890 523, 527, 528, 531, 529, 538, 542, 543, 547, 533,
891 535, 534, 537, 539, 532, 545, 540, 541, 546, 548,
892 552, 554, 557, 545, 530, 524, 546, 518, 552, 543,
893 542, 554, 510, 505, 504, 502, 498, 493, 547, 491,
894 490, 489, 488, 548, 557, 560, 560, 560, 560, 560,
Anton Korobeynikovbcb97702006-09-17 20:25:45 +0000895
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000896 561, 561, 563, 487, 563, 563, 563, 564, 564, 566,
897 566, 566, 566, 566, 483, 478, 468, 458, 452, 451,
898 448, 442, 441, 439, 438, 436, 435, 434, 431, 427,
899 424, 423, 421, 417, 416, 413, 412, 411, 408, 404,
900 400, 397, 389, 387, 382, 368, 363, 356, 355, 353,
901 340, 337, 336, 334, 331, 329, 327, 322, 321, 319,
902 315, 312, 311, 307, 304, 299, 294, 293, 285, 281,
903 280, 275, 274, 260, 257, 244, 235, 234, 232, 231,
904 229, 228, 227, 218, 215, 214, 210, 209, 208, 202,
905 199, 198, 196, 195, 194, 193, 192, 191, 187, 163,
Reid Spencer3da59db2006-11-27 01:05:10 +0000906
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000907 154, 150, 147, 144, 141, 137, 134, 118, 92, 71,
908 62, 52, 41, 39, 8, 7, 3, 559, 559, 559,
909 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
910 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
911 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
912 559, 559, 559, 559, 559, 559, 559, 559, 559, 559,
913 559, 559
Reid Spencer68a24bd2005-08-27 18:50:39 +0000914 } ;
915
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000916/* Table of booleans, true if rule could match eol. */
917static yyconst flex_int32_t yy_rule_can_match_eol[139] =
918 { 0,
9190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
921 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
923 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
924 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
925 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
926
927static yy_state_type yy_last_accepting_state;
928static char *yy_last_accepting_cpos;
929
930extern int llvmAsm_flex_debug;
931int llvmAsm_flex_debug = 0;
932
933/* The intent behind this definition is that it'll catch
934 * any uses of REJECT which flex missed.
935 */
936#define REJECT reject_used_but_not_detected
Reid Spencer68a24bd2005-08-27 18:50:39 +0000937#define yymore() yymore_used_but_not_detected
938#define YY_MORE_ADJ 0
939#define YY_RESTORE_YY_MORE_OFFSET
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000940char *llvmAsmtext;
941#line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000942/*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===//
943//
944// The LLVM Compiler Infrastructure
945//
946// This file was developed by the LLVM research group and is distributed under
947// the University of Illinois Open Source License. See LICENSE.TXT for details.
948//
949//===----------------------------------------------------------------------===//
950//
951// This file implements the flex scanner for LLVM assembly languages files.
952//
953//===----------------------------------------------------------------------===*/
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000954#line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +0000955#include "ParserInternals.h"
956#include "llvm/Module.h"
957#include <list>
958#include "llvmAsmParser.h"
959#include <cctype>
960#include <cstdlib>
961
962void set_scan_file(FILE * F){
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000963 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +0000964}
965void set_scan_string (const char * str) {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +0000966 llvmAsm_scan_string (str);
Reid Spencer68a24bd2005-08-27 18:50:39 +0000967}
968
Reid Spencer3ed469c2006-11-02 20:25:50 +0000969// Construct a token value for a non-obsolete token
Reid Spencer68a24bd2005-08-27 18:50:39 +0000970#define RET_TOK(type, Enum, sym) \
Reid Spencera132e042006-12-03 05:46:11 +0000971 llvmAsmlval.type = Instruction::Enum; \
972 return sym
973
Reid Spencer3ed469c2006-11-02 20:25:50 +0000974// Construct a token value for an obsolete token
Reid Spencera132e042006-12-03 05:46:11 +0000975#define RET_TY(CTYPE, SYM) \
976 llvmAsmlval.PrimType = CTYPE;\
Reid Spencer481169e2006-12-01 00:33:46 +0000977 return SYM
Reid Spencer68a24bd2005-08-27 18:50:39 +0000978
979namespace llvm {
980
981// TODO: All of the static identifiers are figured out by the lexer,
982// these should be hashed to reduce the lexer size
983
984
985// atoull - Convert an ascii string of decimal digits into the unsigned long
986// long representation... this does not have to do input error checking,
987// because we know that the input will be matched by a suitable regex...
988//
989static uint64_t atoull(const char *Buffer) {
990 uint64_t Result = 0;
991 for (; *Buffer; Buffer++) {
992 uint64_t OldRes = Result;
993 Result *= 10;
994 Result += *Buffer-'0';
995 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +0000996 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +0000997 }
998 return Result;
999}
1000
1001static uint64_t HexIntToVal(const char *Buffer) {
1002 uint64_t Result = 0;
1003 for (; *Buffer; ++Buffer) {
1004 uint64_t OldRes = Result;
1005 Result *= 16;
1006 char C = *Buffer;
1007 if (C >= '0' && C <= '9')
1008 Result += C-'0';
1009 else if (C >= 'A' && C <= 'F')
1010 Result += C-'A'+10;
1011 else if (C >= 'a' && C <= 'f')
1012 Result += C-'a'+10;
1013
1014 if (Result < OldRes) // Uh, oh, overflow detected!!!
Reid Spencer61c83e02006-08-18 08:43:06 +00001015 GenerateError("constant bigger than 64 bits detected!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001016 }
1017 return Result;
1018}
1019
1020
1021// HexToFP - Convert the ascii string in hexidecimal format to the floating
1022// point representation of it.
1023//
1024static double HexToFP(const char *Buffer) {
1025 // Behave nicely in the face of C TBAA rules... see:
1026 // http://www.nullstone.com/htmls/category/aliastyp.htm
1027 union {
1028 uint64_t UI;
1029 double FP;
1030 } UIntToFP;
1031 UIntToFP.UI = HexIntToVal(Buffer);
1032
1033 assert(sizeof(double) == sizeof(uint64_t) &&
1034 "Data sizes incompatible on this target!");
1035 return UIntToFP.FP; // Cast Hex constant to double
1036}
1037
1038
1039// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1040// appropriate character. If AllowNull is set to false, a \00 value will cause
1041// an exception to be thrown.
1042//
1043// If AllowNull is set to true, the return value of the function points to the
1044// last character of the string in memory.
1045//
1046char *UnEscapeLexed(char *Buffer, bool AllowNull) {
1047 char *BOut = Buffer;
1048 for (char *BIn = Buffer; *BIn; ) {
1049 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1050 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1051 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1052 if (!AllowNull && !*BOut)
Reid Spencer61c83e02006-08-18 08:43:06 +00001053 GenerateError("String literal cannot accept \\00 escape!");
Reid Spencer68a24bd2005-08-27 18:50:39 +00001054
1055 BIn[3] = Tmp; // Restore character
1056 BIn += 3; // Skip over handled chars
1057 ++BOut;
1058 } else {
1059 *BOut++ = *BIn++;
1060 }
1061 }
1062
1063 return BOut;
1064}
1065
1066} // End llvm namespace
1067
1068using namespace llvm;
1069
1070#define YY_NEVER_INTERACTIVE 1
1071/* Comments start with a ; and go till end of line */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001072/* Local Values and Type identifiers start with a % sign */
1073/* Global Value identifiers start with an @ sign */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001074/* Label identifiers end with a colon */
1075/* Quoted names can contain any character except " and \ */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001076/* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */
1077/* Integer types are specified with i and a bitwidth */
1078/* E[PN]Integer: match positive and negative literal integer values. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001079/* FPConstant - A Floating point constant.
1080 */
1081/* HexFPConstant - Floating point constant represented in IEEE format as a
1082 * hexadecimal number for when exponential notation is not precise enough.
1083 */
1084/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1085 * it to deal with 64 bit numbers.
1086 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001087#line 1088 "Lexer.cpp"
1088
1089#define INITIAL 0
1090
1091#ifndef YY_NO_UNISTD_H
1092/* Special case for "unistd.h", since it is non-ANSI. We include it way
1093 * down here because we want the user's section 1 to have been scanned first.
1094 * The user has a chance to override it with an option.
1095 */
1096#include <unistd.h>
1097#endif
1098
1099#ifndef YY_EXTRA_TYPE
1100#define YY_EXTRA_TYPE void *
1101#endif
1102
1103static int yy_init_globals (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001104
1105/* Macros after this point can all be overridden by user definitions in
1106 * section 1.
1107 */
1108
1109#ifndef YY_SKIP_YYWRAP
1110#ifdef __cplusplus
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001111extern "C" int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001112#else
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001113extern int llvmAsmwrap (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001114#endif
1115#endif
1116
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001117 static inline void yyunput (int c,char *buf_ptr );
1118
Reid Spencer68a24bd2005-08-27 18:50:39 +00001119#ifndef yytext_ptr
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001120static void yy_flex_strncpy (char *,yyconst char *,int );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001121#endif
1122
1123#ifdef YY_NEED_STRLEN
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001124static int yy_flex_strlen (yyconst char * );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001125#endif
1126
1127#ifndef YY_NO_INPUT
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001128
Reid Spencer68a24bd2005-08-27 18:50:39 +00001129#ifdef __cplusplus
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001130static int yyinput (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001131#else
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001132static int input (void );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001133#endif
1134
Reid Spencer68a24bd2005-08-27 18:50:39 +00001135#endif
1136
1137/* Amount of stuff to slurp up with each read. */
1138#ifndef YY_READ_BUF_SIZE
1139#define YY_READ_BUF_SIZE 8192
1140#endif
1141
1142/* Copy whatever the last rule matched to the standard output. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001143#ifndef ECHO
1144/* This used to be an fputs(), but since the string might contain NUL's,
1145 * we now use fwrite().
1146 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001147#define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001148#endif
1149
1150/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1151 * is returned in "result".
1152 */
1153#ifndef YY_INPUT
1154#define YY_INPUT(buf,result,max_size) \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001155 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001156 { \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001157 int c = '*'; \
1158 size_t n; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001159 for ( n = 0; n < max_size && \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001160 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001161 buf[n] = (char) c; \
1162 if ( c == '\n' ) \
1163 buf[n++] = (char) c; \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001164 if ( c == EOF && ferror( llvmAsmin ) ) \
Reid Spencer68a24bd2005-08-27 18:50:39 +00001165 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1166 result = n; \
1167 } \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001168 else \
1169 { \
1170 errno=0; \
1171 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \
1172 { \
1173 if( errno != EINTR) \
1174 { \
1175 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1176 break; \
1177 } \
1178 errno=0; \
1179 clearerr(llvmAsmin); \
1180 } \
1181 }\
1182\
1183
Reid Spencer68a24bd2005-08-27 18:50:39 +00001184#endif
1185
1186/* No semi-colon after return; correct usage is to write "yyterminate();" -
1187 * we don't want an extra ';' after the "return" because that will cause
1188 * some compilers to complain about unreachable statements.
1189 */
1190#ifndef yyterminate
1191#define yyterminate() return YY_NULL
1192#endif
1193
1194/* Number of entries by which start-condition stack grows. */
1195#ifndef YY_START_STACK_INCR
1196#define YY_START_STACK_INCR 25
1197#endif
1198
1199/* Report a fatal error. */
1200#ifndef YY_FATAL_ERROR
1201#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1202#endif
1203
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001204/* end tables serialization structures and prototypes */
1205
Reid Spencer68a24bd2005-08-27 18:50:39 +00001206/* Default declaration of generated scanner - a define so the user can
1207 * easily add parameters.
1208 */
1209#ifndef YY_DECL
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001210#define YY_DECL_IS_OURS 1
Reid Spencer68a24bd2005-08-27 18:50:39 +00001211
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001212extern int llvmAsmlex (void);
1213
1214#define YY_DECL int llvmAsmlex (void)
1215#endif /* !YY_DECL */
1216
1217/* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng
Reid Spencer68a24bd2005-08-27 18:50:39 +00001218 * have been set up.
1219 */
1220#ifndef YY_USER_ACTION
1221#define YY_USER_ACTION
1222#endif
1223
1224/* Code executed at the end of each rule. */
1225#ifndef YY_BREAK
1226#define YY_BREAK break;
1227#endif
1228
1229#define YY_RULE_SETUP \
1230 YY_USER_ACTION
1231
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001232/** The main scanner function which does all the work.
1233 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001234YY_DECL
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001235{
Reid Spencer68a24bd2005-08-27 18:50:39 +00001236 register yy_state_type yy_current_state;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001237 register char *yy_cp, *yy_bp;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001238 register int yy_act;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001239
1240#line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001241
1242
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001243#line 1244 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001244
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001245 if ( !(yy_init) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001246 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001247 (yy_init) = 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001248
1249#ifdef YY_USER_INIT
1250 YY_USER_INIT;
1251#endif
1252
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001253 if ( ! (yy_start) )
1254 (yy_start) = 1; /* first start state */
Reid Spencer68a24bd2005-08-27 18:50:39 +00001255
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001256 if ( ! llvmAsmin )
1257 llvmAsmin = stdin;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001258
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001259 if ( ! llvmAsmout )
1260 llvmAsmout = stdout;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001261
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001262 if ( ! YY_CURRENT_BUFFER ) {
1263 llvmAsmensure_buffer_stack ();
1264 YY_CURRENT_BUFFER_LVALUE =
1265 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
1266 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001267
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001268 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00001269 }
1270
1271 while ( 1 ) /* loops until end-of-file is reached */
1272 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001273 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001274
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001275 /* Support of llvmAsmtext. */
1276 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001277
1278 /* yy_bp points to the position in yy_ch_buf of the start of
1279 * the current run.
1280 */
1281 yy_bp = yy_cp;
1282
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001283 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001284yy_match:
1285 do
1286 {
1287 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001288 if ( yy_accept[yy_current_state] )
1289 {
1290 (yy_last_accepting_state) = yy_current_state;
1291 (yy_last_accepting_cpos) = yy_cp;
1292 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001293 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1294 {
1295 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001296 if ( yy_current_state >= 560 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001297 yy_c = yy_meta[(unsigned int) yy_c];
1298 }
1299 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001300 ++yy_cp;
1301 }
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001302 while ( yy_current_state != 559 );
1303 yy_cp = (yy_last_accepting_cpos);
1304 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00001305
1306yy_find_action:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001307 yy_act = yy_accept[yy_current_state];
Reid Spencer68a24bd2005-08-27 18:50:39 +00001308
1309 YY_DO_BEFORE_ACTION;
1310
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001311 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00001312 {
1313 int yyl;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001314 for ( yyl = 0; yyl < llvmAsmleng; ++yyl )
1315 if ( llvmAsmtext[yyl] == '\n' )
1316
1317 llvmAsmlineno++;
1318;
Reid Spencer68a24bd2005-08-27 18:50:39 +00001319 }
1320
1321do_action: /* This label is used only to access EOF actions. */
1322
Reid Spencer68a24bd2005-08-27 18:50:39 +00001323 switch ( yy_act )
1324 { /* beginning of action switch */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001325 case 0: /* must back up */
1326 /* undo the effects of YY_DO_BEFORE_ACTION */
1327 *yy_cp = (yy_hold_char);
1328 yy_cp = (yy_last_accepting_cpos);
1329 yy_current_state = (yy_last_accepting_state);
1330 goto yy_find_action;
1331
Reid Spencer68a24bd2005-08-27 18:50:39 +00001332case 1:
1333YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001334#line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001335{ /* Ignore comments for now */ }
1336 YY_BREAK
1337case 2:
1338YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001339#line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001340{ return BEGINTOK; }
1341 YY_BREAK
1342case 3:
1343YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001344#line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001345{ return ENDTOK; }
1346 YY_BREAK
1347case 4:
1348YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001349#line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001350{ return TRUETOK; }
1351 YY_BREAK
1352case 5:
1353YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001354#line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001355{ return FALSETOK; }
1356 YY_BREAK
1357case 6:
1358YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001359#line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001360{ return DECLARE; }
1361 YY_BREAK
1362case 7:
1363YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001364#line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001365{ return DEFINE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001366 YY_BREAK
1367case 8:
1368YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001369#line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001370{ return GLOBAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001371 YY_BREAK
1372case 9:
1373YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001374#line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001375{ return CONSTANT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001376 YY_BREAK
1377case 10:
1378YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001379#line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001380{ return INTERNAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001381 YY_BREAK
1382case 11:
1383YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001384#line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001385{ return LINKONCE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001386 YY_BREAK
1387case 12:
1388YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001389#line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001390{ return WEAK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001391 YY_BREAK
1392case 13:
1393YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001394#line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001395{ return APPENDING; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001396 YY_BREAK
1397case 14:
1398YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001399#line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001400{ return DLLIMPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001401 YY_BREAK
1402case 15:
1403YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001404#line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer6fd36ab2006-12-29 20:35:03 +00001405{ return DLLEXPORT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001406 YY_BREAK
1407case 16:
1408YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001409#line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov178a3522007-01-12 19:22:51 +00001410{ return HIDDEN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001411 YY_BREAK
1412case 17:
1413YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001414#line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1415{ return PROTECTED; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001416 YY_BREAK
1417case 18:
1418YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001419#line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1420{ return EXTERN_WEAK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001421 YY_BREAK
1422case 19:
1423YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001424#line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1425{ return EXTERNAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001426 YY_BREAK
1427case 20:
1428YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001429#line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1430{ return THREAD_LOCAL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001431 YY_BREAK
1432case 21:
1433YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001434#line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1435{ return ZEROINITIALIZER; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001436 YY_BREAK
1437case 22:
1438YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001439#line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1440{ return DOTDOTDOT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001441 YY_BREAK
1442case 23:
1443YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001444#line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1445{ return UNDEF; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001446 YY_BREAK
1447case 24:
1448YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001449#line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1450{ return NULL_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001451 YY_BREAK
1452case 25:
1453YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001454#line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1455{ return TO; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001456 YY_BREAK
1457case 26:
1458YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001459#line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1460{ return TAIL; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001461 YY_BREAK
1462case 27:
1463YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001464#line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1465{ return TARGET; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001466 YY_BREAK
1467case 28:
1468YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001469#line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1470{ return TRIPLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001471 YY_BREAK
1472case 29:
1473YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001474#line 221 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1475{ return DEPLIBS; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001476 YY_BREAK
1477case 30:
1478YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001479#line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1480{ return DATALAYOUT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001481 YY_BREAK
1482case 31:
1483YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001484#line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1485{ return VOLATILE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001486 YY_BREAK
1487case 32:
1488YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001489#line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1490{ return ALIGN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001491 YY_BREAK
1492case 33:
1493YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001494#line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1495{ return SECTION; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001496 YY_BREAK
1497case 34:
1498YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001499#line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1500{ return ALIAS; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001501 YY_BREAK
1502case 35:
1503YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001504#line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1505{ return MODULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001506 YY_BREAK
1507case 36:
1508YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001509#line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1510{ return ASM_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001511 YY_BREAK
1512case 37:
1513YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001514#line 229 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1515{ return SIDEEFFECT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001516 YY_BREAK
1517case 38:
1518YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001519#line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1520{ return CC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001521 YY_BREAK
1522case 39:
1523YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001524#line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1525{ return CCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001526 YY_BREAK
1527case 40:
1528YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001529#line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1530{ return FASTCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001531 YY_BREAK
1532case 41:
1533YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001534#line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1535{ return COLDCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001536 YY_BREAK
1537case 42:
1538YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001539#line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1540{ return X86_STDCALLCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001541 YY_BREAK
1542case 43:
1543YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001544#line 236 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1545{ return X86_FASTCALLCC_TOK; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001546 YY_BREAK
1547case 44:
1548YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001549#line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1550{ return INREG; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001551 YY_BREAK
1552case 45:
1553YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001554#line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1555{ return SRET; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001556 YY_BREAK
1557case 46:
1558YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001559#line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1560{ return NOUNWIND; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001561 YY_BREAK
1562case 47:
1563YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001564#line 241 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1565{ return NORETURN; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001566 YY_BREAK
1567case 48:
1568YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001569#line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1570{ RET_TY(Type::VoidTy, VOID); }
Reid Spencer832254e2007-02-02 02:16:23 +00001571 YY_BREAK
1572case 49:
1573YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001574#line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1575{ RET_TY(Type::FloatTy, FLOAT); }
Reid Spencer832254e2007-02-02 02:16:23 +00001576 YY_BREAK
1577case 50:
1578YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001579#line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1580{ RET_TY(Type::DoubleTy,DOUBLE);}
Reid Spencer67d8ed92007-03-22 02:14:08 +00001581 YY_BREAK
1582case 51:
1583YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001584#line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1585{ RET_TY(Type::LabelTy, LABEL); }
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001586 YY_BREAK
1587case 52:
1588YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001589#line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1590{ return TYPE; }
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001591 YY_BREAK
1592case 53:
1593YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001594#line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1595{ return OPAQUE; }
1596 YY_BREAK
1597case 54:
1598YY_RULE_SETUP
1599#line 249 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1600{ uint64_t NumBits = atoull(llvmAsmtext+1);
Reid Spencera54b7cb2007-01-12 07:05:14 +00001601 if (NumBits < IntegerType::MIN_INT_BITS ||
1602 NumBits > IntegerType::MAX_INT_BITS)
1603 GenerateError("Bitwidth for integer type out of range!");
1604 const Type* Ty = IntegerType::get(NumBits);
1605 RET_TY(Ty, INTTYPE);
1606 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001607 YY_BREAK
Reid Spencer68a24bd2005-08-27 18:50:39 +00001608case 55:
1609YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001610#line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1611{ RET_TOK(BinaryOpVal, Add, ADD); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001612 YY_BREAK
1613case 56:
1614YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001615#line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1616{ RET_TOK(BinaryOpVal, Sub, SUB); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001617 YY_BREAK
1618case 57:
1619YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001620#line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1621{ RET_TOK(BinaryOpVal, Mul, MUL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001622 YY_BREAK
1623case 58:
1624YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001625#line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1626{ RET_TOK(BinaryOpVal, UDiv, UDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001627 YY_BREAK
1628case 59:
1629YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001630#line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1631{ RET_TOK(BinaryOpVal, SDiv, SDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001632 YY_BREAK
1633case 60:
1634YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001635#line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1636{ RET_TOK(BinaryOpVal, FDiv, FDIV); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001637 YY_BREAK
1638case 61:
1639YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001640#line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1641{ RET_TOK(BinaryOpVal, URem, UREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001642 YY_BREAK
1643case 62:
1644YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001645#line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1646{ RET_TOK(BinaryOpVal, SRem, SREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001647 YY_BREAK
1648case 63:
1649YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001650#line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1651{ RET_TOK(BinaryOpVal, FRem, FREM); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001652 YY_BREAK
1653case 64:
1654YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001655#line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1656{ RET_TOK(BinaryOpVal, Shl, SHL); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001657 YY_BREAK
1658case 65:
1659YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001660#line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1661{ RET_TOK(BinaryOpVal, LShr, LSHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001662 YY_BREAK
1663case 66:
1664YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001665#line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1666{ RET_TOK(BinaryOpVal, AShr, ASHR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001667 YY_BREAK
1668case 67:
1669YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001670#line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1671{ RET_TOK(BinaryOpVal, And, AND); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001672 YY_BREAK
1673case 68:
1674YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001675#line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1676{ RET_TOK(BinaryOpVal, Or , OR ); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001677 YY_BREAK
1678case 69:
1679YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001680#line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1681{ RET_TOK(BinaryOpVal, Xor, XOR); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001682 YY_BREAK
1683case 70:
1684YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001685#line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1686{ RET_TOK(OtherOpVal, ICmp, ICMP); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001687 YY_BREAK
1688case 71:
1689YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001690#line 273 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1691{ RET_TOK(OtherOpVal, FCmp, FCMP); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001692 YY_BREAK
1693case 72:
1694YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001695#line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1696{ return EQ; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001697 YY_BREAK
1698case 73:
1699YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001700#line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1701{ return NE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001702 YY_BREAK
1703case 74:
1704YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001705#line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1706{ return SLT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001707 YY_BREAK
1708case 75:
1709YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001710#line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1711{ return SGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001712 YY_BREAK
1713case 76:
1714YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001715#line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1716{ return SLE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001717 YY_BREAK
1718case 77:
1719YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001720#line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1721{ return SGE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001722 YY_BREAK
1723case 78:
1724YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001725#line 281 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1726{ return ULT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001727 YY_BREAK
1728case 79:
1729YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001730#line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1731{ return UGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001732 YY_BREAK
1733case 80:
1734YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001735#line 283 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1736{ return ULE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001737 YY_BREAK
1738case 81:
1739YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001740#line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1741{ return UGE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001742 YY_BREAK
1743case 82:
1744YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001745#line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1746{ return OEQ; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001747 YY_BREAK
1748case 83:
1749YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001750#line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1751{ return ONE; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001752 YY_BREAK
1753case 84:
1754YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001755#line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1756{ return OLT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001757 YY_BREAK
1758case 85:
1759YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001760#line 288 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1761{ return OGT; }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001762 YY_BREAK
1763case 86:
1764YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001765#line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1766{ return OLE; }
Nate Begeman14b05292005-11-05 09:21:28 +00001767 YY_BREAK
1768case 87:
1769YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001770#line 290 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1771{ return OGE; }
Chris Lattnere869eef2005-11-12 00:11:49 +00001772 YY_BREAK
1773case 88:
1774YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001775#line 291 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1776{ return ORD; }
Robert Bocchino9c62b562006-01-10 19:04:32 +00001777 YY_BREAK
1778case 89:
1779YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001780#line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1781{ return UNO; }
Robert Bocchino2def1b32006-01-17 20:06:25 +00001782 YY_BREAK
1783case 90:
1784YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001785#line 293 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1786{ return UEQ; }
Chris Lattner8335e842006-01-23 23:05:42 +00001787 YY_BREAK
1788case 91:
1789YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001790#line 294 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1791{ return UNE; }
Chris Lattner66316012006-01-24 04:14:29 +00001792 YY_BREAK
1793case 92:
1794YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001795#line 296 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1796{ RET_TOK(OtherOpVal, PHI, PHI_TOK); }
Chris Lattner0e9c3762006-01-25 22:27:16 +00001797 YY_BREAK
1798case 93:
1799YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001800#line 297 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1801{ RET_TOK(OtherOpVal, Call, CALL); }
Chris Lattnerd5efe842006-04-08 01:18:56 +00001802 YY_BREAK
1803case 94:
1804YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001805#line 298 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1806{ RET_TOK(CastOpVal, Trunc, TRUNC); }
Chris Lattner75466192006-05-19 21:28:53 +00001807 YY_BREAK
1808case 95:
1809YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001810#line 299 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1811{ RET_TOK(CastOpVal, ZExt, ZEXT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001812 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001813case 96:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001814YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001815#line 300 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1816{ RET_TOK(CastOpVal, SExt, SEXT); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001817 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001818case 97:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001819YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001820#line 301 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1821{ RET_TOK(CastOpVal, FPTrunc, FPTRUNC); }
Reid Spencer68a24bd2005-08-27 18:50:39 +00001822 YY_BREAK
Chris Lattner75466192006-05-19 21:28:53 +00001823case 98:
Reid Spencer68a24bd2005-08-27 18:50:39 +00001824YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001825#line 302 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1826{ RET_TOK(CastOpVal, FPExt, FPEXT); }
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001827 YY_BREAK
1828case 99:
1829YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001830#line 303 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1831{ RET_TOK(CastOpVal, UIToFP, UITOFP); }
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001832 YY_BREAK
1833case 100:
1834YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001835#line 304 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1836{ RET_TOK(CastOpVal, SIToFP, SITOFP); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001837 YY_BREAK
Anton Korobeynikovbcb97702006-09-17 20:25:45 +00001838case 101:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001839YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001840#line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1841{ RET_TOK(CastOpVal, FPToUI, FPTOUI); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001842 YY_BREAK
1843case 102:
1844YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001845#line 306 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1846{ RET_TOK(CastOpVal, FPToSI, FPTOSI); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001847 YY_BREAK
1848case 103:
1849YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001850#line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1851{ RET_TOK(CastOpVal, IntToPtr, INTTOPTR); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001852 YY_BREAK
1853case 104:
1854YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001855#line 308 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1856{ RET_TOK(CastOpVal, PtrToInt, PTRTOINT); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001857 YY_BREAK
1858case 105:
1859YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001860#line 309 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1861{ RET_TOK(CastOpVal, BitCast, BITCAST); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001862 YY_BREAK
1863case 106:
1864YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001865#line 310 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1866{ RET_TOK(OtherOpVal, Select, SELECT); }
Reid Spencer3ed469c2006-11-02 20:25:50 +00001867 YY_BREAK
1868case 107:
1869YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001870#line 311 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1871{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001872 YY_BREAK
1873case 108:
1874YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001875#line 312 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1876{ RET_TOK(TermOpVal, Ret, RET); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001877 YY_BREAK
1878case 109:
1879YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001880#line 313 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1881{ RET_TOK(TermOpVal, Br, BR); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001882 YY_BREAK
1883case 110:
1884YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001885#line 314 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1886{ RET_TOK(TermOpVal, Switch, SWITCH); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001887 YY_BREAK
1888case 111:
1889YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001890#line 315 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1891{ RET_TOK(TermOpVal, Invoke, INVOKE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001892 YY_BREAK
1893case 112:
1894YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001895#line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1896{ RET_TOK(TermOpVal, Unwind, UNWIND); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001897 YY_BREAK
1898case 113:
1899YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001900#line 317 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1901{ RET_TOK(TermOpVal, Unreachable, UNREACHABLE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001902 YY_BREAK
1903case 114:
1904YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001905#line 319 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1906{ RET_TOK(MemOpVal, Malloc, MALLOC); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001907 YY_BREAK
1908case 115:
1909YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001910#line 320 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1911{ RET_TOK(MemOpVal, Alloca, ALLOCA); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001912 YY_BREAK
1913case 116:
1914YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001915#line 321 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1916{ RET_TOK(MemOpVal, Free, FREE); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001917 YY_BREAK
1918case 117:
1919YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001920#line 322 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1921{ RET_TOK(MemOpVal, Load, LOAD); }
Reid Spencer3da59db2006-11-27 01:05:10 +00001922 YY_BREAK
1923case 118:
1924YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001925#line 323 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1926{ RET_TOK(MemOpVal, Store, STORE); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001927 YY_BREAK
Reid Spencer41dff5e2007-01-26 08:05:27 +00001928case 119:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001929YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001930#line 324 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1931{ RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
Reid Spencer67d8ed92007-03-22 02:14:08 +00001932 YY_BREAK
1933case 120:
1934YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001935#line 326 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1936{ RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); }
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001937 YY_BREAK
Reid Spencer3d6b71e2007-04-09 01:56:05 +00001938case 121:
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001939YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001940#line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1941{ RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); }
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001942 YY_BREAK
1943case 122:
1944YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001945#line 328 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1946{ RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); }
Owen Anderson1dc69692006-10-18 02:21:48 +00001947 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001948case 123:
Owen Anderson1dc69692006-10-18 02:21:48 +00001949YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001950#line 331 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001951{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001952 UnEscapeLexed(llvmAsmtext+1);
1953 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip %
1954 return LOCALVAR;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001955 }
1956 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001957case 124:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001958YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001959#line 336 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001960{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001961 UnEscapeLexed(llvmAsmtext+1);
1962 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip @
1963 return GLOBALVAR;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001964 }
1965 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001966case 125:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001967YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001968#line 341 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001969{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001970 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon
1971 UnEscapeLexed(llvmAsmtext);
1972 llvmAsmlval.StrVal = strdup(llvmAsmtext);
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001973 return LABELSTR;
1974 }
1975 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00001976case 126:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001977/* rule 126 can match eol */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00001978YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001979#line 347 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
1980{
1981 llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote
1982 UnEscapeLexed(llvmAsmtext+1);
1983 llvmAsmlval.StrVal = strdup(llvmAsmtext+1);
1984 return LABELSTR;
1985 }
1986 YY_BREAK
1987case 127:
1988/* rule 127 can match eol */
1989YY_RULE_SETUP
1990#line 354 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00001991{ // Note that we cannot unescape a string constant here! The
1992 // string constant might contain a \00 which would not be
1993 // understood by the string stuff. It is valid to make a
1994 // [sbyte] c"Hello World\00" constant, for example.
1995 //
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00001996 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
1997 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote
Reid Spencer68a24bd2005-08-27 18:50:39 +00001998 return STRINGCONSTANT;
1999 }
2000 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002001case 128:
2002/* rule 128 can match eol */
Reid Spencer6f407902007-01-13 05:00:46 +00002003YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002004#line 363 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002005{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002006 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote
2007 llvmAsmlval.StrVal = strdup(llvmAsmtext+2); // Nuke @, quote
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002008 return ATSTRINGCONSTANT;
2009 }
2010 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002011case 129:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002012YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002013#line 369 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2014{ int len = strlen(llvmAsmtext);
Reid Spencer38c91a92007-02-28 02:24:54 +00002015 uint32_t numBits = ((len * 64) / 19) + 1;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002016 APInt Tmp(numBits, llvmAsmtext, len, 10);
Reid Spencer38c91a92007-02-28 02:24:54 +00002017 uint32_t activeBits = Tmp.getActiveBits();
2018 if (activeBits > 0 && activeBits < numBits)
2019 Tmp.trunc(activeBits);
2020 if (Tmp.getBitWidth() > 64) {
2021 llvmAsmlval.APIntVal = new APInt(Tmp);
2022 return EUAPINTVAL;
2023 } else {
2024 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2025 return EUINT64VAL;
2026 }
2027 }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002028 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002029case 130:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002030YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002031#line 383 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2032{ int len = strlen(llvmAsmtext);
Reid Spencerafc37822007-03-09 21:19:09 +00002033 uint32_t numBits = (((len-1) * 64) / 19) + 2;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002034 APInt Tmp(numBits, llvmAsmtext, len, 10);
Reid Spencer38c91a92007-02-28 02:24:54 +00002035 uint32_t minBits = Tmp.getMinSignedBits();
2036 if (minBits > 0 && minBits < numBits)
2037 Tmp.trunc(minBits);
2038 if (Tmp.getBitWidth() > 64) {
2039 llvmAsmlval.APIntVal = new APInt(Tmp);
2040 return ESAPINTVAL;
2041 } else {
2042 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2043 return ESINT64VAL;
2044 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002045 }
2046 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002047case 131:
Reid Spencer6f407902007-01-13 05:00:46 +00002048YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002049#line 398 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2050{ int len = strlen(llvmAsmtext+3) - 3;
Reid Spencer38c91a92007-02-28 02:24:54 +00002051 uint32_t bits = len * 4;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002052 APInt Tmp(bits, llvmAsmtext+3, len, 16);
Reid Spencer38c91a92007-02-28 02:24:54 +00002053 uint32_t activeBits = Tmp.getActiveBits();
2054 if (activeBits > 0 && activeBits < bits)
2055 Tmp.trunc(activeBits);
2056 if (Tmp.getBitWidth() > 64) {
2057 llvmAsmlval.APIntVal = new APInt(Tmp);
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002058 return llvmAsmtext[0] == 's' ? ESAPINTVAL : EUAPINTVAL;
2059 } else if (llvmAsmtext[0] == 's') {
Reid Spencer38c91a92007-02-28 02:24:54 +00002060 llvmAsmlval.SInt64Val = Tmp.getSExtValue();
2061 return ESINT64VAL;
2062 } else {
2063 llvmAsmlval.UInt64Val = Tmp.getZExtValue();
2064 return EUINT64VAL;
2065 }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002066 }
Reid Spencer6f407902007-01-13 05:00:46 +00002067 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002068case 132:
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002069YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002070#line 416 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002071{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002072 uint64_t Val = atoull(llvmAsmtext+1);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002073 if ((unsigned)Val != Val)
2074 GenerateError("Invalid value number (too large)!");
2075 llvmAsmlval.UIntVal = unsigned(Val);
2076 return LOCALVAL_ID;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002077 }
2078 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002079case 133:
Owen Anderson1dc69692006-10-18 02:21:48 +00002080YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002081#line 423 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002082{
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002083 uint64_t Val = atoull(llvmAsmtext+1);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002084 if ((unsigned)Val != Val)
2085 GenerateError("Invalid value number (too large)!");
2086 llvmAsmlval.UIntVal = unsigned(Val);
2087 return GLOBALVAL_ID;
2088 }
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002089 YY_BREAK
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002090case 134:
2091YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002092#line 431 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2093{ llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; }
2094 YY_BREAK
2095case 135:
2096YY_RULE_SETUP
2097#line 432 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2098{ llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; }
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002099 YY_BREAK
2100case YY_STATE_EOF(INITIAL):
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002101#line 434 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002102{
2103 /* Make sure to free the internal buffers for flex when we are
2104 * done reading our input!
2105 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002106 llvmAsm_delete_buffer(YY_CURRENT_BUFFER);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002107 return EOF;
2108 }
2109 YY_BREAK
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002110case 136:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002111/* rule 136 can match eol */
Lauro Ramos Venancioc7635522007-04-12 18:32:50 +00002112YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002113#line 442 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2114{ /* Ignore whitespace */ }
Anton Korobeynikov77d0f972007-04-25 14:29:12 +00002115 YY_BREAK
2116case 137:
2117YY_RULE_SETUP
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002118#line 443 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
2119{ return llvmAsmtext[0]; }
2120 YY_BREAK
2121case 138:
2122YY_RULE_SETUP
2123#line 445 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002124YY_FATAL_ERROR( "flex scanner jammed" );
2125 YY_BREAK
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002126#line 2127 "Lexer.cpp"
Reid Spencer68a24bd2005-08-27 18:50:39 +00002127
2128 case YY_END_OF_BUFFER:
2129 {
2130 /* Amount of text matched not including the EOB char. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002131 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002132
2133 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002134 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002135 YY_RESTORE_YY_MORE_OFFSET
2136
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002137 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002138 {
2139 /* We're scanning a new file or input source. It's
2140 * possible that this happened because the user
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002141 * just pointed llvmAsmin at a new source and called
2142 * llvmAsmlex(). If so, then we have to assure
2143 * consistency between YY_CURRENT_BUFFER and our
Reid Spencer68a24bd2005-08-27 18:50:39 +00002144 * globals. Here is the right place to do so, because
2145 * this is the first action (other than possibly a
2146 * back-up) that will match for the new input source.
2147 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002148 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2149 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin;
2150 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002151 }
2152
2153 /* Note that here we test for yy_c_buf_p "<=" to the position
2154 * of the first EOB in the buffer, since yy_c_buf_p will
2155 * already have been incremented past the NUL character
2156 * (since all states make transitions on EOB to the
2157 * end-of-buffer state). Contrast this with the test
2158 * in input().
2159 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002160 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002161 { /* This was really a NUL. */
2162 yy_state_type yy_next_state;
2163
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002164 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002165
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002166 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002167
2168 /* Okay, we're now positioned to make the NUL
2169 * transition. We couldn't have
2170 * yy_get_previous_state() go ahead and do it
2171 * for us because it doesn't know how to deal
2172 * with the possibility of jamming (and we don't
2173 * want to build jamming into it because then it
2174 * will run more slowly).
2175 */
2176
2177 yy_next_state = yy_try_NUL_trans( yy_current_state );
2178
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002179 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002180
2181 if ( yy_next_state )
2182 {
2183 /* Consume the NUL. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002184 yy_cp = ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002185 yy_current_state = yy_next_state;
2186 goto yy_match;
2187 }
2188
2189 else
2190 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002191 yy_cp = (yy_last_accepting_cpos);
2192 yy_current_state = (yy_last_accepting_state);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002193 goto yy_find_action;
2194 }
2195 }
2196
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002197 else switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002198 {
2199 case EOB_ACT_END_OF_FILE:
2200 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002201 (yy_did_buffer_switch_on_eof) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002202
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002203 if ( llvmAsmwrap( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002204 {
2205 /* Note: because we've taken care in
2206 * yy_get_next_buffer() to have set up
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002207 * llvmAsmtext, we can now set up
Reid Spencer68a24bd2005-08-27 18:50:39 +00002208 * yy_c_buf_p so that if some total
2209 * hoser (like flex itself) wants to
2210 * call the scanner after we return the
2211 * YY_NULL, it'll still work - another
2212 * YY_NULL will get returned.
2213 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002214 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002215
2216 yy_act = YY_STATE_EOF(YY_START);
2217 goto do_action;
2218 }
2219
2220 else
2221 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002222 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002223 YY_NEW_FILE;
2224 }
2225 break;
2226 }
2227
2228 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002229 (yy_c_buf_p) =
2230 (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002231
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002232 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002233
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002234 yy_cp = (yy_c_buf_p);
2235 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002236 goto yy_match;
2237
2238 case EOB_ACT_LAST_MATCH:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002239 (yy_c_buf_p) =
2240 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002241
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002242 yy_current_state = yy_get_previous_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002243
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002244 yy_cp = (yy_c_buf_p);
2245 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002246 goto yy_find_action;
2247 }
2248 break;
2249 }
2250
2251 default:
2252 YY_FATAL_ERROR(
2253 "fatal flex scanner internal error--no action found" );
2254 } /* end of action switch */
2255 } /* end of scanning one token */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002256} /* end of llvmAsmlex */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002257
2258/* yy_get_next_buffer - try to read in a new buffer
2259 *
2260 * Returns a code representing an action:
2261 * EOB_ACT_LAST_MATCH -
2262 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2263 * EOB_ACT_END_OF_FILE - end of file
2264 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002265static int yy_get_next_buffer (void)
2266{
2267 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2268 register char *source = (yytext_ptr);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002269 register int number_to_move, i;
2270 int ret_val;
2271
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002272 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002273 YY_FATAL_ERROR(
2274 "fatal flex scanner internal error--end of buffer missed" );
2275
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002276 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002277 { /* Don't try to fill the buffer, so this is an EOF. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002278 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002279 {
2280 /* We matched a single character, the EOB, so
2281 * treat this as a final EOF.
2282 */
2283 return EOB_ACT_END_OF_FILE;
2284 }
2285
2286 else
2287 {
2288 /* We matched some text prior to the EOB, first
2289 * process it.
2290 */
2291 return EOB_ACT_LAST_MATCH;
2292 }
2293 }
2294
2295 /* Try to read more data. */
2296
2297 /* First move last chars to start of buffer. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002298 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002299
2300 for ( i = 0; i < number_to_move; ++i )
2301 *(dest++) = *(source++);
2302
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002303 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002304 /* don't do the read, it's not guaranteed to return an EOF,
2305 * just force an EOF
2306 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002307 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002308
2309 else
2310 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002311 int num_to_read =
2312 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002313
2314 while ( num_to_read <= 0 )
2315 { /* Not enough room in the buffer - grow it. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002316
2317 /* just a shorter name for the current buffer */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002318 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002319
2320 int yy_c_buf_p_offset =
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002321 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002322
2323 if ( b->yy_is_our_buffer )
2324 {
2325 int new_size = b->yy_buf_size * 2;
2326
2327 if ( new_size <= 0 )
2328 b->yy_buf_size += b->yy_buf_size / 8;
2329 else
2330 b->yy_buf_size *= 2;
2331
2332 b->yy_ch_buf = (char *)
2333 /* Include room in for 2 EOB chars. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002334 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002335 }
2336 else
2337 /* Can't grow it, we don't own it. */
2338 b->yy_ch_buf = 0;
2339
2340 if ( ! b->yy_ch_buf )
2341 YY_FATAL_ERROR(
2342 "fatal error - scanner input buffer overflow" );
2343
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002344 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002345
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002346 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Reid Spencer68a24bd2005-08-27 18:50:39 +00002347 number_to_move - 1;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002348
Reid Spencer68a24bd2005-08-27 18:50:39 +00002349 }
2350
2351 if ( num_to_read > YY_READ_BUF_SIZE )
2352 num_to_read = YY_READ_BUF_SIZE;
2353
2354 /* Read in more data. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002355 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2356 (yy_n_chars), num_to_read );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002357
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002358 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002359 }
2360
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002361 if ( (yy_n_chars) == 0 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002362 {
2363 if ( number_to_move == YY_MORE_ADJ )
2364 {
2365 ret_val = EOB_ACT_END_OF_FILE;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002366 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002367 }
2368
2369 else
2370 {
2371 ret_val = EOB_ACT_LAST_MATCH;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002372 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Reid Spencer68a24bd2005-08-27 18:50:39 +00002373 YY_BUFFER_EOF_PENDING;
2374 }
2375 }
2376
2377 else
2378 ret_val = EOB_ACT_CONTINUE_SCAN;
2379
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002380 (yy_n_chars) += number_to_move;
2381 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2382 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002383
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002384 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002385
2386 return ret_val;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002387}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002388
2389/* yy_get_previous_state - get the state just before the EOB char was reached */
2390
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002391 static yy_state_type yy_get_previous_state (void)
2392{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002393 register yy_state_type yy_current_state;
2394 register char *yy_cp;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002395
2396 yy_current_state = (yy_start);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002397
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002398 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002399 {
2400 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002401 if ( yy_accept[yy_current_state] )
2402 {
2403 (yy_last_accepting_state) = yy_current_state;
2404 (yy_last_accepting_cpos) = yy_cp;
2405 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002406 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2407 {
2408 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002409 if ( yy_current_state >= 560 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002410 yy_c = yy_meta[(unsigned int) yy_c];
2411 }
2412 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002413 }
2414
2415 return yy_current_state;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002416}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002417
2418/* yy_try_NUL_trans - try to make a transition on the NUL character
2419 *
2420 * synopsis
2421 * next_state = yy_try_NUL_trans( current_state );
2422 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002423 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2424{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002425 register int yy_is_jam;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002426 register char *yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002427
2428 register YY_CHAR yy_c = 1;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002429 if ( yy_accept[yy_current_state] )
2430 {
2431 (yy_last_accepting_state) = yy_current_state;
2432 (yy_last_accepting_cpos) = yy_cp;
2433 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002434 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2435 {
2436 yy_current_state = (int) yy_def[yy_current_state];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002437 if ( yy_current_state >= 560 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002438 yy_c = yy_meta[(unsigned int) yy_c];
2439 }
2440 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002441 yy_is_jam = (yy_current_state == 559);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002442
2443 return yy_is_jam ? 0 : yy_current_state;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002444}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002445
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002446 static inline void yyunput (int c, register char * yy_bp )
2447{
2448 register char *yy_cp;
2449
2450 yy_cp = (yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002451
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002452 /* undo effects of setting up llvmAsmtext */
2453 *yy_cp = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002454
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002455 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002456 { /* need to shift things up to make room */
2457 /* +2 for EOB chars. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002458 register int number_to_move = (yy_n_chars) + 2;
2459 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2460 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002461 register char *source =
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002462 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002463
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002464 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002465 *--dest = *--source;
2466
2467 yy_cp += (int) (dest - source);
2468 yy_bp += (int) (dest - source);
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002469 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2470 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002471
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002472 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002473 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2474 }
2475
2476 *--yy_cp = (char) c;
2477
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002478 if ( c == '\n' ){
2479 --llvmAsmlineno;
2480 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002481
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002482 (yytext_ptr) = yy_bp;
2483 (yy_hold_char) = *yy_cp;
2484 (yy_c_buf_p) = yy_cp;
2485}
Reid Spencer6f407902007-01-13 05:00:46 +00002486
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002487#ifndef YY_NO_INPUT
Reid Spencer68a24bd2005-08-27 18:50:39 +00002488#ifdef __cplusplus
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002489 static int yyinput (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002490#else
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002491 static int input (void)
Reid Spencer68a24bd2005-08-27 18:50:39 +00002492#endif
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002493
2494{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002495 int c;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002496
2497 *(yy_c_buf_p) = (yy_hold_char);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002498
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002499 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002500 {
2501 /* yy_c_buf_p now points to the character we want to return.
2502 * If this occurs *before* the EOB characters, then it's a
2503 * valid NUL; if not, then we've hit the end of the buffer.
2504 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002505 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002506 /* This was really a NUL. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002507 *(yy_c_buf_p) = '\0';
Reid Spencer68a24bd2005-08-27 18:50:39 +00002508
2509 else
2510 { /* need more input */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002511 int offset = (yy_c_buf_p) - (yytext_ptr);
2512 ++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002513
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002514 switch ( yy_get_next_buffer( ) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002515 {
2516 case EOB_ACT_LAST_MATCH:
2517 /* This happens because yy_g_n_b()
2518 * sees that we've accumulated a
2519 * token and flags that we need to
2520 * try matching the token before
2521 * proceeding. But for input(),
2522 * there's no matching to consider.
2523 * So convert the EOB_ACT_LAST_MATCH
2524 * to EOB_ACT_END_OF_FILE.
2525 */
2526
2527 /* Reset buffer status. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002528 llvmAsmrestart(llvmAsmin );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002529
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002530 /*FALLTHROUGH*/
Reid Spencer68a24bd2005-08-27 18:50:39 +00002531
2532 case EOB_ACT_END_OF_FILE:
2533 {
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002534 if ( llvmAsmwrap( ) )
Reid Spencer61c83e02006-08-18 08:43:06 +00002535 return EOF;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002536
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002537 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002538 YY_NEW_FILE;
2539#ifdef __cplusplus
2540 return yyinput();
2541#else
2542 return input();
2543#endif
2544 }
2545
2546 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002547 (yy_c_buf_p) = (yytext_ptr) + offset;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002548 break;
2549 }
2550 }
2551 }
2552
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002553 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2554 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */
2555 (yy_hold_char) = *++(yy_c_buf_p);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002556
2557 if ( c == '\n' )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002558
2559 llvmAsmlineno++;
2560;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002561
2562 return c;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002563}
2564#endif /* ifndef YY_NO_INPUT */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002565
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002566/** Immediately switch to a different input stream.
2567 * @param input_file A readable stream.
2568 *
2569 * @note This function does not reset the start condition to @c INITIAL .
2570 */
2571 void llvmAsmrestart (FILE * input_file )
2572{
2573
2574 if ( ! YY_CURRENT_BUFFER ){
2575 llvmAsmensure_buffer_stack ();
2576 YY_CURRENT_BUFFER_LVALUE =
2577 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE );
Reid Spencer6f407902007-01-13 05:00:46 +00002578 }
Reid Spencer41dff5e2007-01-26 08:05:27 +00002579
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002580 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file );
2581 llvmAsm_load_buffer_state( );
2582}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002583
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002584/** Switch to a different input buffer.
2585 * @param new_buffer The new input buffer.
2586 *
2587 */
2588 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2589{
2590
2591 /* TODO. We should be able to replace this entire function body
2592 * with
2593 * llvmAsmpop_buffer_state();
2594 * llvmAsmpush_buffer_state(new_buffer);
2595 */
2596 llvmAsmensure_buffer_stack ();
2597 if ( YY_CURRENT_BUFFER == new_buffer )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002598 return;
2599
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002600 if ( YY_CURRENT_BUFFER )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002601 {
2602 /* Flush out information for old buffer. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002603 *(yy_c_buf_p) = (yy_hold_char);
2604 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2605 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencer68a24bd2005-08-27 18:50:39 +00002606 }
2607
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002608 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2609 llvmAsm_load_buffer_state( );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002610
2611 /* We don't actually know whether we did this switch during
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002612 * EOF (llvmAsmwrap()) processing, but the only time this flag
2613 * is looked at is after llvmAsmwrap() is called, so it's safe
Reid Spencer68a24bd2005-08-27 18:50:39 +00002614 * to go ahead and always set it.
2615 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002616 (yy_did_buffer_switch_on_eof) = 1;
2617}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002618
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002619static void llvmAsm_load_buffer_state (void)
2620{
2621 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2622 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2623 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2624 (yy_hold_char) = *(yy_c_buf_p);
2625}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002626
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002627/** Allocate and initialize an input buffer state.
2628 * @param file A readable stream.
2629 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2630 *
2631 * @return the allocated buffer state.
2632 */
2633 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size )
2634{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002635 YY_BUFFER_STATE b;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002636
2637 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002638 if ( ! b )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002639 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002640
2641 b->yy_buf_size = size;
2642
2643 /* yy_ch_buf has to be 2 characters longer than the size given because
2644 * we need to put in 2 end-of-buffer characters.
2645 */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002646 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002647 if ( ! b->yy_ch_buf )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002648 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002649
2650 b->yy_is_our_buffer = 1;
2651
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002652 llvmAsm_init_buffer(b,file );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002653
2654 return b;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002655}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002656
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002657/** Destroy the buffer.
2658 * @param b a buffer created with llvmAsm_create_buffer()
2659 *
2660 */
2661 void llvmAsm_delete_buffer (YY_BUFFER_STATE b )
2662{
2663
Reid Spencer68a24bd2005-08-27 18:50:39 +00002664 if ( ! b )
2665 return;
2666
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002667 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2668 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002669
2670 if ( b->yy_is_our_buffer )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002671 llvmAsmfree((void *) b->yy_ch_buf );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002672
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002673 llvmAsmfree((void *) b );
2674}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002675
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002676/* Initializes or reinitializes a buffer.
2677 * This function is sometimes called more than once on the same buffer,
2678 * such as during a llvmAsmrestart() or at EOF.
2679 */
2680 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002681
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002682{
2683 int oerrno = errno;
2684
2685 llvmAsm_flush_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002686
2687 b->yy_input_file = file;
2688 b->yy_fill_buffer = 1;
2689
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002690 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_
2691 * called from llvmAsmrestart() or through yy_get_next_buffer.
2692 * In that case, we don't want to reset the lineno or column.
2693 */
2694 if (b != YY_CURRENT_BUFFER){
2695 b->yy_bs_lineno = 1;
2696 b->yy_bs_column = 0;
2697 }
Reid Spencer68a24bd2005-08-27 18:50:39 +00002698
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002699 b->yy_is_interactive = 0;
2700
2701 errno = oerrno;
2702}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002703
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002704/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2705 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2706 *
2707 */
2708 void llvmAsm_flush_buffer (YY_BUFFER_STATE b )
2709{
2710 if ( ! b )
Reid Spencer68a24bd2005-08-27 18:50:39 +00002711 return;
2712
2713 b->yy_n_chars = 0;
2714
2715 /* We always need two end-of-buffer characters. The first causes
2716 * a transition to the end-of-buffer state. The second causes
2717 * a jam in that state.
2718 */
2719 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2720 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2721
2722 b->yy_buf_pos = &b->yy_ch_buf[0];
2723
2724 b->yy_at_bol = 1;
2725 b->yy_buffer_status = YY_BUFFER_NEW;
2726
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002727 if ( b == YY_CURRENT_BUFFER )
2728 llvmAsm_load_buffer_state( );
2729}
2730
2731/** Pushes the new state onto the stack. The new state becomes
2732 * the current state. This function will allocate the stack
2733 * if necessary.
2734 * @param new_buffer The new state.
2735 *
2736 */
2737void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer )
2738{
2739 if (new_buffer == NULL)
2740 return;
2741
2742 llvmAsmensure_buffer_stack();
2743
2744 /* This block is copied from llvmAsm_switch_to_buffer. */
2745 if ( YY_CURRENT_BUFFER )
2746 {
2747 /* Flush out information for old buffer. */
2748 *(yy_c_buf_p) = (yy_hold_char);
2749 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2750 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2751 }
2752
2753 /* Only push if top exists. Otherwise, replace top. */
2754 if (YY_CURRENT_BUFFER)
2755 (yy_buffer_stack_top)++;
2756 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2757
2758 /* copied from llvmAsm_switch_to_buffer. */
2759 llvmAsm_load_buffer_state( );
2760 (yy_did_buffer_switch_on_eof) = 1;
2761}
2762
2763/** Removes and deletes the top of the stack, if present.
2764 * The next element becomes the new top.
2765 *
2766 */
2767void llvmAsmpop_buffer_state (void)
2768{
2769 if (!YY_CURRENT_BUFFER)
2770 return;
2771
2772 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
2773 YY_CURRENT_BUFFER_LVALUE = NULL;
2774 if ((yy_buffer_stack_top) > 0)
2775 --(yy_buffer_stack_top);
2776
2777 if (YY_CURRENT_BUFFER) {
2778 llvmAsm_load_buffer_state( );
2779 (yy_did_buffer_switch_on_eof) = 1;
2780 }
2781}
2782
2783/* Allocates the stack if it does not exist.
2784 * Guarantees space for at least one push.
2785 */
2786static void llvmAsmensure_buffer_stack (void)
2787{
2788 int num_to_alloc;
2789
2790 if (!(yy_buffer_stack)) {
2791
2792 /* First allocation is just for 2 elements, since we don't know if this
2793 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2794 * immediate realloc on the next call.
2795 */
2796 num_to_alloc = 1;
2797 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc
2798 (num_to_alloc * sizeof(struct yy_buffer_state*)
2799 );
2800
2801 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2802
2803 (yy_buffer_stack_max) = num_to_alloc;
2804 (yy_buffer_stack_top) = 0;
2805 return;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002806 }
2807
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002808 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Reid Spencer68a24bd2005-08-27 18:50:39 +00002809
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002810 /* Increase the buffer to prepare for a possible push. */
2811 int grow_size = 8 /* arbitrary grow size */;
2812
2813 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2814 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc
2815 ((yy_buffer_stack),
2816 num_to_alloc * sizeof(struct yy_buffer_state*)
2817 );
2818
2819 /* zero only the new slots.*/
2820 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2821 (yy_buffer_stack_max) = num_to_alloc;
2822 }
2823}
2824
2825/** Setup the input buffer state to scan directly from a user-specified character buffer.
2826 * @param base the character buffer
2827 * @param size the size in bytes of the character buffer
2828 *
2829 * @return the newly allocated buffer state object.
2830 */
2831YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size )
2832{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002833 YY_BUFFER_STATE b;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002834
Reid Spencer68a24bd2005-08-27 18:50:39 +00002835 if ( size < 2 ||
2836 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2837 base[size-1] != YY_END_OF_BUFFER_CHAR )
2838 /* They forgot to leave room for the EOB's. */
2839 return 0;
2840
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002841 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002842 if ( ! b )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002843 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002844
2845 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2846 b->yy_buf_pos = b->yy_ch_buf = base;
2847 b->yy_is_our_buffer = 0;
2848 b->yy_input_file = 0;
2849 b->yy_n_chars = b->yy_buf_size;
2850 b->yy_is_interactive = 0;
2851 b->yy_at_bol = 1;
2852 b->yy_fill_buffer = 0;
2853 b->yy_buffer_status = YY_BUFFER_NEW;
2854
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002855 llvmAsm_switch_to_buffer(b );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002856
2857 return b;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002858}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002859
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002860/** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will
2861 * scan from a @e copy of @a str.
2862 * @param str a NUL-terminated string to scan
2863 *
2864 * @return the newly allocated buffer state object.
2865 * @note If you want to scan bytes that may contain NUL values, then use
2866 * llvmAsm_scan_bytes() instead.
2867 */
2868YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr )
2869{
2870
2871 return llvmAsm_scan_bytes(yystr,strlen(yystr) );
2872}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002873
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002874/** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will
2875 * scan from a @e copy of @a bytes.
2876 * @param bytes the byte buffer to scan
2877 * @param len the number of bytes in the buffer pointed to by @a bytes.
2878 *
2879 * @return the newly allocated buffer state object.
2880 */
2881YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2882{
Reid Spencer68a24bd2005-08-27 18:50:39 +00002883 YY_BUFFER_STATE b;
2884 char *buf;
2885 yy_size_t n;
2886 int i;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002887
Reid Spencer68a24bd2005-08-27 18:50:39 +00002888 /* Get memory for full buffer, including space for trailing EOB's. */
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002889 n = _yybytes_len + 2;
2890 buf = (char *) llvmAsmalloc(n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002891 if ( ! buf )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002892 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002893
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002894 for ( i = 0; i < _yybytes_len; ++i )
2895 buf[i] = yybytes[i];
Reid Spencer68a24bd2005-08-27 18:50:39 +00002896
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002897 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Reid Spencer68a24bd2005-08-27 18:50:39 +00002898
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002899 b = llvmAsm_scan_buffer(buf,n );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002900 if ( ! b )
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002901 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002902
2903 /* It's okay to grow etc. this buffer, and we should throw it
2904 * away when we're done.
2905 */
2906 b->yy_is_our_buffer = 1;
2907
2908 return b;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002909}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002910
2911#ifndef YY_EXIT_FAILURE
2912#define YY_EXIT_FAILURE 2
2913#endif
2914
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002915static void yy_fatal_error (yyconst char* msg )
2916{
2917 (void) fprintf( stderr, "%s\n", msg );
Reid Spencer68a24bd2005-08-27 18:50:39 +00002918 exit( YY_EXIT_FAILURE );
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002919}
Reid Spencer68a24bd2005-08-27 18:50:39 +00002920
2921/* Redefine yyless() so it works in section 3 code. */
2922
2923#undef yyless
2924#define yyless(n) \
2925 do \
2926 { \
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002927 /* Undo effects of setting up llvmAsmtext. */ \
2928 int yyless_macro_arg = (n); \
2929 YY_LESS_LINENO(yyless_macro_arg);\
2930 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \
2931 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \
2932 (yy_hold_char) = *(yy_c_buf_p); \
2933 *(yy_c_buf_p) = '\0'; \
2934 llvmAsmleng = yyless_macro_arg; \
Reid Spencer68a24bd2005-08-27 18:50:39 +00002935 } \
2936 while ( 0 )
2937
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002938/* Accessor methods (get/set functions) to struct members. */
Reid Spencer68a24bd2005-08-27 18:50:39 +00002939
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00002940/** Get the current line number.
2941 *
2942 */
2943int llvmAsmget_lineno (void)
2944{
2945
2946 return llvmAsmlineno;
2947}
2948
2949/** Get the input stream.
2950 *
2951 */
2952FILE *llvmAsmget_in (void)
2953{
2954 return llvmAsmin;
2955}
2956
2957/** Get the output stream.
2958 *
2959 */
2960FILE *llvmAsmget_out (void)
2961{
2962 return llvmAsmout;
2963}
2964
2965/** Get the length of the current token.
2966 *
2967 */
2968int llvmAsmget_leng (void)
2969{
2970 return llvmAsmleng;
2971}
2972
2973/** Get the current token.
2974 *
2975 */
2976
2977char *llvmAsmget_text (void)
2978{
2979 return llvmAsmtext;
2980}
2981
2982/** Set the current line number.
2983 * @param line_number
2984 *
2985 */
2986void llvmAsmset_lineno (int line_number )
2987{
2988
2989 llvmAsmlineno = line_number;
2990}
2991
2992/** Set the input stream. This does not discard the current
2993 * input buffer.
2994 * @param in_str A readable stream.
2995 *
2996 * @see llvmAsm_switch_to_buffer
2997 */
2998void llvmAsmset_in (FILE * in_str )
2999{
3000 llvmAsmin = in_str ;
3001}
3002
3003void llvmAsmset_out (FILE * out_str )
3004{
3005 llvmAsmout = out_str ;
3006}
3007
3008int llvmAsmget_debug (void)
3009{
3010 return llvmAsm_flex_debug;
3011}
3012
3013void llvmAsmset_debug (int bdebug )
3014{
3015 llvmAsm_flex_debug = bdebug ;
3016}
3017
3018static int yy_init_globals (void)
3019{
3020 /* Initialization is the same as for the non-reentrant scanner.
3021 * This function is called from llvmAsmlex_destroy(), so don't allocate here.
3022 */
3023
3024 /* We do not touch llvmAsmlineno unless the option is enabled. */
3025 llvmAsmlineno = 1;
3026
3027 (yy_buffer_stack) = 0;
3028 (yy_buffer_stack_top) = 0;
3029 (yy_buffer_stack_max) = 0;
3030 (yy_c_buf_p) = (char *) 0;
3031 (yy_init) = 0;
3032 (yy_start) = 0;
3033
3034/* Defined in main.c */
3035#ifdef YY_STDINIT
3036 llvmAsmin = stdin;
3037 llvmAsmout = stdout;
3038#else
3039 llvmAsmin = (FILE *) 0;
3040 llvmAsmout = (FILE *) 0;
3041#endif
3042
3043 /* For future reference: Set errno on error, since we are called by
3044 * llvmAsmlex_init()
3045 */
3046 return 0;
3047}
3048
3049/* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */
3050int llvmAsmlex_destroy (void)
3051{
3052
3053 /* Pop the buffer stack, destroying each element. */
3054 while(YY_CURRENT_BUFFER){
3055 llvmAsm_delete_buffer(YY_CURRENT_BUFFER );
3056 YY_CURRENT_BUFFER_LVALUE = NULL;
3057 llvmAsmpop_buffer_state();
3058 }
3059
3060 /* Destroy the stack itself. */
3061 llvmAsmfree((yy_buffer_stack) );
3062 (yy_buffer_stack) = NULL;
3063
3064 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3065 * llvmAsmlex() is called, initialization will occur. */
3066 yy_init_globals( );
3067
3068 return 0;
3069}
3070
3071/*
3072 * Internal utility routines.
3073 */
Reid Spencer68a24bd2005-08-27 18:50:39 +00003074
3075#ifndef yytext_ptr
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003076static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3077{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003078 register int i;
3079 for ( i = 0; i < n; ++i )
3080 s1[i] = s2[i];
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003081}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003082#endif
3083
3084#ifdef YY_NEED_STRLEN
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003085static int yy_flex_strlen (yyconst char * s )
3086{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003087 register int n;
3088 for ( n = 0; s[n]; ++n )
3089 ;
3090
3091 return n;
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003092}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003093#endif
3094
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003095void *llvmAsmalloc (yy_size_t size )
3096{
Reid Spencer9c9b63a2007-04-28 16:07:31 +00003097 return (void *) malloc( size );
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003098}
Reid Spencer9c9b63a2007-04-28 16:07:31 +00003099
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003100void *llvmAsmrealloc (void * ptr, yy_size_t size )
3101{
Reid Spencer68a24bd2005-08-27 18:50:39 +00003102 /* The cast to (char *) in the following accommodates both
3103 * implementations that use char* generic pointers, and those
3104 * that use void* generic pointers. It works with the latter
3105 * because both ANSI C and C++ allow castless assignment from
3106 * any pointer type to void*, and deal with argument conversions
3107 * as though doing an assignment.
3108 */
3109 return (void *) realloc( (char *) ptr, size );
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003110}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003111
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003112void llvmAsmfree (void * ptr )
3113{
3114 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */
3115}
Reid Spencer68a24bd2005-08-27 18:50:39 +00003116
Anton Korobeynikovf52e6082007-04-29 18:38:24 +00003117#define YYTABLES_NAME "yytables"
3118
3119#line 445 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l"
3120
3121
Chris Lattner2fecc0f2006-02-15 07:02:59 +00003122