blob: 8161bee55911b54fb7ca42813e5ffc070692c9f9 [file] [log] [blame]
Chris Lattnercf786592007-12-29 20:47:37 +00001#line 2 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00002
Chris Lattnercf786592007-12-29 20:47:37 +00003#line 4 "UpgradeLexer.cpp"
4
5#define YY_INT_ALIGNED short int
6
Dale Johannesen43421b32007-09-06 18:13:44 +00007/* A lexical scanner generated by flex */
Reid Spencere7c3c602006-11-30 06:36:44 +00008
Reid Spencere7c3c602006-11-30 06:36:44 +00009#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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>
Chris Lattnercf786592007-12-29 20:47:37 +000021#include <string.h>
22#include <errno.h>
23#include <stdlib.h>
Reid Spencere7c3c602006-11-30 06:36:44 +000024
Chris Lattnercf786592007-12-29 20:47:37 +000025/* end standard C headers. */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000026
Chris Lattnercf786592007-12-29 20:47:37 +000027/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000041#endif
42
Chris Lattnercf786592007-12-29 20:47:37 +000043#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57#endif /* ! C99 */
58
59/* Limits of integral types. */
60#ifndef INT8_MIN
61#define INT8_MIN (-128)
62#endif
63#ifndef INT16_MIN
64#define INT16_MIN (-32767-1)
65#endif
66#ifndef INT32_MIN
67#define INT32_MIN (-2147483647-1)
68#endif
69#ifndef INT8_MAX
70#define INT8_MAX (127)
71#endif
72#ifndef INT16_MAX
73#define INT16_MAX (32767)
74#endif
75#ifndef INT32_MAX
76#define INT32_MAX (2147483647)
77#endif
78#ifndef UINT8_MAX
79#define UINT8_MAX (255U)
80#endif
81#ifndef UINT16_MAX
82#define UINT16_MAX (65535U)
83#endif
84#ifndef UINT32_MAX
85#define UINT32_MAX (4294967295U)
86#endif
87
88#endif /* ! FLEXINT_H */
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000089
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 */
Chris Lattnercf786592007-12-29 20:47:37 +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 */
Chris Lattnercf786592007-12-29 20:47:37 +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". */
Chris Lattnercf786592007-12-29 20:47:37 +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. */
Chris Lattnercf786592007-12-29 20:47:37 +0000142#ifndef YY_BUF_SIZE
Reid Spencere7c3c602006-11-30 06:36:44 +0000143#define YY_BUF_SIZE (16384*64)
Chris Lattnercf786592007-12-29 20:47:37 +0000144#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000145
Chris Lattnercf786592007-12-29 20:47:37 +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;
Chris Lattnercf786592007-12-29 20:47:37 +0000153#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000154
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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 { \
Chris Lattnercf786592007-12-29 20:47:37 +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 \
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +0000192#define unput(c) yyunput( c, (yytext_ptr) )
Reid Spencer832254e2007-02-02 02:16:23 +0000193
Reid Spencere7c3c602006-11-30 06:36:44 +0000194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
Chris Lattnercf786592007-12-29 20:47:37 +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;
Chris Lattnercf786592007-12-29 20:47:37 +0000202#endif
Reid Spencere7c3c602006-11-30 06:36:44 +0000203
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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;
Chris Lattnercf786592007-12-29 20:47:37 +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"
Chris Lattnercf786592007-12-29 20:47:37 +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
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000265
Chris Lattnercf786592007-12-29 20:47:37 +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".
Chris Lattnercf786592007-12-29 20:47:37 +0000277 *
278 * Returns the top of the stack, or NULL.
Reid Spencere7c3c602006-11-30 06:36:44 +0000279 */
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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 */
Chris Lattnercf786592007-12-29 20:47:37 +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;
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +0000316#define YY_FLUSH_BUFFER Upgrade_flush_buffer(YY_CURRENT_BUFFER )
Reid Spencere7c3c602006-11-30 06:36:44 +0000317
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +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 { \
Chris Lattnercf786592007-12-29 20:47:37 +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 { \
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +0000348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Reid Spencere7c3c602006-11-30 06:36:44 +0000349
Chris Lattnercf786592007-12-29 20:47:37 +0000350/* Begin user sect3 */
Reid Spencere7c3c602006-11-30 06:36:44 +0000351
Chris Lattnercf786592007-12-29 20:47:37 +0000352#define Upgradewrap(n) 1
Reid Spencere7c3c602006-11-30 06:36:44 +0000353#define YY_SKIP_YYWRAP
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000354
Chris Lattnercf786592007-12-29 20:47:37 +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
Chris Lattnercf786592007-12-29 20:47:37 +0000374 * corresponding action - sets up Upgradetext.
Reid Spencere7c3c602006-11-30 06:36:44 +0000375 */
376#define YY_DO_BEFORE_ACTION \
Chris Lattnercf786592007-12-29 20:47:37 +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'; \
Chris Lattnercf786592007-12-29 20:47:37 +0000381 (yy_c_buf_p) = yy_cp;
Reid Spencere7c3c602006-11-30 06:36:44 +0000382
Reid Spencer785a5ae2007-02-08 00:21:40 +0000383#define YY_NUM_RULES 161
384#define YY_END_OF_BUFFER 162
Chris Lattnercf786592007-12-29 20:47:37 +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[620] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000393 { 0,
Chris Lattnercf786592007-12-29 20:47:37 +0000394 0, 0, 162, 160, 159, 159, 160, 160, 160, 160,
395 160, 160, 152, 152, 1, 160, 160, 160, 160, 160,
396 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
397 160, 160, 160, 160, 160, 160, 160, 0, 151, 0,
398 149, 148, 148, 155, 0, 153, 0, 157, 152, 0,
399 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
400 134, 0, 41, 0, 0, 0, 0, 0, 0, 0,
401 0, 94, 0, 0, 0, 0, 0, 0, 0, 0,
402 0, 62, 0, 0, 50, 0, 0, 0, 0, 0,
403 0, 0, 0, 0, 0, 95, 0, 0, 0, 0,
Reid Spencere7c3c602006-11-30 06:36:44 +0000404
Chris Lattnercf786592007-12-29 20:47:37 +0000405 0, 0, 0, 80, 0, 0, 0, 0, 0, 0,
406 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
407 0, 23, 0, 0, 0, 0, 0, 0, 0, 0,
408 0, 0, 0, 0, 0, 0, 0, 0, 0, 151,
409 148, 148, 157, 20, 157, 0, 158, 0, 68, 0,
410 0, 79, 0, 0, 39, 0, 34, 0, 0, 0,
411 0, 42, 0, 0, 0, 0, 0, 0, 71, 0,
412 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
413 0, 0, 0, 0, 53, 56, 59, 0, 0, 0,
414 54, 0, 0, 0, 0, 0, 0, 0, 0, 0,
Reid Spencere7c3c602006-11-30 06:36:44 +0000415
Chris Lattnercf786592007-12-29 20:47:37 +0000416 70, 25, 0, 104, 109, 107, 108, 106, 105, 0,
417 110, 114, 0, 0, 75, 133, 0, 0, 0, 0,
418 0, 0, 0, 99, 97, 88, 0, 89, 0, 0,
419 0, 98, 96, 0, 0, 69, 0, 0, 0, 0,
420 0, 0, 0, 0, 112, 103, 101, 0, 0, 102,
421 0, 100, 0, 113, 0, 111, 0, 0, 0, 0,
422 0, 0, 0, 0, 0, 0, 0, 81, 0, 0,
423 150, 157, 0, 0, 0, 157, 0, 0, 0, 91,
424 0, 0, 61, 115, 116, 0, 0, 0, 0, 0,
425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
426
427 93, 74, 0, 0, 0, 0, 141, 78, 0, 0,
428 92, 0, 0, 0, 0, 0, 0, 0, 0, 142,
429 57, 90, 0, 0, 22, 0, 0, 0, 154, 0,
430 73, 0, 0, 0, 0, 0, 0, 119, 0, 0,
431 0, 0, 77, 0, 0, 26, 0, 0, 4, 0,
432 66, 0, 72, 55, 0, 0, 0, 0, 0, 0,
433 76, 0, 0, 0, 0, 60, 0, 11, 0, 0,
434 118, 157, 36, 0, 0, 2, 0, 0, 0, 0,
435 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
436 5, 0, 63, 121, 0, 0, 0, 0, 0, 0,
437
438 0, 0, 0, 0, 65, 0, 0, 0, 0, 0,
439 0, 0, 48, 0, 0, 83, 87, 85, 86, 84,
440 82, 51, 0, 0, 0, 143, 0, 0, 0, 117,
441 49, 0, 58, 21, 0, 0, 0, 0, 0, 131,
442 0, 0, 0, 0, 0, 140, 0, 0, 45, 0,
443 0, 0, 0, 0, 0, 0, 64, 30, 24, 0,
444 0, 44, 123, 122, 0, 0, 7, 0, 0, 0,
445 0, 136, 0, 33, 139, 38, 67, 0, 0, 0,
446 129, 0, 0, 125, 135, 27, 28, 124, 0, 0,
447 137, 52, 132, 130, 0, 0, 0, 0, 0, 128,
448
449 0, 43, 0, 6, 29, 0, 0, 0, 0, 0,
450 120, 0, 0, 0, 0, 0, 0, 0, 0, 37,
451 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,
452 0, 0, 0, 0, 17, 0, 0, 0, 0, 9,
453 127, 10, 0, 126, 0, 0, 0, 0, 35, 0,
454 0, 0, 12, 0, 14, 13, 0, 0, 0, 0,
455 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,
456 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
457 0, 0, 0, 15, 0, 0, 0, 0, 31, 0,
458 0, 138, 0, 0, 0, 0, 0, 0, 0, 0,
459
460 0, 0, 0, 0, 0, 144, 0, 146, 147, 16,
461 0, 46, 0, 145, 18, 47, 0, 19, 0
Reid Spencere7c3c602006-11-30 06:36:44 +0000462 } ;
463
Chris Lattnercf786592007-12-29 20:47:37 +0000464static yyconst flex_int32_t yy_ec[256] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000465 { 0,
466 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
467 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
469 1, 2, 1, 4, 1, 5, 6, 1, 1, 1,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000470 1, 1, 7, 1, 8, 9, 1, 10, 11, 12,
471 13, 14, 15, 16, 15, 17, 15, 18, 19, 1,
472 1, 1, 1, 20, 21, 21, 21, 21, 22, 21,
Reid Spencere7c3c602006-11-30 06:36:44 +0000473 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
474 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000475 1, 1, 1, 1, 23, 1, 24, 25, 26, 27,
Reid Spencere7c3c602006-11-30 06:36:44 +0000476
Reid Spencer785a5ae2007-02-08 00:21:40 +0000477 28, 29, 30, 31, 32, 5, 33, 34, 35, 36,
478 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
479 47, 48, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencere7c3c602006-11-30 06:36:44 +0000480 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
487
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, 1, 1, 1, 1, 1,
493 1, 1, 1, 1, 1
494 } ;
495
Chris Lattnercf786592007-12-29 20:47:37 +0000496static yyconst flex_int32_t yy_meta[49] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000497 { 0,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000498 1, 1, 2, 1, 3, 1, 4, 5, 3, 6,
499 6, 6, 6, 6, 6, 6, 6, 7, 1, 1,
500 3, 8, 3, 3, 3, 3, 3, 8, 3, 3,
Reid Spencere7c3c602006-11-30 06:36:44 +0000501 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000502 3, 3, 3, 3, 3, 3, 3, 3
Reid Spencere7c3c602006-11-30 06:36:44 +0000503 } ;
504
Chris Lattnercf786592007-12-29 20:47:37 +0000505static yyconst flex_int16_t yy_base[630] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000506 { 0,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000507 0, 0, 1336, 1337, 1337, 1337, 1331, 1316, 41, 0,
508 49, 59, 69, 1287, 0, 112, 69, 72, 93, 113,
509 52, 122, 74, 152, 120, 77, 136, 156, 135, 71,
510 187, 186, 224, 118, 115, 56, 153, 1328, 1337, 1313,
511 1337, 0, 256, 0, 1321, 1320, 88, 264, 1282, 283,
512 0, 1323, 140, 157, 158, 121, 164, 183, 198, 32,
513 1308, 190, 95, 175, 54, 165, 217, 162, 117, 182,
514 218, 1307, 220, 272, 185, 100, 204, 219, 235, 241,
515 264, 232, 273, 57, 1306, 284, 285, 296, 297, 299,
516 300, 226, 298, 302, 308, 1305, 303, 309, 307, 316,
Reid Spencere7c3c602006-11-30 06:36:44 +0000517
Reid Spencer785a5ae2007-02-08 00:21:40 +0000518 321, 329, 330, 332, 333, 334, 313, 337, 310, 315,
519 342, 343, 350, 353, 346, 352, 358, 363, 357, 365,
520 366, 1304, 373, 377, 381, 385, 383, 384, 389, 390,
521 402, 386, 392, 417, 418, 395, 271, 393, 403, 1303,
522 0, 0, 416, 1302, 0, 447, 0, 1315, 1300, 438,
523 428, 1299, 448, 427, 1298, 419, 1297, 451, 452, 453,
524 406, 1296, 454, 455, 456, 461, 457, 460, 1295, 465,
525 464, 470, 462, 477, 474, 480, 481, 482, 483, 485,
526 488, 486, 490, 491, 1294, 1293, 1292, 492, 493, 495,
527 506, 502, 514, 511, 494, 519, 515, 517, 520, 522,
Reid Spencere7c3c602006-11-30 06:36:44 +0000528
Reid Spencer785a5ae2007-02-08 00:21:40 +0000529 1291, 1290, 525, 1289, 1288, 1287, 1286, 1285, 1284, 523,
530 1283, 1282, 531, 529, 1281, 1280, 562, 538, 537, 540,
531 532, 567, 550, 1279, 1278, 1277, 575, 1276, 534, 533,
532 576, 1275, 1274, 535, 578, 1273, 580, 582, 581, 586,
533 584, 589, 587, 588, 1272, 1271, 1270, 591, 590, 1269,
534 592, 1268, 603, 1267, 601, 1266, 607, 608, 612, 605,
535 620, 596, 621, 616, 627, 623, 546, 1265, 628, 630,
536 1337, 630, 646, 652, 654, 656, 632, 648, 637, 1264,
537 639, 652, 1263, 1262, 1261, 651, 649, 653, 660, 661,
538 664, 662, 663, 665, 666, 668, 669, 679, 674, 675,
Reid Spencere7c3c602006-11-30 06:36:44 +0000539
Reid Spencer785a5ae2007-02-08 00:21:40 +0000540 1260, 1259, 670, 671, 682, 686, 1258, 1257, 687, 692,
541 1256, 689, 693, 696, 697, 702, 704, 700, 706, 1255,
542 1254, 1253, 708, 709, 1252, 701, 710, 712, 0, 713,
543 1251, 714, 721, 724, 730, 732, 733, 1250, 735, 736,
544 738, 739, 1249, 741, 744, 1248, 753, 746, 1247, 749,
545 1246, 755, 1245, 1244, 758, 760, 764, 766, 761, 768,
546 1243, 770, 771, 773, 774, 1242, 776, 1241, 778, 777,
547 1240, 0, 1239, 781, 779, 1238, 782, 790, 797, 796,
548 806, 794, 807, 795, 799, 808, 809, 810, 811, 813,
549 1237, 817, 1236, 1235, 822, 823, 820, 830, 826, 824,
Reid Spencere7c3c602006-11-30 06:36:44 +0000550
Reid Spencer785a5ae2007-02-08 00:21:40 +0000551 828, 831, 833, 835, 1234, 832, 844, 839, 846, 848,
552 851, 843, 1233, 855, 859, 1232, 1231, 1230, 1229, 1228,
553 1227, 1226, 860, 862, 864, 1225, 865, 863, 867, 1224,
554 1223, 866, 1222, 1221, 868, 871, 872, 869, 870, 1220,
555 875, 880, 885, 888, 889, 1219, 890, 895, 1218, 896,
556 897, 898, 900, 901, 902, 903, 1217, 1216, 1215, 911,
557 906, 1214, 1213, 1212, 915, 908, 1211, 918, 926, 929,
558 909, 1210, 931, 1209, 1208, 1207, 1206, 920, 932, 934,
559 1205, 937, 938, 1204, 1203, 1202, 1201, 1200, 940, 943,
560 1199, 1198, 1197, 1192, 941, 944, 946, 945, 948, 1181,
Reid Spencere7c3c602006-11-30 06:36:44 +0000561
Reid Spencer785a5ae2007-02-08 00:21:40 +0000562 951, 1178, 953, 1170, 1167, 958, 960, 961, 962, 963,
563 1164, 964, 965, 968, 969, 970, 971, 976, 977, 1158,
564 979, 986, 987, 989, 990, 991, 994, 997, 998, 1146,
565 1003, 1006, 1007, 1004, 1145, 1008, 1009, 1011, 1012, 1144,
566 1142, 1141, 1018, 1140, 1013, 1017, 1020, 1019, 1139, 1029,
567 1033, 1034, 1137, 1016, 1136, 1133, 1038, 1041, 1042, 1043,
568 1045, 1046, 1047, 1050, 1053, 1052, 1054, 1056, 1057, 1131,
569 1058, 1061, 1059, 1064, 1065, 1070, 1069, 1128, 1071, 1077,
570 1081, 1082, 1083, 913, 1084, 1085, 1086, 1089, 784, 1091,
571 1092, 783, 1090, 1095, 1104, 1096, 1105, 1111, 1108, 1112,
Reid Spencer229e9362006-12-02 22:14:11 +0000572
Reid Spencer785a5ae2007-02-08 00:21:40 +0000573 1113, 1115, 1116, 1117, 1119, 737, 1120, 548, 391, 349,
574 1121, 312, 1125, 270, 266, 221, 1126, 184, 1337, 1166,
575 1172, 1178, 192, 1186, 1192, 70, 1200, 1203, 1208
Reid Spencere7c3c602006-11-30 06:36:44 +0000576 } ;
577
Chris Lattnercf786592007-12-29 20:47:37 +0000578static yyconst flex_int16_t yy_def[630] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000579 { 0,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000580 619, 1, 619, 619, 619, 619, 620, 621, 622, 623,
581 621, 621, 11, 13, 624, 622, 621, 621, 621, 621,
582 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
583 621, 621, 621, 621, 621, 621, 621, 620, 619, 621,
584 619, 625, 625, 626, 623, 11, 621, 11, 13, 11,
585 624, 627, 621, 621, 621, 621, 621, 621, 621, 621,
586 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
587 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
588 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
589 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencere7c3c602006-11-30 06:36:44 +0000590
Reid Spencer785a5ae2007-02-08 00:21:40 +0000591 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
592 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
593 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
594 621, 621, 621, 621, 621, 621, 621, 621, 621, 619,
595 625, 43, 628, 621, 48, 11, 50, 627, 621, 621,
596 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
597 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
598 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
599 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
600 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencere7c3c602006-11-30 06:36:44 +0000601
Reid Spencer785a5ae2007-02-08 00:21:40 +0000602 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
603 621, 621, 621, 621, 621, 621, 50, 621, 621, 621,
604 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
605 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
606 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
607 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
608 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
609 619, 628, 629, 629, 146, 146, 621, 621, 621, 621,
610 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
611 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencere7c3c602006-11-30 06:36:44 +0000612
Reid Spencer785a5ae2007-02-08 00:21:40 +0000613 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
614 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
615 621, 621, 621, 621, 621, 621, 621, 621, 217, 621,
616 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
617 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
618 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
619 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
620 621, 274, 621, 621, 621, 621, 621, 621, 621, 621,
621 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
622 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencere7c3c602006-11-30 06:36:44 +0000623
Reid Spencer785a5ae2007-02-08 00:21:40 +0000624 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
625 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
626 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
627 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
628 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
629 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
630 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
631 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
632 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
633 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencere7c3c602006-11-30 06:36:44 +0000634
Reid Spencer785a5ae2007-02-08 00:21:40 +0000635 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
636 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
637 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
638 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
639 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
640 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
641 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
642 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
643 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
644 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
Reid Spencer229e9362006-12-02 22:14:11 +0000645
Reid Spencer785a5ae2007-02-08 00:21:40 +0000646 621, 621, 621, 621, 621, 621, 621, 621, 621, 621,
647 621, 621, 621, 621, 621, 621, 621, 621, 0, 619,
648 619, 619, 619, 619, 619, 619, 619, 619, 619
Reid Spencere7c3c602006-11-30 06:36:44 +0000649 } ;
650
Chris Lattnercf786592007-12-29 20:47:37 +0000651static yyconst flex_int16_t yy_nxt[1386] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000652 { 0,
653 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000654 14, 14, 14, 14, 14, 14, 14, 4, 15, 16,
655 8, 8, 8, 17, 18, 19, 20, 21, 22, 23,
656 8, 24, 8, 25, 26, 27, 28, 29, 8, 30,
657 31, 32, 33, 34, 35, 36, 8, 37, 43, 41,
658 44, 44, 44, 44, 44, 44, 44, 44, 46, 46,
659 46, 46, 46, 46, 46, 46, 41, 47, 159, 41,
660 187, 41, 137, 41, 41, 44, 41, 48, 49, 49,
661 49, 49, 49, 49, 49, 49, 41, 71, 41, 41,
662 72, 41, 138, 165, 41, 53, 144, 73, 108, 58,
Reid Spencere7c3c602006-11-30 06:36:44 +0000663
Reid Spencer785a5ae2007-02-08 00:21:40 +0000664 93, 80, 54, 59, 55, 41, 56, 81, 60, 57,
665 41, 61, 41, 94, 50, 52, 62, 41, 63, 95,
666 162, 619, 619, 619, 619, 619, 619, 619, 619, 64,
667 41, 178, 41, 65, 41, 41, 66, 41, 41, 41,
668 67, 134, 136, 89, 68, 74, 69, 75, 76, 70,
669 170, 90, 41, 41, 135, 77, 91, 41, 153, 78,
670 92, 79, 82, 96, 83, 105, 149, 84, 85, 41,
671 41, 106, 97, 41, 41, 41, 107, 86, 98, 41,
672 139, 41, 41, 99, 152, 100, 87, 88, 150, 101,
673 151, 102, 41, 103, 154, 104, 109, 45, 155, 41,
Reid Spencere7c3c602006-11-30 06:36:44 +0000674
Reid Spencer785a5ae2007-02-08 00:21:40 +0000675 41, 41, 41, 41, 41, 169, 166, 41, 163, 121,
676 164, 110, 156, 111, 112, 41, 113, 114, 115, 177,
677 116, 41, 122, 160, 171, 123, 117, 157, 118, 119,
678 161, 120, 124, 109, 41, 41, 41, 41, 41, 158,
679 179, 41, 167, 41, 172, 173, 180, 185, 125, 41,
680 126, 127, 41, 128, 168, 129, 198, 130, 41, 131,
681 181, 174, 182, 132, 133, 142, 142, 142, 142, 142,
682 142, 142, 142, 145, 145, 145, 145, 145, 145, 145,
683 145, 41, 183, 41, 186, 146, 267, 41, 41, 41,
684 41, 146, 147, 147, 147, 147, 147, 147, 147, 147,
Reid Spencere7c3c602006-11-30 06:36:44 +0000685
Reid Spencer785a5ae2007-02-08 00:21:40 +0000686 184, 41, 41, 147, 147, 175, 147, 147, 147, 147,
687 147, 147, 176, 41, 41, 41, 41, 41, 188, 41,
688 41, 193, 189, 196, 41, 41, 41, 41, 200, 41,
689 41, 199, 41, 41, 194, 197, 190, 191, 41, 192,
690 195, 201, 203, 205, 202, 204, 41, 41, 207, 41,
691 41, 41, 214, 210, 41, 217, 209, 206, 211, 41,
692 41, 218, 208, 41, 212, 213, 41, 41, 220, 41,
693 41, 215, 230, 219, 41, 41, 221, 224, 216, 232,
694 41, 236, 41, 41, 222, 234, 226, 231, 223, 227,
695 41, 225, 228, 233, 41, 229, 237, 238, 41, 235,
Reid Spencere7c3c602006-11-30 06:36:44 +0000696
Reid Spencer785a5ae2007-02-08 00:21:40 +0000697 41, 41, 41, 41, 240, 239, 41, 41, 41, 41,
698 41, 246, 41, 259, 242, 241, 244, 250, 266, 41,
699 41, 245, 260, 41, 248, 247, 251, 243, 253, 254,
700 249, 252, 268, 255, 41, 41, 41, 273, 256, 261,
701 262, 257, 269, 273, 41, 41, 258, 285, 270, 264,
702 281, 265, 263, 274, 275, 41, 276, 276, 276, 276,
703 276, 276, 276, 276, 278, 41, 280, 277, 41, 41,
704 41, 41, 41, 41, 41, 279, 282, 41, 41, 41,
705 286, 41, 41, 288, 289, 283, 284, 41, 294, 296,
706 290, 41, 292, 291, 41, 287, 293, 41, 41, 41,
Reid Spencere7c3c602006-11-30 06:36:44 +0000707
Reid Spencer785a5ae2007-02-08 00:21:40 +0000708 41, 295, 41, 41, 297, 41, 303, 41, 41, 41,
709 41, 41, 41, 307, 299, 310, 298, 309, 301, 41,
710 308, 300, 313, 41, 305, 302, 312, 306, 41, 311,
711 304, 41, 41, 314, 41, 319, 41, 41, 316, 41,
712 41, 317, 41, 318, 321, 320, 41, 315, 41, 41,
713 41, 41, 41, 323, 41, 41, 322, 41, 325, 333,
714 341, 326, 340, 41, 324, 41, 327, 41, 369, 343,
715 328, 329, 329, 329, 329, 329, 329, 329, 329, 330,
716 331, 332, 329, 329, 41, 329, 329, 329, 329, 329,
717 329, 338, 41, 41, 334, 41, 335, 41, 41, 41,
Reid Spencere7c3c602006-11-30 06:36:44 +0000718
Reid Spencer785a5ae2007-02-08 00:21:40 +0000719 336, 41, 337, 41, 41, 41, 41, 41, 41, 41,
720 347, 349, 342, 41, 339, 346, 351, 344, 41, 350,
721 41, 345, 41, 348, 41, 41, 355, 356, 352, 41,
722 357, 353, 354, 41, 359, 364, 358, 41, 41, 360,
723 41, 362, 366, 363, 41, 41, 361, 41, 365, 41,
724 367, 273, 274, 274, 41, 368, 41, 273, 619, 619,
725 619, 40, 619, 40, 370, 41, 41, 373, 41, 41,
726 41, 371, 375, 374, 376, 377, 378, 41, 41, 41,
727 41, 41, 41, 41, 382, 41, 41, 41, 41, 387,
728 379, 41, 41, 381, 380, 383, 41, 385, 386, 41,
Reid Spencere7c3c602006-11-30 06:36:44 +0000729
Reid Spencer785a5ae2007-02-08 00:21:40 +0000730 392, 391, 390, 41, 41, 388, 41, 384, 389, 41,
731 41, 393, 394, 41, 41, 399, 400, 41, 41, 41,
732 398, 41, 395, 41, 396, 41, 41, 41, 397, 41,
733 41, 41, 401, 403, 404, 402, 406, 405, 41, 407,
734 413, 41, 409, 410, 408, 414, 415, 41, 412, 41,
735 41, 411, 41, 41, 41, 41, 41, 417, 41, 419,
736 421, 41, 416, 41, 423, 424, 41, 425, 426, 427,
737 41, 418, 41, 420, 430, 41, 422, 41, 41, 429,
738 428, 41, 431, 41, 436, 41, 432, 41, 41, 433,
739 41, 41, 434, 41, 41, 41, 41, 435, 41, 41,
Reid Spencere7c3c602006-11-30 06:36:44 +0000740
Reid Spencer785a5ae2007-02-08 00:21:40 +0000741 41, 41, 440, 437, 446, 447, 443, 41, 445, 438,
742 439, 41, 41, 41, 41, 449, 41, 442, 444, 441,
743 450, 451, 448, 41, 41, 41, 41, 41, 41, 452,
744 41, 454, 455, 453, 41, 457, 456, 41, 461, 41,
745 41, 41, 462, 41, 458, 41, 460, 41, 41, 41,
746 41, 459, 41, 463, 464, 465, 41, 466, 468, 467,
747 41, 41, 472, 41, 475, 41, 470, 473, 41, 469,
748 471, 474, 41, 476, 479, 477, 41, 41, 478, 41,
749 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
750 483, 480, 41, 482, 487, 485, 490, 41, 491, 493,
Reid Spencer78720742006-12-02 20:21:22 +0000751
Reid Spencer785a5ae2007-02-08 00:21:40 +0000752 481, 484, 41, 488, 486, 41, 41, 41, 496, 489,
753 492, 495, 41, 41, 41, 41, 494, 41, 41, 41,
754 41, 499, 502, 41, 498, 41, 41, 504, 41, 497,
755 41, 501, 41, 508, 509, 41, 500, 41, 506, 507,
756 511, 505, 512, 41, 503, 513, 41, 510, 41, 41,
757 516, 41, 515, 514, 41, 41, 517, 41, 41, 518,
758 41, 41, 41, 41, 521, 41, 522, 519, 41, 520,
759 41, 523, 527, 524, 525, 41, 528, 41, 41, 41,
760 41, 41, 41, 529, 526, 41, 41, 41, 41, 531,
761 536, 537, 530, 41, 41, 535, 41, 532, 542, 533,
Reid Spencer78720742006-12-02 20:21:22 +0000762
Reid Spencer785a5ae2007-02-08 00:21:40 +0000763 538, 539, 540, 41, 41, 534, 41, 41, 41, 541,
764 547, 41, 548, 546, 41, 41, 543, 549, 544, 551,
765 41, 41, 545, 41, 41, 41, 41, 553, 41, 41,
766 41, 557, 550, 41, 41, 41, 41, 41, 552, 561,
767 563, 558, 564, 566, 559, 554, 41, 555, 556, 562,
768 41, 41, 560, 565, 567, 41, 568, 570, 41, 41,
769 41, 571, 41, 41, 41, 569, 574, 41, 572, 41,
770 41, 41, 577, 41, 41, 41, 41, 581, 41, 575,
771 583, 41, 41, 573, 579, 580, 41, 41, 41, 582,
772 584, 578, 588, 576, 41, 585, 586, 589, 41, 41,
Reid Spencer78720742006-12-02 20:21:22 +0000773
Reid Spencer785a5ae2007-02-08 00:21:40 +0000774 41, 41, 41, 41, 592, 587, 41, 41, 41, 41,
775 590, 596, 41, 41, 593, 594, 595, 598, 591, 601,
776 603, 41, 41, 602, 599, 41, 597, 600, 41, 41,
777 41, 605, 41, 41, 41, 604, 41, 41, 41, 610,
778 611, 612, 41, 41, 606, 41, 616, 607, 41, 608,
779 41, 609, 617, 41, 41, 615, 41, 41, 41, 41,
780 614, 41, 41, 41, 613, 618, 38, 38, 38, 38,
781 38, 38, 38, 38, 40, 41, 40, 40, 40, 40,
782 42, 41, 42, 42, 41, 42, 51, 41, 51, 51,
783 51, 51, 51, 51, 141, 41, 141, 141, 41, 141,
Reid Spencer229e9362006-12-02 22:14:11 +0000784
Reid Spencer785a5ae2007-02-08 00:21:40 +0000785 148, 148, 148, 148, 148, 148, 148, 148, 272, 41,
786 272, 372, 372, 372, 41, 41, 41, 41, 41, 41,
787 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
788 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
789 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
790 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
791 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
792 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
793 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
794 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
Reid Spencer229e9362006-12-02 22:14:11 +0000795
Reid Spencer785a5ae2007-02-08 00:21:40 +0000796 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
797 41, 41, 41, 41, 41, 41, 41, 41, 39, 41,
798 271, 41, 41, 41, 41, 41, 39, 40, 48, 143,
799 41, 140, 40, 41, 39, 619, 3, 619, 619, 619,
800 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
801 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
802 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
803 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
804 619, 619, 619, 619, 619
Reid Spencere7c3c602006-11-30 06:36:44 +0000805 } ;
806
Chris Lattnercf786592007-12-29 20:47:37 +0000807static yyconst flex_int16_t yy_chk[1386] =
Reid Spencere7c3c602006-11-30 06:36:44 +0000808 { 0,
809 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
810 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
811 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
812 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Reid Spencer785a5ae2007-02-08 00:21:40 +0000813 1, 1, 1, 1, 1, 1, 1, 1, 9, 60,
814 9, 9, 9, 9, 9, 9, 9, 9, 11, 11,
815 11, 11, 11, 11, 11, 11, 11, 12, 60, 21,
816 84, 65, 36, 36, 84, 626, 12, 13, 13, 13,
817 13, 13, 13, 13, 13, 13, 17, 21, 30, 18,
818 21, 23, 36, 65, 26, 17, 47, 21, 30, 18,
Reid Spencere7c3c602006-11-30 06:36:44 +0000819
Reid Spencer785a5ae2007-02-08 00:21:40 +0000820 26, 23, 17, 18, 17, 47, 17, 23, 18, 17,
821 19, 18, 63, 26, 13, 16, 19, 76, 19, 26,
822 63, 16, 16, 16, 16, 16, 16, 16, 16, 19,
823 20, 76, 35, 19, 69, 34, 20, 25, 56, 22,
824 20, 34, 35, 25, 20, 22, 20, 22, 22, 20,
825 69, 25, 29, 27, 34, 22, 25, 53, 56, 22,
826 25, 22, 24, 27, 24, 29, 53, 24, 24, 24,
827 37, 29, 27, 28, 54, 55, 29, 24, 27, 68,
828 37, 57, 66, 28, 55, 28, 24, 24, 54, 28,
829 54, 28, 64, 28, 57, 28, 31, 623, 57, 70,
Reid Spencere7c3c602006-11-30 06:36:44 +0000830
Reid Spencer785a5ae2007-02-08 00:21:40 +0000831 58, 618, 75, 32, 31, 68, 66, 62, 64, 32,
832 64, 31, 58, 31, 31, 59, 31, 31, 31, 75,
833 31, 77, 32, 62, 70, 32, 31, 59, 31, 31,
834 62, 31, 32, 33, 67, 71, 78, 73, 616, 59,
835 77, 33, 67, 92, 71, 73, 78, 82, 33, 82,
836 33, 33, 79, 33, 67, 33, 92, 33, 80, 33,
837 78, 73, 79, 33, 33, 43, 43, 43, 43, 43,
838 43, 43, 43, 48, 48, 48, 48, 48, 48, 48,
839 48, 81, 80, 615, 83, 48, 137, 614, 137, 74,
840 83, 48, 50, 50, 50, 50, 50, 50, 50, 50,
Reid Spencere7c3c602006-11-30 06:36:44 +0000841
Reid Spencer785a5ae2007-02-08 00:21:40 +0000842 81, 86, 87, 50, 50, 74, 50, 50, 50, 50,
843 50, 50, 74, 88, 89, 93, 90, 91, 86, 94,
844 97, 89, 87, 91, 99, 95, 98, 109, 94, 612,
845 107, 93, 110, 100, 90, 91, 88, 88, 101, 88,
846 90, 95, 98, 100, 97, 99, 102, 103, 101, 104,
847 105, 106, 107, 103, 108, 109, 102, 100, 104, 111,
848 112, 110, 101, 115, 105, 106, 610, 113, 112, 116,
849 114, 108, 115, 111, 119, 117, 112, 113, 108, 116,
850 118, 119, 120, 121, 112, 117, 114, 115, 112, 114,
851 123, 113, 114, 116, 124, 114, 120, 121, 125, 118,
Reid Spencere7c3c602006-11-30 06:36:44 +0000852
Reid Spencer785a5ae2007-02-08 00:21:40 +0000853 127, 128, 126, 132, 123, 121, 129, 130, 609, 133,
854 138, 128, 136, 132, 124, 123, 126, 130, 136, 131,
855 139, 127, 133, 161, 129, 128, 130, 125, 131, 131,
856 129, 130, 138, 131, 134, 135, 156, 143, 131, 134,
857 134, 131, 139, 143, 154, 151, 131, 161, 139, 135,
858 156, 135, 134, 146, 146, 150, 146, 146, 146, 146,
859 146, 146, 146, 146, 151, 153, 154, 150, 158, 159,
860 160, 163, 164, 165, 167, 153, 158, 168, 166, 173,
861 163, 171, 170, 165, 166, 159, 160, 172, 171, 173,
862 167, 175, 170, 168, 174, 164, 170, 176, 177, 178,
Reid Spencere7c3c602006-11-30 06:36:44 +0000863
Reid Spencer785a5ae2007-02-08 00:21:40 +0000864 179, 172, 180, 182, 174, 181, 179, 183, 184, 188,
865 189, 195, 190, 182, 175, 184, 174, 183, 177, 192,
866 182, 176, 190, 191, 181, 178, 189, 181, 194, 188,
867 180, 193, 197, 191, 198, 195, 196, 199, 192, 200,
868 210, 193, 203, 194, 197, 196, 214, 191, 213, 221,
869 230, 229, 234, 199, 219, 218, 198, 220, 203, 221,
870 230, 210, 229, 267, 200, 608, 213, 223, 267, 234,
871 214, 217, 217, 217, 217, 217, 217, 217, 217, 218,
872 219, 220, 217, 217, 222, 217, 217, 217, 217, 217,
873 217, 223, 227, 231, 222, 235, 222, 237, 239, 238,
Reid Spencere7c3c602006-11-30 06:36:44 +0000874
Reid Spencer785a5ae2007-02-08 00:21:40 +0000875 222, 241, 222, 240, 243, 244, 242, 249, 248, 251,
876 239, 241, 231, 262, 227, 238, 242, 235, 255, 241,
877 253, 237, 260, 240, 257, 258, 249, 251, 243, 259,
878 253, 244, 248, 264, 257, 262, 255, 261, 263, 258,
879 266, 260, 264, 261, 265, 269, 259, 270, 263, 277,
880 265, 272, 273, 273, 279, 266, 281, 272, 274, 274,
881 275, 275, 276, 276, 269, 278, 287, 277, 286, 282,
882 288, 270, 279, 278, 281, 282, 286, 289, 290, 292,
883 293, 291, 294, 295, 290, 296, 297, 303, 304, 295,
884 287, 299, 300, 289, 288, 291, 298, 293, 294, 305,
Reid Spencere7c3c602006-11-30 06:36:44 +0000885
Reid Spencer785a5ae2007-02-08 00:21:40 +0000886 300, 299, 298, 306, 309, 296, 312, 292, 297, 310,
887 313, 303, 304, 314, 315, 310, 312, 318, 326, 316,
888 309, 317, 305, 319, 305, 323, 324, 327, 306, 328,
889 330, 332, 313, 315, 316, 314, 318, 317, 333, 319,
890 330, 334, 324, 326, 323, 332, 333, 335, 328, 336,
891 337, 327, 339, 340, 606, 341, 342, 335, 344, 336,
892 337, 345, 334, 348, 340, 341, 350, 342, 344, 345,
893 347, 335, 352, 336, 350, 355, 339, 356, 359, 348,
894 347, 357, 352, 358, 359, 360, 355, 362, 363, 356,
895 364, 365, 357, 367, 370, 369, 375, 358, 374, 377,
Reid Spencere7c3c602006-11-30 06:36:44 +0000896
Reid Spencer785a5ae2007-02-08 00:21:40 +0000897 592, 589, 364, 360, 374, 375, 369, 378, 370, 362,
898 363, 382, 384, 380, 379, 378, 385, 367, 369, 365,
899 379, 380, 377, 381, 383, 386, 387, 388, 389, 381,
900 390, 383, 384, 382, 392, 386, 385, 397, 390, 395,
901 396, 400, 392, 399, 387, 401, 389, 398, 402, 406,
902 403, 388, 404, 395, 396, 397, 408, 398, 400, 399,
903 412, 407, 404, 409, 408, 410, 402, 406, 411, 401,
904 403, 407, 414, 409, 412, 410, 415, 423, 411, 424,
905 428, 425, 427, 432, 429, 435, 438, 439, 436, 437,
906 424, 414, 441, 423, 429, 427, 436, 442, 437, 439,
Reid Spencere7c3c602006-11-30 06:36:44 +0000907
Reid Spencer785a5ae2007-02-08 00:21:40 +0000908 415, 425, 443, 432, 428, 444, 445, 447, 443, 435,
909 438, 442, 448, 450, 451, 452, 441, 453, 454, 455,
910 456, 447, 451, 461, 445, 466, 471, 453, 460, 444,
911 584, 450, 465, 460, 460, 468, 448, 478, 455, 456,
912 465, 454, 466, 469, 452, 468, 470, 461, 473, 479,
913 471, 480, 470, 469, 482, 483, 473, 489, 495, 478,
914 490, 496, 498, 497, 482, 499, 483, 479, 501, 480,
915 503, 489, 497, 490, 495, 506, 498, 507, 508, 509,
916 510, 512, 513, 499, 496, 514, 515, 516, 517, 503,
917 510, 512, 501, 518, 519, 509, 521, 506, 517, 507,
Reid Spencere7c3c602006-11-30 06:36:44 +0000918
Reid Spencer785a5ae2007-02-08 00:21:40 +0000919 513, 514, 515, 522, 523, 508, 524, 525, 526, 516,
920 523, 527, 524, 522, 528, 529, 518, 525, 519, 527,
921 531, 534, 521, 532, 533, 536, 537, 529, 538, 539,
922 545, 534, 526, 554, 546, 543, 548, 547, 528, 539,
923 545, 536, 546, 548, 537, 531, 550, 532, 533, 543,
924 551, 552, 538, 547, 550, 557, 551, 554, 558, 559,
925 560, 557, 561, 562, 563, 552, 560, 564, 558, 566,
926 565, 567, 563, 568, 569, 571, 573, 567, 572, 561,
927 569, 574, 575, 559, 565, 566, 577, 576, 579, 568,
928 571, 564, 575, 562, 580, 572, 573, 576, 581, 582,
Reid Spencere7c3c602006-11-30 06:36:44 +0000929
Reid Spencer785a5ae2007-02-08 00:21:40 +0000930 583, 585, 586, 587, 580, 574, 588, 593, 590, 591,
931 577, 585, 594, 596, 581, 582, 583, 587, 579, 591,
932 594, 595, 597, 593, 588, 599, 586, 590, 598, 600,
933 601, 596, 602, 603, 604, 595, 605, 607, 611, 601,
934 602, 603, 613, 617, 597, 578, 611, 598, 570, 599,
935 556, 600, 613, 555, 553, 607, 549, 544, 542, 541,
936 605, 540, 535, 530, 604, 617, 620, 620, 620, 620,
937 620, 620, 620, 620, 621, 520, 621, 621, 621, 621,
938 622, 511, 622, 622, 505, 622, 624, 504, 624, 624,
939 624, 624, 624, 624, 625, 502, 625, 625, 500, 625,
Reid Spencerfcb5df82006-12-01 22:34:43 +0000940
Reid Spencer785a5ae2007-02-08 00:21:40 +0000941 627, 627, 627, 627, 627, 627, 627, 627, 628, 494,
942 628, 629, 629, 629, 493, 492, 491, 488, 487, 486,
943 485, 484, 481, 477, 476, 475, 474, 472, 467, 464,
944 463, 462, 459, 458, 457, 449, 446, 440, 434, 433,
945 431, 430, 426, 422, 421, 420, 419, 418, 417, 416,
946 413, 405, 394, 393, 391, 376, 373, 371, 368, 366,
947 361, 354, 353, 351, 349, 346, 343, 338, 331, 325,
948 322, 321, 320, 311, 308, 307, 302, 301, 285, 284,
949 283, 280, 268, 256, 254, 252, 250, 247, 246, 245,
950 236, 233, 232, 228, 226, 225, 224, 216, 215, 212,
Reid Spencer229e9362006-12-02 22:14:11 +0000951
Reid Spencer785a5ae2007-02-08 00:21:40 +0000952 211, 209, 208, 207, 206, 205, 204, 202, 201, 187,
953 186, 185, 169, 162, 157, 155, 152, 149, 148, 144,
954 140, 122, 96, 85, 72, 61, 52, 49, 46, 45,
955 40, 38, 14, 8, 7, 3, 619, 619, 619, 619,
956 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
957 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
958 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
959 619, 619, 619, 619, 619, 619, 619, 619, 619, 619,
960 619, 619, 619, 619, 619
Reid Spencere7c3c602006-11-30 06:36:44 +0000961 } ;
962
Chris Lattnercf786592007-12-29 20:47:37 +0000963/* Table of booleans, true if rule could match eol. */
964static yyconst flex_int32_t yy_rule_can_match_eol[162] =
965 { 0,
9660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
969 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
973 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,
974 0, 0, };
975
976static yy_state_type yy_last_accepting_state;
977static char *yy_last_accepting_cpos;
978
979extern int Upgrade_flex_debug;
980int Upgrade_flex_debug = 0;
981
982/* The intent behind this definition is that it'll catch
983 * any uses of REJECT which flex missed.
984 */
985#define REJECT reject_used_but_not_detected
Reid Spencere7c3c602006-11-30 06:36:44 +0000986#define yymore() yymore_used_but_not_detected
987#define YY_MORE_ADJ 0
988#define YY_RESTORE_YY_MORE_OFFSET
Chris Lattnercf786592007-12-29 20:47:37 +0000989char *Upgradetext;
990#line 1 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer96839be2006-11-30 16:50:26 +0000991/*===-- UpgradeLexer.l - Scanner for 1.9 assembly files --------*- C++ -*--===//
Reid Spencere7c3c602006-11-30 06:36:44 +0000992//
993// The LLVM Compiler Infrastructure
994//
Chris Lattnercf786592007-12-29 20:47:37 +0000995// This file is distributed under the University of Illinois Open Source
996// License. See LICENSE.TXT for details.
Reid Spencere7c3c602006-11-30 06:36:44 +0000997//
998//===----------------------------------------------------------------------===//
999//
Reid Spencer96839be2006-11-30 16:50:26 +00001000// This file implements the flex scanner for LLVM 1.9 assembly languages files.
Dale Johannesen4292d1c2007-09-28 18:06:58 +00001001// This doesn't handle long double constants, since LLVM 1.9 did not have them.
Reid Spencere7c3c602006-11-30 06:36:44 +00001002//
1003//===----------------------------------------------------------------------===*/
Chris Lattnercf786592007-12-29 20:47:37 +00001004#line 29 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer319a7302007-01-05 17:20:02 +00001005#include "UpgradeInternals.h"
Reid Spencer950bf602007-01-26 08:19:09 +00001006#include "llvm/Module.h"
1007#include <list>
Reid Spencere7c3c602006-11-30 06:36:44 +00001008#include "UpgradeParser.h"
1009#include <cctype>
1010#include <cstdlib>
1011
Reid Spencer96839be2006-11-30 16:50:26 +00001012#define YY_INPUT(buf,result,max_size) \
1013{ \
1014 if (LexInput->good() && !LexInput->eof()) { \
1015 LexInput->read(buf,max_size); \
1016 result = LexInput->gcount(); \
1017 } else {\
1018 result = YY_NULL; \
1019 } \
1020}
1021
Reid Spencer950bf602007-01-26 08:19:09 +00001022#define YY_NEVER_INTERACTIVE 1
Reid Spencer96839be2006-11-30 16:50:26 +00001023
Reid Spencere7c3c602006-11-30 06:36:44 +00001024// Construct a token value for a non-obsolete token
Reid Spencer950bf602007-01-26 08:19:09 +00001025#define RET_TOK(type, Enum, sym) \
1026 Upgradelval.type = Enum; \
Reid Spencere77e35e2006-12-01 20:26:20 +00001027 return sym
1028
Reid Spencer950bf602007-01-26 08:19:09 +00001029#define RET_TY(sym,NewTY,sign) \
1030 Upgradelval.PrimType.T = NewTY; \
Reid Spencerbb1fd572007-03-21 17:15:50 +00001031 switch (sign) { \
1032 case 0: Upgradelval.PrimType.S.makeSignless(); break; \
1033 case 1: Upgradelval.PrimType.S.makeUnsigned(); break; \
1034 case 2: Upgradelval.PrimType.S.makeSigned(); break; \
1035 default: assert(0 && "Invalid sign kind"); break; \
1036 }\
Reid Spencere7c3c602006-11-30 06:36:44 +00001037 return sym
1038
Reid Spencer950bf602007-01-26 08:19:09 +00001039namespace llvm {
1040
1041// TODO: All of the static identifiers are figured out by the lexer,
1042// these should be hashed to reduce the lexer size
1043
1044// UnEscapeLexed - Run through the specified buffer and change \xx codes to the
1045// appropriate character. If AllowNull is set to false, a \00 value will cause
1046// an exception to be thrown.
1047//
1048// If AllowNull is set to true, the return value of the function points to the
1049// last character of the string in memory.
1050//
1051char *UnEscapeLexed(char *Buffer, bool AllowNull) {
1052 char *BOut = Buffer;
1053 for (char *BIn = Buffer; *BIn; ) {
1054 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) {
1055 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string
1056 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number
1057 if (!AllowNull && !*BOut)
1058 error("String literal cannot accept \\00 escape!");
1059
1060 BIn[3] = Tmp; // Restore character
1061 BIn += 3; // Skip over handled chars
1062 ++BOut;
1063 } else {
1064 *BOut++ = *BIn++;
1065 }
1066 }
1067
1068 return BOut;
1069}
1070
1071// atoull - Convert an ascii string of decimal digits into the unsigned long
1072// long representation... this does not have to do input error checking,
1073// because we know that the input will be matched by a suitable regex...
1074//
1075static uint64_t atoull(const char *Buffer) {
1076 uint64_t Result = 0;
1077 for (; *Buffer; Buffer++) {
1078 uint64_t OldRes = Result;
1079 Result *= 10;
1080 Result += *Buffer-'0';
1081 if (Result < OldRes) // Uh, oh, overflow detected!!!
1082 error("constant bigger than 64 bits detected!");
1083 }
1084 return Result;
1085}
1086
1087static uint64_t HexIntToVal(const char *Buffer) {
1088 uint64_t Result = 0;
1089 for (; *Buffer; ++Buffer) {
1090 uint64_t OldRes = Result;
1091 Result *= 16;
1092 char C = *Buffer;
1093 if (C >= '0' && C <= '9')
1094 Result += C-'0';
1095 else if (C >= 'A' && C <= 'F')
1096 Result += C-'A'+10;
1097 else if (C >= 'a' && C <= 'f')
1098 Result += C-'a'+10;
1099
1100 if (Result < OldRes) // Uh, oh, overflow detected!!!
1101 error("constant bigger than 64 bits detected!");
1102 }
1103 return Result;
1104}
1105
1106
1107// HexToFP - Convert the ascii string in hexidecimal format to the floating
1108// point representation of it.
1109//
1110static double HexToFP(const char *Buffer) {
1111 // Behave nicely in the face of C TBAA rules... see:
1112 // http://www.nullstone.com/htmls/category/aliastyp.htm
1113 union {
1114 uint64_t UI;
1115 double FP;
1116 } UIntToFP;
1117 UIntToFP.UI = HexIntToVal(Buffer);
1118
1119 assert(sizeof(double) == sizeof(uint64_t) &&
1120 "Data sizes incompatible on this target!");
1121 return UIntToFP.FP; // Cast Hex constant to double
1122}
1123
1124
1125} // End llvm namespace
1126
1127using namespace llvm;
1128
Reid Spencere7c3c602006-11-30 06:36:44 +00001129/* Comments start with a ; and go till end of line */
1130/* Variable(Value) identifiers start with a % sign */
1131/* Label identifiers end with a colon */
1132/* Quoted names can contain any character except " and \ */
1133/* [PN]Integer: match positive and negative literal integer values that
1134 * are preceeded by a '%' character. These represent unnamed variable slots.
1135 */
1136/* E[PN]Integer: match positive and negative literal integer values */
1137/* FPConstant - A Floating point constant.
1138 */
1139/* HexFPConstant - Floating point constant represented in IEEE format as a
1140 * hexadecimal number for when exponential notation is not precise enough.
1141 */
1142/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
1143 * it to deal with 64 bit numbers.
1144 */
Chris Lattnercf786592007-12-29 20:47:37 +00001145#line 1146 "UpgradeLexer.cpp"
1146
1147#define INITIAL 0
1148
1149#ifndef YY_NO_UNISTD_H
1150/* Special case for "unistd.h", since it is non-ANSI. We include it way
1151 * down here because we want the user's section 1 to have been scanned first.
1152 * The user has a chance to override it with an option.
1153 */
1154#include <unistd.h>
1155#endif
1156
1157#ifndef YY_EXTRA_TYPE
1158#define YY_EXTRA_TYPE void *
1159#endif
1160
1161static int yy_init_globals (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001162
1163/* Macros after this point can all be overridden by user definitions in
1164 * section 1.
1165 */
1166
1167#ifndef YY_SKIP_YYWRAP
1168#ifdef __cplusplus
Chris Lattnercf786592007-12-29 20:47:37 +00001169extern "C" int Upgradewrap (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001170#else
Chris Lattnercf786592007-12-29 20:47:37 +00001171extern int Upgradewrap (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001172#endif
1173#endif
1174
Chris Lattnercf786592007-12-29 20:47:37 +00001175 static inline void yyunput (int c,char *buf_ptr );
1176
Reid Spencere7c3c602006-11-30 06:36:44 +00001177#ifndef yytext_ptr
Chris Lattnercf786592007-12-29 20:47:37 +00001178static void yy_flex_strncpy (char *,yyconst char *,int );
Reid Spencere7c3c602006-11-30 06:36:44 +00001179#endif
1180
1181#ifdef YY_NEED_STRLEN
Chris Lattnercf786592007-12-29 20:47:37 +00001182static int yy_flex_strlen (yyconst char * );
Reid Spencere7c3c602006-11-30 06:36:44 +00001183#endif
1184
1185#ifndef YY_NO_INPUT
Chris Lattnercf786592007-12-29 20:47:37 +00001186
Reid Spencere7c3c602006-11-30 06:36:44 +00001187#ifdef __cplusplus
Chris Lattnercf786592007-12-29 20:47:37 +00001188static int yyinput (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001189#else
Chris Lattnercf786592007-12-29 20:47:37 +00001190static int input (void );
Reid Spencere7c3c602006-11-30 06:36:44 +00001191#endif
1192
Reid Spencere7c3c602006-11-30 06:36:44 +00001193#endif
1194
1195/* Amount of stuff to slurp up with each read. */
1196#ifndef YY_READ_BUF_SIZE
1197#define YY_READ_BUF_SIZE 8192
1198#endif
1199
1200/* Copy whatever the last rule matched to the standard output. */
Reid Spencere7c3c602006-11-30 06:36:44 +00001201#ifndef ECHO
1202/* This used to be an fputs(), but since the string might contain NUL's,
1203 * we now use fwrite().
1204 */
Chris Lattnercf786592007-12-29 20:47:37 +00001205#define ECHO (void) fwrite( Upgradetext, Upgradeleng, 1, Upgradeout )
Reid Spencere7c3c602006-11-30 06:36:44 +00001206#endif
1207
1208/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1209 * is returned in "result".
1210 */
1211#ifndef YY_INPUT
1212#define YY_INPUT(buf,result,max_size) \
Chris Lattnercf786592007-12-29 20:47:37 +00001213 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001214 { \
Chris Lattnercf786592007-12-29 20:47:37 +00001215 int c = '*'; \
1216 size_t n; \
Reid Spencere7c3c602006-11-30 06:36:44 +00001217 for ( n = 0; n < max_size && \
Chris Lattnercf786592007-12-29 20:47:37 +00001218 (c = getc( Upgradein )) != EOF && c != '\n'; ++n ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001219 buf[n] = (char) c; \
1220 if ( c == '\n' ) \
1221 buf[n++] = (char) c; \
Chris Lattnercf786592007-12-29 20:47:37 +00001222 if ( c == EOF && ferror( Upgradein ) ) \
Reid Spencere7c3c602006-11-30 06:36:44 +00001223 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1224 result = n; \
1225 } \
Chris Lattnercf786592007-12-29 20:47:37 +00001226 else \
1227 { \
1228 errno=0; \
1229 while ( (result = fread(buf, 1, max_size, Upgradein))==0 && ferror(Upgradein)) \
1230 { \
1231 if( errno != EINTR) \
1232 { \
1233 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1234 break; \
1235 } \
1236 errno=0; \
1237 clearerr(Upgradein); \
1238 } \
1239 }\
1240\
1241
Reid Spencere7c3c602006-11-30 06:36:44 +00001242#endif
1243
1244/* No semi-colon after return; correct usage is to write "yyterminate();" -
1245 * we don't want an extra ';' after the "return" because that will cause
1246 * some compilers to complain about unreachable statements.
1247 */
1248#ifndef yyterminate
1249#define yyterminate() return YY_NULL
1250#endif
1251
1252/* Number of entries by which start-condition stack grows. */
1253#ifndef YY_START_STACK_INCR
1254#define YY_START_STACK_INCR 25
1255#endif
1256
1257/* Report a fatal error. */
1258#ifndef YY_FATAL_ERROR
1259#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1260#endif
1261
Chris Lattnercf786592007-12-29 20:47:37 +00001262/* end tables serialization structures and prototypes */
1263
Reid Spencere7c3c602006-11-30 06:36:44 +00001264/* Default declaration of generated scanner - a define so the user can
1265 * easily add parameters.
1266 */
1267#ifndef YY_DECL
Chris Lattnercf786592007-12-29 20:47:37 +00001268#define YY_DECL_IS_OURS 1
Reid Spencere7c3c602006-11-30 06:36:44 +00001269
Chris Lattnercf786592007-12-29 20:47:37 +00001270extern int Upgradelex (void);
1271
1272#define YY_DECL int Upgradelex (void)
1273#endif /* !YY_DECL */
1274
1275/* Code executed at the beginning of each rule, after Upgradetext and Upgradeleng
Reid Spencere7c3c602006-11-30 06:36:44 +00001276 * have been set up.
1277 */
1278#ifndef YY_USER_ACTION
1279#define YY_USER_ACTION
1280#endif
1281
1282/* Code executed at the end of each rule. */
1283#ifndef YY_BREAK
1284#define YY_BREAK break;
1285#endif
1286
1287#define YY_RULE_SETUP \
1288 YY_USER_ACTION
1289
Chris Lattnercf786592007-12-29 20:47:37 +00001290/** The main scanner function which does all the work.
1291 */
Reid Spencere7c3c602006-11-30 06:36:44 +00001292YY_DECL
Chris Lattnercf786592007-12-29 20:47:37 +00001293{
Reid Spencere7c3c602006-11-30 06:36:44 +00001294 register yy_state_type yy_current_state;
Dale Johannesen43421b32007-09-06 18:13:44 +00001295 register char *yy_cp, *yy_bp;
Reid Spencere7c3c602006-11-30 06:36:44 +00001296 register int yy_act;
Chris Lattnercf786592007-12-29 20:47:37 +00001297
1298#line 195 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00001299
1300
Chris Lattnercf786592007-12-29 20:47:37 +00001301#line 1302 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00001302
Chris Lattnercf786592007-12-29 20:47:37 +00001303 if ( !(yy_init) )
Reid Spencere7c3c602006-11-30 06:36:44 +00001304 {
Chris Lattnercf786592007-12-29 20:47:37 +00001305 (yy_init) = 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00001306
1307#ifdef YY_USER_INIT
1308 YY_USER_INIT;
1309#endif
1310
Chris Lattnercf786592007-12-29 20:47:37 +00001311 if ( ! (yy_start) )
1312 (yy_start) = 1; /* first start state */
Reid Spencere7c3c602006-11-30 06:36:44 +00001313
Chris Lattnercf786592007-12-29 20:47:37 +00001314 if ( ! Upgradein )
1315 Upgradein = stdin;
Reid Spencere7c3c602006-11-30 06:36:44 +00001316
Chris Lattnercf786592007-12-29 20:47:37 +00001317 if ( ! Upgradeout )
1318 Upgradeout = stdout;
Reid Spencere7c3c602006-11-30 06:36:44 +00001319
Chris Lattnercf786592007-12-29 20:47:37 +00001320 if ( ! YY_CURRENT_BUFFER ) {
1321 Upgradeensure_buffer_stack ();
1322 YY_CURRENT_BUFFER_LVALUE =
1323 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE );
1324 }
Reid Spencere7c3c602006-11-30 06:36:44 +00001325
Chris Lattnercf786592007-12-29 20:47:37 +00001326 Upgrade_load_buffer_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00001327 }
1328
1329 while ( 1 ) /* loops until end-of-file is reached */
1330 {
Chris Lattnercf786592007-12-29 20:47:37 +00001331 yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00001332
Chris Lattnercf786592007-12-29 20:47:37 +00001333 /* Support of Upgradetext. */
1334 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00001335
1336 /* yy_bp points to the position in yy_ch_buf of the start of
1337 * the current run.
1338 */
1339 yy_bp = yy_cp;
1340
Chris Lattnercf786592007-12-29 20:47:37 +00001341 yy_current_state = (yy_start);
Reid Spencere7c3c602006-11-30 06:36:44 +00001342yy_match:
1343 do
1344 {
1345 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Chris Lattnercf786592007-12-29 20:47:37 +00001346 if ( yy_accept[yy_current_state] )
1347 {
1348 (yy_last_accepting_state) = yy_current_state;
1349 (yy_last_accepting_cpos) = yy_cp;
1350 }
Reid Spencere7c3c602006-11-30 06:36:44 +00001351 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1352 {
1353 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer785a5ae2007-02-08 00:21:40 +00001354 if ( yy_current_state >= 620 )
Reid Spencere7c3c602006-11-30 06:36:44 +00001355 yy_c = yy_meta[(unsigned int) yy_c];
1356 }
1357 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencere7c3c602006-11-30 06:36:44 +00001358 ++yy_cp;
1359 }
Reid Spencer785a5ae2007-02-08 00:21:40 +00001360 while ( yy_current_state != 619 );
Chris Lattnercf786592007-12-29 20:47:37 +00001361 yy_cp = (yy_last_accepting_cpos);
1362 yy_current_state = (yy_last_accepting_state);
Reid Spencere7c3c602006-11-30 06:36:44 +00001363
1364yy_find_action:
Chris Lattnercf786592007-12-29 20:47:37 +00001365 yy_act = yy_accept[yy_current_state];
Reid Spencere7c3c602006-11-30 06:36:44 +00001366
1367 YY_DO_BEFORE_ACTION;
1368
Chris Lattnercf786592007-12-29 20:47:37 +00001369 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
Reid Spencere7c3c602006-11-30 06:36:44 +00001370 {
1371 int yyl;
Chris Lattnercf786592007-12-29 20:47:37 +00001372 for ( yyl = 0; yyl < Upgradeleng; ++yyl )
1373 if ( Upgradetext[yyl] == '\n' )
1374
1375 Upgradelineno++;
1376;
Reid Spencere7c3c602006-11-30 06:36:44 +00001377 }
1378
1379do_action: /* This label is used only to access EOF actions. */
1380
Reid Spencere7c3c602006-11-30 06:36:44 +00001381 switch ( yy_act )
1382 { /* beginning of action switch */
Chris Lattnercf786592007-12-29 20:47:37 +00001383 case 0: /* must back up */
1384 /* undo the effects of YY_DO_BEFORE_ACTION */
1385 *yy_cp = (yy_hold_char);
1386 yy_cp = (yy_last_accepting_cpos);
1387 yy_current_state = (yy_last_accepting_state);
1388 goto yy_find_action;
1389
Reid Spencere7c3c602006-11-30 06:36:44 +00001390case 1:
1391YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001392#line 197 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00001393{ /* Ignore comments for now */ }
1394 YY_BREAK
1395case 2:
1396YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001397#line 199 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001398{ return BEGINTOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001399 YY_BREAK
1400case 3:
1401YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001402#line 200 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001403{ return ENDTOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001404 YY_BREAK
1405case 4:
1406YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001407#line 201 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001408{ return TRUETOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001409 YY_BREAK
1410case 5:
1411YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001412#line 202 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001413{ return FALSETOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001414 YY_BREAK
1415case 6:
1416YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001417#line 203 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001418{ return DECLARE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001419 YY_BREAK
1420case 7:
1421YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001422#line 204 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001423{ return GLOBAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001424 YY_BREAK
1425case 8:
1426YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001427#line 205 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001428{ return CONSTANT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001429 YY_BREAK
1430case 9:
1431YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001432#line 206 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001433{ return INTERNAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001434 YY_BREAK
1435case 10:
1436YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001437#line 207 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001438{ return LINKONCE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001439 YY_BREAK
1440case 11:
1441YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001442#line 208 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001443{ return WEAK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001444 YY_BREAK
1445case 12:
1446YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001447#line 209 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001448{ return APPENDING; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001449 YY_BREAK
1450case 13:
1451YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001452#line 210 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001453{ return DLLIMPORT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001454 YY_BREAK
1455case 14:
1456YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001457#line 211 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001458{ return DLLEXPORT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001459 YY_BREAK
1460case 15:
1461YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001462#line 212 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001463{ return EXTERN_WEAK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001464 YY_BREAK
1465case 16:
1466YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001467#line 213 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001468{ return EXTERNAL; } /* Deprecated, turn into external */
Reid Spencere7c3c602006-11-30 06:36:44 +00001469 YY_BREAK
1470case 17:
1471YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001472#line 214 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001473{ return EXTERNAL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001474 YY_BREAK
1475case 18:
1476YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001477#line 215 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001478{ return IMPLEMENTATION; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001479 YY_BREAK
1480case 19:
1481YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001482#line 216 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001483{ return ZEROINITIALIZER; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001484 YY_BREAK
1485case 20:
1486YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001487#line 217 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001488{ return DOTDOTDOT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001489 YY_BREAK
1490case 21:
1491YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001492#line 218 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001493{ return UNDEF; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001494 YY_BREAK
1495case 22:
1496YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001497#line 219 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001498{ return NULL_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001499 YY_BREAK
1500case 23:
1501YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001502#line 220 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001503{ return TO; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001504 YY_BREAK
1505case 24:
1506YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001507#line 221 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001508{ return EXCEPT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001509 YY_BREAK
1510case 25:
1511YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001512#line 222 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001513{ return NOT; } /* Deprecated, turned into XOR */
Reid Spencere7c3c602006-11-30 06:36:44 +00001514 YY_BREAK
1515case 26:
1516YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001517#line 223 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001518{ return TAIL; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001519 YY_BREAK
1520case 27:
1521YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001522#line 224 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001523{ return TARGET; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001524 YY_BREAK
1525case 28:
1526YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001527#line 225 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001528{ return TRIPLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001529 YY_BREAK
1530case 29:
1531YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001532#line 226 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001533{ return DEPLIBS; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001534 YY_BREAK
1535case 30:
1536YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001537#line 227 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001538{ return ENDIAN; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001539 YY_BREAK
1540case 31:
1541YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001542#line 228 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001543{ return POINTERSIZE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001544 YY_BREAK
1545case 32:
1546YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001547#line 229 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001548{ return DATALAYOUT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001549 YY_BREAK
1550case 33:
1551YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001552#line 230 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001553{ return LITTLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001554 YY_BREAK
1555case 34:
1556YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001557#line 231 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001558{ return BIG; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001559 YY_BREAK
1560case 35:
1561YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001562#line 232 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001563{ return VOLATILE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001564 YY_BREAK
1565case 36:
1566YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001567#line 233 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001568{ return ALIGN; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001569 YY_BREAK
1570case 37:
1571YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001572#line 234 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001573{ return SECTION; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001574 YY_BREAK
1575case 38:
1576YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001577#line 235 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001578{ return MODULE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001579 YY_BREAK
1580case 39:
1581YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001582#line 236 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001583{ return ASM_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001584 YY_BREAK
1585case 40:
1586YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001587#line 237 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001588{ return SIDEEFFECT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001589 YY_BREAK
1590case 41:
1591YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001592#line 239 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001593{ return CC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001594 YY_BREAK
1595case 42:
1596YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001597#line 240 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001598{ return CCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001599 YY_BREAK
1600case 43:
1601YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001602#line 241 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001603{ return CSRETCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001604 YY_BREAK
1605case 44:
1606YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001607#line 242 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001608{ return FASTCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001609 YY_BREAK
1610case 45:
1611YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001612#line 243 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001613{ return COLDCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001614 YY_BREAK
1615case 46:
1616YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001617#line 244 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001618{ return X86_STDCALLCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001619 YY_BREAK
1620case 47:
1621YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001622#line 245 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00001623{ return X86_FASTCALLCC_TOK; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001624 YY_BREAK
1625case 48:
1626YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001627#line 247 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001628{ RET_TY(SBYTE, Type::Int8Ty, 2); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001629 YY_BREAK
1630case 49:
1631YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001632#line 248 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001633{ RET_TY(UBYTE, Type::Int8Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001634 YY_BREAK
1635case 50:
1636YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001637#line 249 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001638{ RET_TY(UBYTE, Type::Int8Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001639 YY_BREAK
1640case 51:
1641YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001642#line 250 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001643{ RET_TY(SHORT, Type::Int16Ty, 2); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001644 YY_BREAK
1645case 52:
1646YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001647#line 251 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001648{ RET_TY(USHORT, Type::Int16Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001649 YY_BREAK
1650case 53:
1651YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001652#line 252 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001653{ RET_TY(USHORT, Type::Int16Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001654 YY_BREAK
1655case 54:
1656YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001657#line 253 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001658{ RET_TY(INT, Type::Int32Ty, 2); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001659 YY_BREAK
1660case 55:
1661YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001662#line 254 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001663{ RET_TY(UINT, Type::Int32Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001664 YY_BREAK
1665case 56:
1666YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001667#line 255 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001668{ RET_TY(UINT, Type::Int32Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001669 YY_BREAK
1670case 57:
1671YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001672#line 256 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001673{ RET_TY(LONG, Type::Int64Ty, 2); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001674 YY_BREAK
1675case 58:
1676YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001677#line 257 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001678{ RET_TY(ULONG, Type::Int64Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001679 YY_BREAK
1680case 59:
1681YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001682#line 258 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001683{ RET_TY(ULONG, Type::Int64Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001684 YY_BREAK
1685case 60:
1686YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001687#line 259 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001688{ RET_TY(VOID, Type::VoidTy, 0); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001689 YY_BREAK
1690case 61:
1691YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001692#line 260 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001693{ RET_TY(BOOL, Type::Int1Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001694 YY_BREAK
1695case 62:
1696YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001697#line 261 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001698{ RET_TY(BOOL, Type::Int1Ty, 1); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001699 YY_BREAK
1700case 63:
1701YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001702#line 262 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001703{ RET_TY(FLOAT, Type::FloatTy, 0); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001704 YY_BREAK
1705case 64:
1706YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001707#line 263 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001708{ RET_TY(DOUBLE, Type::DoubleTy,0); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001709 YY_BREAK
1710case 65:
1711YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001712#line 264 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencerbb1fd572007-03-21 17:15:50 +00001713{ RET_TY(LABEL, Type::LabelTy, 0); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001714 YY_BREAK
1715case 66:
1716YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001717#line 265 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001718{ return TYPE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001719 YY_BREAK
1720case 67:
1721YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001722#line 266 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001723{ return OPAQUE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001724 YY_BREAK
1725case 68:
1726YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001727#line 268 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001728{ RET_TOK(BinaryOpVal, AddOp, ADD); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001729 YY_BREAK
1730case 69:
1731YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001732#line 269 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001733{ RET_TOK(BinaryOpVal, SubOp, SUB); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001734 YY_BREAK
1735case 70:
1736YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001737#line 270 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001738{ RET_TOK(BinaryOpVal, MulOp, MUL); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001739 YY_BREAK
1740case 71:
1741YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001742#line 271 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001743{ RET_TOK(BinaryOpVal, DivOp, DIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001744 YY_BREAK
1745case 72:
1746YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001747#line 272 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001748{ RET_TOK(BinaryOpVal, UDivOp, UDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001749 YY_BREAK
1750case 73:
1751YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001752#line 273 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001753{ RET_TOK(BinaryOpVal, SDivOp, SDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001754 YY_BREAK
1755case 74:
1756YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001757#line 274 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001758{ RET_TOK(BinaryOpVal, FDivOp, FDIV); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001759 YY_BREAK
1760case 75:
1761YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001762#line 275 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001763{ RET_TOK(BinaryOpVal, RemOp, REM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001764 YY_BREAK
1765case 76:
1766YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001767#line 276 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001768{ RET_TOK(BinaryOpVal, URemOp, UREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001769 YY_BREAK
1770case 77:
1771YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001772#line 277 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001773{ RET_TOK(BinaryOpVal, SRemOp, SREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001774 YY_BREAK
1775case 78:
1776YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001777#line 278 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001778{ RET_TOK(BinaryOpVal, FRemOp, FREM); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001779 YY_BREAK
1780case 79:
1781YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001782#line 279 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001783{ RET_TOK(BinaryOpVal, AndOp, AND); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001784 YY_BREAK
1785case 80:
1786YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001787#line 280 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001788{ RET_TOK(BinaryOpVal, OrOp , OR ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001789 YY_BREAK
1790case 81:
1791YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001792#line 281 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001793{ RET_TOK(BinaryOpVal, XorOp, XOR); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001794 YY_BREAK
1795case 82:
1796YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001797#line 282 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001798{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001799 YY_BREAK
1800case 83:
1801YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001802#line 283 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001803{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001804 YY_BREAK
1805case 84:
1806YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001807#line 284 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001808{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001809 YY_BREAK
1810case 85:
1811YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001812#line 285 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001813{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001814 YY_BREAK
1815case 86:
1816YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001817#line 286 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001818{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001819 YY_BREAK
1820case 87:
1821YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001822#line 287 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001823{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001824 YY_BREAK
1825case 88:
1826YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001827#line 288 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001828{ RET_TOK(BinaryOpVal, ShlOp, SHL); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001829 YY_BREAK
1830case 89:
1831YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001832#line 289 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001833{ RET_TOK(BinaryOpVal, ShrOp, SHR); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001834 YY_BREAK
1835case 90:
1836YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001837#line 290 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001838{ RET_TOK(BinaryOpVal, LShrOp, LSHR); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001839 YY_BREAK
1840case 91:
1841YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001842#line 291 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001843{ RET_TOK(BinaryOpVal, AShrOp, ASHR); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001844 YY_BREAK
1845case 92:
1846YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001847#line 293 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001848{ RET_TOK(OtherOpVal, ICmpOp, ICMP); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001849 YY_BREAK
1850case 93:
1851YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001852#line 294 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001853{ RET_TOK(OtherOpVal, FCmpOp, FCMP); }
Reid Spencere7c3c602006-11-30 06:36:44 +00001854 YY_BREAK
1855case 94:
1856YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001857#line 296 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001858{ return EQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001859 YY_BREAK
1860case 95:
1861YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001862#line 297 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001863{ return NE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001864 YY_BREAK
1865case 96:
1866YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001867#line 298 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001868{ return SLT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001869 YY_BREAK
1870case 97:
1871YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001872#line 299 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001873{ return SGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001874 YY_BREAK
1875case 98:
1876YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001877#line 300 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001878{ return SLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001879 YY_BREAK
1880case 99:
1881YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001882#line 301 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001883{ return SGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001884 YY_BREAK
1885case 100:
1886YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001887#line 302 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001888{ return ULT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001889 YY_BREAK
1890case 101:
1891YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001892#line 303 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001893{ return UGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001894 YY_BREAK
1895case 102:
1896YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001897#line 304 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001898{ return ULE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001899 YY_BREAK
1900case 103:
1901YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001902#line 305 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001903{ return UGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001904 YY_BREAK
1905case 104:
1906YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001907#line 306 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001908{ return OEQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001909 YY_BREAK
1910case 105:
1911YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001912#line 307 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001913{ return ONE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001914 YY_BREAK
1915case 106:
1916YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001917#line 308 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001918{ return OLT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001919 YY_BREAK
1920case 107:
1921YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001922#line 309 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001923{ return OGT; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001924 YY_BREAK
1925case 108:
1926YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001927#line 310 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001928{ return OLE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001929 YY_BREAK
1930case 109:
1931YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001932#line 311 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001933{ return OGE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001934 YY_BREAK
1935case 110:
1936YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001937#line 312 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001938{ return ORD; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001939 YY_BREAK
1940case 111:
1941YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001942#line 313 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001943{ return UNO; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001944 YY_BREAK
1945case 112:
1946YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001947#line 314 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001948{ return UEQ; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001949 YY_BREAK
1950case 113:
1951YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001952#line 315 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001953{ return UNE; }
Reid Spencere7c3c602006-11-30 06:36:44 +00001954 YY_BREAK
Reid Spencer16244f42006-12-01 21:10:07 +00001955case 114:
1956YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001957#line 317 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001958{ RET_TOK(OtherOpVal, PHIOp, PHI_TOK); }
Reid Spencer16244f42006-12-01 21:10:07 +00001959 YY_BREAK
Reid Spencerf7bde222006-12-01 22:26:37 +00001960case 115:
1961YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001962#line 318 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001963{ RET_TOK(OtherOpVal, CallOp, CALL); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001964 YY_BREAK
1965case 116:
1966YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001967#line 319 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001968{ RET_TOK(CastOpVal, CastOp, CAST); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001969 YY_BREAK
1970case 117:
1971YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001972#line 320 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001973{ RET_TOK(CastOpVal, TruncOp, TRUNC); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001974 YY_BREAK
1975case 118:
1976YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001977#line 321 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001978{ RET_TOK(CastOpVal, ZExtOp , ZEXT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001979 YY_BREAK
1980case 119:
1981YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001982#line 322 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001983{ RET_TOK(CastOpVal, SExtOp, SEXT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001984 YY_BREAK
1985case 120:
1986YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001987#line 323 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001988{ RET_TOK(CastOpVal, FPTruncOp, FPTRUNC); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001989 YY_BREAK
1990case 121:
1991YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001992#line 324 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001993{ RET_TOK(CastOpVal, FPExtOp, FPEXT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001994 YY_BREAK
1995case 122:
1996YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00001997#line 325 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00001998{ RET_TOK(CastOpVal, FPToUIOp, FPTOUI); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00001999 YY_BREAK
2000case 123:
2001YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002002#line 326 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002003{ RET_TOK(CastOpVal, FPToSIOp, FPTOSI); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00002004 YY_BREAK
2005case 124:
2006YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002007#line 327 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002008{ RET_TOK(CastOpVal, UIToFPOp, UITOFP); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00002009 YY_BREAK
2010case 125:
2011YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002012#line 328 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002013{ RET_TOK(CastOpVal, SIToFPOp, SITOFP); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00002014 YY_BREAK
2015case 126:
2016YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002017#line 329 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002018{ RET_TOK(CastOpVal, PtrToIntOp, PTRTOINT); }
Reid Spencerfcb5df82006-12-01 22:34:43 +00002019 YY_BREAK
2020case 127:
2021YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002022#line 330 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002023{ RET_TOK(CastOpVal, IntToPtrOp, INTTOPTR); }
Reid Spencer78720742006-12-02 20:21:22 +00002024 YY_BREAK
2025case 128:
2026YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002027#line 331 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002028{ RET_TOK(CastOpVal, BitCastOp, BITCAST); }
Reid Spencer229e9362006-12-02 22:14:11 +00002029 YY_BREAK
2030case 129:
2031YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002032#line 332 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002033{ RET_TOK(OtherOpVal, SelectOp, SELECT); }
Reid Spencer229e9362006-12-02 22:14:11 +00002034 YY_BREAK
2035case 130:
2036YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002037#line 333 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002038{ return VANEXT_old; }
Reid Spencer229e9362006-12-02 22:14:11 +00002039 YY_BREAK
2040case 131:
2041YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002042#line 334 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002043{ return VAARG_old; }
Reid Spencer229e9362006-12-02 22:14:11 +00002044 YY_BREAK
2045case 132:
2046YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002047#line 335 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002048{ RET_TOK(OtherOpVal, VAArg , VAARG); }
Reid Spencer229e9362006-12-02 22:14:11 +00002049 YY_BREAK
2050case 133:
2051YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002052#line 336 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002053{ RET_TOK(TermOpVal, RetOp, RET); }
Reid Spencer229e9362006-12-02 22:14:11 +00002054 YY_BREAK
2055case 134:
2056YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002057#line 337 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002058{ RET_TOK(TermOpVal, BrOp, BR); }
Reid Spencer229e9362006-12-02 22:14:11 +00002059 YY_BREAK
2060case 135:
2061YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002062#line 338 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002063{ RET_TOK(TermOpVal, SwitchOp, SWITCH); }
Reid Spencer229e9362006-12-02 22:14:11 +00002064 YY_BREAK
2065case 136:
2066YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002067#line 339 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002068{ RET_TOK(TermOpVal, InvokeOp, INVOKE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002069 YY_BREAK
2070case 137:
2071YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002072#line 340 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002073{ return UNWIND; }
Reid Spencer229e9362006-12-02 22:14:11 +00002074 YY_BREAK
2075case 138:
2076YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002077#line 341 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002078{ RET_TOK(TermOpVal, UnreachableOp, UNREACHABLE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002079 YY_BREAK
2080case 139:
2081YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002082#line 343 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002083{ RET_TOK(MemOpVal, MallocOp, MALLOC); }
Reid Spencer229e9362006-12-02 22:14:11 +00002084 YY_BREAK
2085case 140:
2086YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002087#line 344 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002088{ RET_TOK(MemOpVal, AllocaOp, ALLOCA); }
Reid Spencer229e9362006-12-02 22:14:11 +00002089 YY_BREAK
2090case 141:
2091YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002092#line 345 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002093{ RET_TOK(MemOpVal, FreeOp, FREE); }
Reid Spencer229e9362006-12-02 22:14:11 +00002094 YY_BREAK
2095case 142:
2096YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002097#line 346 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002098{ RET_TOK(MemOpVal, LoadOp, LOAD); }
Reid Spencer229e9362006-12-02 22:14:11 +00002099 YY_BREAK
2100case 143:
2101YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002102#line 347 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002103{ RET_TOK(MemOpVal, StoreOp, STORE); }
2104 YY_BREAK
2105case 144:
2106YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002107#line 348 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002108{ RET_TOK(MemOpVal, GetElementPtrOp, GETELEMENTPTR); }
2109 YY_BREAK
2110case 145:
2111YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002112#line 350 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002113{ RET_TOK(OtherOpVal, ExtractElementOp, EXTRACTELEMENT); }
2114 YY_BREAK
2115case 146:
2116YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002117#line 351 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002118{ RET_TOK(OtherOpVal, InsertElementOp, INSERTELEMENT); }
2119 YY_BREAK
2120case 147:
2121YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002122#line 352 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer785a5ae2007-02-08 00:21:40 +00002123{ RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); }
2124 YY_BREAK
2125case 148:
2126YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002127#line 355 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002128{
Chris Lattnercf786592007-12-29 20:47:37 +00002129 UnEscapeLexed(Upgradetext+1);
2130 Upgradelval.StrVal = strdup(Upgradetext+1); // Skip %
Reid Spencer950bf602007-01-26 08:19:09 +00002131 return VAR_ID;
2132 }
Reid Spencer229e9362006-12-02 22:14:11 +00002133 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002134case 149:
Reid Spencer229e9362006-12-02 22:14:11 +00002135YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002136#line 360 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002137{
Chris Lattnercf786592007-12-29 20:47:37 +00002138 Upgradetext[strlen(Upgradetext)-1] = 0; // nuke colon
2139 UnEscapeLexed(Upgradetext);
2140 Upgradelval.StrVal = strdup(Upgradetext);
Reid Spencer950bf602007-01-26 08:19:09 +00002141 return LABELSTR;
2142 }
Reid Spencer229e9362006-12-02 22:14:11 +00002143 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002144case 150:
Chris Lattnercf786592007-12-29 20:47:37 +00002145/* rule 150 can match eol */
Reid Spencer229e9362006-12-02 22:14:11 +00002146YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002147#line 366 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002148{
Chris Lattnercf786592007-12-29 20:47:37 +00002149 Upgradetext[strlen(Upgradetext)-2] = 0; // nuke colon, end quote
2150 UnEscapeLexed(Upgradetext+1);
2151 Upgradelval.StrVal = strdup(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002152 return LABELSTR;
2153 }
Reid Spencer229e9362006-12-02 22:14:11 +00002154 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002155case 151:
Chris Lattnercf786592007-12-29 20:47:37 +00002156/* rule 151 can match eol */
Reid Spencer229e9362006-12-02 22:14:11 +00002157YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002158#line 373 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002159{ // Note that we cannot unescape a string constant here! The
2160 // string constant might contain a \00 which would not be
2161 // understood by the string stuff. It is valid to make a
2162 // [sbyte] c"Hello World\00" constant, for example.
2163 //
Chris Lattnercf786592007-12-29 20:47:37 +00002164 Upgradetext[strlen(Upgradetext)-1] = 0; // nuke end quote
2165 Upgradelval.StrVal = strdup(Upgradetext+1); // Nuke start quote
Reid Spencer950bf602007-01-26 08:19:09 +00002166 return STRINGCONSTANT;
2167 }
Reid Spencer229e9362006-12-02 22:14:11 +00002168 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002169case 152:
Reid Spencer229e9362006-12-02 22:14:11 +00002170YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002171#line 384 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
2172{ Upgradelval.UInt64Val = atoull(Upgradetext); return EUINT64VAL; }
Reid Spencer229e9362006-12-02 22:14:11 +00002173 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002174case 153:
Reid Spencer229e9362006-12-02 22:14:11 +00002175YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002176#line 385 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002177{
Chris Lattnercf786592007-12-29 20:47:37 +00002178 uint64_t Val = atoull(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002179 // +1: we have bigger negative range
2180 if (Val > (uint64_t)INT64_MAX+1)
2181 error("Constant too large for signed 64 bits!");
2182 Upgradelval.SInt64Val = -Val;
2183 return ESINT64VAL;
2184 }
Reid Spencer229e9362006-12-02 22:14:11 +00002185 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002186case 154:
Reid Spencer229e9362006-12-02 22:14:11 +00002187YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002188#line 393 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002189{
Chris Lattnercf786592007-12-29 20:47:37 +00002190 Upgradelval.UInt64Val = HexIntToVal(Upgradetext+3);
2191 return Upgradetext[0] == 's' ? ESINT64VAL : EUINT64VAL;
Reid Spencer950bf602007-01-26 08:19:09 +00002192 }
Reid Spencer229e9362006-12-02 22:14:11 +00002193 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002194case 155:
Reid Spencer229e9362006-12-02 22:14:11 +00002195YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002196#line 398 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002197{
Chris Lattnercf786592007-12-29 20:47:37 +00002198 uint64_t Val = atoull(Upgradetext+1);
Reid Spencer950bf602007-01-26 08:19:09 +00002199 if ((unsigned)Val != Val)
2200 error("Invalid value number (too large)!");
2201 Upgradelval.UIntVal = unsigned(Val);
2202 return UINTVAL;
2203 }
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002204 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002205case 156:
Reid Spencer6fd36ab2006-12-29 20:35:03 +00002206YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002207#line 405 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002208{
Chris Lattnercf786592007-12-29 20:47:37 +00002209 uint64_t Val = atoull(Upgradetext+2);
Reid Spencer950bf602007-01-26 08:19:09 +00002210 // +1: we have bigger negative range
2211 if (Val > (uint64_t)INT32_MAX+1)
2212 error("Constant too large for signed 32 bits!");
2213 Upgradelval.SIntVal = (int)-Val;
2214 return SINTVAL;
2215 }
Reid Spencer71d2ec92006-12-31 06:02:26 +00002216 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002217case 157:
Reid Spencer71d2ec92006-12-31 06:02:26 +00002218YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002219#line 414 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
2220{ Upgradelval.FPVal = new APFloat(atof(Upgradetext)); return FPVAL; }
Reid Spencer71d2ec92006-12-31 06:02:26 +00002221 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002222case 158:
Reid Spencer71d2ec92006-12-31 06:02:26 +00002223YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002224#line 415 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
2225{ Upgradelval.FPVal = new APFloat(HexToFP(Upgradetext));
Dale Johannesen43421b32007-09-06 18:13:44 +00002226 return FPVAL;
2227 }
Reid Spencerf7bde222006-12-01 22:26:37 +00002228 YY_BREAK
2229case YY_STATE_EOF(INITIAL):
Chris Lattnercf786592007-12-29 20:47:37 +00002230#line 419 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00002231{
2232 /* Make sure to free the internal buffers for flex when we are
2233 * done reading our input!
2234 */
Chris Lattnercf786592007-12-29 20:47:37 +00002235 Upgrade_delete_buffer(YY_CURRENT_BUFFER);
Reid Spencere7c3c602006-11-30 06:36:44 +00002236 return EOF;
2237 }
2238 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002239case 159:
Chris Lattnercf786592007-12-29 20:47:37 +00002240/* rule 159 can match eol */
Reid Spencer950bf602007-01-26 08:19:09 +00002241YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002242#line 427 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencer950bf602007-01-26 08:19:09 +00002243{ /* Ignore whitespace */ }
2244 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002245case 160:
Reid Spencerf7bde222006-12-01 22:26:37 +00002246YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002247#line 428 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
2248{ return Upgradetext[0]; }
Reid Spencer78720742006-12-02 20:21:22 +00002249 YY_BREAK
Reid Spencer785a5ae2007-02-08 00:21:40 +00002250case 161:
Reid Spencer78720742006-12-02 20:21:22 +00002251YY_RULE_SETUP
Chris Lattnercf786592007-12-29 20:47:37 +00002252#line 430 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
Reid Spencere7c3c602006-11-30 06:36:44 +00002253YY_FATAL_ERROR( "flex scanner jammed" );
2254 YY_BREAK
Chris Lattnercf786592007-12-29 20:47:37 +00002255#line 2256 "UpgradeLexer.cpp"
Reid Spencere7c3c602006-11-30 06:36:44 +00002256
2257 case YY_END_OF_BUFFER:
2258 {
2259 /* Amount of text matched not including the EOB char. */
Chris Lattnercf786592007-12-29 20:47:37 +00002260 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002261
2262 /* Undo the effects of YY_DO_BEFORE_ACTION. */
Chris Lattnercf786592007-12-29 20:47:37 +00002263 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002264 YY_RESTORE_YY_MORE_OFFSET
2265
Chris Lattnercf786592007-12-29 20:47:37 +00002266 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Reid Spencere7c3c602006-11-30 06:36:44 +00002267 {
2268 /* We're scanning a new file or input source. It's
2269 * possible that this happened because the user
Chris Lattnercf786592007-12-29 20:47:37 +00002270 * just pointed Upgradein at a new source and called
2271 * Upgradelex(). If so, then we have to assure
2272 * consistency between YY_CURRENT_BUFFER and our
Reid Spencere7c3c602006-11-30 06:36:44 +00002273 * globals. Here is the right place to do so, because
2274 * this is the first action (other than possibly a
2275 * back-up) that will match for the new input source.
2276 */
Chris Lattnercf786592007-12-29 20:47:37 +00002277 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2278 YY_CURRENT_BUFFER_LVALUE->yy_input_file = Upgradein;
2279 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Reid Spencere7c3c602006-11-30 06:36:44 +00002280 }
2281
2282 /* Note that here we test for yy_c_buf_p "<=" to the position
2283 * of the first EOB in the buffer, since yy_c_buf_p will
2284 * already have been incremented past the NUL character
2285 * (since all states make transitions on EOB to the
2286 * end-of-buffer state). Contrast this with the test
2287 * in input().
2288 */
Chris Lattnercf786592007-12-29 20:47:37 +00002289 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002290 { /* This was really a NUL. */
2291 yy_state_type yy_next_state;
2292
Chris Lattnercf786592007-12-29 20:47:37 +00002293 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencere7c3c602006-11-30 06:36:44 +00002294
Chris Lattnercf786592007-12-29 20:47:37 +00002295 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002296
2297 /* Okay, we're now positioned to make the NUL
2298 * transition. We couldn't have
2299 * yy_get_previous_state() go ahead and do it
2300 * for us because it doesn't know how to deal
2301 * with the possibility of jamming (and we don't
2302 * want to build jamming into it because then it
2303 * will run more slowly).
2304 */
2305
2306 yy_next_state = yy_try_NUL_trans( yy_current_state );
2307
Chris Lattnercf786592007-12-29 20:47:37 +00002308 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002309
2310 if ( yy_next_state )
2311 {
2312 /* Consume the NUL. */
Chris Lattnercf786592007-12-29 20:47:37 +00002313 yy_cp = ++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002314 yy_current_state = yy_next_state;
2315 goto yy_match;
2316 }
2317
2318 else
2319 {
Chris Lattnercf786592007-12-29 20:47:37 +00002320 yy_cp = (yy_last_accepting_cpos);
2321 yy_current_state = (yy_last_accepting_state);
Reid Spencere7c3c602006-11-30 06:36:44 +00002322 goto yy_find_action;
2323 }
2324 }
2325
Chris Lattnercf786592007-12-29 20:47:37 +00002326 else switch ( yy_get_next_buffer( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002327 {
2328 case EOB_ACT_END_OF_FILE:
2329 {
Chris Lattnercf786592007-12-29 20:47:37 +00002330 (yy_did_buffer_switch_on_eof) = 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002331
Chris Lattnercf786592007-12-29 20:47:37 +00002332 if ( Upgradewrap( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002333 {
2334 /* Note: because we've taken care in
2335 * yy_get_next_buffer() to have set up
Chris Lattnercf786592007-12-29 20:47:37 +00002336 * Upgradetext, we can now set up
Reid Spencere7c3c602006-11-30 06:36:44 +00002337 * yy_c_buf_p so that if some total
2338 * hoser (like flex itself) wants to
2339 * call the scanner after we return the
2340 * YY_NULL, it'll still work - another
2341 * YY_NULL will get returned.
2342 */
Chris Lattnercf786592007-12-29 20:47:37 +00002343 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002344
2345 yy_act = YY_STATE_EOF(YY_START);
2346 goto do_action;
2347 }
2348
2349 else
2350 {
Chris Lattnercf786592007-12-29 20:47:37 +00002351 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002352 YY_NEW_FILE;
2353 }
2354 break;
2355 }
2356
2357 case EOB_ACT_CONTINUE_SCAN:
Chris Lattnercf786592007-12-29 20:47:37 +00002358 (yy_c_buf_p) =
2359 (yytext_ptr) + yy_amount_of_matched_text;
Reid Spencere7c3c602006-11-30 06:36:44 +00002360
Chris Lattnercf786592007-12-29 20:47:37 +00002361 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002362
Chris Lattnercf786592007-12-29 20:47:37 +00002363 yy_cp = (yy_c_buf_p);
2364 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002365 goto yy_match;
2366
2367 case EOB_ACT_LAST_MATCH:
Chris Lattnercf786592007-12-29 20:47:37 +00002368 (yy_c_buf_p) =
2369 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Reid Spencere7c3c602006-11-30 06:36:44 +00002370
Chris Lattnercf786592007-12-29 20:47:37 +00002371 yy_current_state = yy_get_previous_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002372
Chris Lattnercf786592007-12-29 20:47:37 +00002373 yy_cp = (yy_c_buf_p);
2374 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Reid Spencere7c3c602006-11-30 06:36:44 +00002375 goto yy_find_action;
2376 }
2377 break;
2378 }
2379
2380 default:
2381 YY_FATAL_ERROR(
2382 "fatal flex scanner internal error--no action found" );
2383 } /* end of action switch */
2384 } /* end of scanning one token */
Chris Lattnercf786592007-12-29 20:47:37 +00002385} /* end of Upgradelex */
Reid Spencere7c3c602006-11-30 06:36:44 +00002386
2387/* yy_get_next_buffer - try to read in a new buffer
2388 *
2389 * Returns a code representing an action:
2390 * EOB_ACT_LAST_MATCH -
2391 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2392 * EOB_ACT_END_OF_FILE - end of file
2393 */
Chris Lattnercf786592007-12-29 20:47:37 +00002394static int yy_get_next_buffer (void)
2395{
2396 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2397 register char *source = (yytext_ptr);
Reid Spencere7c3c602006-11-30 06:36:44 +00002398 register int number_to_move, i;
2399 int ret_val;
2400
Chris Lattnercf786592007-12-29 20:47:37 +00002401 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002402 YY_FATAL_ERROR(
2403 "fatal flex scanner internal error--end of buffer missed" );
2404
Chris Lattnercf786592007-12-29 20:47:37 +00002405 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002406 { /* Don't try to fill the buffer, so this is an EOF. */
Chris Lattnercf786592007-12-29 20:47:37 +00002407 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002408 {
2409 /* We matched a single character, the EOB, so
2410 * treat this as a final EOF.
2411 */
2412 return EOB_ACT_END_OF_FILE;
2413 }
2414
2415 else
2416 {
2417 /* We matched some text prior to the EOB, first
2418 * process it.
2419 */
2420 return EOB_ACT_LAST_MATCH;
2421 }
2422 }
2423
2424 /* Try to read more data. */
2425
2426 /* First move last chars to start of buffer. */
Chris Lattnercf786592007-12-29 20:47:37 +00002427 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002428
2429 for ( i = 0; i < number_to_move; ++i )
2430 *(dest++) = *(source++);
2431
Chris Lattnercf786592007-12-29 20:47:37 +00002432 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Reid Spencere7c3c602006-11-30 06:36:44 +00002433 /* don't do the read, it's not guaranteed to return an EOF,
2434 * just force an EOF
2435 */
Chris Lattnercf786592007-12-29 20:47:37 +00002436 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002437
2438 else
2439 {
Chris Lattnercf786592007-12-29 20:47:37 +00002440 int num_to_read =
2441 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Reid Spencere7c3c602006-11-30 06:36:44 +00002442
2443 while ( num_to_read <= 0 )
2444 { /* Not enough room in the buffer - grow it. */
Reid Spencere7c3c602006-11-30 06:36:44 +00002445
2446 /* just a shorter name for the current buffer */
Chris Lattnercf786592007-12-29 20:47:37 +00002447 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Reid Spencere7c3c602006-11-30 06:36:44 +00002448
2449 int yy_c_buf_p_offset =
Chris Lattnercf786592007-12-29 20:47:37 +00002450 (int) ((yy_c_buf_p) - b->yy_ch_buf);
Reid Spencere7c3c602006-11-30 06:36:44 +00002451
2452 if ( b->yy_is_our_buffer )
2453 {
2454 int new_size = b->yy_buf_size * 2;
2455
2456 if ( new_size <= 0 )
2457 b->yy_buf_size += b->yy_buf_size / 8;
2458 else
2459 b->yy_buf_size *= 2;
2460
2461 b->yy_ch_buf = (char *)
2462 /* Include room in for 2 EOB chars. */
Chris Lattnercf786592007-12-29 20:47:37 +00002463 Upgraderealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
Reid Spencere7c3c602006-11-30 06:36:44 +00002464 }
2465 else
2466 /* Can't grow it, we don't own it. */
2467 b->yy_ch_buf = 0;
2468
2469 if ( ! b->yy_ch_buf )
2470 YY_FATAL_ERROR(
2471 "fatal error - scanner input buffer overflow" );
2472
Chris Lattnercf786592007-12-29 20:47:37 +00002473 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Reid Spencere7c3c602006-11-30 06:36:44 +00002474
Chris Lattnercf786592007-12-29 20:47:37 +00002475 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Reid Spencere7c3c602006-11-30 06:36:44 +00002476 number_to_move - 1;
Chris Lattnercf786592007-12-29 20:47:37 +00002477
Reid Spencere7c3c602006-11-30 06:36:44 +00002478 }
2479
2480 if ( num_to_read > YY_READ_BUF_SIZE )
2481 num_to_read = YY_READ_BUF_SIZE;
2482
2483 /* Read in more data. */
Chris Lattnercf786592007-12-29 20:47:37 +00002484 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2485 (yy_n_chars), num_to_read );
Reid Spencere7c3c602006-11-30 06:36:44 +00002486
Chris Lattnercf786592007-12-29 20:47:37 +00002487 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencere7c3c602006-11-30 06:36:44 +00002488 }
2489
Chris Lattnercf786592007-12-29 20:47:37 +00002490 if ( (yy_n_chars) == 0 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002491 {
2492 if ( number_to_move == YY_MORE_ADJ )
2493 {
2494 ret_val = EOB_ACT_END_OF_FILE;
Chris Lattnercf786592007-12-29 20:47:37 +00002495 Upgraderestart(Upgradein );
Reid Spencere7c3c602006-11-30 06:36:44 +00002496 }
2497
2498 else
2499 {
2500 ret_val = EOB_ACT_LAST_MATCH;
Chris Lattnercf786592007-12-29 20:47:37 +00002501 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Reid Spencere7c3c602006-11-30 06:36:44 +00002502 YY_BUFFER_EOF_PENDING;
2503 }
2504 }
2505
2506 else
2507 ret_val = EOB_ACT_CONTINUE_SCAN;
2508
Chris Lattnercf786592007-12-29 20:47:37 +00002509 (yy_n_chars) += number_to_move;
2510 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2511 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Reid Spencere7c3c602006-11-30 06:36:44 +00002512
Chris Lattnercf786592007-12-29 20:47:37 +00002513 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Reid Spencere7c3c602006-11-30 06:36:44 +00002514
2515 return ret_val;
Chris Lattnercf786592007-12-29 20:47:37 +00002516}
Reid Spencere7c3c602006-11-30 06:36:44 +00002517
2518/* yy_get_previous_state - get the state just before the EOB char was reached */
2519
Chris Lattnercf786592007-12-29 20:47:37 +00002520 static yy_state_type yy_get_previous_state (void)
2521{
Reid Spencere7c3c602006-11-30 06:36:44 +00002522 register yy_state_type yy_current_state;
2523 register char *yy_cp;
Chris Lattnercf786592007-12-29 20:47:37 +00002524
2525 yy_current_state = (yy_start);
Reid Spencere7c3c602006-11-30 06:36:44 +00002526
Chris Lattnercf786592007-12-29 20:47:37 +00002527 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Reid Spencere7c3c602006-11-30 06:36:44 +00002528 {
2529 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Chris Lattnercf786592007-12-29 20:47:37 +00002530 if ( yy_accept[yy_current_state] )
2531 {
2532 (yy_last_accepting_state) = yy_current_state;
2533 (yy_last_accepting_cpos) = yy_cp;
2534 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002535 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2536 {
2537 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer785a5ae2007-02-08 00:21:40 +00002538 if ( yy_current_state >= 620 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002539 yy_c = yy_meta[(unsigned int) yy_c];
2540 }
2541 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencere7c3c602006-11-30 06:36:44 +00002542 }
2543
2544 return yy_current_state;
Chris Lattnercf786592007-12-29 20:47:37 +00002545}
Reid Spencere7c3c602006-11-30 06:36:44 +00002546
2547/* yy_try_NUL_trans - try to make a transition on the NUL character
2548 *
2549 * synopsis
2550 * next_state = yy_try_NUL_trans( current_state );
2551 */
Chris Lattnercf786592007-12-29 20:47:37 +00002552 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2553{
Reid Spencere7c3c602006-11-30 06:36:44 +00002554 register int yy_is_jam;
Chris Lattnercf786592007-12-29 20:47:37 +00002555 register char *yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002556
2557 register YY_CHAR yy_c = 1;
Chris Lattnercf786592007-12-29 20:47:37 +00002558 if ( yy_accept[yy_current_state] )
2559 {
2560 (yy_last_accepting_state) = yy_current_state;
2561 (yy_last_accepting_cpos) = yy_cp;
2562 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002563 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2564 {
2565 yy_current_state = (int) yy_def[yy_current_state];
Reid Spencer785a5ae2007-02-08 00:21:40 +00002566 if ( yy_current_state >= 620 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002567 yy_c = yy_meta[(unsigned int) yy_c];
2568 }
2569 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Reid Spencer785a5ae2007-02-08 00:21:40 +00002570 yy_is_jam = (yy_current_state == 619);
Reid Spencere7c3c602006-11-30 06:36:44 +00002571
2572 return yy_is_jam ? 0 : yy_current_state;
Chris Lattnercf786592007-12-29 20:47:37 +00002573}
Reid Spencere7c3c602006-11-30 06:36:44 +00002574
Chris Lattnercf786592007-12-29 20:47:37 +00002575 static inline void yyunput (int c, register char * yy_bp )
2576{
2577 register char *yy_cp;
2578
2579 yy_cp = (yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002580
Chris Lattnercf786592007-12-29 20:47:37 +00002581 /* undo effects of setting up Upgradetext */
2582 *yy_cp = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002583
Chris Lattnercf786592007-12-29 20:47:37 +00002584 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002585 { /* need to shift things up to make room */
2586 /* +2 for EOB chars. */
Chris Lattnercf786592007-12-29 20:47:37 +00002587 register int number_to_move = (yy_n_chars) + 2;
2588 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2589 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Reid Spencere7c3c602006-11-30 06:36:44 +00002590 register char *source =
Chris Lattnercf786592007-12-29 20:47:37 +00002591 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Reid Spencere7c3c602006-11-30 06:36:44 +00002592
Chris Lattnercf786592007-12-29 20:47:37 +00002593 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Reid Spencere7c3c602006-11-30 06:36:44 +00002594 *--dest = *--source;
2595
2596 yy_cp += (int) (dest - source);
2597 yy_bp += (int) (dest - source);
Chris Lattnercf786592007-12-29 20:47:37 +00002598 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2599 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Reid Spencere7c3c602006-11-30 06:36:44 +00002600
Chris Lattnercf786592007-12-29 20:47:37 +00002601 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Reid Spencere7c3c602006-11-30 06:36:44 +00002602 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2603 }
2604
2605 *--yy_cp = (char) c;
2606
Chris Lattnercf786592007-12-29 20:47:37 +00002607 if ( c == '\n' ){
2608 --Upgradelineno;
2609 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002610
Chris Lattnercf786592007-12-29 20:47:37 +00002611 (yytext_ptr) = yy_bp;
2612 (yy_hold_char) = *yy_cp;
2613 (yy_c_buf_p) = yy_cp;
2614}
Reid Spencer832254e2007-02-02 02:16:23 +00002615
Chris Lattnercf786592007-12-29 20:47:37 +00002616#ifndef YY_NO_INPUT
Reid Spencere7c3c602006-11-30 06:36:44 +00002617#ifdef __cplusplus
Chris Lattnercf786592007-12-29 20:47:37 +00002618 static int yyinput (void)
Reid Spencere7c3c602006-11-30 06:36:44 +00002619#else
Chris Lattnercf786592007-12-29 20:47:37 +00002620 static int input (void)
Reid Spencere7c3c602006-11-30 06:36:44 +00002621#endif
Chris Lattnercf786592007-12-29 20:47:37 +00002622
2623{
Reid Spencere7c3c602006-11-30 06:36:44 +00002624 int c;
Chris Lattnercf786592007-12-29 20:47:37 +00002625
2626 *(yy_c_buf_p) = (yy_hold_char);
Reid Spencere7c3c602006-11-30 06:36:44 +00002627
Chris Lattnercf786592007-12-29 20:47:37 +00002628 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Reid Spencere7c3c602006-11-30 06:36:44 +00002629 {
2630 /* yy_c_buf_p now points to the character we want to return.
2631 * If this occurs *before* the EOB characters, then it's a
2632 * valid NUL; if not, then we've hit the end of the buffer.
2633 */
Chris Lattnercf786592007-12-29 20:47:37 +00002634 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Reid Spencere7c3c602006-11-30 06:36:44 +00002635 /* This was really a NUL. */
Chris Lattnercf786592007-12-29 20:47:37 +00002636 *(yy_c_buf_p) = '\0';
Reid Spencere7c3c602006-11-30 06:36:44 +00002637
2638 else
2639 { /* need more input */
Chris Lattnercf786592007-12-29 20:47:37 +00002640 int offset = (yy_c_buf_p) - (yytext_ptr);
2641 ++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002642
Chris Lattnercf786592007-12-29 20:47:37 +00002643 switch ( yy_get_next_buffer( ) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002644 {
2645 case EOB_ACT_LAST_MATCH:
2646 /* This happens because yy_g_n_b()
2647 * sees that we've accumulated a
2648 * token and flags that we need to
2649 * try matching the token before
2650 * proceeding. But for input(),
2651 * there's no matching to consider.
2652 * So convert the EOB_ACT_LAST_MATCH
2653 * to EOB_ACT_END_OF_FILE.
2654 */
2655
2656 /* Reset buffer status. */
Chris Lattnercf786592007-12-29 20:47:37 +00002657 Upgraderestart(Upgradein );
Reid Spencere7c3c602006-11-30 06:36:44 +00002658
Chris Lattnercf786592007-12-29 20:47:37 +00002659 /*FALLTHROUGH*/
Reid Spencere7c3c602006-11-30 06:36:44 +00002660
2661 case EOB_ACT_END_OF_FILE:
2662 {
Chris Lattnercf786592007-12-29 20:47:37 +00002663 if ( Upgradewrap( ) )
2664 return 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002665
Chris Lattnercf786592007-12-29 20:47:37 +00002666 if ( ! (yy_did_buffer_switch_on_eof) )
Reid Spencere7c3c602006-11-30 06:36:44 +00002667 YY_NEW_FILE;
2668#ifdef __cplusplus
2669 return yyinput();
2670#else
2671 return input();
2672#endif
2673 }
2674
2675 case EOB_ACT_CONTINUE_SCAN:
Chris Lattnercf786592007-12-29 20:47:37 +00002676 (yy_c_buf_p) = (yytext_ptr) + offset;
Reid Spencere7c3c602006-11-30 06:36:44 +00002677 break;
2678 }
2679 }
2680 }
2681
Chris Lattnercf786592007-12-29 20:47:37 +00002682 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2683 *(yy_c_buf_p) = '\0'; /* preserve Upgradetext */
2684 (yy_hold_char) = *++(yy_c_buf_p);
Reid Spencere7c3c602006-11-30 06:36:44 +00002685
2686 if ( c == '\n' )
Chris Lattnercf786592007-12-29 20:47:37 +00002687
2688 Upgradelineno++;
2689;
Reid Spencere7c3c602006-11-30 06:36:44 +00002690
2691 return c;
Chris Lattnercf786592007-12-29 20:47:37 +00002692}
2693#endif /* ifndef YY_NO_INPUT */
2694
2695/** Immediately switch to a different input stream.
2696 * @param input_file A readable stream.
2697 *
2698 * @note This function does not reset the start condition to @c INITIAL .
2699 */
2700 void Upgraderestart (FILE * input_file )
2701{
2702
2703 if ( ! YY_CURRENT_BUFFER ){
2704 Upgradeensure_buffer_stack ();
2705 YY_CURRENT_BUFFER_LVALUE =
2706 Upgrade_create_buffer(Upgradein,YY_BUF_SIZE );
Reid Spencer832254e2007-02-02 02:16:23 +00002707 }
Dale Johannesen43421b32007-09-06 18:13:44 +00002708
Chris Lattnercf786592007-12-29 20:47:37 +00002709 Upgrade_init_buffer(YY_CURRENT_BUFFER,input_file );
2710 Upgrade_load_buffer_state( );
2711}
Reid Spencere7c3c602006-11-30 06:36:44 +00002712
Chris Lattnercf786592007-12-29 20:47:37 +00002713/** Switch to a different input buffer.
2714 * @param new_buffer The new input buffer.
2715 *
2716 */
2717 void Upgrade_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2718{
2719
2720 /* TODO. We should be able to replace this entire function body
2721 * with
2722 * Upgradepop_buffer_state();
2723 * Upgradepush_buffer_state(new_buffer);
2724 */
2725 Upgradeensure_buffer_stack ();
2726 if ( YY_CURRENT_BUFFER == new_buffer )
Reid Spencere7c3c602006-11-30 06:36:44 +00002727 return;
2728
Chris Lattnercf786592007-12-29 20:47:37 +00002729 if ( YY_CURRENT_BUFFER )
Reid Spencere7c3c602006-11-30 06:36:44 +00002730 {
2731 /* Flush out information for old buffer. */
Chris Lattnercf786592007-12-29 20:47:37 +00002732 *(yy_c_buf_p) = (yy_hold_char);
2733 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2734 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Reid Spencere7c3c602006-11-30 06:36:44 +00002735 }
2736
Chris Lattnercf786592007-12-29 20:47:37 +00002737 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2738 Upgrade_load_buffer_state( );
Reid Spencere7c3c602006-11-30 06:36:44 +00002739
2740 /* We don't actually know whether we did this switch during
Chris Lattnercf786592007-12-29 20:47:37 +00002741 * EOF (Upgradewrap()) processing, but the only time this flag
2742 * is looked at is after Upgradewrap() is called, so it's safe
Reid Spencere7c3c602006-11-30 06:36:44 +00002743 * to go ahead and always set it.
2744 */
Chris Lattnercf786592007-12-29 20:47:37 +00002745 (yy_did_buffer_switch_on_eof) = 1;
2746}
Reid Spencere7c3c602006-11-30 06:36:44 +00002747
Chris Lattnercf786592007-12-29 20:47:37 +00002748static void Upgrade_load_buffer_state (void)
2749{
2750 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2751 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2752 Upgradein = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2753 (yy_hold_char) = *(yy_c_buf_p);
2754}
Reid Spencere7c3c602006-11-30 06:36:44 +00002755
Chris Lattnercf786592007-12-29 20:47:37 +00002756/** Allocate and initialize an input buffer state.
2757 * @param file A readable stream.
2758 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2759 *
2760 * @return the allocated buffer state.
2761 */
2762 YY_BUFFER_STATE Upgrade_create_buffer (FILE * file, int size )
2763{
Reid Spencere7c3c602006-11-30 06:36:44 +00002764 YY_BUFFER_STATE b;
Chris Lattnercf786592007-12-29 20:47:37 +00002765
2766 b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) );
Reid Spencere7c3c602006-11-30 06:36:44 +00002767 if ( ! b )
Chris Lattnercf786592007-12-29 20:47:37 +00002768 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002769
2770 b->yy_buf_size = size;
2771
2772 /* yy_ch_buf has to be 2 characters longer than the size given because
2773 * we need to put in 2 end-of-buffer characters.
2774 */
Chris Lattnercf786592007-12-29 20:47:37 +00002775 b->yy_ch_buf = (char *) Upgradealloc(b->yy_buf_size + 2 );
Reid Spencere7c3c602006-11-30 06:36:44 +00002776 if ( ! b->yy_ch_buf )
Chris Lattnercf786592007-12-29 20:47:37 +00002777 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002778
2779 b->yy_is_our_buffer = 1;
2780
Chris Lattnercf786592007-12-29 20:47:37 +00002781 Upgrade_init_buffer(b,file );
Reid Spencere7c3c602006-11-30 06:36:44 +00002782
2783 return b;
Chris Lattnercf786592007-12-29 20:47:37 +00002784}
Reid Spencere7c3c602006-11-30 06:36:44 +00002785
Chris Lattnercf786592007-12-29 20:47:37 +00002786/** Destroy the buffer.
2787 * @param b a buffer created with Upgrade_create_buffer()
2788 *
2789 */
2790 void Upgrade_delete_buffer (YY_BUFFER_STATE b )
2791{
2792
Reid Spencere7c3c602006-11-30 06:36:44 +00002793 if ( ! b )
2794 return;
2795
Chris Lattnercf786592007-12-29 20:47:37 +00002796 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2797 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Reid Spencere7c3c602006-11-30 06:36:44 +00002798
2799 if ( b->yy_is_our_buffer )
Chris Lattnercf786592007-12-29 20:47:37 +00002800 Upgradefree((void *) b->yy_ch_buf );
Reid Spencere7c3c602006-11-30 06:36:44 +00002801
Chris Lattnercf786592007-12-29 20:47:37 +00002802 Upgradefree((void *) b );
2803}
Reid Spencere7c3c602006-11-30 06:36:44 +00002804
Chris Lattnercf786592007-12-29 20:47:37 +00002805/* Initializes or reinitializes a buffer.
2806 * This function is sometimes called more than once on the same buffer,
2807 * such as during a Upgraderestart() or at EOF.
2808 */
2809 static void Upgrade_init_buffer (YY_BUFFER_STATE b, FILE * file )
Reid Spencere7c3c602006-11-30 06:36:44 +00002810
Chris Lattnercf786592007-12-29 20:47:37 +00002811{
2812 int oerrno = errno;
2813
2814 Upgrade_flush_buffer(b );
Reid Spencere7c3c602006-11-30 06:36:44 +00002815
2816 b->yy_input_file = file;
2817 b->yy_fill_buffer = 1;
2818
Chris Lattnercf786592007-12-29 20:47:37 +00002819 /* If b is the current buffer, then Upgrade_init_buffer was _probably_
2820 * called from Upgraderestart() or through yy_get_next_buffer.
2821 * In that case, we don't want to reset the lineno or column.
2822 */
2823 if (b != YY_CURRENT_BUFFER){
2824 b->yy_bs_lineno = 1;
2825 b->yy_bs_column = 0;
2826 }
Reid Spencere7c3c602006-11-30 06:36:44 +00002827
Chris Lattnercf786592007-12-29 20:47:37 +00002828 b->yy_is_interactive = 0;
2829
2830 errno = oerrno;
2831}
Reid Spencere7c3c602006-11-30 06:36:44 +00002832
Chris Lattnercf786592007-12-29 20:47:37 +00002833/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2834 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2835 *
2836 */
2837 void Upgrade_flush_buffer (YY_BUFFER_STATE b )
2838{
2839 if ( ! b )
Reid Spencere7c3c602006-11-30 06:36:44 +00002840 return;
2841
2842 b->yy_n_chars = 0;
2843
2844 /* We always need two end-of-buffer characters. The first causes
2845 * a transition to the end-of-buffer state. The second causes
2846 * a jam in that state.
2847 */
2848 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2849 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2850
2851 b->yy_buf_pos = &b->yy_ch_buf[0];
2852
2853 b->yy_at_bol = 1;
2854 b->yy_buffer_status = YY_BUFFER_NEW;
2855
Chris Lattnercf786592007-12-29 20:47:37 +00002856 if ( b == YY_CURRENT_BUFFER )
2857 Upgrade_load_buffer_state( );
2858}
2859
2860/** Pushes the new state onto the stack. The new state becomes
2861 * the current state. This function will allocate the stack
2862 * if necessary.
2863 * @param new_buffer The new state.
2864 *
2865 */
2866void Upgradepush_buffer_state (YY_BUFFER_STATE new_buffer )
2867{
2868 if (new_buffer == NULL)
2869 return;
2870
2871 Upgradeensure_buffer_stack();
2872
2873 /* This block is copied from Upgrade_switch_to_buffer. */
2874 if ( YY_CURRENT_BUFFER )
2875 {
2876 /* Flush out information for old buffer. */
2877 *(yy_c_buf_p) = (yy_hold_char);
2878 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2879 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2880 }
2881
2882 /* Only push if top exists. Otherwise, replace top. */
2883 if (YY_CURRENT_BUFFER)
2884 (yy_buffer_stack_top)++;
2885 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2886
2887 /* copied from Upgrade_switch_to_buffer. */
2888 Upgrade_load_buffer_state( );
2889 (yy_did_buffer_switch_on_eof) = 1;
2890}
2891
2892/** Removes and deletes the top of the stack, if present.
2893 * The next element becomes the new top.
2894 *
2895 */
2896void Upgradepop_buffer_state (void)
2897{
2898 if (!YY_CURRENT_BUFFER)
2899 return;
2900
2901 Upgrade_delete_buffer(YY_CURRENT_BUFFER );
2902 YY_CURRENT_BUFFER_LVALUE = NULL;
2903 if ((yy_buffer_stack_top) > 0)
2904 --(yy_buffer_stack_top);
2905
2906 if (YY_CURRENT_BUFFER) {
2907 Upgrade_load_buffer_state( );
2908 (yy_did_buffer_switch_on_eof) = 1;
2909 }
2910}
2911
2912/* Allocates the stack if it does not exist.
2913 * Guarantees space for at least one push.
2914 */
2915static void Upgradeensure_buffer_stack (void)
2916{
2917 int num_to_alloc;
2918
2919 if (!(yy_buffer_stack)) {
2920
2921 /* First allocation is just for 2 elements, since we don't know if this
2922 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2923 * immediate realloc on the next call.
2924 */
2925 num_to_alloc = 1;
2926 (yy_buffer_stack) = (struct yy_buffer_state**)Upgradealloc
2927 (num_to_alloc * sizeof(struct yy_buffer_state*)
2928 );
2929
2930 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2931
2932 (yy_buffer_stack_max) = num_to_alloc;
2933 (yy_buffer_stack_top) = 0;
2934 return;
Reid Spencere7c3c602006-11-30 06:36:44 +00002935 }
2936
Chris Lattnercf786592007-12-29 20:47:37 +00002937 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Reid Spencere7c3c602006-11-30 06:36:44 +00002938
Chris Lattnercf786592007-12-29 20:47:37 +00002939 /* Increase the buffer to prepare for a possible push. */
2940 int grow_size = 8 /* arbitrary grow size */;
2941
2942 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2943 (yy_buffer_stack) = (struct yy_buffer_state**)Upgraderealloc
2944 ((yy_buffer_stack),
2945 num_to_alloc * sizeof(struct yy_buffer_state*)
2946 );
2947
2948 /* zero only the new slots.*/
2949 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2950 (yy_buffer_stack_max) = num_to_alloc;
2951 }
2952}
2953
2954/** Setup the input buffer state to scan directly from a user-specified character buffer.
2955 * @param base the character buffer
2956 * @param size the size in bytes of the character buffer
2957 *
2958 * @return the newly allocated buffer state object.
2959 */
2960YY_BUFFER_STATE Upgrade_scan_buffer (char * base, yy_size_t size )
2961{
Reid Spencere7c3c602006-11-30 06:36:44 +00002962 YY_BUFFER_STATE b;
Chris Lattnercf786592007-12-29 20:47:37 +00002963
Reid Spencere7c3c602006-11-30 06:36:44 +00002964 if ( size < 2 ||
2965 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2966 base[size-1] != YY_END_OF_BUFFER_CHAR )
2967 /* They forgot to leave room for the EOB's. */
2968 return 0;
2969
Chris Lattnercf786592007-12-29 20:47:37 +00002970 b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) );
Reid Spencere7c3c602006-11-30 06:36:44 +00002971 if ( ! b )
Chris Lattnercf786592007-12-29 20:47:37 +00002972 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_buffer()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00002973
2974 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2975 b->yy_buf_pos = b->yy_ch_buf = base;
2976 b->yy_is_our_buffer = 0;
2977 b->yy_input_file = 0;
2978 b->yy_n_chars = b->yy_buf_size;
2979 b->yy_is_interactive = 0;
2980 b->yy_at_bol = 1;
2981 b->yy_fill_buffer = 0;
2982 b->yy_buffer_status = YY_BUFFER_NEW;
2983
Chris Lattnercf786592007-12-29 20:47:37 +00002984 Upgrade_switch_to_buffer(b );
Reid Spencere7c3c602006-11-30 06:36:44 +00002985
2986 return b;
Chris Lattnercf786592007-12-29 20:47:37 +00002987}
Reid Spencere7c3c602006-11-30 06:36:44 +00002988
Chris Lattnercf786592007-12-29 20:47:37 +00002989/** Setup the input buffer state to scan a string. The next call to Upgradelex() will
2990 * scan from a @e copy of @a str.
2991 * @param str a NUL-terminated string to scan
2992 *
2993 * @return the newly allocated buffer state object.
2994 * @note If you want to scan bytes that may contain NUL values, then use
2995 * Upgrade_scan_bytes() instead.
2996 */
2997YY_BUFFER_STATE Upgrade_scan_string (yyconst char * yystr )
2998{
2999
3000 return Upgrade_scan_bytes(yystr,strlen(yystr) );
3001}
Reid Spencere7c3c602006-11-30 06:36:44 +00003002
Chris Lattnercf786592007-12-29 20:47:37 +00003003/** Setup the input buffer state to scan the given bytes. The next call to Upgradelex() will
3004 * scan from a @e copy of @a bytes.
3005 * @param bytes the byte buffer to scan
3006 * @param len the number of bytes in the buffer pointed to by @a bytes.
3007 *
3008 * @return the newly allocated buffer state object.
3009 */
3010YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char * yybytes, int _yybytes_len )
3011{
Reid Spencere7c3c602006-11-30 06:36:44 +00003012 YY_BUFFER_STATE b;
3013 char *buf;
3014 yy_size_t n;
3015 int i;
Chris Lattnercf786592007-12-29 20:47:37 +00003016
Reid Spencere7c3c602006-11-30 06:36:44 +00003017 /* Get memory for full buffer, including space for trailing EOB's. */
Chris Lattnercf786592007-12-29 20:47:37 +00003018 n = _yybytes_len + 2;
3019 buf = (char *) Upgradealloc(n );
Reid Spencere7c3c602006-11-30 06:36:44 +00003020 if ( ! buf )
Chris Lattnercf786592007-12-29 20:47:37 +00003021 YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_bytes()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00003022
Chris Lattnercf786592007-12-29 20:47:37 +00003023 for ( i = 0; i < _yybytes_len; ++i )
3024 buf[i] = yybytes[i];
Reid Spencere7c3c602006-11-30 06:36:44 +00003025
Chris Lattnercf786592007-12-29 20:47:37 +00003026 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Reid Spencere7c3c602006-11-30 06:36:44 +00003027
Chris Lattnercf786592007-12-29 20:47:37 +00003028 b = Upgrade_scan_buffer(buf,n );
Reid Spencere7c3c602006-11-30 06:36:44 +00003029 if ( ! b )
Chris Lattnercf786592007-12-29 20:47:37 +00003030 YY_FATAL_ERROR( "bad buffer in Upgrade_scan_bytes()" );
Reid Spencere7c3c602006-11-30 06:36:44 +00003031
3032 /* It's okay to grow etc. this buffer, and we should throw it
3033 * away when we're done.
3034 */
3035 b->yy_is_our_buffer = 1;
3036
3037 return b;
Chris Lattnercf786592007-12-29 20:47:37 +00003038}
Reid Spencere7c3c602006-11-30 06:36:44 +00003039
3040#ifndef YY_EXIT_FAILURE
3041#define YY_EXIT_FAILURE 2
3042#endif
3043
Chris Lattnercf786592007-12-29 20:47:37 +00003044static void yy_fatal_error (yyconst char* msg )
3045{
3046 (void) fprintf( stderr, "%s\n", msg );
Reid Spencere7c3c602006-11-30 06:36:44 +00003047 exit( YY_EXIT_FAILURE );
Chris Lattnercf786592007-12-29 20:47:37 +00003048}
Reid Spencere7c3c602006-11-30 06:36:44 +00003049
3050/* Redefine yyless() so it works in section 3 code. */
3051
3052#undef yyless
3053#define yyless(n) \
3054 do \
3055 { \
Chris Lattnercf786592007-12-29 20:47:37 +00003056 /* Undo effects of setting up Upgradetext. */ \
3057 int yyless_macro_arg = (n); \
3058 YY_LESS_LINENO(yyless_macro_arg);\
3059 Upgradetext[Upgradeleng] = (yy_hold_char); \
3060 (yy_c_buf_p) = Upgradetext + yyless_macro_arg; \
3061 (yy_hold_char) = *(yy_c_buf_p); \
3062 *(yy_c_buf_p) = '\0'; \
3063 Upgradeleng = yyless_macro_arg; \
Reid Spencere7c3c602006-11-30 06:36:44 +00003064 } \
3065 while ( 0 )
3066
Chris Lattnercf786592007-12-29 20:47:37 +00003067/* Accessor methods (get/set functions) to struct members. */
Reid Spencere7c3c602006-11-30 06:36:44 +00003068
Chris Lattnercf786592007-12-29 20:47:37 +00003069/** Get the current line number.
3070 *
3071 */
3072int Upgradeget_lineno (void)
3073{
3074
3075 return Upgradelineno;
3076}
3077
3078/** Get the input stream.
3079 *
3080 */
3081FILE *Upgradeget_in (void)
3082{
3083 return Upgradein;
3084}
3085
3086/** Get the output stream.
3087 *
3088 */
3089FILE *Upgradeget_out (void)
3090{
3091 return Upgradeout;
3092}
3093
3094/** Get the length of the current token.
3095 *
3096 */
3097int Upgradeget_leng (void)
3098{
3099 return Upgradeleng;
3100}
3101
3102/** Get the current token.
3103 *
3104 */
3105
3106char *Upgradeget_text (void)
3107{
3108 return Upgradetext;
3109}
3110
3111/** Set the current line number.
3112 * @param line_number
3113 *
3114 */
3115void Upgradeset_lineno (int line_number )
3116{
3117
3118 Upgradelineno = line_number;
3119}
3120
3121/** Set the input stream. This does not discard the current
3122 * input buffer.
3123 * @param in_str A readable stream.
3124 *
3125 * @see Upgrade_switch_to_buffer
3126 */
3127void Upgradeset_in (FILE * in_str )
3128{
3129 Upgradein = in_str ;
3130}
3131
3132void Upgradeset_out (FILE * out_str )
3133{
3134 Upgradeout = out_str ;
3135}
3136
3137int Upgradeget_debug (void)
3138{
3139 return Upgrade_flex_debug;
3140}
3141
3142void Upgradeset_debug (int bdebug )
3143{
3144 Upgrade_flex_debug = bdebug ;
3145}
3146
3147static int yy_init_globals (void)
3148{
3149 /* Initialization is the same as for the non-reentrant scanner.
3150 * This function is called from Upgradelex_destroy(), so don't allocate here.
3151 */
3152
3153 /* We do not touch Upgradelineno unless the option is enabled. */
3154 Upgradelineno = 1;
3155
3156 (yy_buffer_stack) = 0;
3157 (yy_buffer_stack_top) = 0;
3158 (yy_buffer_stack_max) = 0;
3159 (yy_c_buf_p) = (char *) 0;
3160 (yy_init) = 0;
3161 (yy_start) = 0;
3162
3163/* Defined in main.c */
3164#ifdef YY_STDINIT
3165 Upgradein = stdin;
3166 Upgradeout = stdout;
3167#else
3168 Upgradein = (FILE *) 0;
3169 Upgradeout = (FILE *) 0;
3170#endif
3171
3172 /* For future reference: Set errno on error, since we are called by
3173 * Upgradelex_init()
3174 */
3175 return 0;
3176}
3177
3178/* Upgradelex_destroy is for both reentrant and non-reentrant scanners. */
3179int Upgradelex_destroy (void)
3180{
3181
3182 /* Pop the buffer stack, destroying each element. */
3183 while(YY_CURRENT_BUFFER){
3184 Upgrade_delete_buffer(YY_CURRENT_BUFFER );
3185 YY_CURRENT_BUFFER_LVALUE = NULL;
3186 Upgradepop_buffer_state();
3187 }
3188
3189 /* Destroy the stack itself. */
3190 Upgradefree((yy_buffer_stack) );
3191 (yy_buffer_stack) = NULL;
3192
3193 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3194 * Upgradelex() is called, initialization will occur. */
3195 yy_init_globals( );
3196
3197 return 0;
3198}
3199
3200/*
3201 * Internal utility routines.
3202 */
Reid Spencere7c3c602006-11-30 06:36:44 +00003203
3204#ifndef yytext_ptr
Chris Lattnercf786592007-12-29 20:47:37 +00003205static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3206{
Reid Spencere7c3c602006-11-30 06:36:44 +00003207 register int i;
3208 for ( i = 0; i < n; ++i )
3209 s1[i] = s2[i];
Chris Lattnercf786592007-12-29 20:47:37 +00003210}
Reid Spencere7c3c602006-11-30 06:36:44 +00003211#endif
3212
3213#ifdef YY_NEED_STRLEN
Chris Lattnercf786592007-12-29 20:47:37 +00003214static int yy_flex_strlen (yyconst char * s )
3215{
Reid Spencere7c3c602006-11-30 06:36:44 +00003216 register int n;
3217 for ( n = 0; s[n]; ++n )
3218 ;
3219
3220 return n;
Chris Lattnercf786592007-12-29 20:47:37 +00003221}
Reid Spencere7c3c602006-11-30 06:36:44 +00003222#endif
3223
Chris Lattnercf786592007-12-29 20:47:37 +00003224void *Upgradealloc (yy_size_t size )
3225{
Reid Spencer832254e2007-02-02 02:16:23 +00003226 return (void *) malloc( size );
Chris Lattnercf786592007-12-29 20:47:37 +00003227}
Reid Spencer832254e2007-02-02 02:16:23 +00003228
Chris Lattnercf786592007-12-29 20:47:37 +00003229void *Upgraderealloc (void * ptr, yy_size_t size )
3230{
Reid Spencere7c3c602006-11-30 06:36:44 +00003231 /* The cast to (char *) in the following accommodates both
3232 * implementations that use char* generic pointers, and those
3233 * that use void* generic pointers. It works with the latter
3234 * because both ANSI C and C++ allow castless assignment from
3235 * any pointer type to void*, and deal with argument conversions
3236 * as though doing an assignment.
3237 */
3238 return (void *) realloc( (char *) ptr, size );
Chris Lattnercf786592007-12-29 20:47:37 +00003239}
Reid Spencere7c3c602006-11-30 06:36:44 +00003240
Chris Lattnercf786592007-12-29 20:47:37 +00003241void Upgradefree (void * ptr )
3242{
3243 free( (char *) ptr ); /* see Upgraderealloc() for (char *) cast */
3244}
Reid Spencere7c3c602006-11-30 06:36:44 +00003245
Chris Lattnercf786592007-12-29 20:47:37 +00003246#define YYTABLES_NAME "yytables"
3247
3248#line 430 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l"
3249
3250
Reid Spencere7c3c602006-11-30 06:36:44 +00003251