Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1 | #line 2 "UpgradeLexer.cpp" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3 | #line 4 "UpgradeLexer.cpp" |
| 4 | |
| 5 | #define YY_INT_ALIGNED short int |
| 6 | |
Dale Johannesen | 43421b3 | 2007-09-06 18:13:44 +0000 | [diff] [blame] | 7 | /* A lexical scanner generated by flex */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 8 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 9 | #define FLEX_SCANNER |
| 10 | #define YY_FLEX_MAJOR_VERSION 2 |
| 11 | #define YY_FLEX_MINOR_VERSION 5 |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 12 | #define YY_FLEX_SUBMINOR_VERSION 33 |
| 13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
| 14 | #define FLEX_BETA |
| 15 | #endif |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 16 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 17 | /* First, we deal with platform-specific or compiler-specific issues. */ |
| 18 | |
| 19 | /* begin standard C headers. */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 20 | #include <stdio.h> |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 21 | #include <string.h> |
| 22 | #include <errno.h> |
| 23 | #include <stdlib.h> |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 24 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 25 | /* end standard C headers. */ |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 26 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 27 | /* flex integer type definitions */ |
| 28 | |
| 29 | #ifndef FLEXINT_H |
| 30 | #define FLEXINT_H |
| 31 | |
| 32 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
| 33 | |
| 34 | #if __STDC_VERSION__ >= 199901L |
| 35 | |
| 36 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
| 37 | * if you want the limit (max/min) macros for int types. |
| 38 | */ |
| 39 | #ifndef __STDC_LIMIT_MACROS |
| 40 | #define __STDC_LIMIT_MACROS 1 |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 41 | #endif |
| 42 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 43 | #include <inttypes.h> |
| 44 | typedef int8_t flex_int8_t; |
| 45 | typedef uint8_t flex_uint8_t; |
| 46 | typedef int16_t flex_int16_t; |
| 47 | typedef uint16_t flex_uint16_t; |
| 48 | typedef int32_t flex_int32_t; |
| 49 | typedef uint32_t flex_uint32_t; |
| 50 | #else |
| 51 | typedef signed char flex_int8_t; |
| 52 | typedef short int flex_int16_t; |
| 53 | typedef int flex_int32_t; |
| 54 | typedef unsigned char flex_uint8_t; |
| 55 | typedef unsigned short int flex_uint16_t; |
| 56 | typedef 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 Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 89 | |
| 90 | #ifdef __cplusplus |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 91 | |
| 92 | /* The "const" storage-class-modifier is valid. */ |
| 93 | #define YY_USE_CONST |
| 94 | |
| 95 | #else /* ! __cplusplus */ |
| 96 | |
| 97 | #if __STDC__ |
| 98 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 99 | #define YY_USE_CONST |
| 100 | |
| 101 | #endif /* __STDC__ */ |
| 102 | #endif /* ! __cplusplus */ |
| 103 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 104 | #ifdef YY_USE_CONST |
| 105 | #define yyconst const |
| 106 | #else |
| 107 | #define yyconst |
| 108 | #endif |
| 109 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 110 | /* 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 124 | #define BEGIN (yy_start) = 1 + 2 * |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 125 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 130 | #define YY_START (((yy_start) - 1) / 2) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 131 | #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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 137 | #define YY_NEW_FILE Upgraderestart(Upgradein ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 138 | |
| 139 | #define YY_END_OF_BUFFER_CHAR 0 |
| 140 | |
| 141 | /* Size of default input buffer. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 142 | #ifndef YY_BUF_SIZE |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 143 | #define YY_BUF_SIZE (16384*64) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 144 | #endif |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 145 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 146 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 152 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 153 | #endif |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 154 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 155 | extern int Upgradeleng; |
| 156 | |
| 157 | extern FILE *Upgradein, *Upgradeout; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 158 | |
| 159 | #define EOB_ACT_CONTINUE_SCAN 0 |
| 160 | #define EOB_ACT_END_OF_FILE 1 |
| 161 | #define EOB_ACT_LAST_MATCH 2 |
| 162 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 163 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 179 | #define yyless(n) \ |
| 180 | do \ |
| 181 | { \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 182 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 186 | YY_RESTORE_YY_MORE_OFFSET \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 187 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
| 188 | YY_DO_BEFORE_ACTION; /* set up Upgradetext again */ \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 189 | } \ |
| 190 | while ( 0 ) |
| 191 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 192 | #define unput(c) yyunput( c, (yytext_ptr) ) |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 193 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 194 | /* The following is because we cannot portably get our hands on size_t |
| 195 | * (without autoconf's help, which isn't available because we want |
| 196 | * flex-generated scanners to compile on their own). |
| 197 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 198 | |
| 199 | #ifndef YY_TYPEDEF_YY_SIZE_T |
| 200 | #define YY_TYPEDEF_YY_SIZE_T |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 201 | typedef unsigned int yy_size_t; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 202 | #endif |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 203 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 204 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
| 205 | #define YY_STRUCT_YY_BUFFER_STATE |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 206 | struct 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 242 | int yy_bs_lineno; /**< The line count. */ |
| 243 | int yy_bs_column; /**< The column count. */ |
| 244 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 245 | /* 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 251 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 252 | #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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 261 | * (via Upgraderestart()), so that the user can continue scanning by |
| 262 | * just pointing Upgradein at a new input file. |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 263 | */ |
| 264 | #define YY_BUFFER_EOF_PENDING 2 |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 265 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 266 | }; |
| 267 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
| 268 | |
| 269 | /* Stack of input buffers. */ |
| 270 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
| 271 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
| 272 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 273 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 277 | * |
| 278 | * Returns the top of the stack, or NULL. |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 279 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 280 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
| 281 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
| 282 | : NULL) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 283 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 284 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 288 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 289 | /* yy_hold_char holds the character lost when Upgradetext is formed. */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 290 | static char yy_hold_char; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 291 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 292 | int Upgradeleng; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 293 | |
| 294 | /* Points to current character in buffer. */ |
| 295 | static char *yy_c_buf_p = (char *) 0; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 296 | static int yy_init = 0; /* whether we need to initialize */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 297 | static int yy_start = 0; /* start state number */ |
| 298 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 299 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 301 | */ |
| 302 | static int yy_did_buffer_switch_on_eof; |
| 303 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 304 | void Upgraderestart (FILE *input_file ); |
| 305 | void Upgrade_switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
| 306 | YY_BUFFER_STATE Upgrade_create_buffer (FILE *file,int size ); |
| 307 | void Upgrade_delete_buffer (YY_BUFFER_STATE b ); |
| 308 | void Upgrade_flush_buffer (YY_BUFFER_STATE b ); |
| 309 | void Upgradepush_buffer_state (YY_BUFFER_STATE new_buffer ); |
| 310 | void Upgradepop_buffer_state (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 311 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 312 | static void Upgradeensure_buffer_stack (void ); |
| 313 | static void Upgrade_load_buffer_state (void ); |
| 314 | static void Upgrade_init_buffer (YY_BUFFER_STATE b,FILE *file ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 315 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 316 | #define YY_FLUSH_BUFFER Upgrade_flush_buffer(YY_CURRENT_BUFFER ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 317 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 318 | YY_BUFFER_STATE Upgrade_scan_buffer (char *base,yy_size_t size ); |
| 319 | YY_BUFFER_STATE Upgrade_scan_string (yyconst char *yy_str ); |
| 320 | YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char *bytes,int len ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 321 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 322 | void *Upgradealloc (yy_size_t ); |
| 323 | void *Upgraderealloc (void *,yy_size_t ); |
| 324 | void Upgradefree (void * ); |
| 325 | |
| 326 | #define yy_new_buffer Upgrade_create_buffer |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 327 | |
| 328 | #define yy_set_interactive(is_interactive) \ |
| 329 | { \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 330 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 336 | } |
| 337 | |
| 338 | #define yy_set_bol(at_bol) \ |
| 339 | { \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 340 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 346 | } |
| 347 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 348 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 349 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 350 | /* Begin user sect3 */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 351 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 352 | #define Upgradewrap(n) 1 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 353 | #define YY_SKIP_YYWRAP |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 354 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 355 | typedef unsigned char YY_CHAR; |
| 356 | |
| 357 | FILE *Upgradein = (FILE *) 0, *Upgradeout = (FILE *) 0; |
| 358 | |
| 359 | typedef int yy_state_type; |
| 360 | |
| 361 | extern int Upgradelineno; |
| 362 | |
| 363 | int Upgradelineno = 1; |
| 364 | |
| 365 | extern char *Upgradetext; |
| 366 | #define yytext_ptr Upgradetext |
| 367 | |
| 368 | static yy_state_type yy_get_previous_state (void ); |
| 369 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
| 370 | static int yy_get_next_buffer (void ); |
| 371 | static void yy_fatal_error (yyconst char msg[] ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 372 | |
| 373 | /* Done after the current pattern has been matched and before the |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 374 | * corresponding action - sets up Upgradetext. |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 375 | */ |
| 376 | #define YY_DO_BEFORE_ACTION \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 377 | (yytext_ptr) = yy_bp; \ |
| 378 | Upgradeleng = (size_t) (yy_cp - yy_bp); \ |
| 379 | (yy_hold_char) = *yy_cp; \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 380 | *yy_cp = '\0'; \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 381 | (yy_c_buf_p) = yy_cp; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 382 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 383 | #define YY_NUM_RULES 161 |
| 384 | #define YY_END_OF_BUFFER 162 |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 385 | /* This struct is not used in this scanner, |
| 386 | but its presence is necessary. */ |
| 387 | struct yy_trans_info |
| 388 | { |
| 389 | flex_int32_t yy_verify; |
| 390 | flex_int32_t yy_nxt; |
| 391 | }; |
| 392 | static yyconst flex_int16_t yy_accept[620] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 393 | { 0, |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 394 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 404 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 405 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 415 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 416 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 462 | } ; |
| 463 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 464 | static yyconst flex_int32_t yy_ec[256] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 465 | { 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 470 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 473 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 474 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 475 | 1, 1, 1, 1, 23, 1, 24, 25, 26, 27, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 476 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 477 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 480 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 481 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 482 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 483 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 484 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 485 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 486 | 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 496 | static yyconst flex_int32_t yy_meta[49] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 497 | { 0, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 498 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 501 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 502 | 3, 3, 3, 3, 3, 3, 3, 3 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 503 | } ; |
| 504 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 505 | static yyconst flex_int16_t yy_base[630] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 506 | { 0, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 507 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 517 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 518 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 528 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 529 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 539 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 540 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 550 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 551 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 561 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 562 | 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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 572 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 573 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 576 | } ; |
| 577 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 578 | static yyconst flex_int16_t yy_def[630] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 579 | { 0, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 580 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 590 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 591 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 601 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 602 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 612 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 613 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 623 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 624 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 634 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 635 | 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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 645 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 646 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 649 | } ; |
| 650 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 651 | static yyconst flex_int16_t yy_nxt[1386] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 652 | { 0, |
| 653 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 654 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 663 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 664 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 674 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 675 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 685 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 686 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 696 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 697 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 707 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 708 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 718 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 719 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 729 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 730 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 740 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 741 | 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 Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 751 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 752 | 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 Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 762 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 763 | 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 Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 773 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 774 | 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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 784 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 785 | 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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 795 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 796 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 805 | } ; |
| 806 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 807 | static yyconst flex_int16_t yy_chk[1386] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 808 | { 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 813 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 819 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 820 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 830 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 831 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 841 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 842 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 852 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 853 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 863 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 864 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 874 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 875 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 885 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 886 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 896 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 897 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 907 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 908 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 918 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 919 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 929 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 930 | 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 Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 940 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 941 | 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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 951 | |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 952 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 961 | } ; |
| 962 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 963 | /* Table of booleans, true if rule could match eol. */ |
| 964 | static yyconst flex_int32_t yy_rule_can_match_eol[162] = |
| 965 | { 0, |
| 966 | 0, 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 | |
| 976 | static yy_state_type yy_last_accepting_state; |
| 977 | static char *yy_last_accepting_cpos; |
| 978 | |
| 979 | extern int Upgrade_flex_debug; |
| 980 | int 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 986 | #define yymore() yymore_used_but_not_detected |
| 987 | #define YY_MORE_ADJ 0 |
| 988 | #define YY_RESTORE_YY_MORE_OFFSET |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 989 | char *Upgradetext; |
| 990 | #line 1 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 991 | /*===-- UpgradeLexer.l - Scanner for 1.9 assembly files --------*- C++ -*--===// |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 992 | // |
| 993 | // The LLVM Compiler Infrastructure |
| 994 | // |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 995 | // This file is distributed under the University of Illinois Open Source |
| 996 | // License. See LICENSE.TXT for details. |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 997 | // |
| 998 | //===----------------------------------------------------------------------===// |
| 999 | // |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 1000 | // This file implements the flex scanner for LLVM 1.9 assembly languages files. |
Dale Johannesen | 4292d1c | 2007-09-28 18:06:58 +0000 | [diff] [blame] | 1001 | // This doesn't handle long double constants, since LLVM 1.9 did not have them. |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1002 | // |
| 1003 | //===----------------------------------------------------------------------===*/ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1004 | #line 29 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 319a730 | 2007-01-05 17:20:02 +0000 | [diff] [blame] | 1005 | #include "UpgradeInternals.h" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1006 | #include "llvm/Module.h" |
| 1007 | #include <list> |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1008 | #include "UpgradeParser.h" |
| 1009 | #include <cctype> |
| 1010 | #include <cstdlib> |
| 1011 | |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 1012 | #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 Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1022 | #define YY_NEVER_INTERACTIVE 1 |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 1023 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1024 | // Construct a token value for a non-obsolete token |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1025 | #define RET_TOK(type, Enum, sym) \ |
| 1026 | Upgradelval.type = Enum; \ |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 1027 | return sym |
| 1028 | |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1029 | #define RET_TY(sym,NewTY,sign) \ |
| 1030 | Upgradelval.PrimType.T = NewTY; \ |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1031 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1037 | return sym |
| 1038 | |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1039 | namespace 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 | // |
| 1051 | char *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 | // |
| 1075 | static 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 | |
| 1087 | static 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 | // |
| 1110 | static 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 | |
| 1127 | using namespace llvm; |
| 1128 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1129 | /* 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1145 | #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 | |
| 1161 | static int yy_init_globals (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1162 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1169 | extern "C" int Upgradewrap (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1170 | #else |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1171 | extern int Upgradewrap (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1172 | #endif |
| 1173 | #endif |
| 1174 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1175 | static inline void yyunput (int c,char *buf_ptr ); |
| 1176 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1177 | #ifndef yytext_ptr |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1178 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1179 | #endif |
| 1180 | |
| 1181 | #ifdef YY_NEED_STRLEN |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1182 | static int yy_flex_strlen (yyconst char * ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1183 | #endif |
| 1184 | |
| 1185 | #ifndef YY_NO_INPUT |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1186 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1187 | #ifdef __cplusplus |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1188 | static int yyinput (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1189 | #else |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1190 | static int input (void ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1191 | #endif |
| 1192 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1193 | #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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1201 | #ifndef ECHO |
| 1202 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 1203 | * we now use fwrite(). |
| 1204 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1205 | #define ECHO (void) fwrite( Upgradetext, Upgradeleng, 1, Upgradeout ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1206 | #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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1213 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1214 | { \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1215 | int c = '*'; \ |
| 1216 | size_t n; \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1217 | for ( n = 0; n < max_size && \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1218 | (c = getc( Upgradein )) != EOF && c != '\n'; ++n ) \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1219 | buf[n] = (char) c; \ |
| 1220 | if ( c == '\n' ) \ |
| 1221 | buf[n++] = (char) c; \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1222 | if ( c == EOF && ferror( Upgradein ) ) \ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1223 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1224 | result = n; \ |
| 1225 | } \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1226 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1242 | #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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1262 | /* end tables serialization structures and prototypes */ |
| 1263 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1264 | /* Default declaration of generated scanner - a define so the user can |
| 1265 | * easily add parameters. |
| 1266 | */ |
| 1267 | #ifndef YY_DECL |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1268 | #define YY_DECL_IS_OURS 1 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1269 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1270 | extern 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1276 | * 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1290 | /** The main scanner function which does all the work. |
| 1291 | */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1292 | YY_DECL |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1293 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1294 | register yy_state_type yy_current_state; |
Dale Johannesen | 43421b3 | 2007-09-06 18:13:44 +0000 | [diff] [blame] | 1295 | register char *yy_cp, *yy_bp; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1296 | register int yy_act; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1297 | |
| 1298 | #line 195 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1299 | |
| 1300 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1301 | #line 1302 "UpgradeLexer.cpp" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1302 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1303 | if ( !(yy_init) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1304 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1305 | (yy_init) = 1; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1306 | |
| 1307 | #ifdef YY_USER_INIT |
| 1308 | YY_USER_INIT; |
| 1309 | #endif |
| 1310 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1311 | if ( ! (yy_start) ) |
| 1312 | (yy_start) = 1; /* first start state */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1313 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1314 | if ( ! Upgradein ) |
| 1315 | Upgradein = stdin; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1316 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1317 | if ( ! Upgradeout ) |
| 1318 | Upgradeout = stdout; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1319 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1320 | if ( ! YY_CURRENT_BUFFER ) { |
| 1321 | Upgradeensure_buffer_stack (); |
| 1322 | YY_CURRENT_BUFFER_LVALUE = |
| 1323 | Upgrade_create_buffer(Upgradein,YY_BUF_SIZE ); |
| 1324 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1325 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1326 | Upgrade_load_buffer_state( ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1327 | } |
| 1328 | |
| 1329 | while ( 1 ) /* loops until end-of-file is reached */ |
| 1330 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1331 | yy_cp = (yy_c_buf_p); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1332 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1333 | /* Support of Upgradetext. */ |
| 1334 | *yy_cp = (yy_hold_char); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1335 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1341 | yy_current_state = (yy_start); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1342 | yy_match: |
| 1343 | do |
| 1344 | { |
| 1345 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1346 | if ( yy_accept[yy_current_state] ) |
| 1347 | { |
| 1348 | (yy_last_accepting_state) = yy_current_state; |
| 1349 | (yy_last_accepting_cpos) = yy_cp; |
| 1350 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1351 | 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1354 | if ( yy_current_state >= 620 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1355 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1358 | ++yy_cp; |
| 1359 | } |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1360 | while ( yy_current_state != 619 ); |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1361 | yy_cp = (yy_last_accepting_cpos); |
| 1362 | yy_current_state = (yy_last_accepting_state); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1363 | |
| 1364 | yy_find_action: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1365 | yy_act = yy_accept[yy_current_state]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1366 | |
| 1367 | YY_DO_BEFORE_ACTION; |
| 1368 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1369 | if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1370 | { |
| 1371 | int yyl; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1372 | for ( yyl = 0; yyl < Upgradeleng; ++yyl ) |
| 1373 | if ( Upgradetext[yyl] == '\n' ) |
| 1374 | |
| 1375 | Upgradelineno++; |
| 1376 | ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1377 | } |
| 1378 | |
| 1379 | do_action: /* This label is used only to access EOF actions. */ |
| 1380 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1381 | switch ( yy_act ) |
| 1382 | { /* beginning of action switch */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1383 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1390 | case 1: |
| 1391 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1392 | #line 197 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1393 | { /* Ignore comments for now */ } |
| 1394 | YY_BREAK |
| 1395 | case 2: |
| 1396 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1397 | #line 199 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1398 | { return BEGINTOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1399 | YY_BREAK |
| 1400 | case 3: |
| 1401 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1402 | #line 200 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1403 | { return ENDTOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1404 | YY_BREAK |
| 1405 | case 4: |
| 1406 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1407 | #line 201 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1408 | { return TRUETOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1409 | YY_BREAK |
| 1410 | case 5: |
| 1411 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1412 | #line 202 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1413 | { return FALSETOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1414 | YY_BREAK |
| 1415 | case 6: |
| 1416 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1417 | #line 203 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1418 | { return DECLARE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1419 | YY_BREAK |
| 1420 | case 7: |
| 1421 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1422 | #line 204 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1423 | { return GLOBAL; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1424 | YY_BREAK |
| 1425 | case 8: |
| 1426 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1427 | #line 205 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1428 | { return CONSTANT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1429 | YY_BREAK |
| 1430 | case 9: |
| 1431 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1432 | #line 206 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1433 | { return INTERNAL; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1434 | YY_BREAK |
| 1435 | case 10: |
| 1436 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1437 | #line 207 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1438 | { return LINKONCE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1439 | YY_BREAK |
| 1440 | case 11: |
| 1441 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1442 | #line 208 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1443 | { return WEAK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1444 | YY_BREAK |
| 1445 | case 12: |
| 1446 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1447 | #line 209 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1448 | { return APPENDING; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1449 | YY_BREAK |
| 1450 | case 13: |
| 1451 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1452 | #line 210 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1453 | { return DLLIMPORT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1454 | YY_BREAK |
| 1455 | case 14: |
| 1456 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1457 | #line 211 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1458 | { return DLLEXPORT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1459 | YY_BREAK |
| 1460 | case 15: |
| 1461 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1462 | #line 212 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1463 | { return EXTERN_WEAK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1464 | YY_BREAK |
| 1465 | case 16: |
| 1466 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1467 | #line 213 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1468 | { return EXTERNAL; } /* Deprecated, turn into external */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1469 | YY_BREAK |
| 1470 | case 17: |
| 1471 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1472 | #line 214 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1473 | { return EXTERNAL; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1474 | YY_BREAK |
| 1475 | case 18: |
| 1476 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1477 | #line 215 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1478 | { return IMPLEMENTATION; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1479 | YY_BREAK |
| 1480 | case 19: |
| 1481 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1482 | #line 216 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1483 | { return ZEROINITIALIZER; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1484 | YY_BREAK |
| 1485 | case 20: |
| 1486 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1487 | #line 217 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1488 | { return DOTDOTDOT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1489 | YY_BREAK |
| 1490 | case 21: |
| 1491 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1492 | #line 218 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1493 | { return UNDEF; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1494 | YY_BREAK |
| 1495 | case 22: |
| 1496 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1497 | #line 219 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1498 | { return NULL_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1499 | YY_BREAK |
| 1500 | case 23: |
| 1501 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1502 | #line 220 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1503 | { return TO; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1504 | YY_BREAK |
| 1505 | case 24: |
| 1506 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1507 | #line 221 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1508 | { return EXCEPT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1509 | YY_BREAK |
| 1510 | case 25: |
| 1511 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1512 | #line 222 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1513 | { return NOT; } /* Deprecated, turned into XOR */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1514 | YY_BREAK |
| 1515 | case 26: |
| 1516 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1517 | #line 223 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1518 | { return TAIL; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1519 | YY_BREAK |
| 1520 | case 27: |
| 1521 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1522 | #line 224 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1523 | { return TARGET; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1524 | YY_BREAK |
| 1525 | case 28: |
| 1526 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1527 | #line 225 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1528 | { return TRIPLE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1529 | YY_BREAK |
| 1530 | case 29: |
| 1531 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1532 | #line 226 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1533 | { return DEPLIBS; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1534 | YY_BREAK |
| 1535 | case 30: |
| 1536 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1537 | #line 227 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1538 | { return ENDIAN; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1539 | YY_BREAK |
| 1540 | case 31: |
| 1541 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1542 | #line 228 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1543 | { return POINTERSIZE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1544 | YY_BREAK |
| 1545 | case 32: |
| 1546 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1547 | #line 229 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1548 | { return DATALAYOUT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1549 | YY_BREAK |
| 1550 | case 33: |
| 1551 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1552 | #line 230 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1553 | { return LITTLE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1554 | YY_BREAK |
| 1555 | case 34: |
| 1556 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1557 | #line 231 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1558 | { return BIG; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1559 | YY_BREAK |
| 1560 | case 35: |
| 1561 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1562 | #line 232 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1563 | { return VOLATILE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1564 | YY_BREAK |
| 1565 | case 36: |
| 1566 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1567 | #line 233 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1568 | { return ALIGN; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1569 | YY_BREAK |
| 1570 | case 37: |
| 1571 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1572 | #line 234 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1573 | { return SECTION; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1574 | YY_BREAK |
| 1575 | case 38: |
| 1576 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1577 | #line 235 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1578 | { return MODULE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1579 | YY_BREAK |
| 1580 | case 39: |
| 1581 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1582 | #line 236 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1583 | { return ASM_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1584 | YY_BREAK |
| 1585 | case 40: |
| 1586 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1587 | #line 237 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1588 | { return SIDEEFFECT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1589 | YY_BREAK |
| 1590 | case 41: |
| 1591 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1592 | #line 239 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1593 | { return CC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1594 | YY_BREAK |
| 1595 | case 42: |
| 1596 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1597 | #line 240 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1598 | { return CCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1599 | YY_BREAK |
| 1600 | case 43: |
| 1601 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1602 | #line 241 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1603 | { return CSRETCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1604 | YY_BREAK |
| 1605 | case 44: |
| 1606 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1607 | #line 242 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1608 | { return FASTCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1609 | YY_BREAK |
| 1610 | case 45: |
| 1611 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1612 | #line 243 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1613 | { return COLDCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1614 | YY_BREAK |
| 1615 | case 46: |
| 1616 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1617 | #line 244 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1618 | { return X86_STDCALLCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1619 | YY_BREAK |
| 1620 | case 47: |
| 1621 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1622 | #line 245 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 1623 | { return X86_FASTCALLCC_TOK; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1624 | YY_BREAK |
| 1625 | case 48: |
| 1626 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1627 | #line 247 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1628 | { RET_TY(SBYTE, Type::Int8Ty, 2); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1629 | YY_BREAK |
| 1630 | case 49: |
| 1631 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1632 | #line 248 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1633 | { RET_TY(UBYTE, Type::Int8Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1634 | YY_BREAK |
| 1635 | case 50: |
| 1636 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1637 | #line 249 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1638 | { RET_TY(UBYTE, Type::Int8Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1639 | YY_BREAK |
| 1640 | case 51: |
| 1641 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1642 | #line 250 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1643 | { RET_TY(SHORT, Type::Int16Ty, 2); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1644 | YY_BREAK |
| 1645 | case 52: |
| 1646 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1647 | #line 251 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1648 | { RET_TY(USHORT, Type::Int16Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1649 | YY_BREAK |
| 1650 | case 53: |
| 1651 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1652 | #line 252 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1653 | { RET_TY(USHORT, Type::Int16Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1654 | YY_BREAK |
| 1655 | case 54: |
| 1656 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1657 | #line 253 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1658 | { RET_TY(INT, Type::Int32Ty, 2); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1659 | YY_BREAK |
| 1660 | case 55: |
| 1661 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1662 | #line 254 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1663 | { RET_TY(UINT, Type::Int32Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1664 | YY_BREAK |
| 1665 | case 56: |
| 1666 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1667 | #line 255 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1668 | { RET_TY(UINT, Type::Int32Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1669 | YY_BREAK |
| 1670 | case 57: |
| 1671 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1672 | #line 256 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1673 | { RET_TY(LONG, Type::Int64Ty, 2); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1674 | YY_BREAK |
| 1675 | case 58: |
| 1676 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1677 | #line 257 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1678 | { RET_TY(ULONG, Type::Int64Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1679 | YY_BREAK |
| 1680 | case 59: |
| 1681 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1682 | #line 258 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1683 | { RET_TY(ULONG, Type::Int64Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1684 | YY_BREAK |
| 1685 | case 60: |
| 1686 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1687 | #line 259 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1688 | { RET_TY(VOID, Type::VoidTy, 0); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1689 | YY_BREAK |
| 1690 | case 61: |
| 1691 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1692 | #line 260 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1693 | { RET_TY(BOOL, Type::Int1Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1694 | YY_BREAK |
| 1695 | case 62: |
| 1696 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1697 | #line 261 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1698 | { RET_TY(BOOL, Type::Int1Ty, 1); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1699 | YY_BREAK |
| 1700 | case 63: |
| 1701 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1702 | #line 262 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1703 | { RET_TY(FLOAT, Type::FloatTy, 0); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1704 | YY_BREAK |
| 1705 | case 64: |
| 1706 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1707 | #line 263 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1708 | { RET_TY(DOUBLE, Type::DoubleTy,0); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1709 | YY_BREAK |
| 1710 | case 65: |
| 1711 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1712 | #line 264 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | bb1fd57 | 2007-03-21 17:15:50 +0000 | [diff] [blame] | 1713 | { RET_TY(LABEL, Type::LabelTy, 0); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1714 | YY_BREAK |
| 1715 | case 66: |
| 1716 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1717 | #line 265 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1718 | { return TYPE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1719 | YY_BREAK |
| 1720 | case 67: |
| 1721 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1722 | #line 266 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1723 | { return OPAQUE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1724 | YY_BREAK |
| 1725 | case 68: |
| 1726 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1727 | #line 268 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1728 | { RET_TOK(BinaryOpVal, AddOp, ADD); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1729 | YY_BREAK |
| 1730 | case 69: |
| 1731 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1732 | #line 269 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1733 | { RET_TOK(BinaryOpVal, SubOp, SUB); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1734 | YY_BREAK |
| 1735 | case 70: |
| 1736 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1737 | #line 270 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1738 | { RET_TOK(BinaryOpVal, MulOp, MUL); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1739 | YY_BREAK |
| 1740 | case 71: |
| 1741 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1742 | #line 271 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1743 | { RET_TOK(BinaryOpVal, DivOp, DIV); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1744 | YY_BREAK |
| 1745 | case 72: |
| 1746 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1747 | #line 272 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1748 | { RET_TOK(BinaryOpVal, UDivOp, UDIV); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1749 | YY_BREAK |
| 1750 | case 73: |
| 1751 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1752 | #line 273 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1753 | { RET_TOK(BinaryOpVal, SDivOp, SDIV); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1754 | YY_BREAK |
| 1755 | case 74: |
| 1756 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1757 | #line 274 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1758 | { RET_TOK(BinaryOpVal, FDivOp, FDIV); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1759 | YY_BREAK |
| 1760 | case 75: |
| 1761 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1762 | #line 275 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1763 | { RET_TOK(BinaryOpVal, RemOp, REM); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1764 | YY_BREAK |
| 1765 | case 76: |
| 1766 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1767 | #line 276 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1768 | { RET_TOK(BinaryOpVal, URemOp, UREM); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1769 | YY_BREAK |
| 1770 | case 77: |
| 1771 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1772 | #line 277 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1773 | { RET_TOK(BinaryOpVal, SRemOp, SREM); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1774 | YY_BREAK |
| 1775 | case 78: |
| 1776 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1777 | #line 278 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1778 | { RET_TOK(BinaryOpVal, FRemOp, FREM); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1779 | YY_BREAK |
| 1780 | case 79: |
| 1781 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1782 | #line 279 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1783 | { RET_TOK(BinaryOpVal, AndOp, AND); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1784 | YY_BREAK |
| 1785 | case 80: |
| 1786 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1787 | #line 280 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1788 | { RET_TOK(BinaryOpVal, OrOp , OR ); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1789 | YY_BREAK |
| 1790 | case 81: |
| 1791 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1792 | #line 281 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1793 | { RET_TOK(BinaryOpVal, XorOp, XOR); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1794 | YY_BREAK |
| 1795 | case 82: |
| 1796 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1797 | #line 282 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1798 | { RET_TOK(BinaryOpVal, SetNE, SETNE); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1799 | YY_BREAK |
| 1800 | case 83: |
| 1801 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1802 | #line 283 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1803 | { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1804 | YY_BREAK |
| 1805 | case 84: |
| 1806 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1807 | #line 284 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1808 | { RET_TOK(BinaryOpVal, SetLT, SETLT); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1809 | YY_BREAK |
| 1810 | case 85: |
| 1811 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1812 | #line 285 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1813 | { RET_TOK(BinaryOpVal, SetGT, SETGT); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1814 | YY_BREAK |
| 1815 | case 86: |
| 1816 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1817 | #line 286 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1818 | { RET_TOK(BinaryOpVal, SetLE, SETLE); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1819 | YY_BREAK |
| 1820 | case 87: |
| 1821 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1822 | #line 287 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1823 | { RET_TOK(BinaryOpVal, SetGE, SETGE); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1824 | YY_BREAK |
| 1825 | case 88: |
| 1826 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1827 | #line 288 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1828 | { RET_TOK(BinaryOpVal, ShlOp, SHL); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1829 | YY_BREAK |
| 1830 | case 89: |
| 1831 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1832 | #line 289 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1833 | { RET_TOK(BinaryOpVal, ShrOp, SHR); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1834 | YY_BREAK |
| 1835 | case 90: |
| 1836 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1837 | #line 290 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1838 | { RET_TOK(BinaryOpVal, LShrOp, LSHR); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1839 | YY_BREAK |
| 1840 | case 91: |
| 1841 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1842 | #line 291 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1843 | { RET_TOK(BinaryOpVal, AShrOp, ASHR); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1844 | YY_BREAK |
| 1845 | case 92: |
| 1846 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1847 | #line 293 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1848 | { RET_TOK(OtherOpVal, ICmpOp, ICMP); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1849 | YY_BREAK |
| 1850 | case 93: |
| 1851 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1852 | #line 294 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1853 | { RET_TOK(OtherOpVal, FCmpOp, FCMP); } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1854 | YY_BREAK |
| 1855 | case 94: |
| 1856 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1857 | #line 296 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1858 | { return EQ; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1859 | YY_BREAK |
| 1860 | case 95: |
| 1861 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1862 | #line 297 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1863 | { return NE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1864 | YY_BREAK |
| 1865 | case 96: |
| 1866 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1867 | #line 298 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1868 | { return SLT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1869 | YY_BREAK |
| 1870 | case 97: |
| 1871 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1872 | #line 299 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1873 | { return SGT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1874 | YY_BREAK |
| 1875 | case 98: |
| 1876 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1877 | #line 300 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1878 | { return SLE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1879 | YY_BREAK |
| 1880 | case 99: |
| 1881 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1882 | #line 301 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1883 | { return SGE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1884 | YY_BREAK |
| 1885 | case 100: |
| 1886 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1887 | #line 302 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1888 | { return ULT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1889 | YY_BREAK |
| 1890 | case 101: |
| 1891 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1892 | #line 303 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1893 | { return UGT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1894 | YY_BREAK |
| 1895 | case 102: |
| 1896 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1897 | #line 304 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1898 | { return ULE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1899 | YY_BREAK |
| 1900 | case 103: |
| 1901 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1902 | #line 305 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1903 | { return UGE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1904 | YY_BREAK |
| 1905 | case 104: |
| 1906 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1907 | #line 306 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1908 | { return OEQ; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1909 | YY_BREAK |
| 1910 | case 105: |
| 1911 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1912 | #line 307 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1913 | { return ONE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1914 | YY_BREAK |
| 1915 | case 106: |
| 1916 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1917 | #line 308 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1918 | { return OLT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1919 | YY_BREAK |
| 1920 | case 107: |
| 1921 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1922 | #line 309 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1923 | { return OGT; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1924 | YY_BREAK |
| 1925 | case 108: |
| 1926 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1927 | #line 310 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1928 | { return OLE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1929 | YY_BREAK |
| 1930 | case 109: |
| 1931 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1932 | #line 311 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1933 | { return OGE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1934 | YY_BREAK |
| 1935 | case 110: |
| 1936 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1937 | #line 312 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1938 | { return ORD; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1939 | YY_BREAK |
| 1940 | case 111: |
| 1941 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1942 | #line 313 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1943 | { return UNO; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1944 | YY_BREAK |
| 1945 | case 112: |
| 1946 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1947 | #line 314 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1948 | { return UEQ; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1949 | YY_BREAK |
| 1950 | case 113: |
| 1951 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1952 | #line 315 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1953 | { return UNE; } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1954 | YY_BREAK |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 1955 | case 114: |
| 1956 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1957 | #line 317 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1958 | { RET_TOK(OtherOpVal, PHIOp, PHI_TOK); } |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 1959 | YY_BREAK |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 1960 | case 115: |
| 1961 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1962 | #line 318 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1963 | { RET_TOK(OtherOpVal, CallOp, CALL); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1964 | YY_BREAK |
| 1965 | case 116: |
| 1966 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1967 | #line 319 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1968 | { RET_TOK(CastOpVal, CastOp, CAST); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1969 | YY_BREAK |
| 1970 | case 117: |
| 1971 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1972 | #line 320 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1973 | { RET_TOK(CastOpVal, TruncOp, TRUNC); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1974 | YY_BREAK |
| 1975 | case 118: |
| 1976 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1977 | #line 321 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1978 | { RET_TOK(CastOpVal, ZExtOp , ZEXT); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1979 | YY_BREAK |
| 1980 | case 119: |
| 1981 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1982 | #line 322 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1983 | { RET_TOK(CastOpVal, SExtOp, SEXT); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1984 | YY_BREAK |
| 1985 | case 120: |
| 1986 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1987 | #line 323 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1988 | { RET_TOK(CastOpVal, FPTruncOp, FPTRUNC); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1989 | YY_BREAK |
| 1990 | case 121: |
| 1991 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1992 | #line 324 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1993 | { RET_TOK(CastOpVal, FPExtOp, FPEXT); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1994 | YY_BREAK |
| 1995 | case 122: |
| 1996 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 1997 | #line 325 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 1998 | { RET_TOK(CastOpVal, FPToUIOp, FPTOUI); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1999 | YY_BREAK |
| 2000 | case 123: |
| 2001 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2002 | #line 326 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2003 | { RET_TOK(CastOpVal, FPToSIOp, FPTOSI); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2004 | YY_BREAK |
| 2005 | case 124: |
| 2006 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2007 | #line 327 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2008 | { RET_TOK(CastOpVal, UIToFPOp, UITOFP); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2009 | YY_BREAK |
| 2010 | case 125: |
| 2011 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2012 | #line 328 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2013 | { RET_TOK(CastOpVal, SIToFPOp, SITOFP); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2014 | YY_BREAK |
| 2015 | case 126: |
| 2016 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2017 | #line 329 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2018 | { RET_TOK(CastOpVal, PtrToIntOp, PTRTOINT); } |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2019 | YY_BREAK |
| 2020 | case 127: |
| 2021 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2022 | #line 330 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2023 | { RET_TOK(CastOpVal, IntToPtrOp, INTTOPTR); } |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2024 | YY_BREAK |
| 2025 | case 128: |
| 2026 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2027 | #line 331 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2028 | { RET_TOK(CastOpVal, BitCastOp, BITCAST); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2029 | YY_BREAK |
| 2030 | case 129: |
| 2031 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2032 | #line 332 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2033 | { RET_TOK(OtherOpVal, SelectOp, SELECT); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2034 | YY_BREAK |
| 2035 | case 130: |
| 2036 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2037 | #line 333 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2038 | { return VANEXT_old; } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2039 | YY_BREAK |
| 2040 | case 131: |
| 2041 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2042 | #line 334 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2043 | { return VAARG_old; } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2044 | YY_BREAK |
| 2045 | case 132: |
| 2046 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2047 | #line 335 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2048 | { RET_TOK(OtherOpVal, VAArg , VAARG); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2049 | YY_BREAK |
| 2050 | case 133: |
| 2051 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2052 | #line 336 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2053 | { RET_TOK(TermOpVal, RetOp, RET); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2054 | YY_BREAK |
| 2055 | case 134: |
| 2056 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2057 | #line 337 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2058 | { RET_TOK(TermOpVal, BrOp, BR); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2059 | YY_BREAK |
| 2060 | case 135: |
| 2061 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2062 | #line 338 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2063 | { RET_TOK(TermOpVal, SwitchOp, SWITCH); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2064 | YY_BREAK |
| 2065 | case 136: |
| 2066 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2067 | #line 339 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2068 | { RET_TOK(TermOpVal, InvokeOp, INVOKE); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2069 | YY_BREAK |
| 2070 | case 137: |
| 2071 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2072 | #line 340 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2073 | { return UNWIND; } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2074 | YY_BREAK |
| 2075 | case 138: |
| 2076 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2077 | #line 341 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2078 | { RET_TOK(TermOpVal, UnreachableOp, UNREACHABLE); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2079 | YY_BREAK |
| 2080 | case 139: |
| 2081 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2082 | #line 343 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2083 | { RET_TOK(MemOpVal, MallocOp, MALLOC); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2084 | YY_BREAK |
| 2085 | case 140: |
| 2086 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2087 | #line 344 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2088 | { RET_TOK(MemOpVal, AllocaOp, ALLOCA); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2089 | YY_BREAK |
| 2090 | case 141: |
| 2091 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2092 | #line 345 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2093 | { RET_TOK(MemOpVal, FreeOp, FREE); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2094 | YY_BREAK |
| 2095 | case 142: |
| 2096 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2097 | #line 346 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2098 | { RET_TOK(MemOpVal, LoadOp, LOAD); } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2099 | YY_BREAK |
| 2100 | case 143: |
| 2101 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2102 | #line 347 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2103 | { RET_TOK(MemOpVal, StoreOp, STORE); } |
| 2104 | YY_BREAK |
| 2105 | case 144: |
| 2106 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2107 | #line 348 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2108 | { RET_TOK(MemOpVal, GetElementPtrOp, GETELEMENTPTR); } |
| 2109 | YY_BREAK |
| 2110 | case 145: |
| 2111 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2112 | #line 350 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2113 | { RET_TOK(OtherOpVal, ExtractElementOp, EXTRACTELEMENT); } |
| 2114 | YY_BREAK |
| 2115 | case 146: |
| 2116 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2117 | #line 351 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2118 | { RET_TOK(OtherOpVal, InsertElementOp, INSERTELEMENT); } |
| 2119 | YY_BREAK |
| 2120 | case 147: |
| 2121 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2122 | #line 352 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2123 | { RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); } |
| 2124 | YY_BREAK |
| 2125 | case 148: |
| 2126 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2127 | #line 355 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2128 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2129 | UnEscapeLexed(Upgradetext+1); |
| 2130 | Upgradelval.StrVal = strdup(Upgradetext+1); // Skip % |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2131 | return VAR_ID; |
| 2132 | } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2133 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2134 | case 149: |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2135 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2136 | #line 360 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2137 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2138 | Upgradetext[strlen(Upgradetext)-1] = 0; // nuke colon |
| 2139 | UnEscapeLexed(Upgradetext); |
| 2140 | Upgradelval.StrVal = strdup(Upgradetext); |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2141 | return LABELSTR; |
| 2142 | } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2143 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2144 | case 150: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2145 | /* rule 150 can match eol */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2146 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2147 | #line 366 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2148 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2149 | Upgradetext[strlen(Upgradetext)-2] = 0; // nuke colon, end quote |
| 2150 | UnEscapeLexed(Upgradetext+1); |
| 2151 | Upgradelval.StrVal = strdup(Upgradetext+1); |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2152 | return LABELSTR; |
| 2153 | } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2154 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2155 | case 151: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2156 | /* rule 151 can match eol */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2157 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2158 | #line 373 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2159 | { // 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2164 | Upgradetext[strlen(Upgradetext)-1] = 0; // nuke end quote |
| 2165 | Upgradelval.StrVal = strdup(Upgradetext+1); // Nuke start quote |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2166 | return STRINGCONSTANT; |
| 2167 | } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2168 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2169 | case 152: |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2170 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2171 | #line 384 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
| 2172 | { Upgradelval.UInt64Val = atoull(Upgradetext); return EUINT64VAL; } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2173 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2174 | case 153: |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2175 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2176 | #line 385 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2177 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2178 | uint64_t Val = atoull(Upgradetext+1); |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2179 | // +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 Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2185 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2186 | case 154: |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2187 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2188 | #line 393 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2189 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2190 | Upgradelval.UInt64Val = HexIntToVal(Upgradetext+3); |
| 2191 | return Upgradetext[0] == 's' ? ESINT64VAL : EUINT64VAL; |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2192 | } |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2193 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2194 | case 155: |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 2195 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2196 | #line 398 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2197 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2198 | uint64_t Val = atoull(Upgradetext+1); |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2199 | if ((unsigned)Val != Val) |
| 2200 | error("Invalid value number (too large)!"); |
| 2201 | Upgradelval.UIntVal = unsigned(Val); |
| 2202 | return UINTVAL; |
| 2203 | } |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 2204 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2205 | case 156: |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 2206 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2207 | #line 405 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2208 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2209 | uint64_t Val = atoull(Upgradetext+2); |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2210 | // +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 Spencer | 71d2ec9 | 2006-12-31 06:02:26 +0000 | [diff] [blame] | 2216 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2217 | case 157: |
Reid Spencer | 71d2ec9 | 2006-12-31 06:02:26 +0000 | [diff] [blame] | 2218 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2219 | #line 414 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
| 2220 | { Upgradelval.FPVal = new APFloat(atof(Upgradetext)); return FPVAL; } |
Reid Spencer | 71d2ec9 | 2006-12-31 06:02:26 +0000 | [diff] [blame] | 2221 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2222 | case 158: |
Reid Spencer | 71d2ec9 | 2006-12-31 06:02:26 +0000 | [diff] [blame] | 2223 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2224 | #line 415 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
| 2225 | { Upgradelval.FPVal = new APFloat(HexToFP(Upgradetext)); |
Dale Johannesen | 43421b3 | 2007-09-06 18:13:44 +0000 | [diff] [blame] | 2226 | return FPVAL; |
| 2227 | } |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 2228 | YY_BREAK |
| 2229 | case YY_STATE_EOF(INITIAL): |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2230 | #line 419 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2231 | { |
| 2232 | /* Make sure to free the internal buffers for flex when we are |
| 2233 | * done reading our input! |
| 2234 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2235 | Upgrade_delete_buffer(YY_CURRENT_BUFFER); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2236 | return EOF; |
| 2237 | } |
| 2238 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2239 | case 159: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2240 | /* rule 159 can match eol */ |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2241 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2242 | #line 427 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | 950bf60 | 2007-01-26 08:19:09 +0000 | [diff] [blame] | 2243 | { /* Ignore whitespace */ } |
| 2244 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2245 | case 160: |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 2246 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2247 | #line 428 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
| 2248 | { return Upgradetext[0]; } |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2249 | YY_BREAK |
Reid Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2250 | case 161: |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2251 | YY_RULE_SETUP |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2252 | #line 430 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2253 | YY_FATAL_ERROR( "flex scanner jammed" ); |
| 2254 | YY_BREAK |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2255 | #line 2256 "UpgradeLexer.cpp" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2256 | |
| 2257 | case YY_END_OF_BUFFER: |
| 2258 | { |
| 2259 | /* Amount of text matched not including the EOB char. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2260 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2261 | |
| 2262 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2263 | *yy_cp = (yy_hold_char); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2264 | YY_RESTORE_YY_MORE_OFFSET |
| 2265 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2266 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2267 | { |
| 2268 | /* We're scanning a new file or input source. It's |
| 2269 | * possible that this happened because the user |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2270 | * 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2273 | * 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2277 | (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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2280 | } |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2289 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2290 | { /* This was really a NUL. */ |
| 2291 | yy_state_type yy_next_state; |
| 2292 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2293 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2294 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2295 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2296 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2308 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2309 | |
| 2310 | if ( yy_next_state ) |
| 2311 | { |
| 2312 | /* Consume the NUL. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2313 | yy_cp = ++(yy_c_buf_p); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2314 | yy_current_state = yy_next_state; |
| 2315 | goto yy_match; |
| 2316 | } |
| 2317 | |
| 2318 | else |
| 2319 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2320 | yy_cp = (yy_last_accepting_cpos); |
| 2321 | yy_current_state = (yy_last_accepting_state); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2322 | goto yy_find_action; |
| 2323 | } |
| 2324 | } |
| 2325 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2326 | else switch ( yy_get_next_buffer( ) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2327 | { |
| 2328 | case EOB_ACT_END_OF_FILE: |
| 2329 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2330 | (yy_did_buffer_switch_on_eof) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2331 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2332 | if ( Upgradewrap( ) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2333 | { |
| 2334 | /* Note: because we've taken care in |
| 2335 | * yy_get_next_buffer() to have set up |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2336 | * Upgradetext, we can now set up |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2337 | * 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2343 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2344 | |
| 2345 | yy_act = YY_STATE_EOF(YY_START); |
| 2346 | goto do_action; |
| 2347 | } |
| 2348 | |
| 2349 | else |
| 2350 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2351 | if ( ! (yy_did_buffer_switch_on_eof) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2352 | YY_NEW_FILE; |
| 2353 | } |
| 2354 | break; |
| 2355 | } |
| 2356 | |
| 2357 | case EOB_ACT_CONTINUE_SCAN: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2358 | (yy_c_buf_p) = |
| 2359 | (yytext_ptr) + yy_amount_of_matched_text; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2360 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2361 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2362 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2363 | yy_cp = (yy_c_buf_p); |
| 2364 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2365 | goto yy_match; |
| 2366 | |
| 2367 | case EOB_ACT_LAST_MATCH: |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2368 | (yy_c_buf_p) = |
| 2369 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2370 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2371 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2372 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2373 | yy_cp = (yy_c_buf_p); |
| 2374 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2375 | 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2385 | } /* end of Upgradelex */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2386 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2394 | static 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2398 | register int number_to_move, i; |
| 2399 | int ret_val; |
| 2400 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2401 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2402 | YY_FATAL_ERROR( |
| 2403 | "fatal flex scanner internal error--end of buffer missed" ); |
| 2404 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2405 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2406 | { /* Don't try to fill the buffer, so this is an EOF. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2407 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2408 | { |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2427 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2428 | |
| 2429 | for ( i = 0; i < number_to_move; ++i ) |
| 2430 | *(dest++) = *(source++); |
| 2431 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2432 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2433 | /* don't do the read, it's not guaranteed to return an EOF, |
| 2434 | * just force an EOF |
| 2435 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2436 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2437 | |
| 2438 | else |
| 2439 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2440 | int num_to_read = |
| 2441 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2442 | |
| 2443 | while ( num_to_read <= 0 ) |
| 2444 | { /* Not enough room in the buffer - grow it. */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2445 | |
| 2446 | /* just a shorter name for the current buffer */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2447 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2448 | |
| 2449 | int yy_c_buf_p_offset = |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2450 | (int) ((yy_c_buf_p) - b->yy_ch_buf); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2451 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2463 | Upgraderealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2464 | } |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2473 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2474 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2475 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2476 | number_to_move - 1; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2477 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2478 | } |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2484 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
| 2485 | (yy_n_chars), num_to_read ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2486 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2487 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2488 | } |
| 2489 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2490 | if ( (yy_n_chars) == 0 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2491 | { |
| 2492 | if ( number_to_move == YY_MORE_ADJ ) |
| 2493 | { |
| 2494 | ret_val = EOB_ACT_END_OF_FILE; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2495 | Upgraderestart(Upgradein ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2496 | } |
| 2497 | |
| 2498 | else |
| 2499 | { |
| 2500 | ret_val = EOB_ACT_LAST_MATCH; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2501 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2502 | YY_BUFFER_EOF_PENDING; |
| 2503 | } |
| 2504 | } |
| 2505 | |
| 2506 | else |
| 2507 | ret_val = EOB_ACT_CONTINUE_SCAN; |
| 2508 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2509 | (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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2512 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2513 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2514 | |
| 2515 | return ret_val; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2516 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2517 | |
| 2518 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
| 2519 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2520 | static yy_state_type yy_get_previous_state (void) |
| 2521 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2522 | register yy_state_type yy_current_state; |
| 2523 | register char *yy_cp; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2524 | |
| 2525 | yy_current_state = (yy_start); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2526 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2527 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2528 | { |
| 2529 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2530 | if ( yy_accept[yy_current_state] ) |
| 2531 | { |
| 2532 | (yy_last_accepting_state) = yy_current_state; |
| 2533 | (yy_last_accepting_cpos) = yy_cp; |
| 2534 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2535 | 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2538 | if ( yy_current_state >= 620 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2539 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2542 | } |
| 2543 | |
| 2544 | return yy_current_state; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2545 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2546 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2552 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
| 2553 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2554 | register int yy_is_jam; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2555 | register char *yy_cp = (yy_c_buf_p); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2556 | |
| 2557 | register YY_CHAR yy_c = 1; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2558 | if ( yy_accept[yy_current_state] ) |
| 2559 | { |
| 2560 | (yy_last_accepting_state) = yy_current_state; |
| 2561 | (yy_last_accepting_cpos) = yy_cp; |
| 2562 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2563 | 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2566 | if ( yy_current_state >= 620 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2567 | 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 Spencer | 785a5ae | 2007-02-08 00:21:40 +0000 | [diff] [blame] | 2570 | yy_is_jam = (yy_current_state == 619); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2571 | |
| 2572 | return yy_is_jam ? 0 : yy_current_state; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2573 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2574 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2575 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2580 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2581 | /* undo effects of setting up Upgradetext */ |
| 2582 | *yy_cp = (yy_hold_char); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2583 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2584 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2585 | { /* need to shift things up to make room */ |
| 2586 | /* +2 for EOB chars. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2587 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2590 | register char *source = |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2591 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2592 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2593 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2594 | *--dest = *--source; |
| 2595 | |
| 2596 | yy_cp += (int) (dest - source); |
| 2597 | yy_bp += (int) (dest - source); |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2598 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
| 2599 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2600 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2601 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2602 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
| 2603 | } |
| 2604 | |
| 2605 | *--yy_cp = (char) c; |
| 2606 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2607 | if ( c == '\n' ){ |
| 2608 | --Upgradelineno; |
| 2609 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2610 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2611 | (yytext_ptr) = yy_bp; |
| 2612 | (yy_hold_char) = *yy_cp; |
| 2613 | (yy_c_buf_p) = yy_cp; |
| 2614 | } |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 2615 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2616 | #ifndef YY_NO_INPUT |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2617 | #ifdef __cplusplus |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2618 | static int yyinput (void) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2619 | #else |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2620 | static int input (void) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2621 | #endif |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2622 | |
| 2623 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2624 | int c; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2625 | |
| 2626 | *(yy_c_buf_p) = (yy_hold_char); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2627 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2628 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2629 | { |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2634 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2635 | /* This was really a NUL. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2636 | *(yy_c_buf_p) = '\0'; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2637 | |
| 2638 | else |
| 2639 | { /* need more input */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2640 | int offset = (yy_c_buf_p) - (yytext_ptr); |
| 2641 | ++(yy_c_buf_p); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2642 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2643 | switch ( yy_get_next_buffer( ) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2644 | { |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2657 | Upgraderestart(Upgradein ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2658 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2659 | /*FALLTHROUGH*/ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2660 | |
| 2661 | case EOB_ACT_END_OF_FILE: |
| 2662 | { |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2663 | if ( Upgradewrap( ) ) |
| 2664 | return 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2665 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2666 | if ( ! (yy_did_buffer_switch_on_eof) ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2667 | 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2676 | (yy_c_buf_p) = (yytext_ptr) + offset; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2677 | break; |
| 2678 | } |
| 2679 | } |
| 2680 | } |
| 2681 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2682 | 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2685 | |
| 2686 | if ( c == '\n' ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2687 | |
| 2688 | Upgradelineno++; |
| 2689 | ; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2690 | |
| 2691 | return c; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2692 | } |
| 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 Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 2707 | } |
Dale Johannesen | 43421b3 | 2007-09-06 18:13:44 +0000 | [diff] [blame] | 2708 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2709 | Upgrade_init_buffer(YY_CURRENT_BUFFER,input_file ); |
| 2710 | Upgrade_load_buffer_state( ); |
| 2711 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2712 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2713 | /** 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2727 | return; |
| 2728 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2729 | if ( YY_CURRENT_BUFFER ) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2730 | { |
| 2731 | /* Flush out information for old buffer. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2732 | *(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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2735 | } |
| 2736 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2737 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2738 | Upgrade_load_buffer_state( ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2739 | |
| 2740 | /* We don't actually know whether we did this switch during |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2741 | * EOF (Upgradewrap()) processing, but the only time this flag |
| 2742 | * is looked at is after Upgradewrap() is called, so it's safe |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2743 | * to go ahead and always set it. |
| 2744 | */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2745 | (yy_did_buffer_switch_on_eof) = 1; |
| 2746 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2747 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2748 | static 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2755 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2756 | /** 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2764 | YY_BUFFER_STATE b; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2765 | |
| 2766 | b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2767 | if ( ! b ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2768 | YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2769 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2775 | b->yy_ch_buf = (char *) Upgradealloc(b->yy_buf_size + 2 ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2776 | if ( ! b->yy_ch_buf ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2777 | YY_FATAL_ERROR( "out of dynamic memory in Upgrade_create_buffer()" ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2778 | |
| 2779 | b->yy_is_our_buffer = 1; |
| 2780 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2781 | Upgrade_init_buffer(b,file ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2782 | |
| 2783 | return b; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2784 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2785 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2786 | /** 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2793 | if ( ! b ) |
| 2794 | return; |
| 2795 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2796 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
| 2797 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2798 | |
| 2799 | if ( b->yy_is_our_buffer ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2800 | Upgradefree((void *) b->yy_ch_buf ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2801 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2802 | Upgradefree((void *) b ); |
| 2803 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2804 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2805 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2810 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2811 | { |
| 2812 | int oerrno = errno; |
| 2813 | |
| 2814 | Upgrade_flush_buffer(b ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2815 | |
| 2816 | b->yy_input_file = file; |
| 2817 | b->yy_fill_buffer = 1; |
| 2818 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2819 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2827 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2828 | b->yy_is_interactive = 0; |
| 2829 | |
| 2830 | errno = oerrno; |
| 2831 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2832 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2833 | /** 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2840 | 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2856 | 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 | */ |
| 2866 | void 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 | */ |
| 2896 | void 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 | */ |
| 2915 | static 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2935 | } |
| 2936 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2937 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2938 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2939 | /* 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 | */ |
| 2960 | YY_BUFFER_STATE Upgrade_scan_buffer (char * base, yy_size_t size ) |
| 2961 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2962 | YY_BUFFER_STATE b; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2963 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2964 | 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2970 | b = (YY_BUFFER_STATE) Upgradealloc(sizeof( struct yy_buffer_state ) ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2971 | if ( ! b ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2972 | YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_buffer()" ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2973 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2984 | Upgrade_switch_to_buffer(b ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2985 | |
| 2986 | return b; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2987 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2988 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 2989 | /** 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 | */ |
| 2997 | YY_BUFFER_STATE Upgrade_scan_string (yyconst char * yystr ) |
| 2998 | { |
| 2999 | |
| 3000 | return Upgrade_scan_bytes(yystr,strlen(yystr) ); |
| 3001 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3002 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3003 | /** 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 | */ |
| 3010 | YY_BUFFER_STATE Upgrade_scan_bytes (yyconst char * yybytes, int _yybytes_len ) |
| 3011 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3012 | YY_BUFFER_STATE b; |
| 3013 | char *buf; |
| 3014 | yy_size_t n; |
| 3015 | int i; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3016 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3017 | /* Get memory for full buffer, including space for trailing EOB's. */ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3018 | n = _yybytes_len + 2; |
| 3019 | buf = (char *) Upgradealloc(n ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3020 | if ( ! buf ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3021 | YY_FATAL_ERROR( "out of dynamic memory in Upgrade_scan_bytes()" ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3022 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3023 | for ( i = 0; i < _yybytes_len; ++i ) |
| 3024 | buf[i] = yybytes[i]; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3025 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3026 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3027 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3028 | b = Upgrade_scan_buffer(buf,n ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3029 | if ( ! b ) |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3030 | YY_FATAL_ERROR( "bad buffer in Upgrade_scan_bytes()" ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3031 | |
| 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3038 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3039 | |
| 3040 | #ifndef YY_EXIT_FAILURE |
| 3041 | #define YY_EXIT_FAILURE 2 |
| 3042 | #endif |
| 3043 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3044 | static void yy_fatal_error (yyconst char* msg ) |
| 3045 | { |
| 3046 | (void) fprintf( stderr, "%s\n", msg ); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3047 | exit( YY_EXIT_FAILURE ); |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3048 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3049 | |
| 3050 | /* Redefine yyless() so it works in section 3 code. */ |
| 3051 | |
| 3052 | #undef yyless |
| 3053 | #define yyless(n) \ |
| 3054 | do \ |
| 3055 | { \ |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3056 | /* 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3064 | } \ |
| 3065 | while ( 0 ) |
| 3066 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3067 | /* Accessor methods (get/set functions) to struct members. */ |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3068 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3069 | /** Get the current line number. |
| 3070 | * |
| 3071 | */ |
| 3072 | int Upgradeget_lineno (void) |
| 3073 | { |
| 3074 | |
| 3075 | return Upgradelineno; |
| 3076 | } |
| 3077 | |
| 3078 | /** Get the input stream. |
| 3079 | * |
| 3080 | */ |
| 3081 | FILE *Upgradeget_in (void) |
| 3082 | { |
| 3083 | return Upgradein; |
| 3084 | } |
| 3085 | |
| 3086 | /** Get the output stream. |
| 3087 | * |
| 3088 | */ |
| 3089 | FILE *Upgradeget_out (void) |
| 3090 | { |
| 3091 | return Upgradeout; |
| 3092 | } |
| 3093 | |
| 3094 | /** Get the length of the current token. |
| 3095 | * |
| 3096 | */ |
| 3097 | int Upgradeget_leng (void) |
| 3098 | { |
| 3099 | return Upgradeleng; |
| 3100 | } |
| 3101 | |
| 3102 | /** Get the current token. |
| 3103 | * |
| 3104 | */ |
| 3105 | |
| 3106 | char *Upgradeget_text (void) |
| 3107 | { |
| 3108 | return Upgradetext; |
| 3109 | } |
| 3110 | |
| 3111 | /** Set the current line number. |
| 3112 | * @param line_number |
| 3113 | * |
| 3114 | */ |
| 3115 | void 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 | */ |
| 3127 | void Upgradeset_in (FILE * in_str ) |
| 3128 | { |
| 3129 | Upgradein = in_str ; |
| 3130 | } |
| 3131 | |
| 3132 | void Upgradeset_out (FILE * out_str ) |
| 3133 | { |
| 3134 | Upgradeout = out_str ; |
| 3135 | } |
| 3136 | |
| 3137 | int Upgradeget_debug (void) |
| 3138 | { |
| 3139 | return Upgrade_flex_debug; |
| 3140 | } |
| 3141 | |
| 3142 | void Upgradeset_debug (int bdebug ) |
| 3143 | { |
| 3144 | Upgrade_flex_debug = bdebug ; |
| 3145 | } |
| 3146 | |
| 3147 | static 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. */ |
| 3179 | int 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 Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3203 | |
| 3204 | #ifndef yytext_ptr |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3205 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
| 3206 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3207 | register int i; |
| 3208 | for ( i = 0; i < n; ++i ) |
| 3209 | s1[i] = s2[i]; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3210 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3211 | #endif |
| 3212 | |
| 3213 | #ifdef YY_NEED_STRLEN |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3214 | static int yy_flex_strlen (yyconst char * s ) |
| 3215 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3216 | register int n; |
| 3217 | for ( n = 0; s[n]; ++n ) |
| 3218 | ; |
| 3219 | |
| 3220 | return n; |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3221 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3222 | #endif |
| 3223 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3224 | void *Upgradealloc (yy_size_t size ) |
| 3225 | { |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 3226 | return (void *) malloc( size ); |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3227 | } |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 3228 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3229 | void *Upgraderealloc (void * ptr, yy_size_t size ) |
| 3230 | { |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3231 | /* 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 Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3239 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3240 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3241 | void Upgradefree (void * ptr ) |
| 3242 | { |
| 3243 | free( (char *) ptr ); /* see Upgraderealloc() for (char *) cast */ |
| 3244 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3245 | |
Chris Lattner | cf78659 | 2007-12-29 20:47:37 +0000 | [diff] [blame] | 3246 | #define YYTABLES_NAME "yytables" |
| 3247 | |
| 3248 | #line 430 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeLexer.l" |
| 3249 | |
| 3250 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3251 | |