blob: 9fe1d291a816d899e62ddb8ecee4fafc8afb08d9 [file] [log] [blame]
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001#line 2 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00002
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003#line 4 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00004
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00005#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
Reid Spencere7c3c602006-11-30 06:36:44 +00008
9#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000012#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
Reid Spencere7c3c602006-11-30 06:36:44 +000016
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000017/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
Reid Spencere7c3c602006-11-30 06:36:44 +000020#include <stdio.h>
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000021#include <string.h>
22#include <errno.h>
Reid Spencere7c3c602006-11-30 06:36:44 +000023#include <stdlib.h>
24
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +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 Spencere7c3c602006-11-30 06:36:44 +000091
92/* The "const" storage-class-modifier is valid. */
93#define YY_USE_CONST
94
95#else /* ! __cplusplus */
96
97#if __STDC__
98
Reid Spencere7c3c602006-11-30 06:36:44 +000099#define YY_USE_CONST
100
101#endif /* __STDC__ */
102#endif /* ! __cplusplus */
103
Reid Spencere7c3c602006-11-30 06:36:44 +0000104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000124#define BEGIN (yy_start) = 1 + 2 *
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000130#define YY_START (((yy_start) - 1) / 2)
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000137#define YY_NEW_FILE Upgraderestart(Upgradein )
Reid Spencere7c3c602006-11-30 06:36:44 +0000138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000142#ifndef YY_BUF_SIZE
Reid Spencere7c3c602006-11-30 06:36:44 +0000143#define YY_BUF_SIZE (16384*64)
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000144#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000145
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +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 Spencere7c3c602006-11-30 06:36:44 +0000152typedef struct yy_buffer_state *YY_BUFFER_STATE;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000153#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000154
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000155extern int Upgradeleng;
156
157extern FILE *Upgradein, *Upgradeout;
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +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 Upgradelex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-Upgradelineno 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 < Upgradeleng; ++yyl )\
174 if ( Upgradetext[yyl] == '\n' )\
175 --Upgradelineno;\
176 }while(0)
177
178/* Return all but the first "n" matched characters back to the input stream. */
Reid Spencere7c3c602006-11-30 06:36:44 +0000179#define yyless(n) \
180 do \
181 { \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000182 /* Undo effects of setting up Upgradetext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
Reid Spencere7c3c602006-11-30 06:36:44 +0000186 YY_RESTORE_YY_MORE_OFFSET \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up Upgradetext again */ \
Reid Spencere7c3c602006-11-30 06:36:44 +0000189 } \
190 while ( 0 )
191
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Reid Spencere7c3c602006-11-30 06:36:44 +0000193
194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000198
199#ifndef YY_TYPEDEF_YY_SIZE_T
200#define YY_TYPEDEF_YY_SIZE_T
Reid Spencere7c3c602006-11-30 06:36:44 +0000201typedef unsigned int yy_size_t;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000202#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000203
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000251
Reid Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000261 * (via Upgraderestart()), so that the user can continue scanning by
262 * just pointing Upgradein at a new input file.
Reid Spencere7c3c602006-11-30 06:36:44 +0000263 */
264#define YY_BUFFER_EOF_PENDING 2
Reid Spencere7c3c602006-11-30 06:36:44 +0000265
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +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 Spencere7c3c602006-11-30 06:36:44 +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 Korobeynikov9adeaa22007-01-28 13:37:39 +0000277 *
278 * Returns the top of the stack, or NULL.
Reid Spencere7c3c602006-11-30 06:36:44 +0000279 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
Reid Spencere7c3c602006-11-30 06:36:44 +0000283
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +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 Spencere7c3c602006-11-30 06:36:44 +0000288
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000289/* yy_hold_char holds the character lost when Upgradetext is formed. */
Reid Spencere7c3c602006-11-30 06:36:44 +0000290static char yy_hold_char;
Reid Spencere7c3c602006-11-30 06:36:44 +0000291static int yy_n_chars; /* number of characters read into yy_ch_buf */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000292int Upgradeleng;
Reid Spencere7c3c602006-11-30 06:36:44 +0000293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = (char *) 0;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000296static int yy_init = 0; /* whether we need to initialize */
Reid Spencere7c3c602006-11-30 06:36:44 +0000297static int yy_start = 0; /* start state number */
298
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000299/* Flag which is used to allow Upgradewrap()'s to do buffer switches
300 * instead of setting up a fresh Upgradein. A bit of a hack ...
Reid Spencere7c3c602006-11-30 06:36:44 +0000301 */
302static int yy_did_buffer_switch_on_eof;
303
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000304void Upgraderestart (FILE *input_file );
305void Upgrade_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306YY_BUFFER_STATE Upgrade_create_buffer (FILE *file,int size );
307void Upgrade_delete_buffer (YY_BUFFER_STATE b );
308void Upgrade_flush_buffer (YY_BUFFER_STATE b );
309void Upgradepush_buffer_state (YY_BUFFER_STATE new_buffer );
310void Upgradepop_buffer_state (void );
Reid Spencere7c3c602006-11-30 06:36:44 +0000311
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000312static void Upgradeensure_buffer_stack (void );
313static void Upgrade_load_buffer_state (void );
314static void Upgrade_init_buffer (YY_BUFFER_STATE b,FILE *file );
Reid Spencere7c3c602006-11-30 06:36:44 +0000315
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000316#define YY_FLUSH_BUFFER Upgrade_flush_buffer(YY_CURRENT_BUFFER )
Reid Spencere7c3c602006-11-30 06:36:44 +0000317
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000318YY_BUFFER_STATE Upgrade_scan_buffer (char *base,yy_size_t size );
319YY_BUFFER_STATE Upgrade_scan_string (yyconst char *yy_str );
320YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char *bytes,int len );
Reid Spencere7c3c602006-11-30 06:36:44 +0000321
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000322void *Upgradealloc (yy_size_t );
323void *Upgraderealloc (void *,yy_size_t );
324void Upgradefree (void * );
325
326#define yy_new_buffer Upgrade_create_buffer
Reid Spencere7c3c602006-11-30 06:36:44 +0000327
328#define yy_set_interactive(is_interactive) \
329 { \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000330 if ( ! YY_CURRENT_BUFFER ){ \
331 Upgradeensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Reid Spencere7c3c602006-11-30 06:36:44 +0000336 }
337
338#define yy_set_bol(at_bol) \
339 { \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000340 if ( ! YY_CURRENT_BUFFER ){\
341 Upgradeensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE ); \
344 } \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Reid Spencere7c3c602006-11-30 06:36:44 +0000346 }
347
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Reid Spencere7c3c602006-11-30 06:36:44 +0000349
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000350/* Begin user sect3 */
Reid Spencere7c3c602006-11-30 06:36:44 +0000351
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000352#define Upgradewrap(n) 1
Reid Spencere7c3c602006-11-30 06:36:44 +0000353#define YY_SKIP_YYWRAP
Reid Spencere7c3c602006-11-30 06:36:44 +0000354
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000355typedef unsigned char YY_CHAR;
356
357FILE *Upgradein = (FILE *) 0, *Upgradeout = (FILE *) 0;
358
359typedef int yy_state_type;
360
361extern int Upgradelineno;
362
363int Upgradelineno = 1;
364
365extern char *Upgradetext;
366#define yytext_ptr Upgradetext
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 Spencere7c3c602006-11-30 06:36:44 +0000372
373/* Done after the current pattern has been matched and before the
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000374 * corresponding action - sets up Upgradetext.
Reid Spencere7c3c602006-11-30 06:36:44 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000377 (yytext_ptr) = yy_bp; \
378 Upgradeleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
Reid Spencere7c3c602006-11-30 06:36:44 +0000380 *yy_cp = '\0'; \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000381 (yy_c_buf_p) = yy_cp;
Reid Spencere7c3c602006-11-30 06:36:44 +0000382
Reid Spencer950bf602007-01-26 08:19:09 +0000383#define YY_NUM_RULES 156
384#define YY_END_OF_BUFFER 157
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000385/* This struct is not used in this scanner,
386 but its presence is necessary. */
387struct yy_trans_info
388 {
389 flex_int32_t yy_verify;
390 flex_int32_t yy_nxt;
391 };
392static yyconst flex_int16_t yy_accept[610] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000393 { 0,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000394 0, 0, 157, 155, 154, 154, 155, 155, 155, 155,
395 155, 155, 147, 147, 1, 155, 155, 155, 155, 155,
396 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
397 155, 155, 155, 155, 155, 155, 0, 146, 0, 144,
398 143, 143, 150, 0, 148, 0, 152, 147, 0, 1,
399 0, 0, 0, 0, 0, 0, 0, 0, 129, 0,
400 41, 0, 0, 0, 0, 0, 0, 0, 0, 85,
401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
403 0, 0, 0, 0, 0, 0, 0, 75, 0, 0,
Reid Spencere7c3c602006-11-30 06:36:44 +0000404
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,
407 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
408 0, 0, 0, 146, 143, 143, 152, 20, 152, 0,
409 153, 63, 0, 0, 74, 0, 0, 39, 0, 34,
410 0, 0, 0, 0, 42, 0, 0, 0, 0, 0,
411 0, 66, 0, 0, 3, 0, 0, 0, 0, 0,
412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
413 52, 0, 0, 0, 0, 0, 0, 0, 0, 0,
414 65, 25, 0, 95, 100, 98, 99, 97, 96, 0,
Reid Spencere7c3c602006-11-30 06:36:44 +0000415
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000416 101, 105, 0, 0, 70, 128, 0, 0, 0, 0,
417 0, 0, 0, 90, 88, 121, 0, 122, 0, 0,
418 0, 89, 87, 0, 0, 64, 0, 0, 0, 0,
419 0, 0, 0, 0, 103, 94, 92, 0, 0, 93,
420 0, 91, 0, 104, 0, 102, 0, 0, 0, 0,
421 0, 0, 0, 0, 0, 0, 0, 76, 0, 0,
422 145, 152, 0, 0, 0, 152, 0, 0, 0, 124,
423 0, 0, 57, 106, 107, 0, 0, 0, 0, 0,
424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
425 84, 69, 0, 0, 0, 0, 136, 73, 0, 0,
426
427 83, 0, 0, 0, 0, 0, 0, 0, 0, 137,
428 54, 123, 0, 0, 22, 0, 0, 0, 149, 0,
429 68, 0, 0, 0, 0, 0, 0, 110, 0, 0,
430 0, 0, 72, 0, 0, 26, 0, 0, 4, 0,
431 61, 0, 67, 53, 0, 0, 0, 0, 0, 0,
432 71, 0, 0, 0, 0, 56, 0, 11, 0, 0,
433 109, 152, 36, 0, 0, 2, 0, 0, 0, 0,
434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
435 5, 0, 58, 112, 0, 0, 0, 0, 0, 0,
436 0, 0, 0, 0, 60, 0, 0, 0, 0, 0,
437
438 0, 0, 48, 0, 0, 78, 82, 80, 81, 79,
439 77, 50, 0, 0, 0, 138, 0, 0, 0, 108,
440 49, 0, 55, 21, 0, 0, 0, 0, 0, 126,
441 0, 0, 0, 0, 0, 135, 0, 0, 45, 0,
442 0, 0, 0, 0, 0, 0, 59, 30, 24, 0,
443 0, 44, 114, 113, 0, 0, 7, 0, 0, 0,
444 0, 131, 0, 33, 134, 38, 62, 0, 0, 0,
445 120, 0, 0, 116, 130, 27, 28, 115, 0, 0,
446 132, 51, 127, 125, 0, 0, 0, 0, 0, 119,
447 0, 43, 0, 6, 29, 0, 0, 0, 0, 0,
448
449 111, 0, 0, 0, 0, 0, 0, 0, 0, 37,
450 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
451 0, 0, 0, 0, 17, 0, 0, 0, 0, 9,
452 118, 10, 0, 117, 0, 0, 0, 0, 35, 0,
453 0, 0, 12, 0, 14, 13, 0, 0, 0, 0,
454 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
455 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
456 0, 0, 0, 15, 0, 0, 0, 0, 31, 0,
457 0, 133, 0, 0, 0, 0, 0, 0, 0, 0,
458 0, 0, 0, 0, 0, 139, 0, 141, 142, 16,
459
460 0, 46, 0, 140, 18, 47, 0, 19, 0
Reid Spencere7c3c602006-11-30 06:36:44 +0000461 } ;
462
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000463static yyconst flex_int32_t yy_ec[256] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000464 { 0,
465 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
466 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
468 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
Reid Spencer950bf602007-01-26 08:19:09 +0000469 1, 1, 7, 1, 8, 9, 1, 10, 11, 11,
470 11, 11, 11, 12, 11, 13, 11, 14, 15, 1,
471 1, 1, 1, 1, 16, 16, 16, 16, 17, 16,
Reid Spencere7c3c602006-11-30 06:36:44 +0000472 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
473 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
Reid Spencer950bf602007-01-26 08:19:09 +0000474 1, 1, 1, 1, 18, 1, 19, 20, 21, 22,
Reid Spencere7c3c602006-11-30 06:36:44 +0000475
Reid Spencer950bf602007-01-26 08:19:09 +0000476 23, 24, 25, 26, 27, 5, 28, 29, 30, 31,
477 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
478 42, 43, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencere7c3c602006-11-30 06:36:44 +0000479 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
486
487 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
488 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
489 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
490 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
491 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
492 1, 1, 1, 1, 1
493 } ;
494
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000495static yyconst flex_int32_t yy_meta[44] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000496 { 0,
Reid Spencer950bf602007-01-26 08:19:09 +0000497 1, 1, 2, 1, 3, 1, 1, 3, 3, 3,
498 3, 3, 3, 4, 1, 3, 3, 3, 3, 3,
Reid Spencere7c3c602006-11-30 06:36:44 +0000499 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
Reid Spencer950bf602007-01-26 08:19:09 +0000500 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
501 3, 3, 3
Reid Spencere7c3c602006-11-30 06:36:44 +0000502 } ;
503
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000504static yyconst flex_int16_t yy_base[615] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000505 { 0,
Reid Spencer950bf602007-01-26 08:19:09 +0000506 0, 0, 1308, 1309, 1309, 1309, 1303, 1292, 36, 40,
507 44, 50, 56, 62, 0, 63, 66, 81, 89, 47,
508 108, 91, 105, 96, 119, 117, 144, 128, 68, 170,
509 169, 202, 92, 111, 131, 125, 1301, 1309, 1290, 1309,
510 0, 207, 229, 234, 239, 70, 244, 259, 264, 0,
511 139, 145, 142, 76, 136, 156, 157, 31, 1289, 162,
512 164, 192, 48, 172, 268, 175, 173, 221, 212, 1288,
513 276, 278, 138, 186, 72, 279, 277, 280, 289, 249,
514 282, 290, 216, 281, 291, 189, 294, 284, 295, 1287,
515 297, 306, 73, 305, 316, 317, 246, 311, 318, 322,
Reid Spencere7c3c602006-11-30 06:36:44 +0000516
Reid Spencer950bf602007-01-26 08:19:09 +0000517 323, 324, 327, 329, 330, 338, 332, 348, 350, 333,
518 337, 334, 362, 336, 364, 1286, 367, 351, 359, 371,
519 374, 379, 375, 381, 405, 386, 389, 403, 396, 378,
520 250, 376, 400, 1285, 0, 436, 440, 1284, 454, 471,
521 0, 1283, 382, 406, 1282, 410, 425, 1281, 415, 1280,
522 422, 430, 440, 456, 1279, 458, 459, 473, 412, 447,
523 460, 1278, 474, 442, 472, 477, 480, 476, 461, 478,
524 416, 488, 490, 491, 494, 495, 496, 492, 499, 506,
525 507, 500, 513, 505, 508, 520, 521, 523, 524, 525,
526 1277, 1276, 526, 1275, 1274, 1273, 1272, 1271, 1270, 527,
Reid Spencere7c3c602006-11-30 06:36:44 +0000527
Reid Spencer950bf602007-01-26 08:19:09 +0000528 1269, 1268, 529, 533, 1267, 1266, 561, 538, 537, 542,
529 534, 572, 550, 1265, 1264, 1263, 553, 1262, 535, 575,
530 536, 1261, 1260, 576, 577, 1259, 555, 579, 540, 580,
531 586, 582, 585, 588, 1258, 1257, 1256, 593, 596, 1255,
532 590, 1254, 597, 1253, 600, 1252, 601, 602, 604, 605,
533 619, 609, 612, 618, 622, 611, 214, 1251, 628, 629,
534 1309, 635, 643, 651, 657, 662, 651, 663, 664, 1250,
535 665, 666, 1249, 1248, 1247, 667, 669, 672, 673, 675,
536 676, 677, 678, 683, 679, 686, 685, 691, 690, 693,
537 1246, 1245, 687, 697, 701, 702, 1244, 1243, 703, 707,
Reid Spencere7c3c602006-11-30 06:36:44 +0000538
Reid Spencer950bf602007-01-26 08:19:09 +0000539 1242, 708, 709, 711, 713, 714, 719, 715, 721, 1241,
540 1240, 1239, 722, 724, 1238, 727, 729, 735, 0, 737,
541 1237, 741, 738, 742, 747, 748, 749, 1236, 743, 635,
542 750, 755, 1235, 760, 761, 1234, 763, 764, 1233, 767,
543 1232, 773, 1231, 1230, 775, 776, 778, 777, 781, 780,
544 1229, 783, 784, 789, 791, 1228, 792, 1227, 798, 793,
545 1226, 813, 1225, 794, 795, 1224, 801, 807, 816, 817,
546 822, 813, 796, 819, 825, 826, 828, 829, 830, 832,
547 1223, 833, 1222, 1221, 836, 837, 831, 842, 841, 843,
548 846, 853, 854, 855, 1220, 857, 858, 861, 862, 863,
Reid Spencere7c3c602006-11-30 06:36:44 +0000549
Reid Spencer950bf602007-01-26 08:19:09 +0000550 866, 865, 1219, 876, 860, 1218, 1217, 1216, 1215, 1214,
551 1213, 1212, 877, 879, 880, 1211, 881, 882, 886, 1210,
552 1209, 884, 1208, 1207, 885, 890, 888, 887, 891, 1206,
553 898, 900, 901, 904, 907, 1205, 909, 911, 1204, 912,
554 916, 716, 917, 914, 915, 919, 1203, 1202, 1201, 935,
555 918, 1200, 1199, 1198, 925, 928, 1197, 938, 942, 943,
556 930, 1196, 945, 1195, 1194, 1193, 1192, 946, 949, 954,
557 1191, 950, 955, 1190, 1189, 1188, 1187, 1186, 956, 958,
558 1185, 1184, 1183, 1182, 957, 960, 968, 961, 962, 1181,
559 963, 1180, 973, 1179, 1178, 964, 975, 977, 978, 980,
Reid Spencere7c3c602006-11-30 06:36:44 +0000560
Reid Spencer950bf602007-01-26 08:19:09 +0000561 1177, 981, 983, 984, 987, 988, 992, 994, 995, 1176,
562 997, 998, 1005, 1006, 1004, 1008, 1012, 1014, 920, 1175,
563 1015, 1017, 1020, 1021, 1174, 1023, 1024, 1025, 1026, 1171,
564 1162, 1160, 1029, 1159, 1027, 1044, 1032, 1028, 1158, 1045,
565 1049, 1033, 1157, 1050, 1155, 1154, 1053, 1055, 1056, 1057,
566 1059, 1060, 1061, 1063, 1065, 1066, 1067, 1069, 1071, 1152,
567 1074, 1077, 1080, 1082, 1083, 1085, 1087, 1148, 1090, 1091,
568 1096, 1097, 1098, 1147, 1095, 1101, 1102, 1103, 1145, 1107,
569 1108, 1140, 1106, 1109, 1114, 1118, 1122, 1123, 1126, 1129,
570 1128, 1130, 1131, 1132, 1133, 1070, 1134, 643, 552, 548,
Reid Spencer229e9362006-12-02 22:14:11 +0000571
Reid Spencer950bf602007-01-26 08:19:09 +0000572 1139, 444, 1144, 360, 285, 252, 1142, 133, 1309, 1177,
573 1179, 143, 1183, 57
Reid Spencere7c3c602006-11-30 06:36:44 +0000574 } ;
575
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000576static yyconst flex_int16_t yy_def[615] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000577 { 0,
Reid Spencer950bf602007-01-26 08:19:09 +0000578 609, 1, 609, 609, 609, 609, 610, 611, 612, 609,
579 611, 611, 611, 611, 613, 611, 611, 611, 611, 611,
580 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
581 611, 611, 611, 611, 611, 611, 610, 609, 611, 609,
582 614, 614, 609, 609, 611, 611, 611, 611, 611, 613,
583 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
584 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
585 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
586 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
587 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencere7c3c602006-11-30 06:36:44 +0000588
Reid Spencer950bf602007-01-26 08:19:09 +0000589 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
590 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
591 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
592 611, 611, 611, 609, 614, 614, 609, 611, 611, 611,
593 49, 611, 611, 611, 611, 611, 611, 611, 611, 611,
594 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
595 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
596 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
597 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
598 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencere7c3c602006-11-30 06:36:44 +0000599
Reid Spencer950bf602007-01-26 08:19:09 +0000600 611, 611, 611, 611, 611, 611, 49, 611, 611, 611,
601 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
602 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
603 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
604 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
605 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
606 609, 609, 609, 609, 611, 611, 611, 611, 611, 611,
607 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
608 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
609 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencere7c3c602006-11-30 06:36:44 +0000610
Reid Spencer950bf602007-01-26 08:19:09 +0000611 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
612 611, 611, 611, 611, 611, 611, 611, 611, 207, 611,
613 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
614 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
615 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
616 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
617 611, 609, 611, 611, 611, 611, 611, 611, 611, 611,
618 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
619 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
620 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencere7c3c602006-11-30 06:36:44 +0000621
Reid Spencer950bf602007-01-26 08:19:09 +0000622 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
623 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
624 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
625 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
626 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
627 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
628 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
629 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
630 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
631 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencere7c3c602006-11-30 06:36:44 +0000632
Reid Spencer950bf602007-01-26 08:19:09 +0000633 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
634 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
635 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
636 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
637 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
638 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
639 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
640 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
641 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
642 611, 611, 611, 611, 611, 611, 611, 611, 611, 611,
Reid Spencer229e9362006-12-02 22:14:11 +0000643
Reid Spencer950bf602007-01-26 08:19:09 +0000644 611, 611, 611, 611, 611, 611, 611, 611, 0, 609,
645 609, 609, 609, 609
Reid Spencere7c3c602006-11-30 06:36:44 +0000646 } ;
647
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000648static yyconst flex_int16_t yy_nxt[1353] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000649 { 0,
650 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Reid Spencer950bf602007-01-26 08:19:09 +0000651 14, 14, 14, 4, 15, 8, 8, 8, 16, 17,
652 18, 19, 20, 21, 22, 8, 23, 8, 24, 25,
653 26, 27, 28, 8, 29, 30, 31, 32, 33, 34,
654 35, 8, 36, 42, 40, 43, 43, 43, 43, 44,
655 44, 44, 44, 45, 45, 45, 45, 40, 46, 135,
656 40, 40, 152, 40, 47, 48, 48, 48, 48, 40,
657 47, 48, 48, 48, 48, 40, 40, 69, 138, 40,
658 70, 40, 158, 40, 51, 40, 40, 71, 56, 40,
659 102, 52, 57, 53, 40, 54, 49, 58, 55, 60,
Reid Spencere7c3c602006-11-30 06:36:44 +0000660
Reid Spencer950bf602007-01-26 08:19:09 +0000661 59, 61, 40, 172, 40, 40, 194, 64, 146, 40,
662 128, 65, 62, 78, 83, 66, 63, 67, 40, 79,
663 68, 40, 84, 129, 40, 80, 72, 85, 73, 74,
664 40, 86, 40, 130, 81, 82, 75, 87, 40, 90,
665 76, 40, 77, 131, 40, 41, 40, 133, 91, 40,
666 88, 40, 40, 99, 92, 40, 89, 40, 40, 100,
667 142, 147, 132, 145, 101, 148, 93, 170, 94, 40,
668 40, 143, 95, 144, 96, 40, 97, 40, 98, 103,
669 149, 150, 40, 40, 155, 40, 40, 115, 40, 104,
670 153, 105, 106, 151, 107, 108, 109, 154, 110, 40,
Reid Spencere7c3c602006-11-30 06:36:44 +0000671
Reid Spencer950bf602007-01-26 08:19:09 +0000672 116, 163, 40, 117, 111, 40, 112, 113, 159, 114,
673 118, 103, 171, 162, 188, 40, 136, 136, 136, 136,
674 156, 119, 157, 120, 121, 40, 122, 40, 123, 40,
675 124, 359, 125, 165, 40, 183, 126, 127, 43, 43,
676 43, 43, 137, 44, 44, 44, 44, 47, 45, 45,
677 45, 45, 40, 139, 139, 139, 139, 40, 164, 40,
678 140, 257, 40, 40, 200, 40, 140, 47, 48, 48,
679 48, 48, 40, 141, 141, 141, 141, 40, 178, 141,
680 141, 40, 141, 141, 141, 141, 141, 141, 160, 40,
681 40, 40, 40, 40, 40, 40, 166, 40, 40, 175,
Reid Spencere7c3c602006-11-30 06:36:44 +0000682
Reid Spencer950bf602007-01-26 08:19:09 +0000683 161, 173, 40, 40, 40, 190, 168, 40, 40, 186,
684 40, 184, 167, 169, 179, 174, 176, 185, 40, 40,
685 177, 187, 189, 191, 40, 180, 181, 195, 182, 40,
686 40, 40, 201, 192, 193, 40, 40, 40, 197, 199,
687 40, 196, 40, 40, 202, 40, 40, 40, 203, 40,
688 40, 40, 198, 205, 214, 222, 209, 204, 210, 224,
689 206, 40, 227, 40, 40, 225, 211, 207, 215, 223,
690 208, 220, 40, 40, 212, 40, 216, 40, 213, 217,
691 40, 226, 218, 232, 40, 219, 221, 40, 40, 40,
692 228, 40, 40, 230, 40, 40, 256, 234, 229, 40,
Reid Spencere7c3c602006-11-30 06:36:44 +0000693
Reid Spencer950bf602007-01-26 08:19:09 +0000694 233, 236, 40, 240, 231, 238, 267, 235, 249, 40,
695 258, 239, 241, 40, 250, 237, 40, 242, 40, 40,
696 251, 252, 254, 40, 255, 40, 243, 244, 40, 40,
697 279, 245, 269, 253, 259, 40, 246, 268, 40, 247,
698 260, 271, 272, 40, 248, 136, 136, 136, 136, 262,
699 262, 262, 262, 40, 292, 40, 263, 40, 273, 270,
700 40, 284, 263, 139, 139, 139, 139, 40, 274, 40,
701 140, 40, 40, 40, 40, 280, 140, 264, 265, 276,
702 266, 266, 266, 266, 40, 40, 40, 40, 281, 40,
703 40, 40, 275, 40, 277, 278, 282, 290, 285, 286,
Reid Spencere7c3c602006-11-30 06:36:44 +0000704
Reid Spencer950bf602007-01-26 08:19:09 +0000705 283, 40, 287, 40, 40, 40, 293, 40, 40, 40,
706 291, 289, 40, 40, 288, 300, 297, 299, 40, 40,
707 40, 40, 295, 298, 301, 296, 40, 302, 303, 304,
708 294, 306, 308, 40, 40, 307, 40, 40, 40, 40,
709 40, 310, 40, 305, 309, 311, 40, 40, 40, 40,
710 40, 40, 313, 40, 315, 40, 323, 312, 330, 317,
711 316, 40, 314, 40, 337, 40, 40, 332, 40, 318,
712 319, 319, 319, 319, 320, 321, 319, 319, 322, 319,
713 319, 319, 319, 319, 319, 40, 328, 329, 40, 40,
714 40, 335, 40, 40, 324, 40, 325, 331, 40, 40,
Reid Spencere7c3c602006-11-30 06:36:44 +0000715
Reid Spencer950bf602007-01-26 08:19:09 +0000716 326, 40, 327, 40, 341, 333, 40, 336, 339, 40,
717 40, 334, 338, 40, 40, 40, 340, 40, 40, 347,
718 346, 342, 40, 349, 40, 40, 343, 345, 350, 344,
719 348, 40, 40, 351, 355, 40, 352, 353, 358, 356,
720 357, 40, 40, 354, 262, 262, 262, 262, 40, 264,
721 264, 263, 362, 362, 362, 362, 40, 263, 413, 360,
722 362, 362, 362, 362, 40, 361, 266, 266, 266, 266,
723 40, 266, 266, 266, 266, 40, 40, 40, 40, 40,
724 40, 363, 40, 364, 367, 40, 40, 368, 40, 40,
725 40, 40, 40, 372, 365, 366, 40, 377, 40, 40,
Reid Spencere7c3c602006-11-30 06:36:44 +0000726
Reid Spencer950bf602007-01-26 08:19:09 +0000727 40, 371, 373, 40, 40, 369, 40, 375, 370, 380,
728 40, 376, 381, 382, 40, 40, 40, 374, 378, 379,
729 40, 40, 40, 383, 40, 389, 40, 40, 40, 40,
730 390, 388, 40, 384, 40, 40, 385, 40, 386, 387,
731 40, 394, 40, 391, 393, 392, 396, 395, 40, 397,
732 40, 40, 399, 398, 40, 40, 40, 493, 405, 403,
733 40, 40, 40, 40, 400, 401, 402, 404, 40, 407,
734 409, 411, 414, 40, 40, 406, 40, 40, 415, 412,
735 40, 417, 416, 408, 410, 418, 40, 420, 40, 40,
736 40, 40, 419, 40, 40, 421, 40, 40, 422, 426,
Reid Spencere7c3c602006-11-30 06:36:44 +0000737
Reid Spencer950bf602007-01-26 08:19:09 +0000738 423, 424, 40, 425, 40, 40, 40, 40, 40, 40,
739 427, 40, 436, 430, 40, 444, 437, 428, 429, 435,
740 40, 433, 362, 362, 362, 362, 40, 439, 432, 40,
741 40, 431, 40, 434, 440, 40, 438, 441, 40, 40,
742 442, 40, 40, 40, 40, 40, 40, 443, 447, 40,
743 40, 445, 451, 452, 40, 40, 40, 446, 448, 40,
744 450, 455, 453, 454, 456, 449, 40, 40, 40, 457,
745 40, 40, 458, 40, 40, 40, 40, 462, 40, 40,
746 464, 465, 459, 460, 466, 467, 461, 463, 468, 40,
747 40, 469, 40, 40, 40, 40, 471, 40, 40, 40,
Reid Spencer78720742006-12-02 20:21:22 +0000748
Reid Spencer950bf602007-01-26 08:19:09 +0000749 40, 40, 473, 40, 40, 472, 475, 470, 477, 481,
750 480, 40, 474, 40, 40, 483, 478, 40, 476, 486,
751 40, 479, 40, 482, 40, 40, 485, 40, 40, 40,
752 40, 40, 40, 40, 484, 489, 492, 488, 40, 494,
753 487, 40, 491, 40, 543, 501, 496, 490, 40, 495,
754 497, 40, 498, 499, 500, 40, 40, 502, 40, 40,
755 503, 505, 40, 40, 504, 507, 506, 40, 40, 40,
756 40, 40, 511, 40, 40, 40, 40, 40, 512, 509,
757 508, 40, 513, 514, 510, 515, 40, 518, 40, 517,
758 40, 40, 519, 40, 40, 516, 40, 40, 522, 520,
Reid Spencer78720742006-12-02 20:21:22 +0000759
Reid Spencer950bf602007-01-26 08:19:09 +0000760 40, 40, 526, 527, 521, 40, 525, 40, 40, 523,
761 40, 40, 529, 528, 532, 530, 524, 40, 40, 40,
762 536, 40, 531, 537, 538, 40, 539, 40, 40, 533,
763 40, 534, 541, 40, 40, 535, 40, 40, 40, 40,
764 40, 40, 40, 547, 540, 40, 40, 556, 551, 553,
765 542, 548, 544, 545, 549, 552, 546, 40, 40, 559,
766 555, 550, 40, 40, 554, 557, 40, 558, 40, 40,
767 40, 561, 40, 40, 40, 564, 40, 562, 40, 40,
768 40, 567, 40, 40, 40, 571, 560, 40, 565, 573,
769 40, 569, 563, 40, 570, 40, 40, 572, 40, 568,
Reid Spencer78720742006-12-02 20:21:22 +0000770
Reid Spencer950bf602007-01-26 08:19:09 +0000771 40, 574, 566, 40, 40, 578, 575, 579, 40, 40,
772 40, 40, 576, 582, 40, 40, 40, 586, 577, 40,
773 40, 40, 40, 580, 583, 584, 585, 40, 588, 593,
774 591, 40, 581, 589, 592, 40, 40, 587, 590, 40,
775 594, 40, 40, 40, 40, 40, 40, 40, 595, 600,
776 601, 602, 40, 40, 597, 40, 596, 40, 40, 606,
777 40, 40, 598, 599, 605, 40, 607, 40, 40, 604,
778 40, 40, 40, 40, 603, 40, 608, 37, 37, 37,
779 37, 39, 39, 50, 40, 50, 50, 40, 40, 40,
Reid Spencer229e9362006-12-02 22:14:11 +0000780 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
781
Reid Spencer78720742006-12-02 20:21:22 +0000782 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
783 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
784 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
785 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
786 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
787 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Reid Spencerfcb5df82006-12-01 22:34:43 +0000788 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Reid Spencere7c3c602006-11-30 06:36:44 +0000789 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
Reid Spencer950bf602007-01-26 08:19:09 +0000790 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
791 40, 40, 40, 40, 40, 40, 40, 40, 261, 40,
Reid Spencer229e9362006-12-02 22:14:11 +0000792
Reid Spencer950bf602007-01-26 08:19:09 +0000793 40, 40, 40, 40, 134, 40, 38, 609, 3, 609,
794 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
795 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
796 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
797 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
798 609, 609
Reid Spencere7c3c602006-11-30 06:36:44 +0000799 } ;
800
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000801static yyconst flex_int16_t yy_chk[1353] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000802 { 0,
803 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
804 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
805 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
806 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencer950bf602007-01-26 08:19:09 +0000807 1, 1, 1, 9, 58, 9, 9, 9, 9, 10,
808 10, 10, 10, 11, 11, 11, 11, 11, 12, 614,
809 20, 63, 58, 12, 13, 13, 13, 13, 13, 13,
810 14, 14, 14, 14, 14, 14, 16, 20, 46, 17,
811 20, 29, 63, 46, 16, 75, 93, 20, 17, 54,
812 29, 16, 17, 16, 18, 16, 13, 17, 16, 18,
Reid Spencere7c3c602006-11-30 06:36:44 +0000813
Reid Spencer950bf602007-01-26 08:19:09 +0000814 17, 18, 19, 75, 22, 33, 93, 19, 54, 24,
815 33, 19, 18, 22, 24, 19, 18, 19, 23, 22,
816 19, 21, 24, 33, 34, 23, 21, 24, 21, 21,
817 26, 24, 25, 34, 23, 23, 21, 25, 36, 26,
818 21, 28, 21, 35, 35, 612, 608, 36, 26, 55,
819 25, 73, 51, 28, 26, 53, 25, 27, 52, 28,
820 51, 55, 35, 53, 28, 55, 27, 73, 27, 56,
821 57, 52, 27, 52, 27, 60, 27, 61, 27, 30,
822 56, 57, 31, 30, 61, 64, 67, 31, 66, 30,
823 60, 30, 30, 57, 30, 30, 30, 60, 30, 74,
Reid Spencere7c3c602006-11-30 06:36:44 +0000824
Reid Spencer950bf602007-01-26 08:19:09 +0000825 31, 67, 86, 31, 30, 62, 30, 30, 64, 30,
826 31, 32, 74, 66, 86, 32, 42, 42, 42, 42,
827 62, 32, 62, 32, 32, 69, 32, 257, 32, 83,
828 32, 257, 32, 69, 68, 83, 32, 32, 43, 43,
829 43, 43, 44, 44, 44, 44, 44, 45, 45, 45,
830 45, 45, 45, 47, 47, 47, 47, 47, 68, 97,
831 47, 131, 80, 131, 97, 606, 47, 48, 48, 48,
832 48, 48, 48, 49, 49, 49, 49, 49, 80, 49,
833 49, 65, 49, 49, 49, 49, 49, 49, 65, 71,
834 77, 72, 76, 78, 84, 81, 71, 88, 605, 77,
Reid Spencere7c3c602006-11-30 06:36:44 +0000835
Reid Spencer950bf602007-01-26 08:19:09 +0000836 65, 76, 79, 82, 85, 88, 72, 87, 89, 85,
837 91, 84, 71, 72, 81, 76, 78, 84, 94, 92,
838 79, 85, 87, 89, 98, 82, 82, 94, 82, 95,
839 96, 99, 98, 91, 92, 100, 101, 102, 95, 96,
840 103, 94, 104, 105, 99, 107, 110, 112, 100, 114,
841 111, 106, 95, 102, 107, 110, 105, 101, 106, 111,
842 102, 108, 114, 109, 118, 112, 106, 103, 107, 110,
843 104, 109, 119, 604, 106, 113, 108, 115, 106, 108,
844 117, 113, 108, 118, 120, 108, 109, 121, 123, 132,
845 115, 130, 122, 117, 124, 143, 130, 120, 115, 126,
Reid Spencere7c3c602006-11-30 06:36:44 +0000846
Reid Spencer950bf602007-01-26 08:19:09 +0000847 119, 122, 127, 124, 117, 123, 143, 121, 126, 129,
848 132, 123, 124, 133, 127, 122, 128, 124, 125, 144,
849 128, 128, 129, 146, 129, 159, 125, 125, 149, 171,
850 159, 125, 146, 128, 133, 151, 125, 144, 147, 125,
851 133, 149, 151, 152, 125, 136, 136, 136, 136, 137,
852 137, 137, 137, 153, 171, 164, 137, 602, 152, 147,
853 160, 164, 137, 139, 139, 139, 139, 139, 153, 154,
854 139, 156, 157, 161, 169, 160, 139, 140, 140, 156,
855 140, 140, 140, 140, 140, 165, 158, 163, 161, 168,
856 166, 170, 154, 167, 157, 158, 163, 169, 165, 166,
Reid Spencere7c3c602006-11-30 06:36:44 +0000857
Reid Spencer950bf602007-01-26 08:19:09 +0000858 163, 172, 167, 173, 174, 178, 172, 175, 176, 177,
859 170, 168, 179, 182, 167, 177, 175, 176, 184, 180,
860 181, 185, 174, 175, 178, 174, 183, 179, 180, 181,
861 173, 182, 184, 186, 187, 183, 188, 189, 190, 193,
862 200, 186, 203, 181, 185, 187, 204, 211, 219, 221,
863 209, 208, 189, 229, 193, 210, 211, 188, 219, 203,
864 200, 600, 190, 213, 229, 599, 217, 221, 227, 204,
865 207, 207, 207, 207, 208, 209, 207, 207, 210, 207,
866 207, 207, 207, 207, 207, 212, 213, 217, 220, 224,
867 225, 227, 228, 230, 212, 232, 212, 220, 233, 231,
Reid Spencere7c3c602006-11-30 06:36:44 +0000868
Reid Spencer950bf602007-01-26 08:19:09 +0000869 212, 234, 212, 241, 232, 224, 238, 228, 231, 239,
870 243, 225, 230, 245, 247, 248, 231, 249, 250, 243,
871 241, 233, 252, 247, 256, 253, 234, 239, 248, 238,
872 245, 254, 251, 249, 253, 255, 250, 251, 256, 254,
873 255, 259, 260, 252, 262, 262, 262, 262, 330, 263,
874 263, 262, 263, 263, 263, 263, 598, 262, 330, 259,
875 264, 264, 264, 264, 267, 260, 265, 265, 265, 265,
876 265, 266, 266, 266, 266, 266, 268, 269, 271, 272,
877 276, 267, 277, 268, 272, 278, 279, 276, 280, 281,
878 282, 283, 285, 280, 269, 271, 284, 285, 287, 286,
Reid Spencere7c3c602006-11-30 06:36:44 +0000879
Reid Spencer950bf602007-01-26 08:19:09 +0000880 293, 279, 281, 289, 288, 277, 290, 283, 278, 288,
881 294, 284, 289, 290, 295, 296, 299, 282, 286, 287,
882 300, 302, 303, 293, 304, 300, 305, 306, 308, 442,
883 302, 299, 307, 294, 309, 313, 295, 314, 295, 296,
884 316, 306, 317, 303, 305, 304, 308, 307, 318, 309,
885 320, 323, 314, 313, 322, 324, 329, 442, 323, 320,
886 325, 326, 327, 331, 316, 317, 318, 322, 332, 325,
887 326, 327, 331, 334, 335, 324, 337, 338, 332, 329,
888 340, 335, 334, 325, 326, 337, 342, 340, 345, 346,
889 348, 347, 338, 350, 349, 342, 352, 353, 345, 349,
Reid Spencere7c3c602006-11-30 06:36:44 +0000890
Reid Spencer950bf602007-01-26 08:19:09 +0000891 346, 347, 354, 348, 355, 357, 360, 364, 365, 373,
892 350, 359, 364, 354, 367, 373, 365, 352, 353, 360,
893 368, 359, 362, 362, 362, 362, 372, 368, 357, 369,
894 370, 355, 374, 359, 369, 371, 367, 370, 375, 376,
895 371, 377, 378, 379, 387, 380, 382, 372, 376, 385,
896 386, 374, 380, 382, 389, 388, 390, 375, 377, 391,
897 379, 387, 385, 386, 388, 378, 392, 393, 394, 389,
898 396, 397, 390, 405, 398, 399, 400, 394, 402, 401,
899 397, 398, 391, 392, 399, 400, 393, 396, 401, 404,
900 413, 402, 414, 415, 417, 418, 405, 422, 425, 419,
Reid Spencere7c3c602006-11-30 06:36:44 +0000901
Reid Spencer950bf602007-01-26 08:19:09 +0000902 428, 427, 414, 426, 429, 413, 417, 404, 419, 427,
903 426, 431, 415, 432, 433, 429, 422, 434, 418, 433,
904 435, 425, 437, 428, 438, 440, 432, 444, 445, 441,
905 443, 451, 446, 519, 431, 437, 441, 435, 455, 443,
906 434, 456, 440, 461, 519, 455, 445, 438, 450, 444,
907 446, 458, 450, 450, 451, 459, 460, 456, 463, 468,
908 458, 460, 469, 472, 459, 463, 461, 470, 473, 479,
909 485, 480, 472, 486, 488, 489, 491, 496, 473, 469,
910 468, 487, 479, 480, 470, 485, 493, 488, 497, 487,
911 498, 499, 489, 500, 502, 486, 503, 504, 496, 491,
Reid Spencere7c3c602006-11-30 06:36:44 +0000912
Reid Spencer950bf602007-01-26 08:19:09 +0000913 505, 506, 500, 502, 493, 507, 499, 508, 509, 497,
914 511, 512, 504, 503, 507, 505, 498, 515, 513, 514,
915 512, 516, 506, 513, 514, 517, 515, 518, 521, 508,
916 522, 509, 517, 523, 524, 511, 526, 527, 528, 529,
917 535, 538, 533, 524, 516, 537, 542, 538, 529, 535,
918 518, 526, 521, 522, 527, 533, 523, 536, 540, 542,
919 537, 528, 541, 544, 536, 540, 547, 541, 548, 549,
920 550, 547, 551, 552, 553, 550, 554, 548, 555, 556,
921 557, 553, 558, 596, 559, 557, 544, 561, 551, 559,
922 562, 555, 549, 563, 556, 564, 565, 558, 566, 554,
Reid Spencere7c3c602006-11-30 06:36:44 +0000923
Reid Spencer950bf602007-01-26 08:19:09 +0000924 567, 561, 552, 569, 570, 565, 562, 566, 575, 571,
925 572, 573, 563, 570, 576, 577, 578, 575, 564, 583,
926 580, 581, 584, 567, 571, 572, 573, 585, 577, 584,
927 581, 586, 569, 578, 583, 587, 588, 576, 580, 589,
928 585, 591, 590, 592, 593, 594, 595, 597, 586, 591,
929 592, 593, 601, 582, 588, 607, 587, 603, 579, 601,
930 574, 568, 589, 590, 597, 560, 603, 546, 545, 595,
931 543, 539, 534, 532, 594, 531, 607, 610, 610, 610,
932 610, 611, 611, 613, 530, 613, 613, 525, 520, 510,
933 501, 495, 494, 492, 490, 484, 483, 482, 481, 478,
Reid Spencerfcb5df82006-12-01 22:34:43 +0000934
Reid Spencer950bf602007-01-26 08:19:09 +0000935 477, 476, 475, 474, 471, 467, 466, 465, 464, 462,
936 457, 454, 453, 452, 449, 448, 447, 439, 436, 430,
937 424, 423, 421, 420, 416, 412, 411, 410, 409, 408,
938 407, 406, 403, 395, 384, 383, 381, 366, 363, 361,
939 358, 356, 351, 344, 343, 341, 339, 336, 333, 328,
940 321, 315, 312, 311, 310, 301, 298, 297, 292, 291,
941 275, 274, 273, 270, 258, 246, 244, 242, 240, 237,
942 236, 235, 226, 223, 222, 218, 216, 215, 214, 206,
943 205, 202, 201, 199, 198, 197, 196, 195, 194, 192,
944 191, 162, 155, 150, 148, 145, 142, 138, 134, 116,
Reid Spencer229e9362006-12-02 22:14:11 +0000945
Reid Spencer950bf602007-01-26 08:19:09 +0000946 90, 70, 59, 39, 37, 8, 7, 3, 609, 609,
947 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
948 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
949 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
950 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
951 609, 609
Reid Spencere7c3c602006-11-30 06:36:44 +0000952 } ;
953
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000954/* Table of booleans, true if rule could match eol. */
955static yyconst flex_int32_t yy_rule_can_match_eol[157] =
956 { 0,
9570, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
959 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
961 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
963 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
964 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, };
965
966static yy_state_type yy_last_accepting_state;
967static char *yy_last_accepting_cpos;
968
969extern int Upgrade_flex_debug;
970int Upgrade_flex_debug = 0;
971
972/* The intent behind this definition is that it'll catch
973 * any uses of REJECT which flex missed.
974 */
975#define REJECT reject_used_but_not_detected
Reid Spencere7c3c602006-11-30 06:36:44 +0000976#define yymore() yymore_used_but_not_detected
977#define YY_MORE_ADJ 0
978#define YY_RESTORE_YY_MORE_OFFSET
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000979char *Upgradetext;
980#line 1 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer96839be2006-11-30 16:50:26 +0000981/*===-- UpgradeLexer.l - Scanner for 1.9 assembly files --------*- C++ -*--===//
Reid Spencere7c3c602006-11-30 06:36:44 +0000982//
983// The LLVM Compiler Infrastructure
984//
Reid Spencer96839be2006-11-30 16:50:26 +0000985// This file was developed by Reid Spencer and is distributed under the
986// University of Illinois Open Source License. See LICENSE.TXT for details.
Reid Spencere7c3c602006-11-30 06:36:44 +0000987//
988//===----------------------------------------------------------------------===//
989//
Reid Spencer96839be2006-11-30 16:50:26 +0000990// This file implements the flex scanner for LLVM 1.9 assembly languages files.
Reid Spencere7c3c602006-11-30 06:36:44 +0000991//
992//===----------------------------------------------------------------------===*/
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000993#line 28 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer319a7302007-01-05 17:20:02 +0000994#include "UpgradeInternals.h"
Reid Spencer950bf602007-01-26 08:19:09 +0000995#include "llvm/Module.h"
996#include <list>
Reid Spencere7c3c602006-11-30 06:36:44 +0000997#include "UpgradeParser.h"
998#include <cctype>
999#include <cstdlib>
1000
Reid Spencer96839be2006-11-30 16:50:26 +00001001#define YY_INPUT(buf,result,max_size) \
1002{ \
1003 if (LexInput->good() && !LexInput->eof()) { \
1004 LexInput->read(buf,max_size); \
1005 result = LexInput->gcount(); \
1006 } else {\
1007 result = YY_NULL; \
1008 } \
1009}
1010
Reid Spencer950bf602007-01-26 08:19:09 +00001011#define YY_NEVER_INTERACTIVE 1
Reid Spencer96839be2006-11-30 16:50:26 +00001012
Reid Spencere7c3c602006-11-30 06:36:44 +00001013// Construct a token value for a non-obsolete token
Reid Spencer950bf602007-01-26 08:19:09 +00001014#define RET_TOK(type, Enum, sym) \
1015 Upgradelval.type = Enum; \
Reid Spencere77e35e2006-12-01 20:26:20 +00001016 return sym
1017
Reid Spencer950bf602007-01-26 08:19:09 +00001018#define RET_TY(sym,NewTY,sign) \
1019 Upgradelval.PrimType.T = NewTY; \
1020 Upgradelval.PrimType.S = sign; \
Reid Spencere7c3c602006-11-30 06:36:44 +00001021 return sym
1022
Reid Spencer950bf602007-01-26 08:19:09 +00001023namespace llvm {
1024
1025// TODO: All of the static identifiers are figured out by the lexer,
1026// these should be hashed to reduce the lexer size
1027
1028// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1029// appropriate character. If AllowNull is set to false, a \00 value will cause
1030// an exception to be thrown.
1031//
1032// If AllowNull is set to true, the return value of the function points to the
1033// last character of the string in memory.
1034//
1035char *UnEscapeLexed(char *Buffer, bool AllowNull) {
1036 char *BOut = Buffer;
1037 for (char *BIn = Buffer; *BIn; ) {
1038 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1039 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1040 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1041 if (!AllowNull && !*BOut)
1042 error("String literal cannot accept \\00 escape!");
1043
1044 BIn[3] = Tmp; // Restore character
1045 BIn += 3; // Skip over handled chars
1046 ++BOut;
1047 } else {
1048 *BOut++ = *BIn++;
1049 }
1050 }
1051
1052 return BOut;
1053}
1054
1055// atoull - Convert an ascii string of decimal digits into the unsigned long
1056// long representation... this does not have to do input error checking,
1057// because we know that the input will be matched by a suitable regex...
1058//
1059static uint64_t atoull(const char *Buffer) {
1060 uint64_t Result = 0;
1061 for (; *Buffer; Buffer++) {
1062 uint64_t OldRes = Result;
1063 Result *= 10;
1064 Result += *Buffer-'0';
1065 if (Result < OldRes) // Uh, oh, overflow detected!!!
1066 error("constant bigger than 64 bits detected!");
1067 }
1068 return Result;
1069}
1070
1071static uint64_t HexIntToVal(const char *Buffer) {
1072 uint64_t Result = 0;
1073 for (; *Buffer; ++Buffer) {
1074 uint64_t OldRes = Result;
1075 Result *= 16;
1076 char C = *Buffer;
1077 if (C >= '0' && C <= '9')
1078 Result += C-'0';
1079 else if (C >= 'A' && C <= 'F')
1080 Result += C-'A'+10;
1081 else if (C >= 'a' && C <= 'f')
1082 Result += C-'a'+10;
1083
1084 if (Result < OldRes) // Uh, oh, overflow detected!!!
1085 error("constant bigger than 64 bits detected!");
1086 }
1087 return Result;
1088}
1089
1090
1091// HexToFP - Convert the ascii string in hexidecimal format to the floating
1092// point representation of it.
1093//
1094static double HexToFP(const char *Buffer) {
1095 // Behave nicely in the face of C TBAA rules... see:
1096 // http://www.nullstone.com/htmls/category/aliastyp.htm
1097 union {
1098 uint64_t UI;
1099 double FP;
1100 } UIntToFP;
1101 UIntToFP.UI = HexIntToVal(Buffer);
1102
1103 assert(sizeof(double) == sizeof(uint64_t) &&
1104 "Data sizes incompatible on this target!");
1105 return UIntToFP.FP; // Cast Hex constant to double
1106}
1107
1108
1109} // End llvm namespace
1110
1111using namespace llvm;
1112
Reid Spencere7c3c602006-11-30 06:36:44 +00001113/* Comments start with a ; and go till end of line */
1114/* Variable(Value) identifiers start with a % sign */
1115/* Label identifiers end with a colon */
1116/* Quoted names can contain any character except " and \ */
1117/* [PN]Integer: match positive and negative literal integer values that
1118 * are preceeded by a '%' character. These represent unnamed variable slots.
1119 */
1120/* E[PN]Integer: match positive and negative literal integer values */
1121/* FPConstant - A Floating point constant.
1122 */
1123/* HexFPConstant - Floating point constant represented in IEEE format as a
1124 * hexadecimal number for when exponential notation is not precise enough.
1125 */
1126/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1127 * it to deal with 64 bit numbers.
1128 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001129#line 1130 "UpgradeLexer.cpp"
1130
1131#define INITIAL 0
1132
1133#ifndef YY_NO_UNISTD_H
1134/* Special case for "unistd.h", since it is non-ANSI. We include it way
1135 * down here because we want the user's section 1 to have been scanned first.
1136 * The user has a chance to override it with an option.
1137 */
1138#include <unistd.h>
1139#endif
1140
1141#ifndef YY_EXTRA_TYPE
1142#define YY_EXTRA_TYPE void *
1143#endif
1144
1145static int yy_init_globals (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001146
1147/* Macros after this point can all be overridden by user definitions in
1148 * section 1.
1149 */
1150
1151#ifndef YY_SKIP_YYWRAP
1152#ifdef __cplusplus
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001153extern "C" int Upgradewrap (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001154#else
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001155extern int Upgradewrap (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001156#endif
1157#endif
1158
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001159 static inline void yyunput (int c,char *buf_ptr );
1160
Reid Spencere7c3c602006-11-30 06:36:44 +00001161#ifndef yytext_ptr
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001162static void yy_flex_strncpy (char *,yyconst char *,int );
Reid Spencere7c3c602006-11-30 06:36:44 +00001163#endif
1164
1165#ifdef YY_NEED_STRLEN
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001166static int yy_flex_strlen (yyconst char * );
Reid Spencere7c3c602006-11-30 06:36:44 +00001167#endif
1168
1169#ifndef YY_NO_INPUT
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001170
Reid Spencere7c3c602006-11-30 06:36:44 +00001171#ifdef __cplusplus
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001172static int yyinput (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001173#else
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001174static int input (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001175#endif
1176
Reid Spencere7c3c602006-11-30 06:36:44 +00001177#endif
1178
1179/* Amount of stuff to slurp up with each read. */
1180#ifndef YY_READ_BUF_SIZE
1181#define YY_READ_BUF_SIZE 8192
1182#endif
1183
1184/* Copy whatever the last rule matched to the standard output. */
Reid Spencere7c3c602006-11-30 06:36:44 +00001185#ifndef ECHO
1186/* This used to be an fputs(), but since the string might contain NUL's,
1187 * we now use fwrite().
1188 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001189#define ECHO (void) fwrite( Upgradetext, Upgradeleng, 1, Upgradeout )
Reid Spencere7c3c602006-11-30 06:36:44 +00001190#endif
1191
1192/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1193 * is returned in "result".
1194 */
1195#ifndef YY_INPUT
1196#define YY_INPUT(buf,result,max_size) \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001197 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001198 { \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001199 int c = '*'; \
1200 size_t n; \
Reid Spencere7c3c602006-11-30 06:36:44 +00001201 for ( n = 0; n < max_size && \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001202 (c = getc( Upgradein )) != EOF && c != '\n'; ++n ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001203 buf[n] = (char) c; \
1204 if ( c == '\n' ) \
1205 buf[n++] = (char) c; \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001206 if ( c == EOF && ferror( Upgradein ) ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001207 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1208 result = n; \
1209 } \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001210 else \
1211 { \
1212 errno=0; \
1213 while ( (result = fread(buf, 1, max_size, Upgradein))==0 && ferror(Upgradein)) \
1214 { \
1215 if( errno != EINTR) \
1216 { \
1217 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1218 break; \
1219 } \
1220 errno=0; \
1221 clearerr(Upgradein); \
1222 } \
1223 }\
1224\
1225
Reid Spencere7c3c602006-11-30 06:36:44 +00001226#endif
1227
1228/* No semi-colon after return; correct usage is to write "yyterminate();" -
1229 * we don't want an extra ';' after the "return" because that will cause
1230 * some compilers to complain about unreachable statements.
1231 */
1232#ifndef yyterminate
1233#define yyterminate() return YY_NULL
1234#endif
1235
1236/* Number of entries by which start-condition stack grows. */
1237#ifndef YY_START_STACK_INCR
1238#define YY_START_STACK_INCR 25
1239#endif
1240
1241/* Report a fatal error. */
1242#ifndef YY_FATAL_ERROR
1243#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1244#endif
1245
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001246/* end tables serialization structures and prototypes */
1247
Reid Spencere7c3c602006-11-30 06:36:44 +00001248/* Default declaration of generated scanner - a define so the user can
1249 * easily add parameters.
1250 */
1251#ifndef YY_DECL
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001252#define YY_DECL_IS_OURS 1
Reid Spencere7c3c602006-11-30 06:36:44 +00001253
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001254extern int Upgradelex (void);
1255
1256#define YY_DECL int Upgradelex (void)
1257#endif /* !YY_DECL */
1258
1259/* Code executed at the beginning of each rule, after Upgradetext and Upgradeleng
Reid Spencere7c3c602006-11-30 06:36:44 +00001260 * have been set up.
1261 */
1262#ifndef YY_USER_ACTION
1263#define YY_USER_ACTION
1264#endif
1265
1266/* Code executed at the end of each rule. */
1267#ifndef YY_BREAK
1268#define YY_BREAK break;
1269#endif
1270
1271#define YY_RULE_SETUP \
1272 YY_USER_ACTION
1273
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001274/** The main scanner function which does all the work.
1275 */
Reid Spencere7c3c602006-11-30 06:36:44 +00001276YY_DECL
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001277{
Reid Spencere7c3c602006-11-30 06:36:44 +00001278 register yy_state_type yy_current_state;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001279 register char *yy_cp, *yy_bp;
Reid Spencere7c3c602006-11-30 06:36:44 +00001280 register int yy_act;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001281
1282#line 189 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00001283
1284
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001285#line 1286 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00001286
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001287 if ( !(yy_init) )
Reid Spencere7c3c602006-11-30 06:36:44 +00001288 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001289 (yy_init) = 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00001290
1291#ifdef YY_USER_INIT
1292 YY_USER_INIT;
1293#endif
1294
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001295 if ( ! (yy_start) )
1296 (yy_start) = 1; /* first start state */
Reid Spencere7c3c602006-11-30 06:36:44 +00001297
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001298 if ( ! Upgradein )
1299 Upgradein = stdin;
Reid Spencere7c3c602006-11-30 06:36:44 +00001300
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001301 if ( ! Upgradeout )
1302 Upgradeout = stdout;
Reid Spencere7c3c602006-11-30 06:36:44 +00001303
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001304 if ( ! YY_CURRENT_BUFFER ) {
1305 Upgradeensure_buffer_stack ();
1306 YY_CURRENT_BUFFER_LVALUE =
1307 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE );
1308 }
Reid Spencere7c3c602006-11-30 06:36:44 +00001309
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001310 Upgrade_load_buffer_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00001311 }
1312
1313 while ( 1 ) /* loops until end-of-file is reached */
1314 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001315 yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00001316
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001317 /* Support of Upgradetext. */
1318 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00001319
1320 /* yy_bp points to the position in yy_ch_buf of the start of
1321 * the current run.
1322 */
1323 yy_bp = yy_cp;
1324
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001325 yy_current_state = (yy_start);
Reid Spencere7c3c602006-11-30 06:36:44 +00001326yy_match:
1327 do
1328 {
1329 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001330 if ( yy_accept[yy_current_state] )
1331 {
1332 (yy_last_accepting_state) = yy_current_state;
1333 (yy_last_accepting_cpos) = yy_cp;
1334 }
Reid Spencere7c3c602006-11-30 06:36:44 +00001335 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1336 {
1337 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer950bf602007-01-26 08:19:09 +00001338 if ( yy_current_state >= 610 )
Reid Spencere7c3c602006-11-30 06:36:44 +00001339 yy_c = yy_meta[(unsigned int) yy_c];
1340 }
1341 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencere7c3c602006-11-30 06:36:44 +00001342 ++yy_cp;
1343 }
Reid Spencer950bf602007-01-26 08:19:09 +00001344 while ( yy_current_state != 609 );
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001345 yy_cp = (yy_last_accepting_cpos);
1346 yy_current_state = (yy_last_accepting_state);
Reid Spencere7c3c602006-11-30 06:36:44 +00001347
1348yy_find_action:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001349 yy_act = yy_accept[yy_current_state];
Reid Spencere7c3c602006-11-30 06:36:44 +00001350
1351 YY_DO_BEFORE_ACTION;
1352
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001353 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Reid Spencere7c3c602006-11-30 06:36:44 +00001354 {
1355 int yyl;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001356 for ( yyl = 0; yyl < Upgradeleng; ++yyl )
1357 if ( Upgradetext[yyl] == '\n' )
1358
1359 Upgradelineno++;
1360;
Reid Spencere7c3c602006-11-30 06:36:44 +00001361 }
1362
1363do_action: /* This label is used only to access EOF actions. */
1364
Reid Spencere7c3c602006-11-30 06:36:44 +00001365 switch ( yy_act )
1366 { /* beginning of action switch */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001367 case 0: /* must back up */
1368 /* undo the effects of YY_DO_BEFORE_ACTION */
1369 *yy_cp = (yy_hold_char);
1370 yy_cp = (yy_last_accepting_cpos);
1371 yy_current_state = (yy_last_accepting_state);
1372 goto yy_find_action;
1373
Reid Spencere7c3c602006-11-30 06:36:44 +00001374case 1:
1375YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001376#line 191 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00001377{ /* Ignore comments for now */ }
1378 YY_BREAK
1379case 2:
1380YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001381#line 193 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001382{ return BEGINTOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001383 YY_BREAK
1384case 3:
1385YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001386#line 194 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001387{ return ENDTOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001388 YY_BREAK
1389case 4:
1390YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001391#line 195 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001392{ return TRUETOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001393 YY_BREAK
1394case 5:
1395YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001396#line 196 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001397{ return FALSETOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001398 YY_BREAK
1399case 6:
1400YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001401#line 197 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001402{ return DECLARE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001403 YY_BREAK
1404case 7:
1405YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001406#line 198 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001407{ return GLOBAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001408 YY_BREAK
1409case 8:
1410YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001411#line 199 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001412{ return CONSTANT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001413 YY_BREAK
1414case 9:
1415YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001416#line 200 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001417{ return INTERNAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001418 YY_BREAK
1419case 10:
1420YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001421#line 201 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001422{ return LINKONCE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001423 YY_BREAK
1424case 11:
1425YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001426#line 202 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001427{ return WEAK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001428 YY_BREAK
1429case 12:
1430YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001431#line 203 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001432{ return APPENDING; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001433 YY_BREAK
1434case 13:
1435YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001436#line 204 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001437{ return DLLIMPORT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001438 YY_BREAK
1439case 14:
1440YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001441#line 205 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001442{ return DLLEXPORT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001443 YY_BREAK
1444case 15:
1445YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001446#line 206 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001447{ return EXTERN_WEAK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001448 YY_BREAK
1449case 16:
1450YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001451#line 207 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001452{ return EXTERNAL; } /* Deprecated, turn into external */
Reid Spencere7c3c602006-11-30 06:36:44 +00001453 YY_BREAK
1454case 17:
1455YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001456#line 208 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001457{ return EXTERNAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001458 YY_BREAK
1459case 18:
1460YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001461#line 209 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001462{ return IMPLEMENTATION; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001463 YY_BREAK
1464case 19:
1465YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001466#line 210 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001467{ return ZEROINITIALIZER; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001468 YY_BREAK
1469case 20:
1470YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001471#line 211 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001472{ return DOTDOTDOT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001473 YY_BREAK
1474case 21:
1475YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001476#line 212 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001477{ return UNDEF; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001478 YY_BREAK
1479case 22:
1480YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001481#line 213 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001482{ return NULL_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001483 YY_BREAK
1484case 23:
1485YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001486#line 214 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001487{ return TO; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001488 YY_BREAK
1489case 24:
1490YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001491#line 215 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001492{ return EXCEPT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001493 YY_BREAK
1494case 25:
1495YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001496#line 216 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001497{ return NOT; } /* Deprecated, turned into XOR */
Reid Spencere7c3c602006-11-30 06:36:44 +00001498 YY_BREAK
1499case 26:
1500YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001501#line 217 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001502{ return TAIL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001503 YY_BREAK
1504case 27:
1505YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001506#line 218 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001507{ return TARGET; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001508 YY_BREAK
1509case 28:
1510YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001511#line 219 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001512{ return TRIPLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001513 YY_BREAK
1514case 29:
1515YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001516#line 220 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001517{ return DEPLIBS; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001518 YY_BREAK
1519case 30:
1520YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001521#line 221 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001522{ return ENDIAN; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001523 YY_BREAK
1524case 31:
1525YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001526#line 222 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001527{ return POINTERSIZE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001528 YY_BREAK
1529case 32:
1530YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001531#line 223 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001532{ return DATALAYOUT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001533 YY_BREAK
1534case 33:
1535YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001536#line 224 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001537{ return LITTLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001538 YY_BREAK
1539case 34:
1540YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001541#line 225 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001542{ return BIG; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001543 YY_BREAK
1544case 35:
1545YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001546#line 226 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001547{ return VOLATILE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001548 YY_BREAK
1549case 36:
1550YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001551#line 227 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001552{ return ALIGN; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001553 YY_BREAK
1554case 37:
1555YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001556#line 228 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001557{ return SECTION; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001558 YY_BREAK
1559case 38:
1560YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001561#line 229 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001562{ return MODULE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001563 YY_BREAK
1564case 39:
1565YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001566#line 230 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001567{ return ASM_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001568 YY_BREAK
1569case 40:
1570YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001571#line 231 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001572{ return SIDEEFFECT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001573 YY_BREAK
1574case 41:
1575YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001576#line 233 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001577{ return CC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001578 YY_BREAK
1579case 42:
1580YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001581#line 234 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001582{ return CCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001583 YY_BREAK
1584case 43:
1585YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001586#line 235 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001587{ return CSRETCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001588 YY_BREAK
1589case 44:
1590YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001591#line 236 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001592{ return FASTCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001593 YY_BREAK
1594case 45:
1595YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001596#line 237 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001597{ return COLDCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001598 YY_BREAK
1599case 46:
1600YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001601#line 238 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001602{ return X86_STDCALLCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001603 YY_BREAK
1604case 47:
1605YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001606#line 239 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001607{ return X86_FASTCALLCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001608 YY_BREAK
1609case 48:
1610YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001611#line 241 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001612{ RET_TY(SBYTE, Type::Int8Ty, Signed); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001613 YY_BREAK
1614case 49:
1615YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001616#line 242 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001617{ RET_TY(UBYTE, Type::Int8Ty, Unsigned); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001618 YY_BREAK
1619case 50:
1620YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001621#line 243 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001622{ RET_TY(SHORT, Type::Int16Ty, Signed); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001623 YY_BREAK
1624case 51:
1625YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001626#line 244 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001627{ RET_TY(USHORT, Type::Int16Ty, Unsigned); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001628 YY_BREAK
1629case 52:
1630YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001631#line 245 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001632{ RET_TY(INT, Type::Int32Ty, Signed); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001633 YY_BREAK
1634case 53:
1635YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001636#line 246 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001637{ RET_TY(UINT, Type::Int32Ty, Unsigned); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001638 YY_BREAK
1639case 54:
1640YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001641#line 247 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001642{ RET_TY(LONG, Type::Int64Ty, Signed); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001643 YY_BREAK
1644case 55:
1645YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001646#line 248 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001647{ RET_TY(ULONG, Type::Int64Ty, Unsigned); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001648 YY_BREAK
1649case 56:
1650YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001651#line 249 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001652{ RET_TY(VOID, Type::VoidTy, Signless ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001653 YY_BREAK
1654case 57:
1655YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001656#line 250 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001657{ RET_TY(BOOL, Type::Int1Ty, Unsigned ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001658 YY_BREAK
1659case 58:
1660YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001661#line 251 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001662{ RET_TY(FLOAT, Type::FloatTy, Signless ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001663 YY_BREAK
1664case 59:
1665YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001666#line 252 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001667{ RET_TY(DOUBLE, Type::DoubleTy,Signless); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001668 YY_BREAK
1669case 60:
1670YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001671#line 253 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001672{ RET_TY(LABEL, Type::LabelTy, Signless ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001673 YY_BREAK
1674case 61:
1675YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001676#line 254 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001677{ return TYPE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001678 YY_BREAK
1679case 62:
1680YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001681#line 255 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001682{ return OPAQUE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001683 YY_BREAK
1684case 63:
1685YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001686#line 257 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001687{ RET_TOK(BinaryOpVal, AddOp, ADD); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001688 YY_BREAK
1689case 64:
1690YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001691#line 258 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001692{ RET_TOK(BinaryOpVal, SubOp, SUB); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001693 YY_BREAK
1694case 65:
1695YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001696#line 259 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001697{ RET_TOK(BinaryOpVal, MulOp, MUL); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001698 YY_BREAK
1699case 66:
1700YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001701#line 260 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001702{ RET_TOK(BinaryOpVal, DivOp, DIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001703 YY_BREAK
1704case 67:
1705YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001706#line 261 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001707{ RET_TOK(BinaryOpVal, UDivOp, UDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001708 YY_BREAK
1709case 68:
1710YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001711#line 262 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001712{ RET_TOK(BinaryOpVal, SDivOp, SDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001713 YY_BREAK
1714case 69:
1715YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001716#line 263 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001717{ RET_TOK(BinaryOpVal, FDivOp, FDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001718 YY_BREAK
1719case 70:
1720YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001721#line 264 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001722{ RET_TOK(BinaryOpVal, RemOp, REM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001723 YY_BREAK
1724case 71:
1725YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001726#line 265 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001727{ RET_TOK(BinaryOpVal, URemOp, UREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001728 YY_BREAK
1729case 72:
1730YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001731#line 266 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001732{ RET_TOK(BinaryOpVal, SRemOp, SREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001733 YY_BREAK
1734case 73:
1735YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001736#line 267 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001737{ RET_TOK(BinaryOpVal, FRemOp, FREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001738 YY_BREAK
1739case 74:
1740YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001741#line 268 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001742{ RET_TOK(BinaryOpVal, AndOp, AND); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001743 YY_BREAK
1744case 75:
1745YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001746#line 269 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001747{ RET_TOK(BinaryOpVal, OrOp , OR ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001748 YY_BREAK
1749case 76:
1750YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001751#line 270 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001752{ RET_TOK(BinaryOpVal, XorOp, XOR); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001753 YY_BREAK
1754case 77:
1755YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001756#line 271 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001757{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001758 YY_BREAK
1759case 78:
1760YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001761#line 272 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001762{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001763 YY_BREAK
1764case 79:
1765YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001766#line 273 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001767{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001768 YY_BREAK
1769case 80:
1770YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001771#line 274 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001772{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001773 YY_BREAK
1774case 81:
1775YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001776#line 275 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001777{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001778 YY_BREAK
1779case 82:
1780YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001781#line 276 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001782{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001783 YY_BREAK
1784case 83:
1785YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001786#line 277 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001787{ RET_TOK(OtherOpVal, ICmpOp, ICMP); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001788 YY_BREAK
1789case 84:
1790YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001791#line 278 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001792{ RET_TOK(OtherOpVal, FCmpOp, FCMP); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001793 YY_BREAK
1794case 85:
1795YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001796#line 280 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001797{ return EQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001798 YY_BREAK
1799case 86:
1800YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001801#line 281 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001802{ return NE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001803 YY_BREAK
1804case 87:
1805YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001806#line 282 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001807{ return SLT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001808 YY_BREAK
1809case 88:
1810YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001811#line 283 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001812{ return SGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001813 YY_BREAK
1814case 89:
1815YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001816#line 284 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001817{ return SLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001818 YY_BREAK
1819case 90:
1820YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001821#line 285 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001822{ return SGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001823 YY_BREAK
1824case 91:
1825YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001826#line 286 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001827{ return ULT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001828 YY_BREAK
1829case 92:
1830YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001831#line 287 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001832{ return UGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001833 YY_BREAK
1834case 93:
1835YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001836#line 288 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001837{ return ULE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001838 YY_BREAK
1839case 94:
1840YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001841#line 289 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001842{ return UGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001843 YY_BREAK
1844case 95:
1845YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001846#line 290 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001847{ return OEQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001848 YY_BREAK
1849case 96:
1850YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001851#line 291 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001852{ return ONE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001853 YY_BREAK
1854case 97:
1855YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001856#line 292 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001857{ return OLT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001858 YY_BREAK
1859case 98:
1860YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001861#line 293 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001862{ return OGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001863 YY_BREAK
1864case 99:
1865YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001866#line 294 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001867{ return OLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001868 YY_BREAK
1869case 100:
1870YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001871#line 295 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001872{ return OGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001873 YY_BREAK
1874case 101:
1875YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001876#line 296 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001877{ return ORD; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001878 YY_BREAK
1879case 102:
1880YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001881#line 297 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001882{ return UNO; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001883 YY_BREAK
1884case 103:
1885YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001886#line 298 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001887{ return UEQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001888 YY_BREAK
1889case 104:
1890YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001891#line 299 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001892{ return UNE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001893 YY_BREAK
1894case 105:
1895YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001896#line 301 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001897{ RET_TOK(OtherOpVal, PHIOp, PHI_TOK); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001898 YY_BREAK
1899case 106:
1900YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001901#line 302 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001902{ RET_TOK(OtherOpVal, CallOp, CALL); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001903 YY_BREAK
1904case 107:
1905YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001906#line 303 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001907{ RET_TOK(CastOpVal, CastOp, CAST); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001908 YY_BREAK
1909case 108:
1910YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001911#line 304 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001912{ RET_TOK(CastOpVal, TruncOp, TRUNC); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001913 YY_BREAK
1914case 109:
1915YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001916#line 305 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001917{ RET_TOK(CastOpVal, ZExtOp , ZEXT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001918 YY_BREAK
1919case 110:
1920YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001921#line 306 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001922{ RET_TOK(CastOpVal, SExtOp, SEXT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001923 YY_BREAK
1924case 111:
1925YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001926#line 307 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001927{ RET_TOK(CastOpVal, FPTruncOp, FPTRUNC); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001928 YY_BREAK
1929case 112:
1930YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001931#line 308 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001932{ RET_TOK(CastOpVal, FPExtOp, FPEXT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001933 YY_BREAK
1934case 113:
1935YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001936#line 309 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001937{ RET_TOK(CastOpVal, FPToUIOp, FPTOUI); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001938 YY_BREAK
Reid Spencer16244f42006-12-01 21:10:07 +00001939case 114:
1940YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001941#line 310 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001942{ RET_TOK(CastOpVal, FPToSIOp, FPTOSI); }
Reid Spencer16244f42006-12-01 21:10:07 +00001943 YY_BREAK
Reid Spencerf7bde222006-12-01 22:26:37 +00001944case 115:
1945YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001946#line 311 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001947{ RET_TOK(CastOpVal, UIToFPOp, UITOFP); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001948 YY_BREAK
1949case 116:
1950YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001951#line 312 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001952{ RET_TOK(CastOpVal, SIToFPOp, SITOFP); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001953 YY_BREAK
1954case 117:
1955YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001956#line 313 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001957{ RET_TOK(CastOpVal, PtrToIntOp, PTRTOINT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001958 YY_BREAK
1959case 118:
1960YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001961#line 314 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001962{ RET_TOK(CastOpVal, IntToPtrOp, INTTOPTR); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001963 YY_BREAK
1964case 119:
1965YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001966#line 315 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001967{ RET_TOK(CastOpVal, BitCastOp, BITCAST); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001968 YY_BREAK
1969case 120:
1970YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001971#line 316 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001972{ RET_TOK(OtherOpVal, SelectOp, SELECT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001973 YY_BREAK
1974case 121:
1975YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001976#line 317 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001977{ RET_TOK(OtherOpVal, ShlOp, SHL); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001978 YY_BREAK
1979case 122:
1980YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001981#line 318 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001982{ RET_TOK(OtherOpVal, ShrOp, SHR); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001983 YY_BREAK
1984case 123:
1985YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001986#line 319 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001987{ RET_TOK(OtherOpVal, LShrOp, LSHR); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001988 YY_BREAK
1989case 124:
1990YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001991#line 320 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001992{ RET_TOK(OtherOpVal, AShrOp, ASHR); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001993 YY_BREAK
1994case 125:
1995YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00001996#line 321 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001997{ return VANEXT_old; }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001998 YY_BREAK
1999case 126:
2000YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002001#line 322 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002002{ return VAARG_old; }
Reid Spencerfcb5df82006-12-01 22:34:43 +00002003 YY_BREAK
2004case 127:
2005YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002006#line 323 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002007{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer78720742006-12-02 20:21:22 +00002008 YY_BREAK
2009case 128:
2010YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002011#line 324 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002012{ RET_TOK(TermOpVal, RetOp, RET); }
Reid Spencer229e9362006-12-02 22:14:11 +00002013 YY_BREAK
2014case 129:
2015YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002016#line 325 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002017{ RET_TOK(TermOpVal, BrOp, BR); }
Reid Spencer229e9362006-12-02 22:14:11 +00002018 YY_BREAK
2019case 130:
2020YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002021#line 326 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002022{ RET_TOK(TermOpVal, SwitchOp, SWITCH); }
Reid Spencer229e9362006-12-02 22:14:11 +00002023 YY_BREAK
2024case 131:
2025YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002026#line 327 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002027{ RET_TOK(TermOpVal, InvokeOp, INVOKE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002028 YY_BREAK
2029case 132:
2030YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002031#line 328 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002032{ return UNWIND; }
Reid Spencer229e9362006-12-02 22:14:11 +00002033 YY_BREAK
2034case 133:
2035YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002036#line 329 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002037{ RET_TOK(TermOpVal, UnreachableOp, UNREACHABLE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002038 YY_BREAK
2039case 134:
2040YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002041#line 331 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002042{ RET_TOK(MemOpVal, MallocOp, MALLOC); }
Reid Spencer229e9362006-12-02 22:14:11 +00002043 YY_BREAK
2044case 135:
2045YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002046#line 332 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002047{ RET_TOK(MemOpVal, AllocaOp, ALLOCA); }
Reid Spencer229e9362006-12-02 22:14:11 +00002048 YY_BREAK
2049case 136:
2050YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002051#line 333 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002052{ RET_TOK(MemOpVal, FreeOp, FREE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002053 YY_BREAK
2054case 137:
2055YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002056#line 334 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002057{ RET_TOK(MemOpVal, LoadOp, LOAD); }
Reid Spencer229e9362006-12-02 22:14:11 +00002058 YY_BREAK
2059case 138:
2060YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002061#line 335 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002062{ RET_TOK(MemOpVal, StoreOp, STORE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002063 YY_BREAK
2064case 139:
2065YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002066#line 336 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002067{ RET_TOK(MemOpVal, GetElementPtrOp, GETELEMENTPTR); }
Reid Spencer229e9362006-12-02 22:14:11 +00002068 YY_BREAK
2069case 140:
2070YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002071#line 338 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002072{ RET_TOK(OtherOpVal, ExtractElementOp, EXTRACTELEMENT); }
Reid Spencer229e9362006-12-02 22:14:11 +00002073 YY_BREAK
2074case 141:
2075YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002076#line 339 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002077{ RET_TOK(OtherOpVal, InsertElementOp, INSERTELEMENT); }
Reid Spencer229e9362006-12-02 22:14:11 +00002078 YY_BREAK
2079case 142:
2080YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002081#line 340 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002082{ RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); }
Reid Spencer229e9362006-12-02 22:14:11 +00002083 YY_BREAK
2084case 143:
2085YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002086#line 343 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002087{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002088 UnEscapeLexed(Upgradetext+1);
2089 Upgradelval.StrVal = strdup(Upgradetext+1); // Skip %
Reid Spencer950bf602007-01-26 08:19:09 +00002090 return VAR_ID;
2091 }
Reid Spencer229e9362006-12-02 22:14:11 +00002092 YY_BREAK
2093case 144:
2094YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002095#line 348 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002096{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002097 Upgradetext[strlen(Upgradetext)-1] = 0; // nuke colon
2098 UnEscapeLexed(Upgradetext);
2099 Upgradelval.StrVal = strdup(Upgradetext);
Reid Spencer950bf602007-01-26 08:19:09 +00002100 return LABELSTR;
2101 }
Reid Spencer229e9362006-12-02 22:14:11 +00002102 YY_BREAK
2103case 145:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002104/* rule 145 can match eol */
Reid Spencer229e9362006-12-02 22:14:11 +00002105YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002106#line 354 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002107{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002108 Upgradetext[strlen(Upgradetext)-2] = 0; // nuke colon, end quote
2109 UnEscapeLexed(Upgradetext+1);
2110 Upgradelval.StrVal = strdup(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002111 return LABELSTR;
2112 }
Reid Spencer229e9362006-12-02 22:14:11 +00002113 YY_BREAK
2114case 146:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002115/* rule 146 can match eol */
Reid Spencer229e9362006-12-02 22:14:11 +00002116YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002117#line 361 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002118{ // Note that we cannot unescape a string constant here! The
2119 // string constant might contain a \00 which would not be
2120 // understood by the string stuff. It is valid to make a
2121 // [sbyte] c"Hello World\00" constant, for example.
2122 //
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002123 Upgradetext[strlen(Upgradetext)-1] = 0; // nuke end quote
2124 Upgradelval.StrVal = strdup(Upgradetext+1); // Nuke start quote
Reid Spencer950bf602007-01-26 08:19:09 +00002125 return STRINGCONSTANT;
2126 }
Reid Spencer229e9362006-12-02 22:14:11 +00002127 YY_BREAK
2128case 147:
2129YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002130#line 372 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
2131{ Upgradelval.UInt64Val = atoull(Upgradetext); return EUINT64VAL; }
Reid Spencer229e9362006-12-02 22:14:11 +00002132 YY_BREAK
2133case 148:
2134YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002135#line 373 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002136{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002137 uint64_t Val = atoull(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002138 // +1: we have bigger negative range
2139 if (Val > (uint64_t)INT64_MAX+1)
2140 error("Constant too large for signed 64 bits!");
2141 Upgradelval.SInt64Val = -Val;
2142 return ESINT64VAL;
2143 }
Reid Spencer229e9362006-12-02 22:14:11 +00002144 YY_BREAK
2145case 149:
2146YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002147#line 381 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002148{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002149 Upgradelval.UInt64Val = HexIntToVal(Upgradetext+3);
2150 return Upgradetext[0] == 's' ? ESINT64VAL : EUINT64VAL;
Reid Spencer950bf602007-01-26 08:19:09 +00002151 }
Reid Spencer229e9362006-12-02 22:14:11 +00002152 YY_BREAK
2153case 150:
2154YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002155#line 386 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002156{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002157 uint64_t Val = atoull(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002158 if ((unsigned)Val != Val)
2159 error("Invalid value number (too large)!");
2160 Upgradelval.UIntVal = unsigned(Val);
2161 return UINTVAL;
2162 }
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002163 YY_BREAK
2164case 151:
2165YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002166#line 393 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002167{
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002168 uint64_t Val = atoull(Upgradetext+2);
Reid Spencer950bf602007-01-26 08:19:09 +00002169 // +1: we have bigger negative range
2170 if (Val > (uint64_t)INT32_MAX+1)
2171 error("Constant too large for signed 32 bits!");
2172 Upgradelval.SIntVal = (int)-Val;
2173 return SINTVAL;
2174 }
Reid Spencer71d2ec92006-12-31 06:02:26 +00002175 YY_BREAK
2176case 152:
2177YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002178#line 402 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
2179{ Upgradelval.FPVal = atof(Upgradetext); return FPVAL; }
Reid Spencer71d2ec92006-12-31 06:02:26 +00002180 YY_BREAK
2181case 153:
2182YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002183#line 403 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
2184{ Upgradelval.FPVal = HexToFP(Upgradetext); return FPVAL; }
Reid Spencerf7bde222006-12-01 22:26:37 +00002185 YY_BREAK
2186case YY_STATE_EOF(INITIAL):
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002187#line 405 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00002188{
2189 /* Make sure to free the internal buffers for flex when we are
2190 * done reading our input!
2191 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002192 Upgrade_delete_buffer(YY_CURRENT_BUFFER);
Reid Spencere7c3c602006-11-30 06:36:44 +00002193 return EOF;
2194 }
2195 YY_BREAK
Reid Spencer950bf602007-01-26 08:19:09 +00002196case 154:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002197/* rule 154 can match eol */
Reid Spencer950bf602007-01-26 08:19:09 +00002198YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002199#line 413 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002200{ /* Ignore whitespace */ }
2201 YY_BREAK
Reid Spencer71d2ec92006-12-31 06:02:26 +00002202case 155:
Reid Spencerf7bde222006-12-01 22:26:37 +00002203YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002204#line 414 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
2205{ return Upgradetext[0]; }
Reid Spencer78720742006-12-02 20:21:22 +00002206 YY_BREAK
Reid Spencer71d2ec92006-12-31 06:02:26 +00002207case 156:
Reid Spencer78720742006-12-02 20:21:22 +00002208YY_RULE_SETUP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002209#line 416 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00002210YY_FATAL_ERROR( "flex scanner jammed" );
2211 YY_BREAK
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002212#line 2213 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00002213
2214 case YY_END_OF_BUFFER:
2215 {
2216 /* Amount of text matched not including the EOB char. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002217 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002218
2219 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002220 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002221 YY_RESTORE_YY_MORE_OFFSET
2222
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002223 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Reid Spencere7c3c602006-11-30 06:36:44 +00002224 {
2225 /* We're scanning a new file or input source. It's
2226 * possible that this happened because the user
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002227 * just pointed Upgradein at a new source and called
2228 * Upgradelex(). If so, then we have to assure
2229 * consistency between YY_CURRENT_BUFFER and our
Reid Spencere7c3c602006-11-30 06:36:44 +00002230 * globals. Here is the right place to do so, because
2231 * this is the first action (other than possibly a
2232 * back-up) that will match for the new input source.
2233 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002234 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2235 YY_CURRENT_BUFFER_LVALUE->yy_input_file = Upgradein;
2236 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Reid Spencere7c3c602006-11-30 06:36:44 +00002237 }
2238
2239 /* Note that here we test for yy_c_buf_p "<=" to the position
2240 * of the first EOB in the buffer, since yy_c_buf_p will
2241 * already have been incremented past the NUL character
2242 * (since all states make transitions on EOB to the
2243 * end-of-buffer state). Contrast this with the test
2244 * in input().
2245 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002246 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002247 { /* This was really a NUL. */
2248 yy_state_type yy_next_state;
2249
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002250 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencere7c3c602006-11-30 06:36:44 +00002251
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002252 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002253
2254 /* Okay, we're now positioned to make the NUL
2255 * transition. We couldn't have
2256 * yy_get_previous_state() go ahead and do it
2257 * for us because it doesn't know how to deal
2258 * with the possibility of jamming (and we don't
2259 * want to build jamming into it because then it
2260 * will run more slowly).
2261 */
2262
2263 yy_next_state = yy_try_NUL_trans( yy_current_state );
2264
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002265 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002266
2267 if ( yy_next_state )
2268 {
2269 /* Consume the NUL. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002270 yy_cp = ++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002271 yy_current_state = yy_next_state;
2272 goto yy_match;
2273 }
2274
2275 else
2276 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002277 yy_cp = (yy_last_accepting_cpos);
2278 yy_current_state = (yy_last_accepting_state);
Reid Spencere7c3c602006-11-30 06:36:44 +00002279 goto yy_find_action;
2280 }
2281 }
2282
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002283 else switch ( yy_get_next_buffer( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002284 {
2285 case EOB_ACT_END_OF_FILE:
2286 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002287 (yy_did_buffer_switch_on_eof) = 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002288
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002289 if ( Upgradewrap( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002290 {
2291 /* Note: because we've taken care in
2292 * yy_get_next_buffer() to have set up
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002293 * Upgradetext, we can now set up
Reid Spencere7c3c602006-11-30 06:36:44 +00002294 * yy_c_buf_p so that if some total
2295 * hoser (like flex itself) wants to
2296 * call the scanner after we return the
2297 * YY_NULL, it'll still work - another
2298 * YY_NULL will get returned.
2299 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002300 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002301
2302 yy_act = YY_STATE_EOF(YY_START);
2303 goto do_action;
2304 }
2305
2306 else
2307 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002308 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002309 YY_NEW_FILE;
2310 }
2311 break;
2312 }
2313
2314 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002315 (yy_c_buf_p) =
2316 (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencere7c3c602006-11-30 06:36:44 +00002317
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002318 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002319
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002320 yy_cp = (yy_c_buf_p);
2321 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002322 goto yy_match;
2323
2324 case EOB_ACT_LAST_MATCH:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002325 (yy_c_buf_p) =
2326 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Reid Spencere7c3c602006-11-30 06:36:44 +00002327
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002328 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002329
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002330 yy_cp = (yy_c_buf_p);
2331 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002332 goto yy_find_action;
2333 }
2334 break;
2335 }
2336
2337 default:
2338 YY_FATAL_ERROR(
2339 "fatal flex scanner internal error--no action found" );
2340 } /* end of action switch */
2341 } /* end of scanning one token */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002342} /* end of Upgradelex */
Reid Spencere7c3c602006-11-30 06:36:44 +00002343
2344/* yy_get_next_buffer - try to read in a new buffer
2345 *
2346 * Returns a code representing an action:
2347 * EOB_ACT_LAST_MATCH -
2348 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2349 * EOB_ACT_END_OF_FILE - end of file
2350 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002351static int yy_get_next_buffer (void)
2352{
2353 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2354 register char *source = (yytext_ptr);
Reid Spencere7c3c602006-11-30 06:36:44 +00002355 register int number_to_move, i;
2356 int ret_val;
2357
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002358 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002359 YY_FATAL_ERROR(
2360 "fatal flex scanner internal error--end of buffer missed" );
2361
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002362 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002363 { /* Don't try to fill the buffer, so this is an EOF. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002364 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002365 {
2366 /* We matched a single character, the EOB, so
2367 * treat this as a final EOF.
2368 */
2369 return EOB_ACT_END_OF_FILE;
2370 }
2371
2372 else
2373 {
2374 /* We matched some text prior to the EOB, first
2375 * process it.
2376 */
2377 return EOB_ACT_LAST_MATCH;
2378 }
2379 }
2380
2381 /* Try to read more data. */
2382
2383 /* First move last chars to start of buffer. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002384 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002385
2386 for ( i = 0; i < number_to_move; ++i )
2387 *(dest++) = *(source++);
2388
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002389 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Reid Spencere7c3c602006-11-30 06:36:44 +00002390 /* don't do the read, it's not guaranteed to return an EOF,
2391 * just force an EOF
2392 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002393 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002394
2395 else
2396 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002397 int num_to_read =
2398 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002399
2400 while ( num_to_read <= 0 )
2401 { /* Not enough room in the buffer - grow it. */
Reid Spencere7c3c602006-11-30 06:36:44 +00002402
2403 /* just a shorter name for the current buffer */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002404 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Reid Spencere7c3c602006-11-30 06:36:44 +00002405
2406 int yy_c_buf_p_offset =
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002407 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Reid Spencere7c3c602006-11-30 06:36:44 +00002408
2409 if ( b->yy_is_our_buffer )
2410 {
2411 int new_size = b->yy_buf_size * 2;
2412
2413 if ( new_size <= 0 )
2414 b->yy_buf_size += b->yy_buf_size / 8;
2415 else
2416 b->yy_buf_size *= 2;
2417
2418 b->yy_ch_buf = (char *)
2419 /* Include room in for 2 EOB chars. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002420 Upgraderealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Reid Spencere7c3c602006-11-30 06:36:44 +00002421 }
2422 else
2423 /* Can't grow it, we don't own it. */
2424 b->yy_ch_buf = 0;
2425
2426 if ( ! b->yy_ch_buf )
2427 YY_FATAL_ERROR(
2428 "fatal error - scanner input buffer overflow" );
2429
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002430 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Reid Spencere7c3c602006-11-30 06:36:44 +00002431
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002432 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Reid Spencere7c3c602006-11-30 06:36:44 +00002433 number_to_move - 1;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002434
Reid Spencere7c3c602006-11-30 06:36:44 +00002435 }
2436
2437 if ( num_to_read > YY_READ_BUF_SIZE )
2438 num_to_read = YY_READ_BUF_SIZE;
2439
2440 /* Read in more data. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002441 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2442 (yy_n_chars), num_to_read );
Reid Spencere7c3c602006-11-30 06:36:44 +00002443
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002444 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencere7c3c602006-11-30 06:36:44 +00002445 }
2446
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002447 if ( (yy_n_chars) == 0 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002448 {
2449 if ( number_to_move == YY_MORE_ADJ )
2450 {
2451 ret_val = EOB_ACT_END_OF_FILE;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002452 Upgraderestart(Upgradein );
Reid Spencere7c3c602006-11-30 06:36:44 +00002453 }
2454
2455 else
2456 {
2457 ret_val = EOB_ACT_LAST_MATCH;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002458 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Reid Spencere7c3c602006-11-30 06:36:44 +00002459 YY_BUFFER_EOF_PENDING;
2460 }
2461 }
2462
2463 else
2464 ret_val = EOB_ACT_CONTINUE_SCAN;
2465
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002466 (yy_n_chars) += number_to_move;
2467 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2468 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Reid Spencere7c3c602006-11-30 06:36:44 +00002469
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002470 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Reid Spencere7c3c602006-11-30 06:36:44 +00002471
2472 return ret_val;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002473}
Reid Spencere7c3c602006-11-30 06:36:44 +00002474
2475/* yy_get_previous_state - get the state just before the EOB char was reached */
2476
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002477 static yy_state_type yy_get_previous_state (void)
2478{
Reid Spencere7c3c602006-11-30 06:36:44 +00002479 register yy_state_type yy_current_state;
2480 register char *yy_cp;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002481
2482 yy_current_state = (yy_start);
Reid Spencere7c3c602006-11-30 06:36:44 +00002483
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002484 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Reid Spencere7c3c602006-11-30 06:36:44 +00002485 {
2486 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002487 if ( yy_accept[yy_current_state] )
2488 {
2489 (yy_last_accepting_state) = yy_current_state;
2490 (yy_last_accepting_cpos) = yy_cp;
2491 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002492 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2493 {
2494 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer950bf602007-01-26 08:19:09 +00002495 if ( yy_current_state >= 610 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002496 yy_c = yy_meta[(unsigned int) yy_c];
2497 }
2498 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencere7c3c602006-11-30 06:36:44 +00002499 }
2500
2501 return yy_current_state;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002502}
Reid Spencere7c3c602006-11-30 06:36:44 +00002503
2504/* yy_try_NUL_trans - try to make a transition on the NUL character
2505 *
2506 * synopsis
2507 * next_state = yy_try_NUL_trans( current_state );
2508 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002509 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2510{
Reid Spencere7c3c602006-11-30 06:36:44 +00002511 register int yy_is_jam;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002512 register char *yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002513
2514 register YY_CHAR yy_c = 1;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002515 if ( yy_accept[yy_current_state] )
2516 {
2517 (yy_last_accepting_state) = yy_current_state;
2518 (yy_last_accepting_cpos) = yy_cp;
2519 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002520 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2521 {
2522 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer950bf602007-01-26 08:19:09 +00002523 if ( yy_current_state >= 610 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002524 yy_c = yy_meta[(unsigned int) yy_c];
2525 }
2526 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer950bf602007-01-26 08:19:09 +00002527 yy_is_jam = (yy_current_state == 609);
Reid Spencere7c3c602006-11-30 06:36:44 +00002528
2529 return yy_is_jam ? 0 : yy_current_state;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002530}
Reid Spencere7c3c602006-11-30 06:36:44 +00002531
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002532 static inline void yyunput (int c, register char * yy_bp )
2533{
2534 register char *yy_cp;
2535
2536 yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002537
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002538 /* undo effects of setting up Upgradetext */
2539 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002540
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002541 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002542 { /* need to shift things up to make room */
2543 /* +2 for EOB chars. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002544 register int number_to_move = (yy_n_chars) + 2;
2545 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2546 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Reid Spencere7c3c602006-11-30 06:36:44 +00002547 register char *source =
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002548 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Reid Spencere7c3c602006-11-30 06:36:44 +00002549
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002550 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Reid Spencere7c3c602006-11-30 06:36:44 +00002551 *--dest = *--source;
2552
2553 yy_cp += (int) (dest - source);
2554 yy_bp += (int) (dest - source);
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002555 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2556 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Reid Spencere7c3c602006-11-30 06:36:44 +00002557
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002558 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002559 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2560 }
2561
2562 *--yy_cp = (char) c;
2563
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002564 if ( c == '\n' ){
2565 --Upgradelineno;
2566 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002567
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002568 (yytext_ptr) = yy_bp;
2569 (yy_hold_char) = *yy_cp;
2570 (yy_c_buf_p) = yy_cp;
2571}
Reid Spencere7c3c602006-11-30 06:36:44 +00002572
2573#ifndef YY_NO_INPUT
2574#ifdef __cplusplus
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002575 static int yyinput (void)
Reid Spencere7c3c602006-11-30 06:36:44 +00002576#else
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002577 static int input (void)
Reid Spencere7c3c602006-11-30 06:36:44 +00002578#endif
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002579
2580{
Reid Spencere7c3c602006-11-30 06:36:44 +00002581 int c;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002582
2583 *(yy_c_buf_p) = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002584
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002585 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Reid Spencere7c3c602006-11-30 06:36:44 +00002586 {
2587 /* yy_c_buf_p now points to the character we want to return.
2588 * If this occurs *before* the EOB characters, then it's a
2589 * valid NUL; if not, then we've hit the end of the buffer.
2590 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002591 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002592 /* This was really a NUL. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002593 *(yy_c_buf_p) = '\0';
Reid Spencere7c3c602006-11-30 06:36:44 +00002594
2595 else
2596 { /* need more input */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002597 int offset = (yy_c_buf_p) - (yytext_ptr);
2598 ++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002599
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002600 switch ( yy_get_next_buffer( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002601 {
2602 case EOB_ACT_LAST_MATCH:
2603 /* This happens because yy_g_n_b()
2604 * sees that we've accumulated a
2605 * token and flags that we need to
2606 * try matching the token before
2607 * proceeding. But for input(),
2608 * there's no matching to consider.
2609 * So convert the EOB_ACT_LAST_MATCH
2610 * to EOB_ACT_END_OF_FILE.
2611 */
2612
2613 /* Reset buffer status. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002614 Upgraderestart(Upgradein );
Reid Spencere7c3c602006-11-30 06:36:44 +00002615
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002616 /*FALLTHROUGH*/
Reid Spencere7c3c602006-11-30 06:36:44 +00002617
2618 case EOB_ACT_END_OF_FILE:
2619 {
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002620 if ( Upgradewrap( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002621 return EOF;
2622
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002623 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002624 YY_NEW_FILE;
2625#ifdef __cplusplus
2626 return yyinput();
2627#else
2628 return input();
2629#endif
2630 }
2631
2632 case EOB_ACT_CONTINUE_SCAN:
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002633 (yy_c_buf_p) = (yytext_ptr) + offset;
Reid Spencere7c3c602006-11-30 06:36:44 +00002634 break;
2635 }
2636 }
2637 }
2638
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002639 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2640 *(yy_c_buf_p) = '\0'; /* preserve Upgradetext */
2641 (yy_hold_char) = *++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002642
2643 if ( c == '\n' )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002644
2645 Upgradelineno++;
2646;
Reid Spencere7c3c602006-11-30 06:36:44 +00002647
2648 return c;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002649}
2650#endif /* ifndef YY_NO_INPUT */
Reid Spencere7c3c602006-11-30 06:36:44 +00002651
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002652/** Immediately switch to a different input stream.
2653 * @param input_file A readable stream.
2654 *
2655 * @note This function does not reset the start condition to @c INITIAL .
2656 */
2657 void Upgraderestart (FILE * input_file )
2658{
2659
2660 if ( ! YY_CURRENT_BUFFER ){
2661 Upgradeensure_buffer_stack ();
2662 YY_CURRENT_BUFFER_LVALUE =
2663 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE );
Reid Spencere7c3c602006-11-30 06:36:44 +00002664 }
2665
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002666 Upgrade_init_buffer(YY_CURRENT_BUFFER,input_file );
2667 Upgrade_load_buffer_state( );
2668}
Reid Spencere7c3c602006-11-30 06:36:44 +00002669
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002670/** Switch to a different input buffer.
2671 * @param new_buffer The new input buffer.
2672 *
2673 */
2674 void Upgrade_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2675{
2676
2677 /* TODO. We should be able to replace this entire function body
2678 * with
2679 * Upgradepop_buffer_state();
2680 * Upgradepush_buffer_state(new_buffer);
2681 */
2682 Upgradeensure_buffer_stack ();
2683 if ( YY_CURRENT_BUFFER == new_buffer )
Reid Spencere7c3c602006-11-30 06:36:44 +00002684 return;
2685
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002686 if ( YY_CURRENT_BUFFER )
Reid Spencere7c3c602006-11-30 06:36:44 +00002687 {
2688 /* Flush out information for old buffer. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002689 *(yy_c_buf_p) = (yy_hold_char);
2690 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2691 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencere7c3c602006-11-30 06:36:44 +00002692 }
2693
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002694 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2695 Upgrade_load_buffer_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002696
2697 /* We don't actually know whether we did this switch during
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002698 * EOF (Upgradewrap()) processing, but the only time this flag
2699 * is looked at is after Upgradewrap() is called, so it's safe
Reid Spencere7c3c602006-11-30 06:36:44 +00002700 * to go ahead and always set it.
2701 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002702 (yy_did_buffer_switch_on_eof) = 1;
2703}
Reid Spencere7c3c602006-11-30 06:36:44 +00002704
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002705static void Upgrade_load_buffer_state (void)
2706{
2707 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2708 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2709 Upgradein = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2710 (yy_hold_char) = *(yy_c_buf_p);
2711}
Reid Spencere7c3c602006-11-30 06:36:44 +00002712
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002713/** Allocate and initialize an input buffer state.
2714 * @param file A readable stream.
2715 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2716 *
2717 * @return the allocated buffer state.
2718 */
2719 YY_BUFFER_STATE Upgrade_create_buffer (FILE * file, int size )
2720{
Reid Spencere7c3c602006-11-30 06:36:44 +00002721 YY_BUFFER_STATE b;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002722
2723 b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) );
Reid Spencere7c3c602006-11-30 06:36:44 +00002724 if ( ! b )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002725 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002726
2727 b->yy_buf_size = size;
2728
2729 /* yy_ch_buf has to be 2 characters longer than the size given because
2730 * we need to put in 2 end-of-buffer characters.
2731 */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002732 b->yy_ch_buf = (char *) Upgradealloc(b->yy_buf_size + 2 );
Reid Spencere7c3c602006-11-30 06:36:44 +00002733 if ( ! b->yy_ch_buf )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002734 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002735
2736 b->yy_is_our_buffer = 1;
2737
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002738 Upgrade_init_buffer(b,file );
Reid Spencere7c3c602006-11-30 06:36:44 +00002739
2740 return b;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002741}
Reid Spencere7c3c602006-11-30 06:36:44 +00002742
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002743/** Destroy the buffer.
2744 * @param b a buffer created with Upgrade_create_buffer()
2745 *
2746 */
2747 void Upgrade_delete_buffer (YY_BUFFER_STATE b )
2748{
2749
Reid Spencere7c3c602006-11-30 06:36:44 +00002750 if ( ! b )
2751 return;
2752
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002753 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2754 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002755
2756 if ( b->yy_is_our_buffer )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002757 Upgradefree((void *) b->yy_ch_buf );
Reid Spencere7c3c602006-11-30 06:36:44 +00002758
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002759 Upgradefree((void *) b );
2760}
Reid Spencere7c3c602006-11-30 06:36:44 +00002761
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002762/* Initializes or reinitializes a buffer.
2763 * This function is sometimes called more than once on the same buffer,
2764 * such as during a Upgraderestart() or at EOF.
2765 */
2766 static void Upgrade_init_buffer (YY_BUFFER_STATE b, FILE * file )
Reid Spencere7c3c602006-11-30 06:36:44 +00002767
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002768{
2769 int oerrno = errno;
2770
2771 Upgrade_flush_buffer(b );
Reid Spencere7c3c602006-11-30 06:36:44 +00002772
2773 b->yy_input_file = file;
2774 b->yy_fill_buffer = 1;
2775
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002776 /* If b is the current buffer, then Upgrade_init_buffer was _probably_
2777 * called from Upgraderestart() or through yy_get_next_buffer.
2778 * In that case, we don't want to reset the lineno or column.
2779 */
2780 if (b != YY_CURRENT_BUFFER){
2781 b->yy_bs_lineno = 1;
2782 b->yy_bs_column = 0;
2783 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002784
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002785 b->yy_is_interactive = 0;
2786
2787 errno = oerrno;
2788}
Reid Spencere7c3c602006-11-30 06:36:44 +00002789
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002790/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2791 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2792 *
2793 */
2794 void Upgrade_flush_buffer (YY_BUFFER_STATE b )
2795{
2796 if ( ! b )
Reid Spencere7c3c602006-11-30 06:36:44 +00002797 return;
2798
2799 b->yy_n_chars = 0;
2800
2801 /* We always need two end-of-buffer characters. The first causes
2802 * a transition to the end-of-buffer state. The second causes
2803 * a jam in that state.
2804 */
2805 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2806 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2807
2808 b->yy_buf_pos = &b->yy_ch_buf[0];
2809
2810 b->yy_at_bol = 1;
2811 b->yy_buffer_status = YY_BUFFER_NEW;
2812
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002813 if ( b == YY_CURRENT_BUFFER )
2814 Upgrade_load_buffer_state( );
2815}
2816
2817/** Pushes the new state onto the stack. The new state becomes
2818 * the current state. This function will allocate the stack
2819 * if necessary.
2820 * @param new_buffer The new state.
2821 *
2822 */
2823void Upgradepush_buffer_state (YY_BUFFER_STATE new_buffer )
2824{
2825 if (new_buffer == NULL)
2826 return;
2827
2828 Upgradeensure_buffer_stack();
2829
2830 /* This block is copied from Upgrade_switch_to_buffer. */
2831 if ( YY_CURRENT_BUFFER )
2832 {
2833 /* Flush out information for old buffer. */
2834 *(yy_c_buf_p) = (yy_hold_char);
2835 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2836 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2837 }
2838
2839 /* Only push if top exists. Otherwise, replace top. */
2840 if (YY_CURRENT_BUFFER)
2841 (yy_buffer_stack_top)++;
2842 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2843
2844 /* copied from Upgrade_switch_to_buffer. */
2845 Upgrade_load_buffer_state( );
2846 (yy_did_buffer_switch_on_eof) = 1;
2847}
2848
2849/** Removes and deletes the top of the stack, if present.
2850 * The next element becomes the new top.
2851 *
2852 */
2853void Upgradepop_buffer_state (void)
2854{
2855 if (!YY_CURRENT_BUFFER)
2856 return;
2857
2858 Upgrade_delete_buffer(YY_CURRENT_BUFFER );
2859 YY_CURRENT_BUFFER_LVALUE = NULL;
2860 if ((yy_buffer_stack_top) > 0)
2861 --(yy_buffer_stack_top);
2862
2863 if (YY_CURRENT_BUFFER) {
2864 Upgrade_load_buffer_state( );
2865 (yy_did_buffer_switch_on_eof) = 1;
2866 }
2867}
2868
2869/* Allocates the stack if it does not exist.
2870 * Guarantees space for at least one push.
2871 */
2872static void Upgradeensure_buffer_stack (void)
2873{
2874 int num_to_alloc;
2875
2876 if (!(yy_buffer_stack)) {
2877
2878 /* First allocation is just for 2 elements, since we don't know if this
2879 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2880 * immediate realloc on the next call.
2881 */
2882 num_to_alloc = 1;
2883 (yy_buffer_stack) = (struct yy_buffer_state**)Upgradealloc
2884 (num_to_alloc * sizeof(struct yy_buffer_state*)
2885 );
2886
2887 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2888
2889 (yy_buffer_stack_max) = num_to_alloc;
2890 (yy_buffer_stack_top) = 0;
2891 return;
Reid Spencere7c3c602006-11-30 06:36:44 +00002892 }
2893
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002894 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Reid Spencere7c3c602006-11-30 06:36:44 +00002895
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002896 /* Increase the buffer to prepare for a possible push. */
2897 int grow_size = 8 /* arbitrary grow size */;
2898
2899 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2900 (yy_buffer_stack) = (struct yy_buffer_state**)Upgraderealloc
2901 ((yy_buffer_stack),
2902 num_to_alloc * sizeof(struct yy_buffer_state*)
2903 );
2904
2905 /* zero only the new slots.*/
2906 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2907 (yy_buffer_stack_max) = num_to_alloc;
2908 }
2909}
2910
2911/** Setup the input buffer state to scan directly from a user-specified character buffer.
2912 * @param base the character buffer
2913 * @param size the size in bytes of the character buffer
2914 *
2915 * @return the newly allocated buffer state object.
2916 */
2917YY_BUFFER_STATE Upgrade_scan_buffer (char * base, yy_size_t size )
2918{
Reid Spencere7c3c602006-11-30 06:36:44 +00002919 YY_BUFFER_STATE b;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002920
Reid Spencere7c3c602006-11-30 06:36:44 +00002921 if ( size < 2 ||
2922 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2923 base[size-1] != YY_END_OF_BUFFER_CHAR )
2924 /* They forgot to leave room for the EOB's. */
2925 return 0;
2926
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002927 b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) );
Reid Spencere7c3c602006-11-30 06:36:44 +00002928 if ( ! b )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002929 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002930
2931 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2932 b->yy_buf_pos = b->yy_ch_buf = base;
2933 b->yy_is_our_buffer = 0;
2934 b->yy_input_file = 0;
2935 b->yy_n_chars = b->yy_buf_size;
2936 b->yy_is_interactive = 0;
2937 b->yy_at_bol = 1;
2938 b->yy_fill_buffer = 0;
2939 b->yy_buffer_status = YY_BUFFER_NEW;
2940
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002941 Upgrade_switch_to_buffer(b );
Reid Spencere7c3c602006-11-30 06:36:44 +00002942
2943 return b;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002944}
Reid Spencere7c3c602006-11-30 06:36:44 +00002945
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002946/** Setup the input buffer state to scan a string. The next call to Upgradelex() will
2947 * scan from a @e copy of @a str.
2948 * @param str a NUL-terminated string to scan
2949 *
2950 * @return the newly allocated buffer state object.
2951 * @note If you want to scan bytes that may contain NUL values, then use
2952 * Upgrade_scan_bytes() instead.
2953 */
2954YY_BUFFER_STATE Upgrade_scan_string (yyconst char * yystr )
2955{
2956
2957 return Upgrade_scan_bytes(yystr,strlen(yystr) );
2958}
Reid Spencere7c3c602006-11-30 06:36:44 +00002959
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002960/** Setup the input buffer state to scan the given bytes. The next call to Upgradelex() will
2961 * scan from a @e copy of @a bytes.
2962 * @param bytes the byte buffer to scan
2963 * @param len the number of bytes in the buffer pointed to by @a bytes.
2964 *
2965 * @return the newly allocated buffer state object.
2966 */
2967YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char * yybytes, int _yybytes_len )
2968{
Reid Spencere7c3c602006-11-30 06:36:44 +00002969 YY_BUFFER_STATE b;
2970 char *buf;
2971 yy_size_t n;
2972 int i;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002973
Reid Spencere7c3c602006-11-30 06:36:44 +00002974 /* Get memory for full buffer, including space for trailing EOB's. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002975 n = _yybytes_len + 2;
2976 buf = (char *) Upgradealloc(n );
Reid Spencere7c3c602006-11-30 06:36:44 +00002977 if ( ! buf )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002978 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_bytes()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002979
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002980 for ( i = 0; i < _yybytes_len; ++i )
2981 buf[i] = yybytes[i];
Reid Spencere7c3c602006-11-30 06:36:44 +00002982
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002983 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Reid Spencere7c3c602006-11-30 06:36:44 +00002984
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002985 b = Upgrade_scan_buffer(buf,n );
Reid Spencere7c3c602006-11-30 06:36:44 +00002986 if ( ! b )
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002987 YY_FATAL_ERROR( "bad buffer in Upgrade_scan_bytes()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002988
2989 /* It's okay to grow etc. this buffer, and we should throw it
2990 * away when we're done.
2991 */
2992 b->yy_is_our_buffer = 1;
2993
2994 return b;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00002995}
Reid Spencere7c3c602006-11-30 06:36:44 +00002996
2997#ifndef YY_EXIT_FAILURE
2998#define YY_EXIT_FAILURE 2
2999#endif
3000
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003001static void yy_fatal_error (yyconst char* msg )
3002{
3003 (void) fprintf( stderr, "%s\n", msg );
Reid Spencere7c3c602006-11-30 06:36:44 +00003004 exit( YY_EXIT_FAILURE );
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003005}
Reid Spencere7c3c602006-11-30 06:36:44 +00003006
3007/* Redefine yyless() so it works in section 3 code. */
3008
3009#undef yyless
3010#define yyless(n) \
3011 do \
3012 { \
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003013 /* Undo effects of setting up Upgradetext. */ \
3014 int yyless_macro_arg = (n); \
3015 YY_LESS_LINENO(yyless_macro_arg);\
3016 Upgradetext[Upgradeleng] = (yy_hold_char); \
3017 (yy_c_buf_p) = Upgradetext + yyless_macro_arg; \
3018 (yy_hold_char) = *(yy_c_buf_p); \
3019 *(yy_c_buf_p) = '\0'; \
3020 Upgradeleng = yyless_macro_arg; \
Reid Spencere7c3c602006-11-30 06:36:44 +00003021 } \
3022 while ( 0 )
3023
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003024/* Accessor methods (get/set functions) to struct members. */
Reid Spencere7c3c602006-11-30 06:36:44 +00003025
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003026/** Get the current line number.
3027 *
3028 */
3029int Upgradeget_lineno (void)
3030{
3031
3032 return Upgradelineno;
3033}
3034
3035/** Get the input stream.
3036 *
3037 */
3038FILE *Upgradeget_in (void)
3039{
3040 return Upgradein;
3041}
3042
3043/** Get the output stream.
3044 *
3045 */
3046FILE *Upgradeget_out (void)
3047{
3048 return Upgradeout;
3049}
3050
3051/** Get the length of the current token.
3052 *
3053 */
3054int Upgradeget_leng (void)
3055{
3056 return Upgradeleng;
3057}
3058
3059/** Get the current token.
3060 *
3061 */
3062
3063char *Upgradeget_text (void)
3064{
3065 return Upgradetext;
3066}
3067
3068/** Set the current line number.
3069 * @param line_number
3070 *
3071 */
3072void Upgradeset_lineno (int line_number )
3073{
3074
3075 Upgradelineno = line_number;
3076}
3077
3078/** Set the input stream. This does not discard the current
3079 * input buffer.
3080 * @param in_str A readable stream.
3081 *
3082 * @see Upgrade_switch_to_buffer
3083 */
3084void Upgradeset_in (FILE * in_str )
3085{
3086 Upgradein = in_str ;
3087}
3088
3089void Upgradeset_out (FILE * out_str )
3090{
3091 Upgradeout = out_str ;
3092}
3093
3094int Upgradeget_debug (void)
3095{
3096 return Upgrade_flex_debug;
3097}
3098
3099void Upgradeset_debug (int bdebug )
3100{
3101 Upgrade_flex_debug = bdebug ;
3102}
3103
3104static int yy_init_globals (void)
3105{
3106 /* Initialization is the same as for the non-reentrant scanner.
3107 * This function is called from Upgradelex_destroy(), so don't allocate here.
3108 */
3109
3110 /* We do not touch Upgradelineno unless the option is enabled. */
3111 Upgradelineno = 1;
3112
3113 (yy_buffer_stack) = 0;
3114 (yy_buffer_stack_top) = 0;
3115 (yy_buffer_stack_max) = 0;
3116 (yy_c_buf_p) = (char *) 0;
3117 (yy_init) = 0;
3118 (yy_start) = 0;
3119
3120/* Defined in main.c */
3121#ifdef YY_STDINIT
3122 Upgradein = stdin;
3123 Upgradeout = stdout;
3124#else
3125 Upgradein = (FILE *) 0;
3126 Upgradeout = (FILE *) 0;
3127#endif
3128
3129 /* For future reference: Set errno on error, since we are called by
3130 * Upgradelex_init()
3131 */
3132 return 0;
3133}
3134
3135/* Upgradelex_destroy is for both reentrant and non-reentrant scanners. */
3136int Upgradelex_destroy (void)
3137{
3138
3139 /* Pop the buffer stack, destroying each element. */
3140 while(YY_CURRENT_BUFFER){
3141 Upgrade_delete_buffer(YY_CURRENT_BUFFER );
3142 YY_CURRENT_BUFFER_LVALUE = NULL;
3143 Upgradepop_buffer_state();
3144 }
3145
3146 /* Destroy the stack itself. */
3147 Upgradefree((yy_buffer_stack) );
3148 (yy_buffer_stack) = NULL;
3149
3150 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3151 * Upgradelex() is called, initialization will occur. */
3152 yy_init_globals( );
3153
3154 return 0;
3155}
3156
3157/*
3158 * Internal utility routines.
3159 */
Reid Spencere7c3c602006-11-30 06:36:44 +00003160
3161#ifndef yytext_ptr
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003162static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3163{
Reid Spencere7c3c602006-11-30 06:36:44 +00003164 register int i;
3165 for ( i = 0; i < n; ++i )
3166 s1[i] = s2[i];
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003167}
Reid Spencere7c3c602006-11-30 06:36:44 +00003168#endif
3169
3170#ifdef YY_NEED_STRLEN
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003171static int yy_flex_strlen (yyconst char * s )
3172{
Reid Spencere7c3c602006-11-30 06:36:44 +00003173 register int n;
3174 for ( n = 0; s[n]; ++n )
3175 ;
3176
3177 return n;
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003178}
Reid Spencere7c3c602006-11-30 06:36:44 +00003179#endif
3180
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003181void *Upgradealloc (yy_size_t size )
3182{
Reid Spencere7c3c602006-11-30 06:36:44 +00003183 return (void *) malloc( size );
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003184}
Reid Spencere7c3c602006-11-30 06:36:44 +00003185
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003186void *Upgraderealloc (void * ptr, yy_size_t size )
3187{
Reid Spencere7c3c602006-11-30 06:36:44 +00003188 /* The cast to (char *) in the following accommodates both
3189 * implementations that use char* generic pointers, and those
3190 * that use void* generic pointers. It works with the latter
3191 * because both ANSI C and C++ allow castless assignment from
3192 * any pointer type to void*, and deal with argument conversions
3193 * as though doing an assignment.
3194 */
3195 return (void *) realloc( (char *) ptr, size );
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003196}
Reid Spencere7c3c602006-11-30 06:36:44 +00003197
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003198void Upgradefree (void * ptr )
3199{
3200 free( (char *) ptr ); /* see Upgraderealloc() for (char *) cast */
3201}
Reid Spencere7c3c602006-11-30 06:36:44 +00003202
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +00003203#define YYTABLES_NAME "yytables"
3204
3205#line 416 "/home/asl/proj/llvm/src/tools/llvm-upgrade/UpgradeLexer.l"
3206
3207
Reid Spencere7c3c602006-11-30 06:36:44 +00003208