Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1 | #define yy_create_buffer llvmAsm_create_buffer |
| 2 | #define yy_delete_buffer llvmAsm_delete_buffer |
| 3 | #define yy_scan_buffer llvmAsm_scan_buffer |
| 4 | #define yy_scan_string llvmAsm_scan_string |
| 5 | #define yy_scan_bytes llvmAsm_scan_bytes |
| 6 | #define yy_flex_debug llvmAsm_flex_debug |
| 7 | #define yy_init_buffer llvmAsm_init_buffer |
| 8 | #define yy_flush_buffer llvmAsm_flush_buffer |
| 9 | #define yy_load_buffer_state llvmAsm_load_buffer_state |
| 10 | #define yy_switch_to_buffer llvmAsm_switch_to_buffer |
| 11 | #define yyin llvmAsmin |
| 12 | #define yyleng llvmAsmleng |
| 13 | #define yylex llvmAsmlex |
| 14 | #define yyout llvmAsmout |
| 15 | #define yyrestart llvmAsmrestart |
| 16 | #define yytext llvmAsmtext |
| 17 | #define yylineno llvmAsmlineno |
| 18 | |
| 19 | #line 20 "Lexer.cpp" |
| 20 | /* A lexical scanner generated by flex */ |
| 21 | |
| 22 | /* Scanner skeleton version: |
| 23 | * $Header$ |
| 24 | */ |
| 25 | |
| 26 | #define FLEX_SCANNER |
| 27 | #define YY_FLEX_MAJOR_VERSION 2 |
| 28 | #define YY_FLEX_MINOR_VERSION 5 |
| 29 | |
| 30 | #include <stdio.h> |
| 31 | #include <unistd.h> |
| 32 | |
| 33 | |
| 34 | /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ |
| 35 | #ifdef c_plusplus |
| 36 | #ifndef __cplusplus |
| 37 | #define __cplusplus |
| 38 | #endif |
| 39 | #endif |
| 40 | |
| 41 | |
| 42 | #ifdef __cplusplus |
| 43 | |
| 44 | #include <stdlib.h> |
| 45 | |
| 46 | /* Use prototypes in function declarations. */ |
| 47 | #define YY_USE_PROTOS |
| 48 | |
| 49 | /* The "const" storage-class-modifier is valid. */ |
| 50 | #define YY_USE_CONST |
| 51 | |
| 52 | #else /* ! __cplusplus */ |
| 53 | |
| 54 | #if __STDC__ |
| 55 | |
| 56 | #define YY_USE_PROTOS |
| 57 | #define YY_USE_CONST |
| 58 | |
| 59 | #endif /* __STDC__ */ |
| 60 | #endif /* ! __cplusplus */ |
| 61 | |
| 62 | #ifdef __TURBOC__ |
| 63 | #pragma warn -rch |
| 64 | #pragma warn -use |
| 65 | #include <io.h> |
| 66 | #include <stdlib.h> |
| 67 | #define YY_USE_CONST |
| 68 | #define YY_USE_PROTOS |
| 69 | #endif |
| 70 | |
| 71 | #ifdef YY_USE_CONST |
| 72 | #define yyconst const |
| 73 | #else |
| 74 | #define yyconst |
| 75 | #endif |
| 76 | |
| 77 | |
| 78 | #ifdef YY_USE_PROTOS |
| 79 | #define YY_PROTO(proto) proto |
| 80 | #else |
| 81 | #define YY_PROTO(proto) () |
| 82 | #endif |
| 83 | |
| 84 | /* Returned upon end-of-file. */ |
| 85 | #define YY_NULL 0 |
| 86 | |
| 87 | /* Promotes a possibly negative, possibly signed char to an unsigned |
| 88 | * integer for use as an array index. If the signed char is negative, |
| 89 | * we want to instead treat it as an 8-bit unsigned char, hence the |
| 90 | * double cast. |
| 91 | */ |
| 92 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
| 93 | |
| 94 | /* Enter a start condition. This macro really ought to take a parameter, |
| 95 | * but we do it the disgusting crufty way forced on us by the ()-less |
| 96 | * definition of BEGIN. |
| 97 | */ |
| 98 | #define BEGIN yy_start = 1 + 2 * |
| 99 | |
| 100 | /* Translate the current start state into a value that can be later handed |
| 101 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
| 102 | * compatibility. |
| 103 | */ |
| 104 | #define YY_START ((yy_start - 1) / 2) |
| 105 | #define YYSTATE YY_START |
| 106 | |
| 107 | /* Action number for EOF rule of a given start state. */ |
| 108 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| 109 | |
| 110 | /* Special action meaning "start processing a new file". */ |
| 111 | #define YY_NEW_FILE yyrestart( yyin ) |
| 112 | |
| 113 | #define YY_END_OF_BUFFER_CHAR 0 |
| 114 | |
| 115 | /* Size of default input buffer. */ |
| 116 | #define YY_BUF_SIZE (16384*64) |
| 117 | |
| 118 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
| 119 | |
| 120 | extern int yyleng; |
| 121 | extern FILE *yyin, *yyout; |
| 122 | |
| 123 | #define EOB_ACT_CONTINUE_SCAN 0 |
| 124 | #define EOB_ACT_END_OF_FILE 1 |
| 125 | #define EOB_ACT_LAST_MATCH 2 |
| 126 | |
| 127 | /* The funky do-while in the following #define is used to turn the definition |
| 128 | * int a single C statement (which needs a semi-colon terminator). This |
| 129 | * avoids problems with code like: |
| 130 | * |
| 131 | * if ( condition_holds ) |
| 132 | * yyless( 5 ); |
| 133 | * else |
| 134 | * do_something_else(); |
| 135 | * |
| 136 | * Prior to using the do-while the compiler would get upset at the |
| 137 | * "else" because it interpreted the "if" statement as being all |
| 138 | * done when it reached the ';' after the yyless() call. |
| 139 | */ |
| 140 | |
| 141 | /* Return all but the first 'n' matched characters back to the input stream. */ |
| 142 | |
| 143 | #define yyless(n) \ |
| 144 | do \ |
| 145 | { \ |
| 146 | /* Undo effects of setting up yytext. */ \ |
| 147 | *yy_cp = yy_hold_char; \ |
| 148 | YY_RESTORE_YY_MORE_OFFSET \ |
| 149 | yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ |
| 150 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
| 151 | } \ |
| 152 | while ( 0 ) |
| 153 | |
| 154 | #define unput(c) yyunput( c, yytext_ptr ) |
| 155 | |
| 156 | /* The following is because we cannot portably get our hands on size_t |
| 157 | * (without autoconf's help, which isn't available because we want |
| 158 | * flex-generated scanners to compile on their own). |
| 159 | */ |
| 160 | typedef unsigned int yy_size_t; |
| 161 | |
| 162 | |
| 163 | struct yy_buffer_state |
| 164 | { |
| 165 | FILE *yy_input_file; |
| 166 | |
| 167 | char *yy_ch_buf; /* input buffer */ |
| 168 | char *yy_buf_pos; /* current position in input buffer */ |
| 169 | |
| 170 | /* Size of input buffer in bytes, not including room for EOB |
| 171 | * characters. |
| 172 | */ |
| 173 | yy_size_t yy_buf_size; |
| 174 | |
| 175 | /* Number of characters read into yy_ch_buf, not including EOB |
| 176 | * characters. |
| 177 | */ |
| 178 | int yy_n_chars; |
| 179 | |
| 180 | /* Whether we "own" the buffer - i.e., we know we created it, |
| 181 | * and can realloc() it to grow it, and should free() it to |
| 182 | * delete it. |
| 183 | */ |
| 184 | int yy_is_our_buffer; |
| 185 | |
| 186 | /* Whether this is an "interactive" input source; if so, and |
| 187 | * if we're using stdio for input, then we want to use getc() |
| 188 | * instead of fread(), to make sure we stop fetching input after |
| 189 | * each newline. |
| 190 | */ |
| 191 | int yy_is_interactive; |
| 192 | |
| 193 | /* Whether we're considered to be at the beginning of a line. |
| 194 | * If so, '^' rules will be active on the next match, otherwise |
| 195 | * not. |
| 196 | */ |
| 197 | int yy_at_bol; |
| 198 | |
| 199 | /* Whether to try to fill the input buffer when we reach the |
| 200 | * end of it. |
| 201 | */ |
| 202 | int yy_fill_buffer; |
| 203 | |
| 204 | int yy_buffer_status; |
| 205 | #define YY_BUFFER_NEW 0 |
| 206 | #define YY_BUFFER_NORMAL 1 |
| 207 | /* When an EOF's been seen but there's still some text to process |
| 208 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
| 209 | * shouldn't try reading from the input source any more. We might |
| 210 | * still have a bunch of tokens to match, though, because of |
| 211 | * possible backing-up. |
| 212 | * |
| 213 | * When we actually see the EOF, we change the status to "new" |
| 214 | * (via yyrestart()), so that the user can continue scanning by |
| 215 | * just pointing yyin at a new input file. |
| 216 | */ |
| 217 | #define YY_BUFFER_EOF_PENDING 2 |
| 218 | }; |
| 219 | |
| 220 | static YY_BUFFER_STATE yy_current_buffer = 0; |
| 221 | |
| 222 | /* We provide macros for accessing buffer states in case in the |
| 223 | * future we want to put the buffer states in a more general |
| 224 | * "scanner state". |
| 225 | */ |
| 226 | #define YY_CURRENT_BUFFER yy_current_buffer |
| 227 | |
| 228 | |
| 229 | /* yy_hold_char holds the character lost when yytext is formed. */ |
| 230 | static char yy_hold_char; |
| 231 | |
| 232 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
| 233 | |
| 234 | |
| 235 | int yyleng; |
| 236 | |
| 237 | /* Points to current character in buffer. */ |
| 238 | static char *yy_c_buf_p = (char *) 0; |
| 239 | static int yy_init = 1; /* whether we need to initialize */ |
| 240 | static int yy_start = 0; /* start state number */ |
| 241 | |
| 242 | /* Flag which is used to allow yywrap()'s to do buffer switches |
| 243 | * instead of setting up a fresh yyin. A bit of a hack ... |
| 244 | */ |
| 245 | static int yy_did_buffer_switch_on_eof; |
| 246 | |
| 247 | void yyrestart YY_PROTO(( FILE *input_file )); |
| 248 | |
| 249 | void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); |
| 250 | void yy_load_buffer_state YY_PROTO(( void )); |
| 251 | YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); |
| 252 | void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
| 253 | void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); |
| 254 | void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); |
| 255 | #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) |
| 256 | |
| 257 | YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); |
| 258 | YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); |
| 259 | YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); |
| 260 | |
| 261 | static void *yy_flex_alloc YY_PROTO(( yy_size_t )); |
| 262 | static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); |
| 263 | static void yy_flex_free YY_PROTO(( void * )); |
| 264 | |
| 265 | #define yy_new_buffer yy_create_buffer |
| 266 | |
| 267 | #define yy_set_interactive(is_interactive) \ |
| 268 | { \ |
| 269 | if ( ! yy_current_buffer ) \ |
| 270 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
| 271 | yy_current_buffer->yy_is_interactive = is_interactive; \ |
| 272 | } |
| 273 | |
| 274 | #define yy_set_bol(at_bol) \ |
| 275 | { \ |
| 276 | if ( ! yy_current_buffer ) \ |
| 277 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ |
| 278 | yy_current_buffer->yy_at_bol = at_bol; \ |
| 279 | } |
| 280 | |
| 281 | #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) |
| 282 | |
| 283 | |
| 284 | #define YY_USES_REJECT |
| 285 | |
| 286 | #define yywrap() 1 |
| 287 | #define YY_SKIP_YYWRAP |
| 288 | typedef unsigned char YY_CHAR; |
| 289 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; |
| 290 | typedef int yy_state_type; |
| 291 | extern int yylineno; |
| 292 | int yylineno = 1; |
| 293 | extern char *yytext; |
| 294 | #define yytext_ptr yytext |
| 295 | |
| 296 | static yy_state_type yy_get_previous_state YY_PROTO(( void )); |
| 297 | static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); |
| 298 | static int yy_get_next_buffer YY_PROTO(( void )); |
| 299 | static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); |
| 300 | |
| 301 | /* Done after the current pattern has been matched and before the |
| 302 | * corresponding action - sets up yytext. |
| 303 | */ |
| 304 | #define YY_DO_BEFORE_ACTION \ |
| 305 | yytext_ptr = yy_bp; \ |
| 306 | yyleng = (int) (yy_cp - yy_bp); \ |
| 307 | yy_hold_char = *yy_cp; \ |
| 308 | *yy_cp = '\0'; \ |
| 309 | yy_c_buf_p = yy_cp; |
| 310 | |
| 311 | #define YY_NUM_RULES 99 |
| 312 | #define YY_END_OF_BUFFER 100 |
| 313 | static yyconst short int yy_acclist[177] = |
| 314 | { 0, |
| 315 | 100, 98, 99, 97, 98, 99, 97, 99, 98, 99, |
| 316 | 98, 99, 98, 99, 98, 99, 98, 99, 98, 99, |
| 317 | 90, 98, 99, 90, 98, 99, 1, 98, 99, 98, |
| 318 | 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, |
| 319 | 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, |
| 320 | 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, |
| 321 | 99, 98, 99, 98, 99, 98, 99, 98, 99, 98, |
| 322 | 99, 89, 87, 86, 86, 93, 91, 95, 90, 1, |
| 323 | 75, 32, 57, 20, 89, 86, 86, 94, 95, 17, |
| 324 | 95, 96, 51, 56, 30, 33, 54, 3, 42, 53, |
| 325 | |
| 326 | 22, 65, 55, 74, 69, 70, 52, 58, 88, 95, |
| 327 | 95, 37, 66, 67, 82, 83, 44, 19, 92, 23, |
| 328 | 4, 49, 43, 36, 11, 95, 2, 5, 46, 48, |
| 329 | 38, 60, 64, 62, 63, 61, 59, 40, 84, 39, |
| 330 | 45, 18, 72, 81, 35, 47, 27, 21, 34, 7, |
| 331 | 77, 29, 80, 50, 68, 76, 24, 25, 78, 41, |
| 332 | 73, 71, 6, 26, 8, 14, 9, 10, 31, 12, |
| 333 | 28, 79, 85, 13, 15, 16 |
| 334 | } ; |
| 335 | |
| 336 | static yyconst short int yy_accept[398] = |
| 337 | { 0, |
| 338 | 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, |
| 339 | 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, |
| 340 | 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, |
| 341 | 60, 62, 64, 66, 68, 70, 72, 72, 73, 73, |
| 342 | 74, 75, 76, 77, 77, 78, 78, 79, 80, 80, |
| 343 | 81, 81, 81, 81, 81, 81, 81, 81, 82, 82, |
| 344 | 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, |
| 345 | 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, |
| 346 | 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, |
| 347 | 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, |
| 348 | |
| 349 | 85, 85, 85, 85, 85, 85, 85, 86, 87, 89, |
| 350 | 90, 91, 92, 92, 93, 94, 94, 95, 95, 95, |
| 351 | 96, 96, 96, 96, 97, 97, 97, 97, 97, 98, |
| 352 | 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, |
| 353 | 99, 100, 100, 100, 100, 100, 100, 100, 100, 101, |
| 354 | 102, 102, 102, 103, 103, 104, 105, 105, 105, 105, |
| 355 | 105, 106, 106, 107, 107, 108, 108, 108, 108, 108, |
| 356 | 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, |
| 357 | 108, 108, 108, 108, 108, 108, 109, 109, 110, 111, |
| 358 | 111, 111, 111, 112, 112, 112, 112, 113, 114, 115, |
| 359 | |
| 360 | 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, |
| 361 | 115, 116, 116, 116, 116, 116, 116, 116, 116, 116, |
| 362 | 117, 118, 118, 119, 119, 119, 120, 120, 120, 120, |
| 363 | 120, 120, 120, 120, 120, 120, 121, 121, 121, 122, |
| 364 | 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, |
| 365 | 124, 124, 125, 125, 126, 126, 127, 127, 127, 128, |
| 366 | 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, |
| 367 | 130, 130, 130, 130, 130, 130, 131, 131, 131, 131, |
| 368 | 131, 131, 132, 132, 133, 134, 135, 136, 137, 138, |
| 369 | 139, 140, 140, 140, 140, 141, 142, 143, 143, 143, |
| 370 | |
| 371 | 143, 143, 143, 144, 144, 144, 144, 145, 145, 146, |
| 372 | 146, 146, 146, 147, 148, 149, 149, 150, 150, 151, |
| 373 | 151, 151, 152, 152, 153, 154, 155, 155, 156, 157, |
| 374 | 158, 159, 159, 159, 160, 161, 162, 163, 163, 163, |
| 375 | 163, 163, 164, 165, 165, 165, 165, 165, 165, 165, |
| 376 | 165, 165, 165, 165, 165, 166, 167, 167, 167, 168, |
| 377 | 169, 169, 169, 169, 170, 170, 171, 171, 171, 171, |
| 378 | 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, |
| 379 | 171, 172, 172, 173, 173, 173, 173, 173, 173, 174, |
| 380 | 174, 175, 175, 176, 176, 177, 177 |
| 381 | |
| 382 | } ; |
| 383 | |
| 384 | static yyconst int yy_ec[256] = |
| 385 | { 0, |
| 386 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
| 387 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, |
| 388 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 389 | 1, 2, 1, 4, 1, 5, 6, 1, 1, 1, |
| 390 | 1, 1, 7, 1, 8, 9, 1, 10, 11, 11, |
| 391 | 11, 11, 11, 11, 11, 11, 11, 12, 13, 1, |
| 392 | 1, 1, 1, 1, 14, 14, 14, 14, 15, 14, |
| 393 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 394 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 395 | 1, 1, 1, 1, 16, 1, 17, 18, 19, 20, |
| 396 | |
| 397 | 21, 22, 23, 24, 25, 5, 26, 27, 28, 29, |
| 398 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
| 399 | 40, 41, 1, 1, 1, 1, 1, 1, 1, 1, |
| 400 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 401 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 402 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 403 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 405 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 406 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 407 | |
| 408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 409 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 411 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 412 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 413 | 1, 1, 1, 1, 1 |
| 414 | } ; |
| 415 | |
| 416 | static yyconst int yy_meta[42] = |
| 417 | { 0, |
| 418 | 1, 1, 2, 1, 3, 1, 1, 3, 3, 3, |
| 419 | 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, |
| 420 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 421 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
| 422 | 3 |
| 423 | } ; |
| 424 | |
| 425 | static yyconst short int yy_base[402] = |
| 426 | { 0, |
| 427 | 0, 0, 834, 835, 835, 835, 829, 820, 34, 36, |
| 428 | 38, 42, 46, 50, 0, 51, 54, 53, 56, 61, |
| 429 | 76, 77, 79, 80, 82, 83, 84, 90, 31, 111, |
| 430 | 94, 140, 113, 55, 110, 116, 827, 835, 818, 835, |
| 431 | 0, 128, 131, 144, 150, 124, 160, 167, 172, 0, |
| 432 | 136, 89, 168, 100, 41, 145, 114, 817, 139, 183, |
| 433 | 184, 185, 173, 186, 187, 189, 191, 133, 188, 193, |
| 434 | 200, 202, 194, 203, 205, 215, 208, 211, 207, 214, |
| 435 | 57, 816, 224, 225, 227, 231, 233, 234, 241, 235, |
| 436 | 236, 239, 247, 815, 251, 244, 245, 248, 254, 266, |
| 437 | |
| 438 | 255, 276, 269, 278, 270, 277, 814, 0, 287, 291, |
| 439 | 813, 303, 309, 0, 812, 295, 811, 288, 310, 810, |
| 440 | 296, 299, 315, 809, 316, 317, 318, 319, 808, 240, |
| 441 | 322, 320, 321, 325, 326, 327, 328, 331, 336, 341, |
| 442 | 343, 344, 345, 346, 348, 350, 353, 351, 807, 806, |
| 443 | 355, 357, 805, 359, 804, 803, 380, 361, 363, 391, |
| 444 | 802, 373, 801, 374, 800, 369, 365, 393, 396, 398, |
| 445 | 401, 397, 399, 409, 403, 411, 405, 368, 413, 416, |
| 446 | 417, 418, 367, 419, 423, 799, 425, 835, 431, 437, |
| 447 | 443, 446, 449, 450, 439, 451, 798, 797, 796, 452, |
| 448 | |
| 449 | 453, 455, 454, 458, 461, 462, 463, 465, 464, 469, |
| 450 | 795, 470, 472, 478, 475, 479, 480, 482, 483, 794, |
| 451 | 793, 486, 792, 488, 490, 0, 494, 499, 489, 501, |
| 452 | 502, 505, 497, 507, 508, 791, 517, 518, 790, 789, |
| 453 | 519, 788, 521, 527, 522, 529, 523, 530, 531, 536, |
| 454 | 538, 787, 539, 786, 541, 544, 544, 545, 785, 548, |
| 455 | 556, 546, 557, 550, 558, 560, 564, 784, 566, 783, |
| 456 | 568, 569, 570, 571, 576, 782, 572, 578, 590, 582, |
| 457 | 592, 781, 579, 780, 779, 778, 777, 776, 775, 774, |
| 458 | 773, 593, 580, 595, 772, 771, 770, 594, 599, 600, |
| 459 | |
| 460 | 596, 598, 769, 607, 610, 611, 768, 612, 767, 614, |
| 461 | 613, 615, 766, 765, 764, 616, 763, 618, 762, 620, |
| 462 | 627, 761, 626, 760, 759, 758, 624, 757, 756, 755, |
| 463 | 754, 635, 638, 753, 752, 749, 739, 636, 639, 640, |
| 464 | 641, 738, 737, 643, 644, 642, 646, 647, 649, 655, |
| 465 | 662, 654, 665, 666, 736, 735, 668, 669, 734, 733, |
| 466 | 670, 672, 673, 732, 676, 731, 674, 675, 678, 681, |
| 467 | 684, 686, 682, 690, 693, 695, 696, 700, 698, 703, |
| 468 | 730, 708, 728, 706, 704, 709, 710, 711, 726, 712, |
| 469 | 722, 714, 574, 720, 491, 835, 753, 755, 280, 759, |
| 470 | |
| 471 | 161 |
| 472 | } ; |
| 473 | |
| 474 | static yyconst short int yy_def[402] = |
| 475 | { 0, |
| 476 | 396, 1, 396, 396, 396, 396, 397, 398, 399, 396, |
| 477 | 398, 398, 398, 398, 400, 398, 398, 398, 398, 398, |
| 478 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 479 | 398, 398, 398, 398, 398, 398, 397, 396, 398, 396, |
| 480 | 401, 401, 396, 396, 398, 398, 398, 398, 398, 400, |
| 481 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 482 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 483 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 484 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 485 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 486 | |
| 487 | 398, 398, 398, 398, 398, 398, 396, 401, 401, 396, |
| 488 | 398, 398, 398, 49, 398, 398, 398, 398, 398, 398, |
| 489 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 490 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 491 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 492 | 398, 398, 398, 398, 398, 398, 49, 398, 398, 398, |
| 493 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 494 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 495 | 398, 398, 398, 398, 398, 398, 398, 396, 396, 396, |
| 496 | 396, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 497 | |
| 498 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 499 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 500 | 398, 398, 398, 398, 398, 157, 398, 398, 398, 398, |
| 501 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 502 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 503 | 398, 398, 398, 398, 398, 396, 398, 398, 398, 398, |
| 504 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 505 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 506 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 507 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 508 | |
| 509 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 510 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 511 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 512 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 513 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 514 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 515 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 516 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 517 | 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, |
| 518 | 398, 398, 398, 398, 398, 0, 396, 396, 396, 396, |
| 519 | |
| 520 | 396 |
| 521 | } ; |
| 522 | |
| 523 | static yyconst short int yy_nxt[877] = |
| 524 | { 0, |
| 525 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
| 526 | 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, |
| 527 | 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, |
| 528 | 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, |
| 529 | 36, 42, 40, 43, 43, 44, 44, 45, 45, 40, |
| 530 | 46, 85, 40, 40, 47, 48, 48, 40, 47, 48, |
| 531 | 48, 40, 40, 119, 40, 40, 40, 40, 40, 59, |
| 532 | 51, 60, 40, 152, 55, 104, 62, 52, 56, 53, |
| 533 | 63, 54, 61, 57, 49, 64, 58, 40, 40, 65, |
| 534 | 40, 40, 67, 40, 40, 40, 74, 70, 77, 66, |
| 535 | |
| 536 | 40, 40, 68, 71, 75, 40, 72, 73, 69, 76, |
| 537 | 93, 40, 79, 83, 81, 116, 82, 78, 80, 84, |
| 538 | 86, 40, 40, 94, 40, 40, 95, 40, 87, 102, |
| 539 | 118, 88, 111, 96, 89, 40, 106, 109, 109, 105, |
| 540 | 43, 43, 103, 121, 40, 90, 91, 40, 92, 86, |
| 541 | 40, 40, 110, 44, 44, 115, 40, 97, 47, 45, |
| 542 | 45, 40, 136, 108, 98, 122, 99, 120, 100, 112, |
| 543 | 112, 40, 123, 101, 113, 47, 48, 48, 40, 40, |
| 544 | 113, 114, 114, 40, 40, 114, 114, 117, 114, 114, |
| 545 | 114, 114, 114, 114, 40, 40, 40, 40, 40, 40, |
| 546 | |
| 547 | 40, 124, 40, 127, 40, 40, 131, 132, 137, 129, |
| 548 | 125, 40, 126, 40, 40, 128, 40, 134, 40, 40, |
| 549 | 143, 130, 40, 133, 135, 40, 40, 138, 141, 139, |
| 550 | 142, 146, 140, 144, 148, 40, 40, 149, 40, 145, |
| 551 | 151, 150, 40, 147, 40, 40, 40, 40, 153, 154, |
| 552 | 40, 40, 40, 165, 155, 40, 40, 204, 40, 40, |
| 553 | 159, 156, 40, 166, 164, 40, 40, 161, 160, 157, |
| 554 | 162, 167, 158, 163, 171, 169, 173, 40, 179, 168, |
| 555 | 40, 40, 41, 174, 172, 175, 170, 40, 40, 40, |
| 556 | 176, 180, 181, 183, 185, 184, 109, 109, 177, 40, |
| 557 | |
| 558 | 189, 189, 186, 178, 182, 190, 40, 40, 195, 187, |
| 559 | 40, 190, 112, 112, 40, 191, 192, 113, 193, 193, |
| 560 | 40, 40, 197, 113, 194, 198, 40, 40, 40, 40, |
| 561 | 40, 40, 40, 40, 196, 200, 40, 40, 40, 40, |
| 562 | 206, 207, 40, 210, 202, 203, 205, 40, 211, 199, |
| 563 | 201, 212, 40, 213, 40, 40, 40, 40, 208, 40, |
| 564 | 209, 40, 40, 215, 40, 217, 40, 214, 40, 220, |
| 565 | 40, 218, 40, 216, 40, 221, 40, 222, 40, 40, |
| 566 | 40, 223, 219, 228, 40, 40, 252, 225, 224, 226, |
| 567 | 226, 236, 247, 226, 226, 227, 226, 226, 226, 226, |
| 568 | |
| 569 | 226, 226, 40, 235, 40, 233, 234, 40, 40, 40, |
| 570 | 40, 229, 40, 230, 40, 237, 40, 231, 239, 232, |
| 571 | 40, 240, 40, 244, 40, 246, 238, 40, 40, 40, |
| 572 | 40, 241, 249, 242, 40, 253, 40, 243, 251, 245, |
| 573 | 189, 189, 248, 191, 191, 190, 256, 256, 254, 250, |
| 574 | 40, 190, 256, 256, 255, 193, 193, 40, 193, 193, |
| 575 | 40, 40, 40, 40, 40, 40, 40, 258, 257, 40, |
| 576 | 260, 262, 40, 40, 40, 40, 40, 265, 263, 259, |
| 577 | 40, 40, 269, 40, 264, 268, 40, 261, 272, 40, |
| 578 | 40, 40, 266, 40, 40, 267, 271, 40, 273, 40, |
| 579 | |
| 580 | 40, 40, 40, 270, 275, 40, 276, 274, 40, 278, |
| 581 | 40, 277, 40, 40, 282, 279, 40, 283, 40, 40, |
| 582 | 284, 285, 287, 280, 281, 289, 292, 291, 40, 40, |
| 583 | 40, 290, 40, 40, 40, 286, 288, 293, 40, 295, |
| 584 | 40, 40, 40, 296, 294, 299, 298, 40, 297, 40, |
| 585 | 40, 300, 40, 256, 256, 40, 40, 40, 303, 40, |
| 586 | 307, 40, 301, 302, 308, 306, 309, 40, 40, 40, |
| 587 | 313, 40, 310, 305, 312, 40, 304, 40, 311, 40, |
| 588 | 40, 40, 40, 40, 317, 40, 314, 40, 318, 40, |
| 589 | 40, 40, 316, 40, 315, 319, 322, 320, 324, 321, |
| 590 | |
| 591 | 323, 40, 326, 40, 40, 40, 40, 40, 325, 40, |
| 592 | 40, 40, 327, 328, 330, 331, 329, 333, 40, 334, |
| 593 | 336, 40, 40, 40, 40, 40, 40, 40, 332, 40, |
| 594 | 335, 40, 344, 342, 338, 40, 340, 40, 40, 339, |
| 595 | 346, 337, 341, 347, 348, 345, 40, 40, 343, 40, |
| 596 | 40, 40, 40, 40, 40, 40, 349, 40, 40, 350, |
| 597 | 40, 351, 352, 353, 357, 40, 40, 360, 354, 356, |
| 598 | 358, 362, 359, 40, 364, 355, 40, 40, 363, 40, |
| 599 | 40, 40, 361, 40, 40, 40, 40, 40, 366, 40, |
| 600 | 371, 374, 40, 40, 369, 40, 367, 40, 370, 365, |
| 601 | |
| 602 | 372, 40, 378, 368, 40, 376, 40, 40, 373, 40, |
| 603 | 377, 40, 379, 381, 40, 40, 383, 40, 375, 40, |
| 604 | 40, 40, 40, 40, 380, 40, 384, 386, 387, 391, |
| 605 | 388, 40, 385, 40, 394, 382, 389, 40, 390, 40, |
| 606 | 393, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 607 | 40, 392, 395, 37, 37, 37, 37, 39, 39, 50, |
| 608 | 40, 50, 50, 40, 40, 40, 40, 40, 40, 40, |
| 609 | 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 610 | 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 611 | 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 612 | |
| 613 | 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 614 | 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, |
| 615 | 40, 40, 40, 40, 40, 188, 40, 40, 40, 40, |
| 616 | 107, 40, 38, 396, 3, 396, 396, 396, 396, 396, |
| 617 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 618 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 619 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 620 | 396, 396, 396, 396, 396, 396 |
| 621 | } ; |
| 622 | |
| 623 | static yyconst short int yy_chk[877] = |
| 624 | { 0, |
| 625 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 626 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 627 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 628 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 629 | 1, 9, 29, 9, 9, 10, 10, 11, 11, 11, |
| 630 | 12, 29, 55, 12, 13, 13, 13, 13, 14, 14, |
| 631 | 14, 14, 16, 55, 18, 17, 34, 19, 81, 18, |
| 632 | 16, 18, 20, 81, 17, 34, 19, 16, 17, 16, |
| 633 | 19, 16, 18, 17, 13, 19, 17, 21, 22, 20, |
| 634 | 23, 24, 21, 25, 26, 27, 24, 22, 25, 20, |
| 635 | |
| 636 | 52, 28, 21, 22, 24, 31, 23, 23, 21, 24, |
| 637 | 31, 54, 26, 28, 27, 52, 27, 25, 26, 28, |
| 638 | 30, 35, 30, 31, 33, 57, 31, 36, 30, 33, |
| 639 | 54, 30, 46, 31, 30, 46, 36, 42, 42, 35, |
| 640 | 43, 43, 33, 57, 68, 30, 30, 51, 30, 32, |
| 641 | 59, 32, 44, 44, 44, 51, 56, 32, 45, 45, |
| 642 | 45, 45, 68, 401, 32, 59, 32, 56, 32, 47, |
| 643 | 47, 47, 59, 32, 47, 48, 48, 48, 48, 53, |
| 644 | 47, 49, 49, 49, 63, 49, 49, 53, 49, 49, |
| 645 | 49, 49, 49, 49, 60, 61, 62, 64, 65, 69, |
| 646 | |
| 647 | 66, 60, 67, 62, 70, 73, 65, 66, 69, 63, |
| 648 | 61, 71, 61, 72, 74, 62, 75, 67, 79, 77, |
| 649 | 74, 64, 78, 66, 67, 80, 76, 70, 73, 71, |
| 650 | 73, 76, 72, 75, 77, 83, 84, 78, 85, 75, |
| 651 | 80, 79, 86, 76, 87, 88, 90, 91, 83, 84, |
| 652 | 92, 130, 89, 91, 85, 96, 97, 130, 93, 98, |
| 653 | 88, 85, 95, 92, 90, 99, 101, 89, 88, 86, |
| 654 | 89, 93, 87, 89, 96, 95, 98, 100, 101, 93, |
| 655 | 103, 105, 399, 99, 97, 100, 95, 102, 106, 104, |
| 656 | 100, 102, 102, 103, 104, 103, 109, 109, 100, 118, |
| 657 | |
| 658 | 110, 110, 105, 100, 102, 110, 116, 121, 118, 106, |
| 659 | 122, 110, 112, 112, 112, 113, 113, 112, 113, 113, |
| 660 | 113, 119, 121, 112, 116, 122, 123, 125, 126, 127, |
| 661 | 128, 132, 133, 131, 119, 125, 134, 135, 136, 137, |
| 662 | 132, 133, 138, 136, 127, 128, 131, 139, 137, 123, |
| 663 | 126, 138, 140, 139, 141, 142, 143, 144, 134, 145, |
| 664 | 135, 146, 148, 141, 147, 143, 151, 140, 152, 146, |
| 665 | 154, 144, 158, 142, 159, 147, 167, 148, 183, 178, |
| 666 | 166, 151, 145, 159, 162, 164, 183, 154, 152, 157, |
| 667 | 157, 167, 178, 157, 157, 158, 157, 157, 157, 157, |
| 668 | |
| 669 | 157, 157, 160, 166, 168, 162, 164, 169, 172, 170, |
| 670 | 173, 160, 171, 160, 175, 168, 177, 160, 170, 160, |
| 671 | 174, 171, 176, 175, 179, 177, 169, 180, 181, 182, |
| 672 | 184, 172, 180, 173, 185, 184, 187, 174, 182, 176, |
| 673 | 189, 189, 179, 190, 190, 189, 190, 190, 185, 181, |
| 674 | 195, 189, 191, 191, 187, 192, 192, 192, 193, 193, |
| 675 | 193, 194, 196, 200, 201, 203, 202, 195, 194, 204, |
| 676 | 200, 202, 205, 206, 207, 209, 208, 205, 203, 196, |
| 677 | 210, 212, 209, 213, 204, 208, 215, 201, 213, 214, |
| 678 | 216, 217, 206, 218, 219, 207, 212, 222, 214, 224, |
| 679 | |
| 680 | 229, 225, 395, 210, 216, 227, 217, 215, 233, 219, |
| 681 | 228, 218, 230, 231, 227, 222, 232, 228, 234, 235, |
| 682 | 229, 230, 231, 224, 225, 232, 235, 234, 237, 238, |
| 683 | 241, 233, 243, 245, 247, 230, 231, 237, 244, 241, |
| 684 | 246, 248, 249, 243, 238, 246, 245, 250, 244, 251, |
| 685 | 253, 247, 255, 256, 256, 257, 258, 262, 250, 260, |
| 686 | 257, 264, 248, 249, 258, 255, 260, 261, 263, 265, |
| 687 | 264, 266, 261, 253, 263, 267, 251, 269, 262, 271, |
| 688 | 272, 273, 274, 277, 269, 393, 265, 275, 271, 278, |
| 689 | 283, 293, 267, 280, 266, 272, 275, 273, 278, 274, |
| 690 | |
| 691 | 277, 279, 280, 281, 292, 298, 294, 301, 279, 302, |
| 692 | 299, 300, 281, 283, 293, 294, 292, 299, 304, 300, |
| 693 | 302, 305, 306, 308, 311, 310, 312, 316, 298, 318, |
| 694 | 301, 320, 316, 311, 305, 327, 308, 323, 321, 306, |
| 695 | 320, 304, 310, 321, 323, 318, 332, 338, 312, 333, |
| 696 | 339, 340, 341, 346, 344, 345, 327, 347, 348, 332, |
| 697 | 349, 333, 338, 339, 345, 352, 350, 348, 340, 344, |
| 698 | 346, 350, 347, 351, 352, 341, 353, 354, 351, 357, |
| 699 | 358, 361, 349, 362, 363, 367, 368, 365, 354, 369, |
| 700 | 363, 368, 370, 373, 361, 371, 357, 372, 362, 353, |
| 701 | |
| 702 | 365, 374, 372, 358, 375, 370, 376, 377, 367, 379, |
| 703 | 371, 378, 373, 375, 380, 385, 377, 384, 369, 382, |
| 704 | 386, 387, 388, 390, 374, 392, 378, 380, 382, 387, |
| 705 | 384, 394, 379, 391, 392, 376, 385, 389, 386, 383, |
| 706 | 390, 381, 366, 364, 360, 359, 356, 355, 343, 342, |
| 707 | 337, 388, 394, 397, 397, 397, 397, 398, 398, 400, |
| 708 | 336, 400, 400, 335, 334, 331, 330, 329, 328, 326, |
| 709 | 325, 324, 322, 319, 317, 315, 314, 313, 309, 307, |
| 710 | 303, 297, 296, 295, 291, 290, 289, 288, 287, 286, |
| 711 | 285, 284, 282, 276, 270, 268, 259, 254, 252, 242, |
| 712 | |
| 713 | 240, 239, 236, 223, 221, 220, 211, 199, 198, 197, |
| 714 | 186, 165, 163, 161, 156, 155, 153, 150, 149, 129, |
| 715 | 124, 120, 117, 115, 111, 107, 94, 82, 58, 39, |
| 716 | 37, 8, 7, 3, 396, 396, 396, 396, 396, 396, |
| 717 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 718 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 719 | 396, 396, 396, 396, 396, 396, 396, 396, 396, 396, |
| 720 | 396, 396, 396, 396, 396, 396 |
| 721 | } ; |
| 722 | |
| 723 | static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; |
| 724 | static char *yy_full_match; |
| 725 | static int yy_lp; |
| 726 | #define REJECT \ |
| 727 | { \ |
| 728 | *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ |
| 729 | yy_cp = yy_full_match; /* restore poss. backed-over text */ \ |
| 730 | ++yy_lp; \ |
| 731 | goto find_rule; \ |
| 732 | } |
| 733 | #define yymore() yymore_used_but_not_detected |
| 734 | #define YY_MORE_ADJ 0 |
| 735 | #define YY_RESTORE_YY_MORE_OFFSET |
| 736 | char *yytext; |
| 737 | #line 1 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 738 | #define INITIAL 0 |
| 739 | /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// |
| 740 | // |
| 741 | // The LLVM Compiler Infrastructure |
| 742 | // |
| 743 | // This file was developed by the LLVM research group and is distributed under |
| 744 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 745 | // |
| 746 | //===----------------------------------------------------------------------===// |
| 747 | // |
| 748 | // This file implements the flex scanner for LLVM assembly languages files. |
| 749 | // |
| 750 | //===----------------------------------------------------------------------===*/ |
| 751 | #define YY_NEVER_INTERACTIVE 1 |
| 752 | #line 28 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 753 | #include "ParserInternals.h" |
| 754 | #include "llvm/Module.h" |
| 755 | #include <list> |
| 756 | #include "llvmAsmParser.h" |
| 757 | #include <cctype> |
| 758 | #include <cstdlib> |
| 759 | |
| 760 | void set_scan_file(FILE * F){ |
| 761 | yy_switch_to_buffer(yy_create_buffer( F, YY_BUF_SIZE ) ); |
| 762 | } |
| 763 | void set_scan_string (const char * str) { |
| 764 | yy_scan_string (str); |
| 765 | } |
| 766 | |
| 767 | #define RET_TOK(type, Enum, sym) \ |
| 768 | llvmAsmlval.type = Instruction::Enum; return sym |
| 769 | |
| 770 | namespace llvm { |
| 771 | |
| 772 | // TODO: All of the static identifiers are figured out by the lexer, |
| 773 | // these should be hashed to reduce the lexer size |
| 774 | |
| 775 | |
| 776 | // atoull - Convert an ascii string of decimal digits into the unsigned long |
| 777 | // long representation... this does not have to do input error checking, |
| 778 | // because we know that the input will be matched by a suitable regex... |
| 779 | // |
| 780 | static uint64_t atoull(const char *Buffer) { |
| 781 | uint64_t Result = 0; |
| 782 | for (; *Buffer; Buffer++) { |
| 783 | uint64_t OldRes = Result; |
| 784 | Result *= 10; |
| 785 | Result += *Buffer-'0'; |
| 786 | if (Result < OldRes) // Uh, oh, overflow detected!!! |
| 787 | ThrowException("constant bigger than 64 bits detected!"); |
| 788 | } |
| 789 | return Result; |
| 790 | } |
| 791 | |
| 792 | static uint64_t HexIntToVal(const char *Buffer) { |
| 793 | uint64_t Result = 0; |
| 794 | for (; *Buffer; ++Buffer) { |
| 795 | uint64_t OldRes = Result; |
| 796 | Result *= 16; |
| 797 | char C = *Buffer; |
| 798 | if (C >= '0' && C <= '9') |
| 799 | Result += C-'0'; |
| 800 | else if (C >= 'A' && C <= 'F') |
| 801 | Result += C-'A'+10; |
| 802 | else if (C >= 'a' && C <= 'f') |
| 803 | Result += C-'a'+10; |
| 804 | |
| 805 | if (Result < OldRes) // Uh, oh, overflow detected!!! |
| 806 | ThrowException("constant bigger than 64 bits detected!"); |
| 807 | } |
| 808 | return Result; |
| 809 | } |
| 810 | |
| 811 | |
| 812 | // HexToFP - Convert the ascii string in hexidecimal format to the floating |
| 813 | // point representation of it. |
| 814 | // |
| 815 | static double HexToFP(const char *Buffer) { |
| 816 | // Behave nicely in the face of C TBAA rules... see: |
| 817 | // http://www.nullstone.com/htmls/category/aliastyp.htm |
| 818 | union { |
| 819 | uint64_t UI; |
| 820 | double FP; |
| 821 | } UIntToFP; |
| 822 | UIntToFP.UI = HexIntToVal(Buffer); |
| 823 | |
| 824 | assert(sizeof(double) == sizeof(uint64_t) && |
| 825 | "Data sizes incompatible on this target!"); |
| 826 | return UIntToFP.FP; // Cast Hex constant to double |
| 827 | } |
| 828 | |
| 829 | |
| 830 | // UnEscapeLexed - Run through the specified buffer and change \xx codes to the |
| 831 | // appropriate character. If AllowNull is set to false, a \00 value will cause |
| 832 | // an exception to be thrown. |
| 833 | // |
| 834 | // If AllowNull is set to true, the return value of the function points to the |
| 835 | // last character of the string in memory. |
| 836 | // |
| 837 | char *UnEscapeLexed(char *Buffer, bool AllowNull) { |
| 838 | char *BOut = Buffer; |
| 839 | for (char *BIn = Buffer; *BIn; ) { |
| 840 | if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) { |
| 841 | char Tmp = BIn[3]; BIn[3] = 0; // Terminate string |
| 842 | *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number |
| 843 | if (!AllowNull && !*BOut) |
| 844 | ThrowException("String literal cannot accept \\00 escape!"); |
| 845 | |
| 846 | BIn[3] = Tmp; // Restore character |
| 847 | BIn += 3; // Skip over handled chars |
| 848 | ++BOut; |
| 849 | } else { |
| 850 | *BOut++ = *BIn++; |
| 851 | } |
| 852 | } |
| 853 | |
| 854 | return BOut; |
| 855 | } |
| 856 | |
| 857 | } // End llvm namespace |
| 858 | |
| 859 | using namespace llvm; |
| 860 | |
| 861 | #define YY_NEVER_INTERACTIVE 1 |
| 862 | /* Comments start with a ; and go till end of line */ |
| 863 | /* Variable(Value) identifiers start with a % sign */ |
| 864 | /* Label identifiers end with a colon */ |
| 865 | /* Quoted names can contain any character except " and \ */ |
| 866 | /* [PN]Integer: match positive and negative literal integer values that |
| 867 | * are preceeded by a '%' character. These represent unnamed variable slots. |
| 868 | */ |
| 869 | /* E[PN]Integer: match positive and negative literal integer values */ |
| 870 | /* FPConstant - A Floating point constant. |
| 871 | */ |
| 872 | /* HexFPConstant - Floating point constant represented in IEEE format as a |
| 873 | * hexadecimal number for when exponential notation is not precise enough. |
| 874 | */ |
| 875 | /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing |
| 876 | * it to deal with 64 bit numbers. |
| 877 | */ |
| 878 | #line 879 "Lexer.cpp" |
| 879 | |
| 880 | /* Macros after this point can all be overridden by user definitions in |
| 881 | * section 1. |
| 882 | */ |
| 883 | |
| 884 | #ifndef YY_SKIP_YYWRAP |
| 885 | #ifdef __cplusplus |
| 886 | extern "C" int yywrap YY_PROTO(( void )); |
| 887 | #else |
| 888 | extern int yywrap YY_PROTO(( void )); |
| 889 | #endif |
| 890 | #endif |
| 891 | |
| 892 | #ifndef YY_NO_UNPUT |
| 893 | static inline void yyunput YY_PROTO(( int c, char *buf_ptr )); |
| 894 | #endif |
| 895 | |
| 896 | #ifndef yytext_ptr |
| 897 | static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); |
| 898 | #endif |
| 899 | |
| 900 | #ifdef YY_NEED_STRLEN |
| 901 | static int yy_flex_strlen YY_PROTO(( yyconst char * )); |
| 902 | #endif |
| 903 | |
| 904 | #ifndef YY_NO_INPUT |
| 905 | #ifdef __cplusplus |
| 906 | static int yyinput YY_PROTO(( void )); |
| 907 | #else |
| 908 | static int input YY_PROTO(( void )); |
| 909 | #endif |
| 910 | #endif |
| 911 | |
| 912 | #if YY_STACK_USED |
| 913 | static int yy_start_stack_ptr = 0; |
| 914 | static int yy_start_stack_depth = 0; |
| 915 | static int *yy_start_stack = 0; |
| 916 | #ifndef YY_NO_PUSH_STATE |
| 917 | static void yy_push_state YY_PROTO(( int new_state )); |
| 918 | #endif |
| 919 | #ifndef YY_NO_POP_STATE |
| 920 | static void yy_pop_state YY_PROTO(( void )); |
| 921 | #endif |
| 922 | #ifndef YY_NO_TOP_STATE |
| 923 | static int yy_top_state YY_PROTO(( void )); |
| 924 | #endif |
| 925 | |
| 926 | #else |
| 927 | #define YY_NO_PUSH_STATE 1 |
| 928 | #define YY_NO_POP_STATE 1 |
| 929 | #define YY_NO_TOP_STATE 1 |
| 930 | #endif |
| 931 | |
| 932 | #ifdef YY_MALLOC_DECL |
| 933 | YY_MALLOC_DECL |
| 934 | #else |
| 935 | #if __STDC__ |
| 936 | #ifndef __cplusplus |
| 937 | #include <stdlib.h> |
| 938 | #endif |
| 939 | #else |
| 940 | /* Just try to get by without declaring the routines. This will fail |
| 941 | * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) |
| 942 | * or sizeof(void*) != sizeof(int). |
| 943 | */ |
| 944 | #endif |
| 945 | #endif |
| 946 | |
| 947 | /* Amount of stuff to slurp up with each read. */ |
| 948 | #ifndef YY_READ_BUF_SIZE |
| 949 | #define YY_READ_BUF_SIZE 8192 |
| 950 | #endif |
| 951 | |
| 952 | /* Copy whatever the last rule matched to the standard output. */ |
| 953 | |
| 954 | #ifndef ECHO |
| 955 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 956 | * we now use fwrite(). |
| 957 | */ |
| 958 | #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
| 959 | #endif |
| 960 | |
| 961 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
| 962 | * is returned in "result". |
| 963 | */ |
| 964 | #ifndef YY_INPUT |
| 965 | #define YY_INPUT(buf,result,max_size) \ |
| 966 | if ( yy_current_buffer->yy_is_interactive ) \ |
| 967 | { \ |
| 968 | int c = '*', n; \ |
| 969 | for ( n = 0; n < max_size && \ |
| 970 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
| 971 | buf[n] = (char) c; \ |
| 972 | if ( c == '\n' ) \ |
| 973 | buf[n++] = (char) c; \ |
| 974 | if ( c == EOF && ferror( yyin ) ) \ |
| 975 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 976 | result = n; \ |
| 977 | } \ |
| 978 | else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ |
| 979 | && ferror( yyin ) ) \ |
| 980 | YY_FATAL_ERROR( "input in flex scanner failed" ); |
| 981 | #endif |
| 982 | |
| 983 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
| 984 | * we don't want an extra ';' after the "return" because that will cause |
| 985 | * some compilers to complain about unreachable statements. |
| 986 | */ |
| 987 | #ifndef yyterminate |
| 988 | #define yyterminate() return YY_NULL |
| 989 | #endif |
| 990 | |
| 991 | /* Number of entries by which start-condition stack grows. */ |
| 992 | #ifndef YY_START_STACK_INCR |
| 993 | #define YY_START_STACK_INCR 25 |
| 994 | #endif |
| 995 | |
| 996 | /* Report a fatal error. */ |
| 997 | #ifndef YY_FATAL_ERROR |
| 998 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
| 999 | #endif |
| 1000 | |
| 1001 | /* Default declaration of generated scanner - a define so the user can |
| 1002 | * easily add parameters. |
| 1003 | */ |
| 1004 | #ifndef YY_DECL |
| 1005 | #define YY_DECL int yylex YY_PROTO(( void )) |
| 1006 | #endif |
| 1007 | |
| 1008 | /* Code executed at the beginning of each rule, after yytext and yyleng |
| 1009 | * have been set up. |
| 1010 | */ |
| 1011 | #ifndef YY_USER_ACTION |
| 1012 | #define YY_USER_ACTION |
| 1013 | #endif |
| 1014 | |
| 1015 | /* Code executed at the end of each rule. */ |
| 1016 | #ifndef YY_BREAK |
| 1017 | #define YY_BREAK break; |
| 1018 | #endif |
| 1019 | |
| 1020 | #define YY_RULE_SETUP \ |
| 1021 | YY_USER_ACTION |
| 1022 | |
| 1023 | YY_DECL |
| 1024 | { |
| 1025 | register yy_state_type yy_current_state; |
| 1026 | register char *yy_cp = NULL, *yy_bp = NULL; |
| 1027 | register int yy_act; |
| 1028 | |
| 1029 | #line 179 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1030 | |
| 1031 | |
| 1032 | #line 1033 "Lexer.cpp" |
| 1033 | |
| 1034 | if ( yy_init ) |
| 1035 | { |
| 1036 | yy_init = 0; |
| 1037 | |
| 1038 | #ifdef YY_USER_INIT |
| 1039 | YY_USER_INIT; |
| 1040 | #endif |
| 1041 | |
| 1042 | if ( ! yy_start ) |
| 1043 | yy_start = 1; /* first start state */ |
| 1044 | |
| 1045 | if ( ! yyin ) |
| 1046 | yyin = stdin; |
| 1047 | |
| 1048 | if ( ! yyout ) |
| 1049 | yyout = stdout; |
| 1050 | |
| 1051 | if ( ! yy_current_buffer ) |
| 1052 | yy_current_buffer = |
| 1053 | yy_create_buffer( yyin, YY_BUF_SIZE ); |
| 1054 | |
| 1055 | yy_load_buffer_state(); |
| 1056 | } |
| 1057 | |
| 1058 | while ( 1 ) /* loops until end-of-file is reached */ |
| 1059 | { |
| 1060 | yy_cp = yy_c_buf_p; |
| 1061 | |
| 1062 | /* Support of yytext. */ |
| 1063 | *yy_cp = yy_hold_char; |
| 1064 | |
| 1065 | /* yy_bp points to the position in yy_ch_buf of the start of |
| 1066 | * the current run. |
| 1067 | */ |
| 1068 | yy_bp = yy_cp; |
| 1069 | |
| 1070 | yy_current_state = yy_start; |
| 1071 | yy_state_ptr = yy_state_buf; |
| 1072 | *yy_state_ptr++ = yy_current_state; |
| 1073 | yy_match: |
| 1074 | do |
| 1075 | { |
| 1076 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
| 1077 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1078 | { |
| 1079 | yy_current_state = (int) yy_def[yy_current_state]; |
| 1080 | if ( yy_current_state >= 397 ) |
| 1081 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 1082 | } |
| 1083 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 1084 | *yy_state_ptr++ = yy_current_state; |
| 1085 | ++yy_cp; |
| 1086 | } |
| 1087 | while ( yy_current_state != 396 ); |
| 1088 | |
| 1089 | yy_find_action: |
| 1090 | yy_current_state = *--yy_state_ptr; |
| 1091 | yy_lp = yy_accept[yy_current_state]; |
| 1092 | find_rule: /* we branch to this label when backing up */ |
| 1093 | for ( ; ; ) /* until we find what rule we matched */ |
| 1094 | { |
| 1095 | if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) |
| 1096 | { |
| 1097 | yy_act = yy_acclist[yy_lp]; |
| 1098 | { |
| 1099 | yy_full_match = yy_cp; |
| 1100 | break; |
| 1101 | } |
| 1102 | } |
| 1103 | --yy_cp; |
| 1104 | yy_current_state = *--yy_state_ptr; |
| 1105 | yy_lp = yy_accept[yy_current_state]; |
| 1106 | } |
| 1107 | |
| 1108 | YY_DO_BEFORE_ACTION; |
| 1109 | |
| 1110 | if ( yy_act != YY_END_OF_BUFFER ) |
| 1111 | { |
| 1112 | int yyl; |
| 1113 | for ( yyl = 0; yyl < yyleng; ++yyl ) |
| 1114 | if ( yytext[yyl] == '\n' ) |
| 1115 | ++yylineno; |
| 1116 | } |
| 1117 | |
| 1118 | do_action: /* This label is used only to access EOF actions. */ |
| 1119 | |
| 1120 | |
| 1121 | switch ( yy_act ) |
| 1122 | { /* beginning of action switch */ |
| 1123 | case 1: |
| 1124 | YY_RULE_SETUP |
| 1125 | #line 181 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1126 | { /* Ignore comments for now */ } |
| 1127 | YY_BREAK |
| 1128 | case 2: |
| 1129 | YY_RULE_SETUP |
| 1130 | #line 183 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1131 | { return BEGINTOK; } |
| 1132 | YY_BREAK |
| 1133 | case 3: |
| 1134 | YY_RULE_SETUP |
| 1135 | #line 184 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1136 | { return ENDTOK; } |
| 1137 | YY_BREAK |
| 1138 | case 4: |
| 1139 | YY_RULE_SETUP |
| 1140 | #line 185 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1141 | { return TRUETOK; } |
| 1142 | YY_BREAK |
| 1143 | case 5: |
| 1144 | YY_RULE_SETUP |
| 1145 | #line 186 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1146 | { return FALSETOK; } |
| 1147 | YY_BREAK |
| 1148 | case 6: |
| 1149 | YY_RULE_SETUP |
| 1150 | #line 187 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1151 | { return DECLARE; } |
| 1152 | YY_BREAK |
| 1153 | case 7: |
| 1154 | YY_RULE_SETUP |
| 1155 | #line 188 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1156 | { return GLOBAL; } |
| 1157 | YY_BREAK |
| 1158 | case 8: |
| 1159 | YY_RULE_SETUP |
| 1160 | #line 189 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1161 | { return CONSTANT; } |
| 1162 | YY_BREAK |
| 1163 | case 9: |
| 1164 | YY_RULE_SETUP |
| 1165 | #line 190 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1166 | { return INTERNAL; } |
| 1167 | YY_BREAK |
| 1168 | case 10: |
| 1169 | YY_RULE_SETUP |
| 1170 | #line 191 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1171 | { return LINKONCE; } |
| 1172 | YY_BREAK |
| 1173 | case 11: |
| 1174 | YY_RULE_SETUP |
| 1175 | #line 192 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1176 | { return WEAK; } |
| 1177 | YY_BREAK |
| 1178 | case 12: |
| 1179 | YY_RULE_SETUP |
| 1180 | #line 193 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1181 | { return APPENDING; } |
| 1182 | YY_BREAK |
| 1183 | case 13: |
| 1184 | YY_RULE_SETUP |
| 1185 | #line 194 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1186 | { return EXTERNAL; } /* Deprecated, turn into external */ |
| 1187 | YY_BREAK |
| 1188 | case 14: |
| 1189 | YY_RULE_SETUP |
| 1190 | #line 195 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1191 | { return EXTERNAL; } |
| 1192 | YY_BREAK |
| 1193 | case 15: |
| 1194 | YY_RULE_SETUP |
| 1195 | #line 196 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1196 | { return IMPLEMENTATION; } |
| 1197 | YY_BREAK |
| 1198 | case 16: |
| 1199 | YY_RULE_SETUP |
| 1200 | #line 197 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1201 | { return ZEROINITIALIZER; } |
| 1202 | YY_BREAK |
| 1203 | case 17: |
| 1204 | YY_RULE_SETUP |
| 1205 | #line 198 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1206 | { return DOTDOTDOT; } |
| 1207 | YY_BREAK |
| 1208 | case 18: |
| 1209 | YY_RULE_SETUP |
| 1210 | #line 199 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1211 | { return UNDEF; } |
| 1212 | YY_BREAK |
| 1213 | case 19: |
| 1214 | YY_RULE_SETUP |
| 1215 | #line 200 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1216 | { return NULL_TOK; } |
| 1217 | YY_BREAK |
| 1218 | case 20: |
| 1219 | YY_RULE_SETUP |
| 1220 | #line 201 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1221 | { return TO; } |
| 1222 | YY_BREAK |
| 1223 | case 21: |
| 1224 | YY_RULE_SETUP |
| 1225 | #line 202 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1226 | { RET_TOK(TermOpVal, Unwind, UNWIND); } |
| 1227 | YY_BREAK |
| 1228 | case 22: |
| 1229 | YY_RULE_SETUP |
| 1230 | #line 203 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1231 | { return NOT; } /* Deprecated, turned into XOR */ |
| 1232 | YY_BREAK |
| 1233 | case 23: |
| 1234 | YY_RULE_SETUP |
| 1235 | #line 204 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1236 | { return TAIL; } |
| 1237 | YY_BREAK |
| 1238 | case 24: |
| 1239 | YY_RULE_SETUP |
| 1240 | #line 205 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1241 | { return TARGET; } |
| 1242 | YY_BREAK |
| 1243 | case 25: |
| 1244 | YY_RULE_SETUP |
| 1245 | #line 206 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1246 | { return TRIPLE; } |
| 1247 | YY_BREAK |
| 1248 | case 26: |
| 1249 | YY_RULE_SETUP |
| 1250 | #line 207 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1251 | { return DEPLIBS; } |
| 1252 | YY_BREAK |
| 1253 | case 27: |
| 1254 | YY_RULE_SETUP |
| 1255 | #line 208 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1256 | { return ENDIAN; } |
| 1257 | YY_BREAK |
| 1258 | case 28: |
| 1259 | YY_RULE_SETUP |
| 1260 | #line 209 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1261 | { return POINTERSIZE; } |
| 1262 | YY_BREAK |
| 1263 | case 29: |
| 1264 | YY_RULE_SETUP |
| 1265 | #line 210 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1266 | { return LITTLE; } |
| 1267 | YY_BREAK |
| 1268 | case 30: |
| 1269 | YY_RULE_SETUP |
| 1270 | #line 211 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1271 | { return BIG; } |
| 1272 | YY_BREAK |
| 1273 | case 31: |
| 1274 | YY_RULE_SETUP |
| 1275 | #line 212 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1276 | { return VOLATILE; } |
| 1277 | YY_BREAK |
| 1278 | case 32: |
| 1279 | YY_RULE_SETUP |
| 1280 | #line 214 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1281 | { return CC_TOK; } |
| 1282 | YY_BREAK |
| 1283 | case 33: |
| 1284 | YY_RULE_SETUP |
| 1285 | #line 215 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1286 | { return CCC_TOK; } |
| 1287 | YY_BREAK |
| 1288 | case 34: |
| 1289 | YY_RULE_SETUP |
| 1290 | #line 216 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1291 | { return FASTCC_TOK; } |
| 1292 | YY_BREAK |
| 1293 | case 35: |
| 1294 | YY_RULE_SETUP |
| 1295 | #line 217 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1296 | { return COLDCC_TOK; } |
| 1297 | YY_BREAK |
| 1298 | case 36: |
| 1299 | YY_RULE_SETUP |
| 1300 | #line 219 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1301 | { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } |
| 1302 | YY_BREAK |
| 1303 | case 37: |
| 1304 | YY_RULE_SETUP |
| 1305 | #line 220 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1306 | { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } |
| 1307 | YY_BREAK |
| 1308 | case 38: |
| 1309 | YY_RULE_SETUP |
| 1310 | #line 221 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1311 | { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } |
| 1312 | YY_BREAK |
| 1313 | case 39: |
| 1314 | YY_RULE_SETUP |
| 1315 | #line 222 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1316 | { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } |
| 1317 | YY_BREAK |
| 1318 | case 40: |
| 1319 | YY_RULE_SETUP |
| 1320 | #line 223 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1321 | { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } |
| 1322 | YY_BREAK |
| 1323 | case 41: |
| 1324 | YY_RULE_SETUP |
| 1325 | #line 224 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1326 | { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } |
| 1327 | YY_BREAK |
| 1328 | case 42: |
| 1329 | YY_RULE_SETUP |
| 1330 | #line 225 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1331 | { llvmAsmlval.PrimType = Type::IntTy ; return INT; } |
| 1332 | YY_BREAK |
| 1333 | case 43: |
| 1334 | YY_RULE_SETUP |
| 1335 | #line 226 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1336 | { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } |
| 1337 | YY_BREAK |
| 1338 | case 44: |
| 1339 | YY_RULE_SETUP |
| 1340 | #line 227 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1341 | { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } |
| 1342 | YY_BREAK |
| 1343 | case 45: |
| 1344 | YY_RULE_SETUP |
| 1345 | #line 228 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1346 | { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } |
| 1347 | YY_BREAK |
| 1348 | case 46: |
| 1349 | YY_RULE_SETUP |
| 1350 | #line 229 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1351 | { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } |
| 1352 | YY_BREAK |
| 1353 | case 47: |
| 1354 | YY_RULE_SETUP |
| 1355 | #line 230 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1356 | { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } |
| 1357 | YY_BREAK |
| 1358 | case 48: |
| 1359 | YY_RULE_SETUP |
| 1360 | #line 231 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1361 | { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } |
| 1362 | YY_BREAK |
| 1363 | case 49: |
| 1364 | YY_RULE_SETUP |
| 1365 | #line 232 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1366 | { return TYPE; } |
| 1367 | YY_BREAK |
| 1368 | case 50: |
| 1369 | YY_RULE_SETUP |
| 1370 | #line 233 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1371 | { return OPAQUE; } |
| 1372 | YY_BREAK |
| 1373 | case 51: |
| 1374 | YY_RULE_SETUP |
| 1375 | #line 235 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1376 | { RET_TOK(BinaryOpVal, Add, ADD); } |
| 1377 | YY_BREAK |
| 1378 | case 52: |
| 1379 | YY_RULE_SETUP |
| 1380 | #line 236 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1381 | { RET_TOK(BinaryOpVal, Sub, SUB); } |
| 1382 | YY_BREAK |
| 1383 | case 53: |
| 1384 | YY_RULE_SETUP |
| 1385 | #line 237 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1386 | { RET_TOK(BinaryOpVal, Mul, MUL); } |
| 1387 | YY_BREAK |
| 1388 | case 54: |
| 1389 | YY_RULE_SETUP |
| 1390 | #line 238 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1391 | { RET_TOK(BinaryOpVal, Div, DIV); } |
| 1392 | YY_BREAK |
| 1393 | case 55: |
| 1394 | YY_RULE_SETUP |
| 1395 | #line 239 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1396 | { RET_TOK(BinaryOpVal, Rem, REM); } |
| 1397 | YY_BREAK |
| 1398 | case 56: |
| 1399 | YY_RULE_SETUP |
| 1400 | #line 240 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1401 | { RET_TOK(BinaryOpVal, And, AND); } |
| 1402 | YY_BREAK |
| 1403 | case 57: |
| 1404 | YY_RULE_SETUP |
| 1405 | #line 241 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1406 | { RET_TOK(BinaryOpVal, Or , OR ); } |
| 1407 | YY_BREAK |
| 1408 | case 58: |
| 1409 | YY_RULE_SETUP |
| 1410 | #line 242 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1411 | { RET_TOK(BinaryOpVal, Xor, XOR); } |
| 1412 | YY_BREAK |
| 1413 | case 59: |
| 1414 | YY_RULE_SETUP |
| 1415 | #line 243 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1416 | { RET_TOK(BinaryOpVal, SetNE, SETNE); } |
| 1417 | YY_BREAK |
| 1418 | case 60: |
| 1419 | YY_RULE_SETUP |
| 1420 | #line 244 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1421 | { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } |
| 1422 | YY_BREAK |
| 1423 | case 61: |
| 1424 | YY_RULE_SETUP |
| 1425 | #line 245 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1426 | { RET_TOK(BinaryOpVal, SetLT, SETLT); } |
| 1427 | YY_BREAK |
| 1428 | case 62: |
| 1429 | YY_RULE_SETUP |
| 1430 | #line 246 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1431 | { RET_TOK(BinaryOpVal, SetGT, SETGT); } |
| 1432 | YY_BREAK |
| 1433 | case 63: |
| 1434 | YY_RULE_SETUP |
| 1435 | #line 247 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1436 | { RET_TOK(BinaryOpVal, SetLE, SETLE); } |
| 1437 | YY_BREAK |
| 1438 | case 64: |
| 1439 | YY_RULE_SETUP |
| 1440 | #line 248 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1441 | { RET_TOK(BinaryOpVal, SetGE, SETGE); } |
| 1442 | YY_BREAK |
| 1443 | case 65: |
| 1444 | YY_RULE_SETUP |
| 1445 | #line 250 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1446 | { RET_TOK(OtherOpVal, PHI, PHI_TOK); } |
| 1447 | YY_BREAK |
| 1448 | case 66: |
| 1449 | YY_RULE_SETUP |
| 1450 | #line 251 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1451 | { RET_TOK(OtherOpVal, Call, CALL); } |
| 1452 | YY_BREAK |
| 1453 | case 67: |
| 1454 | YY_RULE_SETUP |
| 1455 | #line 252 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1456 | { RET_TOK(OtherOpVal, Cast, CAST); } |
| 1457 | YY_BREAK |
| 1458 | case 68: |
| 1459 | YY_RULE_SETUP |
| 1460 | #line 253 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1461 | { RET_TOK(OtherOpVal, Select, SELECT); } |
| 1462 | YY_BREAK |
| 1463 | case 69: |
| 1464 | YY_RULE_SETUP |
| 1465 | #line 254 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1466 | { RET_TOK(OtherOpVal, Shl, SHL); } |
| 1467 | YY_BREAK |
| 1468 | case 70: |
| 1469 | YY_RULE_SETUP |
| 1470 | #line 255 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1471 | { RET_TOK(OtherOpVal, Shr, SHR); } |
| 1472 | YY_BREAK |
| 1473 | case 71: |
| 1474 | YY_RULE_SETUP |
| 1475 | #line 256 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1476 | { return VANEXT_old; } |
| 1477 | YY_BREAK |
| 1478 | case 72: |
| 1479 | YY_RULE_SETUP |
| 1480 | #line 257 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1481 | { return VAARG_old; } |
| 1482 | YY_BREAK |
| 1483 | case 73: |
| 1484 | YY_RULE_SETUP |
| 1485 | #line 258 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1486 | { RET_TOK(OtherOpVal, VAArg , VAARG); } |
| 1487 | YY_BREAK |
| 1488 | case 74: |
| 1489 | YY_RULE_SETUP |
| 1490 | #line 259 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1491 | { RET_TOK(TermOpVal, Ret, RET); } |
| 1492 | YY_BREAK |
| 1493 | case 75: |
| 1494 | YY_RULE_SETUP |
| 1495 | #line 260 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1496 | { RET_TOK(TermOpVal, Br, BR); } |
| 1497 | YY_BREAK |
| 1498 | case 76: |
| 1499 | YY_RULE_SETUP |
| 1500 | #line 261 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1501 | { RET_TOK(TermOpVal, Switch, SWITCH); } |
| 1502 | YY_BREAK |
| 1503 | case 77: |
| 1504 | YY_RULE_SETUP |
| 1505 | #line 262 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1506 | { RET_TOK(TermOpVal, Invoke, INVOKE); } |
| 1507 | YY_BREAK |
| 1508 | case 78: |
| 1509 | YY_RULE_SETUP |
| 1510 | #line 263 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1511 | { RET_TOK(TermOpVal, Unwind, UNWIND); } |
| 1512 | YY_BREAK |
| 1513 | case 79: |
| 1514 | YY_RULE_SETUP |
| 1515 | #line 264 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1516 | { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } |
| 1517 | YY_BREAK |
| 1518 | case 80: |
| 1519 | YY_RULE_SETUP |
| 1520 | #line 266 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1521 | { RET_TOK(MemOpVal, Malloc, MALLOC); } |
| 1522 | YY_BREAK |
| 1523 | case 81: |
| 1524 | YY_RULE_SETUP |
| 1525 | #line 267 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1526 | { RET_TOK(MemOpVal, Alloca, ALLOCA); } |
| 1527 | YY_BREAK |
| 1528 | case 82: |
| 1529 | YY_RULE_SETUP |
| 1530 | #line 268 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1531 | { RET_TOK(MemOpVal, Free, FREE); } |
| 1532 | YY_BREAK |
| 1533 | case 83: |
| 1534 | YY_RULE_SETUP |
| 1535 | #line 269 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1536 | { RET_TOK(MemOpVal, Load, LOAD); } |
| 1537 | YY_BREAK |
| 1538 | case 84: |
| 1539 | YY_RULE_SETUP |
| 1540 | #line 270 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1541 | { RET_TOK(MemOpVal, Store, STORE); } |
| 1542 | YY_BREAK |
| 1543 | case 85: |
| 1544 | YY_RULE_SETUP |
| 1545 | #line 271 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1546 | { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } |
| 1547 | YY_BREAK |
| 1548 | case 86: |
| 1549 | YY_RULE_SETUP |
| 1550 | #line 274 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1551 | { |
| 1552 | UnEscapeLexed(yytext+1); |
| 1553 | llvmAsmlval.StrVal = strdup(yytext+1); // Skip % |
| 1554 | return VAR_ID; |
| 1555 | } |
| 1556 | YY_BREAK |
| 1557 | case 87: |
| 1558 | YY_RULE_SETUP |
| 1559 | #line 279 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1560 | { |
| 1561 | yytext[strlen(yytext)-1] = 0; // nuke colon |
| 1562 | UnEscapeLexed(yytext); |
| 1563 | llvmAsmlval.StrVal = strdup(yytext); |
| 1564 | return LABELSTR; |
| 1565 | } |
| 1566 | YY_BREAK |
| 1567 | case 88: |
| 1568 | YY_RULE_SETUP |
| 1569 | #line 285 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1570 | { |
| 1571 | yytext[strlen(yytext)-2] = 0; // nuke colon, end quote |
| 1572 | UnEscapeLexed(yytext+1); |
| 1573 | llvmAsmlval.StrVal = strdup(yytext+1); |
| 1574 | return LABELSTR; |
| 1575 | } |
| 1576 | YY_BREAK |
| 1577 | case 89: |
| 1578 | YY_RULE_SETUP |
| 1579 | #line 292 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1580 | { // Note that we cannot unescape a string constant here! The |
| 1581 | // string constant might contain a \00 which would not be |
| 1582 | // understood by the string stuff. It is valid to make a |
| 1583 | // [sbyte] c"Hello World\00" constant, for example. |
| 1584 | // |
| 1585 | yytext[strlen(yytext)-1] = 0; // nuke end quote |
| 1586 | llvmAsmlval.StrVal = strdup(yytext+1); // Nuke start quote |
| 1587 | return STRINGCONSTANT; |
| 1588 | } |
| 1589 | YY_BREAK |
| 1590 | case 90: |
| 1591 | YY_RULE_SETUP |
| 1592 | #line 303 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1593 | { llvmAsmlval.UInt64Val = atoull(yytext); return EUINT64VAL; } |
| 1594 | YY_BREAK |
| 1595 | case 91: |
| 1596 | YY_RULE_SETUP |
| 1597 | #line 304 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1598 | { |
| 1599 | uint64_t Val = atoull(yytext+1); |
| 1600 | // +1: we have bigger negative range |
| 1601 | if (Val > (uint64_t)INT64_MAX+1) |
| 1602 | ThrowException("Constant too large for signed 64 bits!"); |
| 1603 | llvmAsmlval.SInt64Val = -Val; |
| 1604 | return ESINT64VAL; |
| 1605 | } |
| 1606 | YY_BREAK |
| 1607 | case 92: |
| 1608 | YY_RULE_SETUP |
| 1609 | #line 312 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1610 | { |
| 1611 | llvmAsmlval.UInt64Val = HexIntToVal(yytext+3); |
| 1612 | return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL; |
| 1613 | } |
| 1614 | YY_BREAK |
| 1615 | case 93: |
| 1616 | YY_RULE_SETUP |
| 1617 | #line 317 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1618 | { |
| 1619 | uint64_t Val = atoull(yytext+1); |
| 1620 | if ((unsigned)Val != Val) |
| 1621 | ThrowException("Invalid value number (too large)!"); |
| 1622 | llvmAsmlval.UIntVal = unsigned(Val); |
| 1623 | return UINTVAL; |
| 1624 | } |
| 1625 | YY_BREAK |
| 1626 | case 94: |
| 1627 | YY_RULE_SETUP |
| 1628 | #line 324 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1629 | { |
| 1630 | uint64_t Val = atoull(yytext+2); |
| 1631 | // +1: we have bigger negative range |
| 1632 | if (Val > (uint64_t)INT32_MAX+1) |
| 1633 | ThrowException("Constant too large for signed 32 bits!"); |
| 1634 | llvmAsmlval.SIntVal = (int)-Val; |
| 1635 | return SINTVAL; |
| 1636 | } |
| 1637 | YY_BREAK |
| 1638 | case 95: |
| 1639 | YY_RULE_SETUP |
| 1640 | #line 333 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1641 | { llvmAsmlval.FPVal = atof(yytext); return FPVAL; } |
| 1642 | YY_BREAK |
| 1643 | case 96: |
| 1644 | YY_RULE_SETUP |
| 1645 | #line 334 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1646 | { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; } |
| 1647 | YY_BREAK |
| 1648 | case YY_STATE_EOF(INITIAL): |
| 1649 | #line 336 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1650 | { |
| 1651 | /* Make sure to free the internal buffers for flex when we are |
| 1652 | * done reading our input! |
| 1653 | */ |
| 1654 | yy_delete_buffer(YY_CURRENT_BUFFER); |
| 1655 | return EOF; |
| 1656 | } |
| 1657 | YY_BREAK |
| 1658 | case 97: |
| 1659 | YY_RULE_SETUP |
| 1660 | #line 344 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1661 | { /* Ignore whitespace */ } |
| 1662 | YY_BREAK |
| 1663 | case 98: |
| 1664 | YY_RULE_SETUP |
| 1665 | #line 345 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1666 | { return yytext[0]; } |
| 1667 | YY_BREAK |
| 1668 | case 99: |
| 1669 | YY_RULE_SETUP |
| 1670 | #line 347 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 1671 | YY_FATAL_ERROR( "flex scanner jammed" ); |
| 1672 | YY_BREAK |
| 1673 | #line 1674 "Lexer.cpp" |
| 1674 | |
| 1675 | case YY_END_OF_BUFFER: |
| 1676 | { |
| 1677 | /* Amount of text matched not including the EOB char. */ |
| 1678 | int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; |
| 1679 | |
| 1680 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
| 1681 | *yy_cp = yy_hold_char; |
| 1682 | YY_RESTORE_YY_MORE_OFFSET |
| 1683 | |
| 1684 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) |
| 1685 | { |
| 1686 | /* We're scanning a new file or input source. It's |
| 1687 | * possible that this happened because the user |
| 1688 | * just pointed yyin at a new source and called |
| 1689 | * yylex(). If so, then we have to assure |
| 1690 | * consistency between yy_current_buffer and our |
| 1691 | * globals. Here is the right place to do so, because |
| 1692 | * this is the first action (other than possibly a |
| 1693 | * back-up) that will match for the new input source. |
| 1694 | */ |
| 1695 | yy_n_chars = yy_current_buffer->yy_n_chars; |
| 1696 | yy_current_buffer->yy_input_file = yyin; |
| 1697 | yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; |
| 1698 | } |
| 1699 | |
| 1700 | /* Note that here we test for yy_c_buf_p "<=" to the position |
| 1701 | * of the first EOB in the buffer, since yy_c_buf_p will |
| 1702 | * already have been incremented past the NUL character |
| 1703 | * (since all states make transitions on EOB to the |
| 1704 | * end-of-buffer state). Contrast this with the test |
| 1705 | * in input(). |
| 1706 | */ |
| 1707 | if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) |
| 1708 | { /* This was really a NUL. */ |
| 1709 | yy_state_type yy_next_state; |
| 1710 | |
| 1711 | yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; |
| 1712 | |
| 1713 | yy_current_state = yy_get_previous_state(); |
| 1714 | |
| 1715 | /* Okay, we're now positioned to make the NUL |
| 1716 | * transition. We couldn't have |
| 1717 | * yy_get_previous_state() go ahead and do it |
| 1718 | * for us because it doesn't know how to deal |
| 1719 | * with the possibility of jamming (and we don't |
| 1720 | * want to build jamming into it because then it |
| 1721 | * will run more slowly). |
| 1722 | */ |
| 1723 | |
| 1724 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
| 1725 | |
| 1726 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
| 1727 | |
| 1728 | if ( yy_next_state ) |
| 1729 | { |
| 1730 | /* Consume the NUL. */ |
| 1731 | yy_cp = ++yy_c_buf_p; |
| 1732 | yy_current_state = yy_next_state; |
| 1733 | goto yy_match; |
| 1734 | } |
| 1735 | |
| 1736 | else |
| 1737 | { |
| 1738 | yy_cp = yy_c_buf_p; |
| 1739 | goto yy_find_action; |
| 1740 | } |
| 1741 | } |
| 1742 | |
| 1743 | else switch ( yy_get_next_buffer() ) |
| 1744 | { |
| 1745 | case EOB_ACT_END_OF_FILE: |
| 1746 | { |
| 1747 | yy_did_buffer_switch_on_eof = 0; |
| 1748 | |
| 1749 | if ( yywrap() ) |
| 1750 | { |
| 1751 | /* Note: because we've taken care in |
| 1752 | * yy_get_next_buffer() to have set up |
| 1753 | * yytext, we can now set up |
| 1754 | * yy_c_buf_p so that if some total |
| 1755 | * hoser (like flex itself) wants to |
| 1756 | * call the scanner after we return the |
| 1757 | * YY_NULL, it'll still work - another |
| 1758 | * YY_NULL will get returned. |
| 1759 | */ |
| 1760 | yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; |
| 1761 | |
| 1762 | yy_act = YY_STATE_EOF(YY_START); |
| 1763 | goto do_action; |
| 1764 | } |
| 1765 | |
| 1766 | else |
| 1767 | { |
| 1768 | if ( ! yy_did_buffer_switch_on_eof ) |
| 1769 | YY_NEW_FILE; |
| 1770 | } |
| 1771 | break; |
| 1772 | } |
| 1773 | |
| 1774 | case EOB_ACT_CONTINUE_SCAN: |
| 1775 | yy_c_buf_p = |
| 1776 | yytext_ptr + yy_amount_of_matched_text; |
| 1777 | |
| 1778 | yy_current_state = yy_get_previous_state(); |
| 1779 | |
| 1780 | yy_cp = yy_c_buf_p; |
| 1781 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
| 1782 | goto yy_match; |
| 1783 | |
| 1784 | case EOB_ACT_LAST_MATCH: |
| 1785 | yy_c_buf_p = |
| 1786 | &yy_current_buffer->yy_ch_buf[yy_n_chars]; |
| 1787 | |
| 1788 | yy_current_state = yy_get_previous_state(); |
| 1789 | |
| 1790 | yy_cp = yy_c_buf_p; |
| 1791 | yy_bp = yytext_ptr + YY_MORE_ADJ; |
| 1792 | goto yy_find_action; |
| 1793 | } |
| 1794 | break; |
| 1795 | } |
| 1796 | |
| 1797 | default: |
| 1798 | YY_FATAL_ERROR( |
| 1799 | "fatal flex scanner internal error--no action found" ); |
| 1800 | } /* end of action switch */ |
| 1801 | } /* end of scanning one token */ |
| 1802 | } /* end of yylex */ |
| 1803 | |
| 1804 | |
| 1805 | /* yy_get_next_buffer - try to read in a new buffer |
| 1806 | * |
| 1807 | * Returns a code representing an action: |
| 1808 | * EOB_ACT_LAST_MATCH - |
| 1809 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
| 1810 | * EOB_ACT_END_OF_FILE - end of file |
| 1811 | */ |
| 1812 | |
| 1813 | static int yy_get_next_buffer() |
| 1814 | { |
| 1815 | register char *dest = yy_current_buffer->yy_ch_buf; |
| 1816 | register char *source = yytext_ptr; |
| 1817 | register int number_to_move, i; |
| 1818 | int ret_val; |
| 1819 | |
| 1820 | if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) |
| 1821 | YY_FATAL_ERROR( |
| 1822 | "fatal flex scanner internal error--end of buffer missed" ); |
| 1823 | |
| 1824 | if ( yy_current_buffer->yy_fill_buffer == 0 ) |
| 1825 | { /* Don't try to fill the buffer, so this is an EOF. */ |
| 1826 | if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) |
| 1827 | { |
| 1828 | /* We matched a single character, the EOB, so |
| 1829 | * treat this as a final EOF. |
| 1830 | */ |
| 1831 | return EOB_ACT_END_OF_FILE; |
| 1832 | } |
| 1833 | |
| 1834 | else |
| 1835 | { |
| 1836 | /* We matched some text prior to the EOB, first |
| 1837 | * process it. |
| 1838 | */ |
| 1839 | return EOB_ACT_LAST_MATCH; |
| 1840 | } |
| 1841 | } |
| 1842 | |
| 1843 | /* Try to read more data. */ |
| 1844 | |
| 1845 | /* First move last chars to start of buffer. */ |
| 1846 | number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; |
| 1847 | |
| 1848 | for ( i = 0; i < number_to_move; ++i ) |
| 1849 | *(dest++) = *(source++); |
| 1850 | |
| 1851 | if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
| 1852 | /* don't do the read, it's not guaranteed to return an EOF, |
| 1853 | * just force an EOF |
| 1854 | */ |
| 1855 | yy_current_buffer->yy_n_chars = yy_n_chars = 0; |
| 1856 | |
| 1857 | else |
| 1858 | { |
| 1859 | int num_to_read = |
| 1860 | yy_current_buffer->yy_buf_size - number_to_move - 1; |
| 1861 | |
| 1862 | while ( num_to_read <= 0 ) |
| 1863 | { /* Not enough room in the buffer - grow it. */ |
| 1864 | #ifdef YY_USES_REJECT |
| 1865 | YY_FATAL_ERROR( |
| 1866 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
| 1867 | #else |
| 1868 | |
| 1869 | /* just a shorter name for the current buffer */ |
| 1870 | YY_BUFFER_STATE b = yy_current_buffer; |
| 1871 | |
| 1872 | int yy_c_buf_p_offset = |
| 1873 | (int) (yy_c_buf_p - b->yy_ch_buf); |
| 1874 | |
| 1875 | if ( b->yy_is_our_buffer ) |
| 1876 | { |
| 1877 | int new_size = b->yy_buf_size * 2; |
| 1878 | |
| 1879 | if ( new_size <= 0 ) |
| 1880 | b->yy_buf_size += b->yy_buf_size / 8; |
| 1881 | else |
| 1882 | b->yy_buf_size *= 2; |
| 1883 | |
| 1884 | b->yy_ch_buf = (char *) |
| 1885 | /* Include room in for 2 EOB chars. */ |
| 1886 | yy_flex_realloc( (void *) b->yy_ch_buf, |
| 1887 | b->yy_buf_size + 2 ); |
| 1888 | } |
| 1889 | else |
| 1890 | /* Can't grow it, we don't own it. */ |
| 1891 | b->yy_ch_buf = 0; |
| 1892 | |
| 1893 | if ( ! b->yy_ch_buf ) |
| 1894 | YY_FATAL_ERROR( |
| 1895 | "fatal error - scanner input buffer overflow" ); |
| 1896 | |
| 1897 | yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
| 1898 | |
| 1899 | num_to_read = yy_current_buffer->yy_buf_size - |
| 1900 | number_to_move - 1; |
| 1901 | #endif |
| 1902 | } |
| 1903 | |
| 1904 | if ( num_to_read > YY_READ_BUF_SIZE ) |
| 1905 | num_to_read = YY_READ_BUF_SIZE; |
| 1906 | |
| 1907 | /* Read in more data. */ |
| 1908 | YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), |
| 1909 | yy_n_chars, num_to_read ); |
| 1910 | |
| 1911 | yy_current_buffer->yy_n_chars = yy_n_chars; |
| 1912 | } |
| 1913 | |
| 1914 | if ( yy_n_chars == 0 ) |
| 1915 | { |
| 1916 | if ( number_to_move == YY_MORE_ADJ ) |
| 1917 | { |
| 1918 | ret_val = EOB_ACT_END_OF_FILE; |
| 1919 | yyrestart( yyin ); |
| 1920 | } |
| 1921 | |
| 1922 | else |
| 1923 | { |
| 1924 | ret_val = EOB_ACT_LAST_MATCH; |
| 1925 | yy_current_buffer->yy_buffer_status = |
| 1926 | YY_BUFFER_EOF_PENDING; |
| 1927 | } |
| 1928 | } |
| 1929 | |
| 1930 | else |
| 1931 | ret_val = EOB_ACT_CONTINUE_SCAN; |
| 1932 | |
| 1933 | yy_n_chars += number_to_move; |
| 1934 | yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
| 1935 | yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
| 1936 | |
| 1937 | yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; |
| 1938 | |
| 1939 | return ret_val; |
| 1940 | } |
| 1941 | |
| 1942 | |
| 1943 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
| 1944 | |
| 1945 | static yy_state_type yy_get_previous_state() |
| 1946 | { |
| 1947 | register yy_state_type yy_current_state; |
| 1948 | register char *yy_cp; |
| 1949 | |
| 1950 | yy_current_state = yy_start; |
| 1951 | yy_state_ptr = yy_state_buf; |
| 1952 | *yy_state_ptr++ = yy_current_state; |
| 1953 | |
| 1954 | for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) |
| 1955 | { |
| 1956 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
| 1957 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1958 | { |
| 1959 | yy_current_state = (int) yy_def[yy_current_state]; |
| 1960 | if ( yy_current_state >= 397 ) |
| 1961 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 1962 | } |
| 1963 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 1964 | *yy_state_ptr++ = yy_current_state; |
| 1965 | } |
| 1966 | |
| 1967 | return yy_current_state; |
| 1968 | } |
| 1969 | |
| 1970 | |
| 1971 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
| 1972 | * |
| 1973 | * synopsis |
| 1974 | * next_state = yy_try_NUL_trans( current_state ); |
| 1975 | */ |
| 1976 | |
| 1977 | #ifdef YY_USE_PROTOS |
| 1978 | static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) |
| 1979 | #else |
| 1980 | static yy_state_type yy_try_NUL_trans( yy_current_state ) |
| 1981 | yy_state_type yy_current_state; |
| 1982 | #endif |
| 1983 | { |
| 1984 | register int yy_is_jam; |
| 1985 | |
| 1986 | register YY_CHAR yy_c = 1; |
| 1987 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1988 | { |
| 1989 | yy_current_state = (int) yy_def[yy_current_state]; |
| 1990 | if ( yy_current_state >= 397 ) |
| 1991 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 1992 | } |
| 1993 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
| 1994 | yy_is_jam = (yy_current_state == 396); |
| 1995 | if ( ! yy_is_jam ) |
| 1996 | *yy_state_ptr++ = yy_current_state; |
| 1997 | |
| 1998 | return yy_is_jam ? 0 : yy_current_state; |
| 1999 | } |
| 2000 | |
| 2001 | |
| 2002 | #ifndef YY_NO_UNPUT |
| 2003 | #ifdef YY_USE_PROTOS |
| 2004 | static inline void yyunput( int c, register char *yy_bp ) |
| 2005 | #else |
| 2006 | static inline void yyunput( c, yy_bp ) |
| 2007 | int c; |
| 2008 | register char *yy_bp; |
| 2009 | #endif |
| 2010 | { |
| 2011 | register char *yy_cp = yy_c_buf_p; |
| 2012 | |
| 2013 | /* undo effects of setting up yytext */ |
| 2014 | *yy_cp = yy_hold_char; |
| 2015 | |
| 2016 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) |
| 2017 | { /* need to shift things up to make room */ |
| 2018 | /* +2 for EOB chars. */ |
| 2019 | register int number_to_move = yy_n_chars + 2; |
| 2020 | register char *dest = &yy_current_buffer->yy_ch_buf[ |
| 2021 | yy_current_buffer->yy_buf_size + 2]; |
| 2022 | register char *source = |
| 2023 | &yy_current_buffer->yy_ch_buf[number_to_move]; |
| 2024 | |
| 2025 | while ( source > yy_current_buffer->yy_ch_buf ) |
| 2026 | *--dest = *--source; |
| 2027 | |
| 2028 | yy_cp += (int) (dest - source); |
| 2029 | yy_bp += (int) (dest - source); |
| 2030 | yy_current_buffer->yy_n_chars = |
| 2031 | yy_n_chars = yy_current_buffer->yy_buf_size; |
| 2032 | |
| 2033 | if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) |
| 2034 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
| 2035 | } |
| 2036 | |
| 2037 | *--yy_cp = (char) c; |
| 2038 | |
| 2039 | if ( c == '\n' ) |
| 2040 | --yylineno; |
| 2041 | |
| 2042 | yytext_ptr = yy_bp; |
| 2043 | yy_hold_char = *yy_cp; |
| 2044 | yy_c_buf_p = yy_cp; |
| 2045 | } |
| 2046 | #endif /* ifndef YY_NO_UNPUT */ |
| 2047 | |
| 2048 | |
| 2049 | #ifndef YY_NO_INPUT |
| 2050 | #ifdef __cplusplus |
| 2051 | static int yyinput() |
| 2052 | #else |
| 2053 | static int input() |
| 2054 | #endif |
| 2055 | { |
| 2056 | int c; |
| 2057 | |
| 2058 | *yy_c_buf_p = yy_hold_char; |
| 2059 | |
| 2060 | if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
| 2061 | { |
| 2062 | /* yy_c_buf_p now points to the character we want to return. |
| 2063 | * If this occurs *before* the EOB characters, then it's a |
| 2064 | * valid NUL; if not, then we've hit the end of the buffer. |
| 2065 | */ |
| 2066 | if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) |
| 2067 | /* This was really a NUL. */ |
| 2068 | *yy_c_buf_p = '\0'; |
| 2069 | |
| 2070 | else |
| 2071 | { /* need more input */ |
| 2072 | int offset = yy_c_buf_p - yytext_ptr; |
| 2073 | ++yy_c_buf_p; |
| 2074 | |
| 2075 | switch ( yy_get_next_buffer() ) |
| 2076 | { |
| 2077 | case EOB_ACT_LAST_MATCH: |
| 2078 | /* This happens because yy_g_n_b() |
| 2079 | * sees that we've accumulated a |
| 2080 | * token and flags that we need to |
| 2081 | * try matching the token before |
| 2082 | * proceeding. But for input(), |
| 2083 | * there's no matching to consider. |
| 2084 | * So convert the EOB_ACT_LAST_MATCH |
| 2085 | * to EOB_ACT_END_OF_FILE. |
| 2086 | */ |
| 2087 | |
| 2088 | /* Reset buffer status. */ |
| 2089 | yyrestart( yyin ); |
| 2090 | |
| 2091 | /* fall through */ |
| 2092 | |
| 2093 | case EOB_ACT_END_OF_FILE: |
| 2094 | { |
| 2095 | if ( yywrap() ) |
| 2096 | return EOF; |
| 2097 | |
| 2098 | if ( ! yy_did_buffer_switch_on_eof ) |
| 2099 | YY_NEW_FILE; |
| 2100 | #ifdef __cplusplus |
| 2101 | return yyinput(); |
| 2102 | #else |
| 2103 | return input(); |
| 2104 | #endif |
| 2105 | } |
| 2106 | |
| 2107 | case EOB_ACT_CONTINUE_SCAN: |
| 2108 | yy_c_buf_p = yytext_ptr + offset; |
| 2109 | break; |
| 2110 | } |
| 2111 | } |
| 2112 | } |
| 2113 | |
| 2114 | c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ |
| 2115 | *yy_c_buf_p = '\0'; /* preserve yytext */ |
| 2116 | yy_hold_char = *++yy_c_buf_p; |
| 2117 | |
| 2118 | if ( c == '\n' ) |
| 2119 | ++yylineno; |
| 2120 | |
| 2121 | return c; |
| 2122 | } |
| 2123 | #endif /* YY_NO_INPUT */ |
| 2124 | |
| 2125 | #ifdef YY_USE_PROTOS |
| 2126 | void yyrestart( FILE *input_file ) |
| 2127 | #else |
| 2128 | void yyrestart( input_file ) |
| 2129 | FILE *input_file; |
| 2130 | #endif |
| 2131 | { |
| 2132 | if ( ! yy_current_buffer ) |
| 2133 | yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); |
| 2134 | |
| 2135 | yy_init_buffer( yy_current_buffer, input_file ); |
| 2136 | yy_load_buffer_state(); |
| 2137 | } |
| 2138 | |
| 2139 | |
| 2140 | #ifdef YY_USE_PROTOS |
| 2141 | void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) |
| 2142 | #else |
| 2143 | void yy_switch_to_buffer( new_buffer ) |
| 2144 | YY_BUFFER_STATE new_buffer; |
| 2145 | #endif |
| 2146 | { |
| 2147 | if ( yy_current_buffer == new_buffer ) |
| 2148 | return; |
| 2149 | |
| 2150 | if ( yy_current_buffer ) |
| 2151 | { |
| 2152 | /* Flush out information for old buffer. */ |
| 2153 | *yy_c_buf_p = yy_hold_char; |
| 2154 | yy_current_buffer->yy_buf_pos = yy_c_buf_p; |
| 2155 | yy_current_buffer->yy_n_chars = yy_n_chars; |
| 2156 | } |
| 2157 | |
| 2158 | yy_current_buffer = new_buffer; |
| 2159 | yy_load_buffer_state(); |
| 2160 | |
| 2161 | /* We don't actually know whether we did this switch during |
| 2162 | * EOF (yywrap()) processing, but the only time this flag |
| 2163 | * is looked at is after yywrap() is called, so it's safe |
| 2164 | * to go ahead and always set it. |
| 2165 | */ |
| 2166 | yy_did_buffer_switch_on_eof = 1; |
| 2167 | } |
| 2168 | |
| 2169 | |
| 2170 | #ifdef YY_USE_PROTOS |
| 2171 | void yy_load_buffer_state( void ) |
| 2172 | #else |
| 2173 | void yy_load_buffer_state() |
| 2174 | #endif |
| 2175 | { |
| 2176 | yy_n_chars = yy_current_buffer->yy_n_chars; |
| 2177 | yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; |
| 2178 | yyin = yy_current_buffer->yy_input_file; |
| 2179 | yy_hold_char = *yy_c_buf_p; |
| 2180 | } |
| 2181 | |
| 2182 | |
| 2183 | #ifdef YY_USE_PROTOS |
| 2184 | YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) |
| 2185 | #else |
| 2186 | YY_BUFFER_STATE yy_create_buffer( file, size ) |
| 2187 | FILE *file; |
| 2188 | int size; |
| 2189 | #endif |
| 2190 | { |
| 2191 | YY_BUFFER_STATE b; |
| 2192 | |
| 2193 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); |
| 2194 | if ( ! b ) |
| 2195 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
| 2196 | |
| 2197 | b->yy_buf_size = size; |
| 2198 | |
| 2199 | /* yy_ch_buf has to be 2 characters longer than the size given because |
| 2200 | * we need to put in 2 end-of-buffer characters. |
| 2201 | */ |
| 2202 | b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); |
| 2203 | if ( ! b->yy_ch_buf ) |
| 2204 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
| 2205 | |
| 2206 | b->yy_is_our_buffer = 1; |
| 2207 | |
| 2208 | yy_init_buffer( b, file ); |
| 2209 | |
| 2210 | return b; |
| 2211 | } |
| 2212 | |
| 2213 | |
| 2214 | #ifdef YY_USE_PROTOS |
| 2215 | void yy_delete_buffer( YY_BUFFER_STATE b ) |
| 2216 | #else |
| 2217 | void yy_delete_buffer( b ) |
| 2218 | YY_BUFFER_STATE b; |
| 2219 | #endif |
| 2220 | { |
| 2221 | if ( ! b ) |
| 2222 | return; |
| 2223 | |
| 2224 | if ( b == yy_current_buffer ) |
| 2225 | yy_current_buffer = (YY_BUFFER_STATE) 0; |
| 2226 | |
| 2227 | if ( b->yy_is_our_buffer ) |
| 2228 | yy_flex_free( (void *) b->yy_ch_buf ); |
| 2229 | |
| 2230 | yy_flex_free( (void *) b ); |
| 2231 | } |
| 2232 | |
| 2233 | |
| 2234 | |
| 2235 | #ifdef YY_USE_PROTOS |
| 2236 | void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) |
| 2237 | #else |
| 2238 | void yy_init_buffer( b, file ) |
| 2239 | YY_BUFFER_STATE b; |
| 2240 | FILE *file; |
| 2241 | #endif |
| 2242 | |
| 2243 | |
| 2244 | { |
| 2245 | yy_flush_buffer( b ); |
| 2246 | |
| 2247 | b->yy_input_file = file; |
| 2248 | b->yy_fill_buffer = 1; |
| 2249 | |
| 2250 | #if YY_ALWAYS_INTERACTIVE |
| 2251 | b->yy_is_interactive = 1; |
| 2252 | #else |
| 2253 | #if YY_NEVER_INTERACTIVE |
| 2254 | b->yy_is_interactive = 0; |
| 2255 | #else |
| 2256 | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
| 2257 | #endif |
| 2258 | #endif |
| 2259 | } |
| 2260 | |
| 2261 | |
| 2262 | #ifdef YY_USE_PROTOS |
| 2263 | void yy_flush_buffer( YY_BUFFER_STATE b ) |
| 2264 | #else |
| 2265 | void yy_flush_buffer( b ) |
| 2266 | YY_BUFFER_STATE b; |
| 2267 | #endif |
| 2268 | |
| 2269 | { |
| 2270 | if ( ! b ) |
| 2271 | return; |
| 2272 | |
| 2273 | b->yy_n_chars = 0; |
| 2274 | |
| 2275 | /* We always need two end-of-buffer characters. The first causes |
| 2276 | * a transition to the end-of-buffer state. The second causes |
| 2277 | * a jam in that state. |
| 2278 | */ |
| 2279 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
| 2280 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
| 2281 | |
| 2282 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
| 2283 | |
| 2284 | b->yy_at_bol = 1; |
| 2285 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 2286 | |
| 2287 | if ( b == yy_current_buffer ) |
| 2288 | yy_load_buffer_state(); |
| 2289 | } |
| 2290 | |
| 2291 | |
| 2292 | #ifndef YY_NO_SCAN_BUFFER |
| 2293 | #ifdef YY_USE_PROTOS |
| 2294 | YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) |
| 2295 | #else |
| 2296 | YY_BUFFER_STATE yy_scan_buffer( base, size ) |
| 2297 | char *base; |
| 2298 | yy_size_t size; |
| 2299 | #endif |
| 2300 | { |
| 2301 | YY_BUFFER_STATE b; |
| 2302 | |
| 2303 | if ( size < 2 || |
| 2304 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 2305 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| 2306 | /* They forgot to leave room for the EOB's. */ |
| 2307 | return 0; |
| 2308 | |
| 2309 | b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); |
| 2310 | if ( ! b ) |
| 2311 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
| 2312 | |
| 2313 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
| 2314 | b->yy_buf_pos = b->yy_ch_buf = base; |
| 2315 | b->yy_is_our_buffer = 0; |
| 2316 | b->yy_input_file = 0; |
| 2317 | b->yy_n_chars = b->yy_buf_size; |
| 2318 | b->yy_is_interactive = 0; |
| 2319 | b->yy_at_bol = 1; |
| 2320 | b->yy_fill_buffer = 0; |
| 2321 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 2322 | |
| 2323 | yy_switch_to_buffer( b ); |
| 2324 | |
| 2325 | return b; |
| 2326 | } |
| 2327 | #endif |
| 2328 | |
| 2329 | |
| 2330 | #ifndef YY_NO_SCAN_STRING |
| 2331 | #ifdef YY_USE_PROTOS |
| 2332 | YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) |
| 2333 | #else |
| 2334 | YY_BUFFER_STATE yy_scan_string( yy_str ) |
| 2335 | yyconst char *yy_str; |
| 2336 | #endif |
| 2337 | { |
| 2338 | int len; |
| 2339 | for ( len = 0; yy_str[len]; ++len ) |
| 2340 | ; |
| 2341 | |
| 2342 | return yy_scan_bytes( yy_str, len ); |
| 2343 | } |
| 2344 | #endif |
| 2345 | |
| 2346 | |
| 2347 | #ifndef YY_NO_SCAN_BYTES |
| 2348 | #ifdef YY_USE_PROTOS |
| 2349 | YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) |
| 2350 | #else |
| 2351 | YY_BUFFER_STATE yy_scan_bytes( bytes, len ) |
| 2352 | yyconst char *bytes; |
| 2353 | int len; |
| 2354 | #endif |
| 2355 | { |
| 2356 | YY_BUFFER_STATE b; |
| 2357 | char *buf; |
| 2358 | yy_size_t n; |
| 2359 | int i; |
| 2360 | |
| 2361 | /* Get memory for full buffer, including space for trailing EOB's. */ |
| 2362 | n = len + 2; |
| 2363 | buf = (char *) yy_flex_alloc( n ); |
| 2364 | if ( ! buf ) |
| 2365 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
| 2366 | |
| 2367 | for ( i = 0; i < len; ++i ) |
| 2368 | buf[i] = bytes[i]; |
| 2369 | |
| 2370 | buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; |
| 2371 | |
| 2372 | b = yy_scan_buffer( buf, n ); |
| 2373 | if ( ! b ) |
| 2374 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
| 2375 | |
| 2376 | /* It's okay to grow etc. this buffer, and we should throw it |
| 2377 | * away when we're done. |
| 2378 | */ |
| 2379 | b->yy_is_our_buffer = 1; |
| 2380 | |
| 2381 | return b; |
| 2382 | } |
| 2383 | #endif |
| 2384 | |
| 2385 | |
| 2386 | #ifndef YY_NO_PUSH_STATE |
| 2387 | #ifdef YY_USE_PROTOS |
| 2388 | static void yy_push_state( int new_state ) |
| 2389 | #else |
| 2390 | static void yy_push_state( new_state ) |
| 2391 | int new_state; |
| 2392 | #endif |
| 2393 | { |
| 2394 | if ( yy_start_stack_ptr >= yy_start_stack_depth ) |
| 2395 | { |
| 2396 | yy_size_t new_size; |
| 2397 | |
| 2398 | yy_start_stack_depth += YY_START_STACK_INCR; |
| 2399 | new_size = yy_start_stack_depth * sizeof( int ); |
| 2400 | |
| 2401 | if ( ! yy_start_stack ) |
| 2402 | yy_start_stack = (int *) yy_flex_alloc( new_size ); |
| 2403 | |
| 2404 | else |
| 2405 | yy_start_stack = (int *) yy_flex_realloc( |
| 2406 | (void *) yy_start_stack, new_size ); |
| 2407 | |
| 2408 | if ( ! yy_start_stack ) |
| 2409 | YY_FATAL_ERROR( |
| 2410 | "out of memory expanding start-condition stack" ); |
| 2411 | } |
| 2412 | |
| 2413 | yy_start_stack[yy_start_stack_ptr++] = YY_START; |
| 2414 | |
| 2415 | BEGIN(new_state); |
| 2416 | } |
| 2417 | #endif |
| 2418 | |
| 2419 | |
| 2420 | #ifndef YY_NO_POP_STATE |
| 2421 | static void yy_pop_state() |
| 2422 | { |
| 2423 | if ( --yy_start_stack_ptr < 0 ) |
| 2424 | YY_FATAL_ERROR( "start-condition stack underflow" ); |
| 2425 | |
| 2426 | BEGIN(yy_start_stack[yy_start_stack_ptr]); |
| 2427 | } |
| 2428 | #endif |
| 2429 | |
| 2430 | |
| 2431 | #ifndef YY_NO_TOP_STATE |
| 2432 | static int yy_top_state() |
| 2433 | { |
| 2434 | return yy_start_stack[yy_start_stack_ptr - 1]; |
| 2435 | } |
| 2436 | #endif |
| 2437 | |
| 2438 | #ifndef YY_EXIT_FAILURE |
| 2439 | #define YY_EXIT_FAILURE 2 |
| 2440 | #endif |
| 2441 | |
| 2442 | #ifdef YY_USE_PROTOS |
| 2443 | static void yy_fatal_error( yyconst char msg[] ) |
| 2444 | #else |
| 2445 | static void yy_fatal_error( msg ) |
| 2446 | char msg[]; |
| 2447 | #endif |
| 2448 | { |
| 2449 | (void) fprintf( stderr, "%s\n", msg ); |
| 2450 | exit( YY_EXIT_FAILURE ); |
| 2451 | } |
| 2452 | |
| 2453 | |
| 2454 | |
| 2455 | /* Redefine yyless() so it works in section 3 code. */ |
| 2456 | |
| 2457 | #undef yyless |
| 2458 | #define yyless(n) \ |
| 2459 | do \ |
| 2460 | { \ |
| 2461 | /* Undo effects of setting up yytext. */ \ |
| 2462 | yytext[yyleng] = yy_hold_char; \ |
| 2463 | yy_c_buf_p = yytext + n; \ |
| 2464 | yy_hold_char = *yy_c_buf_p; \ |
| 2465 | *yy_c_buf_p = '\0'; \ |
| 2466 | yyleng = n; \ |
| 2467 | } \ |
| 2468 | while ( 0 ) |
| 2469 | |
| 2470 | |
| 2471 | /* Internal utility routines. */ |
| 2472 | |
| 2473 | #ifndef yytext_ptr |
| 2474 | #ifdef YY_USE_PROTOS |
| 2475 | static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) |
| 2476 | #else |
| 2477 | static void yy_flex_strncpy( s1, s2, n ) |
| 2478 | char *s1; |
| 2479 | yyconst char *s2; |
| 2480 | int n; |
| 2481 | #endif |
| 2482 | { |
| 2483 | register int i; |
| 2484 | for ( i = 0; i < n; ++i ) |
| 2485 | s1[i] = s2[i]; |
| 2486 | } |
| 2487 | #endif |
| 2488 | |
| 2489 | #ifdef YY_NEED_STRLEN |
| 2490 | #ifdef YY_USE_PROTOS |
| 2491 | static int yy_flex_strlen( yyconst char *s ) |
| 2492 | #else |
| 2493 | static int yy_flex_strlen( s ) |
| 2494 | yyconst char *s; |
| 2495 | #endif |
| 2496 | { |
| 2497 | register int n; |
| 2498 | for ( n = 0; s[n]; ++n ) |
| 2499 | ; |
| 2500 | |
| 2501 | return n; |
| 2502 | } |
| 2503 | #endif |
| 2504 | |
| 2505 | |
| 2506 | #ifdef YY_USE_PROTOS |
| 2507 | static void *yy_flex_alloc( yy_size_t size ) |
| 2508 | #else |
| 2509 | static void *yy_flex_alloc( size ) |
| 2510 | yy_size_t size; |
| 2511 | #endif |
| 2512 | { |
| 2513 | return (void *) malloc( size ); |
| 2514 | } |
| 2515 | |
| 2516 | #ifdef YY_USE_PROTOS |
| 2517 | static inline void *yy_flex_realloc( void *ptr, yy_size_t size ) |
| 2518 | #else |
| 2519 | static inline void *yy_flex_realloc( ptr, size ) |
| 2520 | void *ptr; |
| 2521 | yy_size_t size; |
| 2522 | #endif |
| 2523 | { |
| 2524 | /* The cast to (char *) in the following accommodates both |
| 2525 | * implementations that use char* generic pointers, and those |
| 2526 | * that use void* generic pointers. It works with the latter |
| 2527 | * because both ANSI C and C++ allow castless assignment from |
| 2528 | * any pointer type to void*, and deal with argument conversions |
| 2529 | * as though doing an assignment. |
| 2530 | */ |
| 2531 | return (void *) realloc( (char *) ptr, size ); |
| 2532 | } |
| 2533 | |
| 2534 | #ifdef YY_USE_PROTOS |
| 2535 | static void yy_flex_free( void *ptr ) |
| 2536 | #else |
| 2537 | static void yy_flex_free( ptr ) |
| 2538 | void *ptr; |
| 2539 | #endif |
| 2540 | { |
| 2541 | free( ptr ); |
| 2542 | } |
| 2543 | |
| 2544 | #if YY_MAIN |
| 2545 | int main() |
| 2546 | { |
| 2547 | yylex(); |
| 2548 | return 0; |
| 2549 | } |
| 2550 | #endif |
| 2551 | #line 347 "/proj/llvm/build/../llvm/lib/AsmParser/Lexer.l" |
| 2552 | |