LLVM API Documentation
00001 #line 2 "Lexer.cpp" 00002 00003 #line 4 "Lexer.cpp" 00004 00005 #define YY_INT_ALIGNED short int 00006 00007 /* A lexical scanner generated by flex */ 00008 00009 #define FLEX_SCANNER 00010 #define YY_FLEX_MAJOR_VERSION 2 00011 #define YY_FLEX_MINOR_VERSION 5 00012 #define YY_FLEX_SUBMINOR_VERSION 33 00013 #if YY_FLEX_SUBMINOR_VERSION > 0 00014 #define FLEX_BETA 00015 #endif 00016 00017 /* First, we deal with platform-specific or compiler-specific issues. */ 00018 00019 /* begin standard C headers. */ 00020 #include <stdio.h> 00021 #include <string.h> 00022 #include <errno.h> 00023 #include <stdlib.h> 00024 00025 /* end standard C headers. */ 00026 00027 /* flex integer type definitions */ 00028 00029 #ifndef FLEXINT_H 00030 #define FLEXINT_H 00031 00032 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 00033 00034 #if __STDC_VERSION__ >= 199901L 00035 00036 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 00037 * if you want the limit (max/min) macros for int types. 00038 */ 00039 #ifndef __STDC_LIMIT_MACROS 00040 #define __STDC_LIMIT_MACROS 1 00041 #endif 00042 00043 #include <inttypes.h> 00044 typedef int8_t flex_int8_t; 00045 typedef uint8_t flex_uint8_t; 00046 typedef int16_t flex_int16_t; 00047 typedef uint16_t flex_uint16_t; 00048 typedef int32_t flex_int32_t; 00049 typedef uint32_t flex_uint32_t; 00050 #else 00051 typedef signed char flex_int8_t; 00052 typedef short int flex_int16_t; 00053 typedef int flex_int32_t; 00054 typedef unsigned char flex_uint8_t; 00055 typedef unsigned short int flex_uint16_t; 00056 typedef unsigned int flex_uint32_t; 00057 #endif /* ! C99 */ 00058 00059 /* Limits of integral types. */ 00060 #ifndef INT8_MIN 00061 #define INT8_MIN (-128) 00062 #endif 00063 #ifndef INT16_MIN 00064 #define INT16_MIN (-32767-1) 00065 #endif 00066 #ifndef INT32_MIN 00067 #define INT32_MIN (-2147483647-1) 00068 #endif 00069 #ifndef INT8_MAX 00070 #define INT8_MAX (127) 00071 #endif 00072 #ifndef INT16_MAX 00073 #define INT16_MAX (32767) 00074 #endif 00075 #ifndef INT32_MAX 00076 #define INT32_MAX (2147483647) 00077 #endif 00078 #ifndef UINT8_MAX 00079 #define UINT8_MAX (255U) 00080 #endif 00081 #ifndef UINT16_MAX 00082 #define UINT16_MAX (65535U) 00083 #endif 00084 #ifndef UINT32_MAX 00085 #define UINT32_MAX (4294967295U) 00086 #endif 00087 00088 #endif /* ! FLEXINT_H */ 00089 00090 #ifdef __cplusplus 00091 00092 /* The "const" storage-class-modifier is valid. */ 00093 #define YY_USE_CONST 00094 00095 #else /* ! __cplusplus */ 00096 00097 #if __STDC__ 00098 00099 #define YY_USE_CONST 00100 00101 #endif /* __STDC__ */ 00102 #endif /* ! __cplusplus */ 00103 00104 #ifdef YY_USE_CONST 00105 #define yyconst const 00106 #else 00107 #define yyconst 00108 #endif 00109 00110 /* Returned upon end-of-file. */ 00111 #define YY_NULL 0 00112 00113 /* Promotes a possibly negative, possibly signed char to an unsigned 00114 * integer for use as an array index. If the signed char is negative, 00115 * we want to instead treat it as an 8-bit unsigned char, hence the 00116 * double cast. 00117 */ 00118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 00119 00120 /* Enter a start condition. This macro really ought to take a parameter, 00121 * but we do it the disgusting crufty way forced on us by the ()-less 00122 * definition of BEGIN. 00123 */ 00124 #define BEGIN (yy_start) = 1 + 2 * 00125 00126 /* Translate the current start state into a value that can be later handed 00127 * to BEGIN to return to the state. The YYSTATE alias is for lex 00128 * compatibility. 00129 */ 00130 #define YY_START (((yy_start) - 1) / 2) 00131 #define YYSTATE YY_START 00132 00133 /* Action number for EOF rule of a given start state. */ 00134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 00135 00136 /* Special action meaning "start processing a new file". */ 00137 #define YY_NEW_FILE llvmAsmrestart(llvmAsmin ) 00138 00139 #define YY_END_OF_BUFFER_CHAR 0 00140 00141 /* Size of default input buffer. */ 00142 #ifndef YY_BUF_SIZE 00143 #define YY_BUF_SIZE (16384*64) 00144 #endif 00145 00146 /* The state buf must be large enough to hold one state per character in the main buffer. 00147 */ 00148 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 00149 00150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 00151 #define YY_TYPEDEF_YY_BUFFER_STATE 00152 typedef struct yy_buffer_state *YY_BUFFER_STATE; 00153 #endif 00154 00155 extern int llvmAsmleng; 00156 00157 extern FILE *llvmAsmin, *llvmAsmout; 00158 00159 #define EOB_ACT_CONTINUE_SCAN 0 00160 #define EOB_ACT_END_OF_FILE 1 00161 #define EOB_ACT_LAST_MATCH 2 00162 00163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires 00164 * access to the local variable yy_act. Since yyless() is a macro, it would break 00165 * existing scanners that call yyless() from OUTSIDE llvmAsmlex. 00166 * One obvious solution it to make yy_act a global. I tried that, and saw 00167 * a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is 00168 * normally declared as a register variable-- so it is not worth it. 00169 */ 00170 #define YY_LESS_LINENO(n) \ 00171 do { \ 00172 int yyl;\ 00173 for ( yyl = n; yyl < llvmAsmleng; ++yyl )\ 00174 if ( llvmAsmtext[yyl] == '\n' )\ 00175 --llvmAsmlineno;\ 00176 }while(0) 00177 00178 /* Return all but the first "n" matched characters back to the input stream. */ 00179 #define yyless(n) \ 00180 do \ 00181 { \ 00182 /* Undo effects of setting up llvmAsmtext. */ \ 00183 int yyless_macro_arg = (n); \ 00184 YY_LESS_LINENO(yyless_macro_arg);\ 00185 *yy_cp = (yy_hold_char); \ 00186 YY_RESTORE_YY_MORE_OFFSET \ 00187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 00188 YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \ 00189 } \ 00190 while ( 0 ) 00191 00192 #define unput(c) yyunput( c, (yytext_ptr) ) 00193 00194 /* The following is because we cannot portably get our hands on size_t 00195 * (without autoconf's help, which isn't available because we want 00196 * flex-generated scanners to compile on their own). 00197 */ 00198 00199 #ifndef YY_TYPEDEF_YY_SIZE_T 00200 #define YY_TYPEDEF_YY_SIZE_T 00201 typedef unsigned int yy_size_t; 00202 #endif 00203 00204 #ifndef YY_STRUCT_YY_BUFFER_STATE 00205 #define YY_STRUCT_YY_BUFFER_STATE 00206 struct yy_buffer_state 00207 { 00208 FILE *yy_input_file; 00209 00210 char *yy_ch_buf; /* input buffer */ 00211 char *yy_buf_pos; /* current position in input buffer */ 00212 00213 /* Size of input buffer in bytes, not including room for EOB 00214 * characters. 00215 */ 00216 yy_size_t yy_buf_size; 00217 00218 /* Number of characters read into yy_ch_buf, not including EOB 00219 * characters. 00220 */ 00221 int yy_n_chars; 00222 00223 /* Whether we "own" the buffer - i.e., we know we created it, 00224 * and can realloc() it to grow it, and should free() it to 00225 * delete it. 00226 */ 00227 int yy_is_our_buffer; 00228 00229 /* Whether this is an "interactive" input source; if so, and 00230 * if we're using stdio for input, then we want to use getc() 00231 * instead of fread(), to make sure we stop fetching input after 00232 * each newline. 00233 */ 00234 int yy_is_interactive; 00235 00236 /* Whether we're considered to be at the beginning of a line. 00237 * If so, '^' rules will be active on the next match, otherwise 00238 * not. 00239 */ 00240 int yy_at_bol; 00241 00242 int yy_bs_lineno; /**< The line count. */ 00243 int yy_bs_column; /**< The column count. */ 00244 00245 /* Whether to try to fill the input buffer when we reach the 00246 * end of it. 00247 */ 00248 int yy_fill_buffer; 00249 00250 int yy_buffer_status; 00251 00252 #define YY_BUFFER_NEW 0 00253 #define YY_BUFFER_NORMAL 1 00254 /* When an EOF's been seen but there's still some text to process 00255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we 00256 * shouldn't try reading from the input source any more. We might 00257 * still have a bunch of tokens to match, though, because of 00258 * possible backing-up. 00259 * 00260 * When we actually see the EOF, we change the status to "new" 00261 * (via llvmAsmrestart()), so that the user can continue scanning by 00262 * just pointing llvmAsmin at a new input file. 00263 */ 00264 #define YY_BUFFER_EOF_PENDING 2 00265 00266 }; 00267 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 00268 00269 /* Stack of input buffers. */ 00270 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 00271 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 00272 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 00273 00274 /* We provide macros for accessing buffer states in case in the 00275 * future we want to put the buffer states in a more general 00276 * "scanner state". 00277 * 00278 * Returns the top of the stack, or NULL. 00279 */ 00280 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 00281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 00282 : NULL) 00283 00284 /* Same as previous macro, but useful when we know that the buffer stack is not 00285 * NULL or when we need an lvalue. For internal use only. 00286 */ 00287 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 00288 00289 /* yy_hold_char holds the character lost when llvmAsmtext is formed. */ 00290 static char yy_hold_char; 00291 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 00292 int llvmAsmleng; 00293 00294 /* Points to current character in buffer. */ 00295 static char *yy_c_buf_p = (char *) 0; 00296 static int yy_init = 0; /* whether we need to initialize */ 00297 static int yy_start = 0; /* start state number */ 00298 00299 /* Flag which is used to allow llvmAsmwrap()'s to do buffer switches 00300 * instead of setting up a fresh llvmAsmin. A bit of a hack ... 00301 */ 00302 static int yy_did_buffer_switch_on_eof; 00303 00304 void llvmAsmrestart (FILE *input_file ); 00305 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 00306 YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size ); 00307 void llvmAsm_delete_buffer (YY_BUFFER_STATE b ); 00308 void llvmAsm_flush_buffer (YY_BUFFER_STATE b ); 00309 void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer ); 00310 void llvmAsmpop_buffer_state (void ); 00311 00312 static void llvmAsmensure_buffer_stack (void ); 00313 static void llvmAsm_load_buffer_state (void ); 00314 static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file ); 00315 00316 #define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER ) 00317 00318 YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size ); 00319 YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str ); 00320 YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len ); 00321 00322 void *llvmAsmalloc (yy_size_t ); 00323 void *llvmAsmrealloc (void *,yy_size_t ); 00324 void llvmAsmfree (void * ); 00325 00326 #define yy_new_buffer llvmAsm_create_buffer 00327 00328 #define yy_set_interactive(is_interactive) \ 00329 { \ 00330 if ( ! YY_CURRENT_BUFFER ){ \ 00331 llvmAsmensure_buffer_stack (); \ 00332 YY_CURRENT_BUFFER_LVALUE = \ 00333 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \ 00334 } \ 00335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 00336 } 00337 00338 #define yy_set_bol(at_bol) \ 00339 { \ 00340 if ( ! YY_CURRENT_BUFFER ){\ 00341 llvmAsmensure_buffer_stack (); \ 00342 YY_CURRENT_BUFFER_LVALUE = \ 00343 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \ 00344 } \ 00345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 00346 } 00347 00348 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 00349 00350 /* Begin user sect3 */ 00351 00352 #define llvmAsmwrap() 1 00353 #define YY_SKIP_YYWRAP 00354 00355 typedef unsigned char YY_CHAR; 00356 00357 FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0; 00358 00359 typedef int yy_state_type; 00360 00361 extern int llvmAsmlineno; 00362 00363 int llvmAsmlineno = 1; 00364 00365 extern char *llvmAsmtext; 00366 #define yytext_ptr llvmAsmtext 00367 00368 static yy_state_type yy_get_previous_state (void ); 00369 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 00370 static int yy_get_next_buffer (void ); 00371 static void yy_fatal_error (yyconst char msg[] ); 00372 00373 /* Done after the current pattern has been matched and before the 00374 * corresponding action - sets up llvmAsmtext. 00375 */ 00376 #define YY_DO_BEFORE_ACTION \ 00377 (yytext_ptr) = yy_bp; \ 00378 llvmAsmleng = (size_t) (yy_cp - yy_bp); \ 00379 (yy_hold_char) = *yy_cp; \ 00380 *yy_cp = '\0'; \ 00381 (yy_c_buf_p) = yy_cp; 00382 00383 #define YY_NUM_RULES 108 00384 #define YY_END_OF_BUFFER 109 00385 /* This struct is not used in this scanner, 00386 but its presence is necessary. */ 00387 struct yy_trans_info 00388 { 00389 flex_int32_t yy_verify; 00390 flex_int32_t yy_nxt; 00391 }; 00392 static yyconst flex_int16_t yy_accept[460] = 00393 { 0, 00394 0, 0, 109, 107, 106, 106, 107, 107, 107, 107, 00395 107, 107, 99, 99, 1, 107, 107, 107, 107, 107, 00396 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 00397 107, 107, 107, 107, 107, 107, 0, 98, 0, 96, 00398 95, 95, 102, 0, 100, 0, 104, 99, 0, 1, 00399 0, 0, 0, 0, 0, 0, 0, 0, 81, 0, 00400 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00401 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00402 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 00403 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 00404 00405 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00406 98, 95, 95, 104, 17, 104, 0, 105, 57, 0, 00407 0, 62, 0, 35, 0, 30, 0, 0, 0, 38, 00408 0, 0, 0, 0, 0, 60, 0, 3, 0, 0, 00409 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 00410 0, 0, 0, 0, 0, 0, 0, 59, 22, 0, 00411 0, 71, 0, 61, 80, 0, 0, 0, 0, 0, 00412 75, 0, 76, 0, 0, 0, 58, 0, 0, 0, 00413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00414 0, 0, 0, 0, 0, 0, 0, 64, 0, 97, 00415 00416 104, 0, 0, 0, 104, 0, 0, 0, 0, 43, 00417 72, 73, 0, 0, 0, 0, 0, 0, 0, 0, 00418 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 00419 0, 0, 0, 0, 0, 89, 50, 0, 0, 19, 00420 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 00421 0, 0, 0, 0, 0, 23, 0, 0, 4, 55, 00422 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 00423 0, 42, 0, 11, 0, 104, 32, 0, 0, 2, 00424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00425 5, 0, 52, 0, 0, 0, 0, 0, 0, 54, 00426 00427 0, 0, 0, 0, 0, 0, 44, 0, 0, 66, 00428 70, 68, 69, 67, 65, 46, 0, 0, 90, 0, 00429 0, 0, 45, 51, 18, 0, 0, 0, 0, 0, 00430 78, 0, 0, 0, 87, 0, 41, 0, 0, 0, 00431 0, 53, 27, 21, 0, 0, 40, 0, 7, 0, 00432 0, 0, 83, 0, 29, 86, 34, 56, 0, 0, 00433 74, 0, 0, 82, 24, 25, 0, 0, 84, 47, 00434 79, 77, 0, 0, 0, 0, 39, 6, 26, 0, 00435 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 00436 0, 0, 0, 0, 0, 8, 14, 0, 0, 0, 00437 00438 0, 9, 10, 0, 0, 0, 0, 0, 31, 0, 00439 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00440 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 00441 0, 0, 0, 0, 0, 28, 0, 0, 85, 0, 00442 0, 0, 0, 0, 0, 0, 0, 0, 91, 0, 00443 93, 94, 13, 0, 92, 15, 0, 16, 0 00444 } ; 00445 00446 static yyconst flex_int32_t yy_ec[256] = 00447 { 0, 00448 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 00449 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 00450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00451 1, 2, 1, 4, 1, 5, 6, 1, 1, 1, 00452 1, 1, 7, 1, 8, 9, 1, 10, 11, 11, 00453 11, 11, 11, 11, 11, 11, 11, 12, 13, 1, 00454 1, 1, 1, 1, 14, 14, 14, 14, 15, 14, 00455 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 00456 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 00457 1, 1, 1, 1, 16, 1, 17, 18, 19, 20, 00458 00459 21, 22, 23, 24, 25, 5, 26, 27, 28, 29, 00460 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 00461 40, 41, 1, 1, 1, 1, 1, 1, 1, 1, 00462 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00463 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00464 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00465 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00466 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00467 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00468 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00469 00470 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00471 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00472 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00473 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00474 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00475 1, 1, 1, 1, 1 00476 } ; 00477 00478 static yyconst flex_int32_t yy_meta[42] = 00479 { 0, 00480 1, 1, 2, 1, 3, 1, 1, 3, 3, 3, 00481 3, 4, 1, 3, 3, 3, 3, 3, 3, 3, 00482 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 00483 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 00484 3 00485 } ; 00486 00487 static yyconst flex_int16_t yy_base[465] = 00488 { 0, 00489 0, 0, 960, 961, 961, 961, 955, 946, 34, 36, 00490 38, 42, 46, 50, 0, 52, 57, 54, 68, 62, 00491 80, 82, 83, 93, 102, 40, 84, 92, 56, 129, 00492 112, 158, 113, 87, 90, 114, 953, 961, 944, 961, 00493 0, 117, 123, 146, 149, 128, 163, 170, 183, 0, 00494 55, 119, 151, 157, 178, 139, 154, 177, 943, 184, 00495 196, 187, 88, 198, 197, 136, 200, 207, 201, 209, 00496 210, 211, 213, 218, 220, 215, 212, 233, 224, 228, 00497 225, 226, 232, 174, 942, 124, 241, 244, 246, 248, 00498 251, 257, 253, 252, 256, 255, 264, 941, 269, 265, 00499 00500 259, 263, 271, 283, 41, 290, 286, 292, 279, 298, 00501 940, 0, 304, 307, 939, 314, 326, 0, 938, 318, 00502 315, 937, 311, 936, 327, 935, 328, 330, 308, 934, 00503 334, 332, 335, 336, 337, 933, 341, 346, 339, 349, 00504 338, 350, 356, 353, 355, 357, 365, 366, 367, 368, 00505 369, 371, 372, 374, 377, 379, 381, 932, 931, 383, 00506 31, 930, 384, 929, 928, 408, 389, 396, 390, 420, 00507 927, 387, 926, 392, 391, 403, 925, 404, 421, 422, 00508 409, 423, 425, 426, 430, 438, 439, 440, 441, 443, 00509 442, 446, 444, 445, 458, 447, 459, 924, 461, 961, 00510 00511 465, 482, 471, 484, 487, 471, 489, 475, 476, 923, 00512 922, 921, 490, 472, 491, 462, 494, 498, 499, 500, 00513 501, 503, 502, 505, 506, 920, 509, 510, 516, 517, 00514 518, 520, 521, 523, 527, 919, 918, 526, 528, 917, 00515 530, 532, 0, 531, 533, 545, 537, 547, 549, 550, 00516 548, 551, 553, 560, 566, 916, 565, 563, 915, 914, 00517 567, 913, 564, 577, 568, 579, 580, 582, 583, 585, 00518 586, 912, 588, 911, 589, 592, 910, 593, 592, 909, 00519 594, 605, 599, 595, 608, 609, 607, 612, 615, 619, 00520 908, 620, 907, 621, 622, 617, 623, 625, 629, 906, 00521 00522 628, 631, 634, 639, 643, 644, 905, 636, 647, 904, 00523 903, 902, 901, 900, 899, 898, 649, 650, 897, 651, 00524 655, 656, 896, 895, 894, 657, 659, 661, 658, 662, 00525 893, 667, 671, 668, 892, 674, 891, 672, 675, 677, 00526 676, 890, 889, 888, 683, 679, 887, 691, 886, 692, 00527 694, 695, 885, 697, 884, 883, 882, 881, 693, 696, 00528 880, 699, 705, 879, 878, 877, 706, 709, 876, 875, 00529 874, 873, 710, 711, 712, 716, 872, 871, 868, 717, 00530 718, 722, 720, 723, 726, 733, 728, 858, 730, 734, 00531 735, 744, 736, 746, 747, 857, 856, 748, 751, 752, 00532 00533 753, 854, 853, 754, 756, 757, 759, 760, 851, 770, 00534 850, 771, 761, 772, 773, 776, 778, 779, 781, 782, 00535 786, 787, 788, 790, 792, 795, 793, 848, 796, 799, 00536 800, 809, 798, 806, 810, 846, 811, 814, 844, 817, 00537 820, 812, 822, 824, 828, 826, 831, 832, 843, 835, 00538 842, 841, 839, 836, 535, 397, 838, 393, 961, 872, 00539 874, 297, 878, 103 00540 } ; 00541 00542 static yyconst flex_int16_t yy_def[465] = 00543 { 0, 00544 459, 1, 459, 459, 459, 459, 460, 461, 462, 459, 00545 461, 461, 461, 461, 463, 461, 461, 461, 461, 461, 00546 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00547 461, 461, 461, 461, 461, 461, 460, 459, 461, 459, 00548 464, 464, 459, 459, 461, 461, 461, 461, 461, 463, 00549 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00550 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00551 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00552 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00553 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00554 00555 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00556 459, 464, 464, 459, 461, 461, 461, 49, 461, 461, 00557 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00558 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00559 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00560 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00561 461, 461, 461, 461, 461, 49, 461, 461, 461, 461, 00562 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00563 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00564 461, 461, 461, 461, 461, 461, 461, 461, 461, 459, 00565 00566 459, 459, 459, 461, 461, 461, 461, 461, 461, 461, 00567 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00568 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00569 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00570 461, 461, 166, 461, 461, 461, 461, 461, 461, 461, 00571 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00572 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00573 461, 461, 461, 461, 461, 459, 461, 461, 461, 461, 00574 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00575 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00576 00577 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00578 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00579 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00580 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00581 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00582 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00583 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00584 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00585 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00586 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00587 00588 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00589 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00590 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00591 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00592 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 00593 461, 461, 461, 461, 461, 461, 461, 461, 0, 459, 00594 459, 459, 459, 459 00595 } ; 00596 00597 static yyconst flex_int16_t yy_nxt[1003] = 00598 { 0, 00599 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 00600 14, 4, 15, 8, 8, 8, 16, 17, 18, 19, 00601 20, 21, 22, 8, 23, 8, 24, 25, 26, 27, 00602 28, 8, 29, 30, 31, 32, 33, 34, 35, 8, 00603 36, 42, 40, 43, 43, 44, 44, 45, 45, 40, 00604 46, 40, 40, 40, 47, 48, 48, 40, 47, 48, 00605 48, 40, 241, 40, 191, 40, 40, 40, 40, 82, 00606 60, 51, 61, 40, 119, 83, 88, 56, 52, 40, 00607 53, 57, 54, 62, 49, 55, 58, 63, 64, 59, 00608 67, 40, 65, 40, 40, 40, 69, 66, 40, 40, 00609 00610 68, 40, 72, 40, 40, 112, 70, 108, 73, 76, 00611 74, 75, 71, 40, 84, 86, 85, 77, 79, 109, 00612 133, 87, 78, 40, 40, 40, 113, 113, 97, 106, 00613 40, 80, 43, 43, 110, 40, 115, 81, 89, 40, 00614 40, 98, 107, 120, 99, 121, 90, 40, 162, 91, 00615 40, 100, 92, 93, 114, 44, 44, 47, 45, 45, 00616 40, 125, 40, 94, 95, 40, 96, 89, 40, 40, 00617 122, 137, 116, 116, 40, 101, 126, 117, 47, 48, 00618 48, 40, 102, 117, 103, 40, 104, 123, 40, 40, 00619 161, 105, 118, 118, 40, 40, 118, 118, 40, 118, 00620 00621 118, 118, 118, 118, 118, 124, 127, 40, 40, 40, 00622 128, 40, 40, 131, 130, 132, 134, 129, 40, 138, 00623 40, 40, 40, 40, 40, 139, 40, 141, 135, 40, 00624 144, 40, 151, 136, 142, 40, 40, 40, 143, 40, 00625 152, 140, 146, 40, 40, 145, 153, 157, 147, 154, 00626 156, 158, 40, 148, 149, 40, 150, 40, 160, 40, 00627 159, 155, 40, 40, 40, 163, 40, 40, 40, 168, 00628 40, 164, 175, 177, 40, 40, 40, 169, 165, 178, 00629 40, 176, 40, 171, 166, 170, 172, 167, 179, 173, 00630 40, 185, 174, 181, 40, 183, 180, 40, 184, 41, 00631 00632 186, 40, 187, 40, 182, 192, 193, 188, 197, 40, 00633 195, 198, 196, 113, 113, 189, 201, 201, 194, 40, 00634 190, 202, 40, 116, 116, 40, 40, 202, 117, 40, 00635 199, 208, 203, 204, 117, 205, 205, 40, 40, 40, 00636 206, 40, 212, 40, 207, 40, 40, 40, 40, 40, 00637 40, 209, 40, 213, 210, 215, 211, 40, 218, 220, 00638 40, 40, 216, 217, 40, 214, 40, 40, 40, 221, 00639 219, 223, 225, 226, 228, 227, 40, 40, 40, 40, 00640 40, 222, 40, 40, 224, 40, 230, 231, 40, 233, 00641 40, 229, 40, 236, 40, 40, 234, 232, 40, 237, 00642 00643 40, 40, 40, 40, 40, 238, 235, 40, 40, 240, 00644 246, 253, 242, 252, 40, 40, 239, 243, 243, 251, 00645 40, 243, 243, 244, 243, 243, 243, 243, 243, 243, 00646 245, 40, 40, 40, 40, 254, 40, 40, 255, 258, 00647 247, 40, 248, 259, 257, 260, 249, 256, 250, 40, 00648 40, 40, 40, 40, 40, 40, 40, 40, 40, 264, 00649 261, 266, 269, 273, 262, 271, 263, 267, 265, 40, 00650 40, 268, 40, 40, 201, 201, 270, 272, 284, 202, 00651 276, 276, 40, 40, 274, 202, 40, 40, 203, 203, 00652 275, 276, 276, 205, 205, 40, 205, 205, 40, 277, 00653 00654 40, 40, 40, 279, 280, 40, 282, 278, 281, 40, 00655 40, 40, 40, 40, 40, 287, 40, 40, 285, 290, 00656 40, 40, 291, 292, 286, 283, 295, 40, 40, 40, 00657 288, 40, 40, 289, 40, 294, 296, 40, 40, 40, 00658 293, 40, 40, 40, 40, 299, 40, 300, 40, 297, 00659 298, 307, 301, 302, 304, 303, 40, 308, 40, 40, 00660 40, 40, 40, 309, 40, 305, 306, 311, 310, 313, 00661 315, 40, 317, 318, 40, 40, 40, 40, 40, 40, 00662 319, 312, 316, 314, 320, 321, 324, 323, 40, 322, 00663 40, 40, 326, 40, 40, 327, 40, 40, 325, 40, 00664 00665 40, 276, 276, 40, 40, 40, 40, 331, 328, 335, 00666 40, 336, 337, 334, 329, 330, 40, 339, 40, 40, 00667 40, 338, 333, 40, 332, 341, 40, 340, 40, 342, 00668 40, 40, 40, 40, 40, 343, 40, 346, 347, 40, 00669 40, 348, 40, 345, 350, 40, 344, 40, 349, 353, 00670 40, 355, 356, 352, 40, 40, 354, 351, 40, 357, 00671 40, 40, 40, 358, 359, 360, 40, 40, 40, 40, 00672 40, 363, 40, 40, 364, 362, 366, 368, 40, 40, 00673 369, 361, 40, 40, 371, 40, 40, 40, 40, 365, 00674 40, 367, 370, 377, 40, 373, 374, 378, 375, 380, 00675 00676 376, 372, 40, 40, 40, 40, 40, 40, 40, 379, 00677 40, 385, 383, 381, 384, 386, 40, 40, 382, 389, 00678 40, 40, 40, 40, 388, 387, 390, 40, 40, 40, 00679 391, 40, 392, 40, 40, 394, 393, 40, 398, 40, 00680 395, 40, 399, 397, 40, 40, 40, 40, 400, 401, 00681 396, 407, 402, 403, 406, 40, 409, 40, 40, 40, 00682 408, 404, 40, 40, 40, 40, 405, 40, 40, 411, 00683 40, 40, 40, 415, 412, 418, 417, 420, 416, 413, 00684 410, 40, 40, 40, 40, 419, 414, 40, 424, 40, 00685 40, 422, 40, 40, 421, 423, 427, 40, 40, 40, 00686 00687 425, 40, 431, 40, 40, 429, 40, 40, 430, 40, 00688 40, 40, 435, 428, 432, 436, 426, 40, 433, 439, 00689 40, 40, 40, 40, 434, 40, 440, 437, 40, 441, 00690 443, 40, 442, 40, 446, 40, 438, 40, 444, 40, 00691 445, 447, 40, 40, 449, 453, 40, 40, 448, 40, 00692 40, 450, 40, 40, 40, 40, 457, 40, 451, 40, 00693 452, 40, 40, 456, 40, 40, 455, 40, 40, 40, 00694 458, 454, 37, 37, 37, 37, 39, 39, 50, 40, 00695 50, 50, 40, 40, 40, 40, 40, 40, 40, 40, 00696 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00697 00698 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00699 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00700 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00701 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00702 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 00703 40, 200, 40, 40, 40, 40, 111, 40, 38, 459, 00704 3, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00705 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00706 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00707 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00708 00709 459, 459 00710 } ; 00711 00712 static yyconst flex_int16_t yy_chk[1003] = 00713 { 0, 00714 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00715 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00716 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00717 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 00718 1, 9, 161, 9, 9, 10, 10, 11, 11, 11, 00719 12, 26, 105, 12, 13, 13, 13, 13, 14, 14, 00720 14, 14, 161, 16, 105, 18, 51, 29, 17, 26, 00721 18, 16, 18, 20, 51, 26, 29, 17, 16, 19, 00722 16, 17, 16, 18, 13, 16, 17, 18, 19, 17, 00723 20, 21, 19, 22, 23, 27, 21, 19, 34, 63, 00724 00725 20, 35, 22, 28, 24, 464, 21, 34, 22, 24, 00726 23, 23, 21, 25, 27, 28, 27, 24, 25, 35, 00727 63, 28, 24, 31, 33, 36, 42, 42, 31, 33, 00728 52, 25, 43, 43, 36, 86, 46, 25, 30, 46, 00729 30, 31, 33, 52, 31, 52, 30, 66, 86, 30, 00730 56, 31, 30, 30, 44, 44, 44, 45, 45, 45, 00731 45, 56, 53, 30, 30, 57, 30, 32, 54, 32, 00732 53, 66, 47, 47, 47, 32, 57, 47, 48, 48, 00733 48, 48, 32, 47, 32, 84, 32, 54, 58, 55, 00734 84, 32, 49, 49, 49, 60, 49, 49, 62, 49, 00735 00736 49, 49, 49, 49, 49, 55, 58, 61, 65, 64, 00737 60, 67, 69, 62, 61, 62, 64, 60, 68, 67, 00738 70, 71, 72, 77, 73, 68, 76, 69, 64, 74, 00739 71, 75, 76, 65, 69, 79, 81, 82, 70, 80, 00740 77, 68, 73, 83, 78, 72, 77, 80, 74, 78, 00741 79, 81, 87, 75, 75, 88, 75, 89, 83, 90, 00742 82, 78, 91, 94, 93, 87, 96, 95, 92, 91, 00743 101, 88, 93, 95, 102, 97, 100, 91, 88, 96, 00744 99, 94, 103, 92, 89, 91, 92, 90, 97, 92, 00745 109, 102, 92, 99, 104, 100, 97, 107, 101, 462, 00746 00747 103, 106, 104, 108, 99, 106, 106, 104, 108, 110, 00748 107, 109, 107, 113, 113, 104, 114, 114, 106, 129, 00749 104, 114, 123, 116, 116, 116, 121, 114, 116, 120, 00750 110, 123, 117, 117, 116, 117, 117, 117, 125, 127, 00751 120, 128, 129, 132, 121, 131, 133, 134, 135, 141, 00752 139, 125, 137, 131, 127, 133, 128, 138, 137, 139, 00753 140, 142, 134, 135, 144, 132, 145, 143, 146, 140, 00754 138, 141, 143, 144, 146, 145, 147, 148, 149, 150, 00755 151, 140, 152, 153, 142, 154, 148, 149, 155, 151, 00756 156, 147, 157, 154, 160, 163, 152, 150, 172, 155, 00757 00758 167, 169, 175, 174, 458, 156, 153, 168, 456, 160, 00759 169, 175, 163, 174, 176, 178, 157, 166, 166, 172, 00760 181, 166, 166, 167, 166, 166, 166, 166, 166, 166, 00761 168, 170, 179, 180, 182, 176, 183, 184, 178, 181, 00762 170, 185, 170, 182, 180, 183, 170, 179, 170, 186, 00763 187, 188, 189, 191, 190, 193, 194, 192, 196, 187, 00764 184, 189, 192, 196, 185, 194, 186, 190, 188, 195, 00765 197, 191, 199, 216, 201, 201, 193, 195, 216, 201, 00766 203, 203, 206, 214, 197, 201, 208, 209, 202, 202, 00767 199, 202, 202, 204, 204, 204, 205, 205, 205, 206, 00768 00769 207, 213, 215, 208, 209, 217, 214, 207, 213, 218, 00770 219, 220, 221, 223, 222, 219, 224, 225, 217, 222, 00771 227, 228, 223, 224, 218, 215, 228, 229, 230, 231, 00772 220, 232, 233, 221, 234, 227, 229, 238, 235, 239, 00773 225, 241, 244, 242, 245, 232, 455, 233, 247, 230, 00774 231, 244, 234, 235, 239, 238, 246, 245, 248, 251, 00775 249, 250, 252, 246, 253, 241, 242, 248, 247, 249, 00776 250, 254, 252, 253, 258, 263, 257, 255, 261, 265, 00777 254, 248, 251, 249, 255, 257, 263, 261, 264, 258, 00778 266, 267, 265, 268, 269, 266, 270, 271, 264, 273, 00779 00780 275, 276, 276, 279, 278, 281, 284, 270, 267, 278, 00781 283, 279, 281, 275, 268, 269, 282, 283, 287, 285, 00782 286, 282, 273, 288, 271, 285, 289, 284, 296, 286, 00783 290, 292, 294, 295, 297, 287, 298, 290, 292, 301, 00784 299, 294, 302, 289, 296, 303, 288, 308, 295, 299, 00785 304, 302, 303, 298, 305, 306, 301, 297, 309, 304, 00786 317, 318, 320, 305, 306, 308, 321, 322, 326, 329, 00787 327, 318, 328, 330, 320, 317, 322, 327, 332, 334, 00788 328, 309, 333, 338, 330, 336, 339, 341, 340, 321, 00789 346, 326, 329, 339, 345, 333, 334, 340, 336, 345, 00790 00791 338, 332, 348, 350, 359, 351, 352, 360, 354, 341, 00792 362, 352, 350, 346, 351, 354, 363, 367, 348, 362, 00793 368, 373, 374, 375, 360, 359, 363, 376, 380, 381, 00794 367, 383, 368, 382, 384, 374, 373, 385, 381, 387, 00795 375, 389, 382, 380, 386, 390, 391, 393, 383, 384, 00796 376, 391, 385, 386, 390, 392, 393, 394, 395, 398, 00797 392, 387, 399, 400, 401, 404, 389, 405, 406, 395, 00798 407, 408, 413, 401, 398, 406, 405, 408, 404, 399, 00799 394, 410, 412, 414, 415, 407, 400, 416, 414, 417, 00800 418, 412, 419, 420, 410, 413, 417, 421, 422, 423, 00801 00802 415, 424, 421, 425, 427, 419, 426, 429, 420, 433, 00803 430, 431, 425, 418, 422, 426, 416, 434, 423, 430, 00804 432, 435, 437, 442, 424, 438, 431, 427, 440, 432, 00805 434, 441, 433, 443, 438, 444, 429, 446, 435, 445, 00806 437, 440, 447, 448, 442, 446, 450, 454, 441, 457, 00807 453, 443, 452, 451, 449, 439, 454, 436, 444, 428, 00808 445, 411, 409, 450, 403, 402, 448, 397, 396, 388, 00809 457, 447, 460, 460, 460, 460, 461, 461, 463, 379, 00810 463, 463, 378, 377, 372, 371, 370, 369, 366, 365, 00811 364, 361, 358, 357, 356, 355, 353, 349, 347, 344, 00812 00813 343, 342, 337, 335, 331, 325, 324, 323, 319, 316, 00814 315, 314, 313, 312, 311, 310, 307, 300, 293, 291, 00815 280, 277, 274, 272, 262, 260, 259, 256, 240, 237, 00816 236, 226, 212, 211, 210, 198, 177, 173, 171, 165, 00817 164, 162, 159, 158, 136, 130, 126, 124, 122, 119, 00818 115, 111, 98, 85, 59, 39, 37, 8, 7, 3, 00819 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00820 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00821 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00822 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 00823 00824 459, 459 00825 } ; 00826 00827 /* Table of booleans, true if rule could match eol. */ 00828 static yyconst flex_int32_t yy_rule_can_match_eol[109] = 00829 { 0, 00830 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00831 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00832 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00833 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00834 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 00835 0, 0, 0, 0, 0, 0, 1, 0, 0, }; 00836 00837 static yy_state_type yy_last_accepting_state; 00838 static char *yy_last_accepting_cpos; 00839 00840 extern int llvmAsm_flex_debug; 00841 int llvmAsm_flex_debug = 0; 00842 00843 /* The intent behind this definition is that it'll catch 00844 * any uses of REJECT which flex missed. 00845 */ 00846 #define REJECT reject_used_but_not_detected 00847 #define yymore() yymore_used_but_not_detected 00848 #define YY_MORE_ADJ 0 00849 #define YY_RESTORE_YY_MORE_OFFSET 00850 char *llvmAsmtext; 00851 #line 1 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 00852 /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// 00853 // 00854 // The LLVM Compiler Infrastructure 00855 // 00856 // This file was developed by the LLVM research group and is distributed under 00857 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00858 // 00859 //===----------------------------------------------------------------------===// 00860 // 00861 // This file implements the flex scanner for LLVM assembly languages files. 00862 // 00863 //===----------------------------------------------------------------------===*/ 00864 #line 28 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 00865 #include "ParserInternals.h" 00866 #include "llvm/Module.h" 00867 #include <list> 00868 #include "llvmAsmParser.h" 00869 #include <cctype> 00870 #include <cstdlib> 00871 00872 void set_scan_file(FILE * F){ 00873 llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) ); 00874 } 00875 void set_scan_string (const char * str) { 00876 llvmAsm_scan_string (str); 00877 } 00878 00879 #define RET_TOK(type, Enum, sym) \ 00880 llvmAsmlval.type = Instruction::Enum; return sym 00881 00882 namespace llvm { 00883 00884 // TODO: All of the static identifiers are figured out by the lexer, 00885 // these should be hashed to reduce the lexer size 00886 00887 00888 // atoull - Convert an ascii string of decimal digits into the unsigned long 00889 // long representation... this does not have to do input error checking, 00890 // because we know that the input will be matched by a suitable regex... 00891 // 00892 static uint64_t atoull(const char *Buffer) { 00893 uint64_t Result = 0; 00894 for (; *Buffer; Buffer++) { 00895 uint64_t OldRes = Result; 00896 Result *= 10; 00897 Result += *Buffer-'0'; 00898 if (Result < OldRes) // Uh, oh, overflow detected!!! 00899 ThrowException("constant bigger than 64 bits detected!"); 00900 } 00901 return Result; 00902 } 00903 00904 static uint64_t HexIntToVal(const char *Buffer) { 00905 uint64_t Result = 0; 00906 for (; *Buffer; ++Buffer) { 00907 uint64_t OldRes = Result; 00908 Result *= 16; 00909 char C = *Buffer; 00910 if (C >= '0' && C <= '9') 00911 Result += C-'0'; 00912 else if (C >= 'A' && C <= 'F') 00913 Result += C-'A'+10; 00914 else if (C >= 'a' && C <= 'f') 00915 Result += C-'a'+10; 00916 00917 if (Result < OldRes) // Uh, oh, overflow detected!!! 00918 ThrowException("constant bigger than 64 bits detected!"); 00919 } 00920 return Result; 00921 } 00922 00923 00924 // HexToFP - Convert the ascii string in hexidecimal format to the floating 00925 // point representation of it. 00926 // 00927 static double HexToFP(const char *Buffer) { 00928 // Behave nicely in the face of C TBAA rules... see: 00929 // http://www.nullstone.com/htmls/category/aliastyp.htm 00930 union { 00931 uint64_t UI; 00932 double FP; 00933 } UIntToFP; 00934 UIntToFP.UI = HexIntToVal(Buffer); 00935 00936 assert(sizeof(double) == sizeof(uint64_t) && 00937 "Data sizes incompatible on this target!"); 00938 return UIntToFP.FP; // Cast Hex constant to double 00939 } 00940 00941 00942 // UnEscapeLexed - Run through the specified buffer and change \xx codes to the 00943 // appropriate character. If AllowNull is set to false, a \00 value will cause 00944 // an exception to be thrown. 00945 // 00946 // If AllowNull is set to true, the return value of the function points to the 00947 // last character of the string in memory. 00948 // 00949 char *UnEscapeLexed(char *Buffer, bool AllowNull) { 00950 char *BOut = Buffer; 00951 for (char *BIn = Buffer; *BIn; ) { 00952 if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) { 00953 char Tmp = BIn[3]; BIn[3] = 0; // Terminate string 00954 *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number 00955 if (!AllowNull && !*BOut) 00956 ThrowException("String literal cannot accept \\00 escape!"); 00957 00958 BIn[3] = Tmp; // Restore character 00959 BIn += 3; // Skip over handled chars 00960 ++BOut; 00961 } else { 00962 *BOut++ = *BIn++; 00963 } 00964 } 00965 00966 return BOut; 00967 } 00968 00969 } // End llvm namespace 00970 00971 using namespace llvm; 00972 00973 #define YY_NEVER_INTERACTIVE 1 00974 /* Comments start with a ; and go till end of line */ 00975 /* Variable(Value) identifiers start with a % sign */ 00976 /* Label identifiers end with a colon */ 00977 /* Quoted names can contain any character except " and \ */ 00978 /* [PN]Integer: match positive and negative literal integer values that 00979 * are preceeded by a '%' character. These represent unnamed variable slots. 00980 */ 00981 /* E[PN]Integer: match positive and negative literal integer values */ 00982 /* FPConstant - A Floating point constant. 00983 */ 00984 /* HexFPConstant - Floating point constant represented in IEEE format as a 00985 * hexadecimal number for when exponential notation is not precise enough. 00986 */ 00987 /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing 00988 * it to deal with 64 bit numbers. 00989 */ 00990 #line 991 "Lexer.cpp" 00991 00992 #define INITIAL 0 00993 00994 #ifndef YY_NO_UNISTD_H 00995 /* Special case for "unistd.h", since it is non-ANSI. We include it way 00996 * down here because we want the user's section 1 to have been scanned first. 00997 * The user has a chance to override it with an option. 00998 */ 00999 #include <unistd.h> 01000 #endif 01001 01002 #ifndef YY_EXTRA_TYPE 01003 #define YY_EXTRA_TYPE void * 01004 #endif 01005 01006 static int yy_init_globals (void ); 01007 01008 /* Macros after this point can all be overridden by user definitions in 01009 * section 1. 01010 */ 01011 01012 #ifndef YY_SKIP_YYWRAP 01013 #ifdef __cplusplus 01014 extern "C" int llvmAsmwrap (void ); 01015 #else 01016 extern int llvmAsmwrap (void ); 01017 #endif 01018 #endif 01019 01020 static inline void yyunput (int c,char *buf_ptr ); 01021 01022 #ifndef yytext_ptr 01023 static void yy_flex_strncpy (char *,yyconst char *,int ); 01024 #endif 01025 01026 #ifdef YY_NEED_STRLEN 01027 static int yy_flex_strlen (yyconst char * ); 01028 #endif 01029 01030 #ifndef YY_NO_INPUT 01031 01032 #ifdef __cplusplus 01033 static int yyinput (void ); 01034 #else 01035 static int input (void ); 01036 #endif 01037 01038 #endif 01039 01040 /* Amount of stuff to slurp up with each read. */ 01041 #ifndef YY_READ_BUF_SIZE 01042 #define YY_READ_BUF_SIZE 8192 01043 #endif 01044 01045 /* Copy whatever the last rule matched to the standard output. */ 01046 #ifndef ECHO 01047 /* This used to be an fputs(), but since the string might contain NUL's, 01048 * we now use fwrite(). 01049 */ 01050 #define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout ) 01051 #endif 01052 01053 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 01054 * is returned in "result". 01055 */ 01056 #ifndef YY_INPUT 01057 #define YY_INPUT(buf,result,max_size) \ 01058 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 01059 { \ 01060 int c = '*'; \ 01061 size_t n; \ 01062 for ( n = 0; n < max_size && \ 01063 (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \ 01064 buf[n] = (char) c; \ 01065 if ( c == '\n' ) \ 01066 buf[n++] = (char) c; \ 01067 if ( c == EOF && ferror( llvmAsmin ) ) \ 01068 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 01069 result = n; \ 01070 } \ 01071 else \ 01072 { \ 01073 errno=0; \ 01074 while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \ 01075 { \ 01076 if( errno != EINTR) \ 01077 { \ 01078 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 01079 break; \ 01080 } \ 01081 errno=0; \ 01082 clearerr(llvmAsmin); \ 01083 } \ 01084 }\ 01085 \ 01086 01087 #endif 01088 01089 /* No semi-colon after return; correct usage is to write "yyterminate();" - 01090 * we don't want an extra ';' after the "return" because that will cause 01091 * some compilers to complain about unreachable statements. 01092 */ 01093 #ifndef yyterminate 01094 #define yyterminate() return YY_NULL 01095 #endif 01096 01097 /* Number of entries by which start-condition stack grows. */ 01098 #ifndef YY_START_STACK_INCR 01099 #define YY_START_STACK_INCR 25 01100 #endif 01101 01102 /* Report a fatal error. */ 01103 #ifndef YY_FATAL_ERROR 01104 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 01105 #endif 01106 01107 /* end tables serialization structures and prototypes */ 01108 01109 /* Default declaration of generated scanner - a define so the user can 01110 * easily add parameters. 01111 */ 01112 #ifndef YY_DECL 01113 #define YY_DECL_IS_OURS 1 01114 01115 extern int llvmAsmlex (void); 01116 01117 #define YY_DECL int llvmAsmlex (void) 01118 #endif /* !YY_DECL */ 01119 01120 /* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng 01121 * have been set up. 01122 */ 01123 #ifndef YY_USER_ACTION 01124 #define YY_USER_ACTION 01125 #endif 01126 01127 /* Code executed at the end of each rule. */ 01128 #ifndef YY_BREAK 01129 #define YY_BREAK break; 01130 #endif 01131 01132 #define YY_RULE_SETUP \ 01133 YY_USER_ACTION 01134 01135 /** The main scanner function which does all the work. 01136 */ 01137 YY_DECL 01138 { 01139 register yy_state_type yy_current_state; 01140 register char *yy_cp, *yy_bp; 01141 register int yy_act; 01142 01143 #line 179 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01144 01145 01146 #line 1147 "Lexer.cpp" 01147 01148 if ( !(yy_init) ) 01149 { 01150 (yy_init) = 1; 01151 01152 #ifdef YY_USER_INIT 01153 YY_USER_INIT; 01154 #endif 01155 01156 if ( ! (yy_start) ) 01157 (yy_start) = 1; /* first start state */ 01158 01159 if ( ! llvmAsmin ) 01160 llvmAsmin = stdin; 01161 01162 if ( ! llvmAsmout ) 01163 llvmAsmout = stdout; 01164 01165 if ( ! YY_CURRENT_BUFFER ) { 01166 llvmAsmensure_buffer_stack (); 01167 YY_CURRENT_BUFFER_LVALUE = 01168 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); 01169 } 01170 01171 llvmAsm_load_buffer_state( ); 01172 } 01173 01174 while ( 1 ) /* loops until end-of-file is reached */ 01175 { 01176 yy_cp = (yy_c_buf_p); 01177 01178 /* Support of llvmAsmtext. */ 01179 *yy_cp = (yy_hold_char); 01180 01181 /* yy_bp points to the position in yy_ch_buf of the start of 01182 * the current run. 01183 */ 01184 yy_bp = yy_cp; 01185 01186 yy_current_state = (yy_start); 01187 yy_match: 01188 do 01189 { 01190 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 01191 if ( yy_accept[yy_current_state] ) 01192 { 01193 (yy_last_accepting_state) = yy_current_state; 01194 (yy_last_accepting_cpos) = yy_cp; 01195 } 01196 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 01197 { 01198 yy_current_state = (int) yy_def[yy_current_state]; 01199 if ( yy_current_state >= 460 ) 01200 yy_c = yy_meta[(unsigned int) yy_c]; 01201 } 01202 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 01203 ++yy_cp; 01204 } 01205 while ( yy_current_state != 459 ); 01206 yy_cp = (yy_last_accepting_cpos); 01207 yy_current_state = (yy_last_accepting_state); 01208 01209 yy_find_action: 01210 yy_act = yy_accept[yy_current_state]; 01211 01212 YY_DO_BEFORE_ACTION; 01213 01214 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) 01215 { 01216 int yyl; 01217 for ( yyl = 0; yyl < llvmAsmleng; ++yyl ) 01218 if ( llvmAsmtext[yyl] == '\n' ) 01219 01220 llvmAsmlineno++; 01221 ; 01222 } 01223 01224 do_action: /* This label is used only to access EOF actions. */ 01225 01226 switch ( yy_act ) 01227 { /* beginning of action switch */ 01228 case 0: /* must back up */ 01229 /* undo the effects of YY_DO_BEFORE_ACTION */ 01230 *yy_cp = (yy_hold_char); 01231 yy_cp = (yy_last_accepting_cpos); 01232 yy_current_state = (yy_last_accepting_state); 01233 goto yy_find_action; 01234 01235 case 1: 01236 YY_RULE_SETUP 01237 #line 181 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01238 { /* Ignore comments for now */ } 01239 YY_BREAK 01240 case 2: 01241 YY_RULE_SETUP 01242 #line 183 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01243 { return BEGINTOK; } 01244 YY_BREAK 01245 case 3: 01246 YY_RULE_SETUP 01247 #line 184 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01248 { return ENDTOK; } 01249 YY_BREAK 01250 case 4: 01251 YY_RULE_SETUP 01252 #line 185 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01253 { return TRUETOK; } 01254 YY_BREAK 01255 case 5: 01256 YY_RULE_SETUP 01257 #line 186 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01258 { return FALSETOK; } 01259 YY_BREAK 01260 case 6: 01261 YY_RULE_SETUP 01262 #line 187 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01263 { return DECLARE; } 01264 YY_BREAK 01265 case 7: 01266 YY_RULE_SETUP 01267 #line 188 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01268 { return GLOBAL; } 01269 YY_BREAK 01270 case 8: 01271 YY_RULE_SETUP 01272 #line 189 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01273 { return CONSTANT; } 01274 YY_BREAK 01275 case 9: 01276 YY_RULE_SETUP 01277 #line 190 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01278 { return INTERNAL; } 01279 YY_BREAK 01280 case 10: 01281 YY_RULE_SETUP 01282 #line 191 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01283 { return LINKONCE; } 01284 YY_BREAK 01285 case 11: 01286 YY_RULE_SETUP 01287 #line 192 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01288 { return WEAK; } 01289 YY_BREAK 01290 case 12: 01291 YY_RULE_SETUP 01292 #line 193 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01293 { return APPENDING; } 01294 YY_BREAK 01295 case 13: 01296 YY_RULE_SETUP 01297 #line 194 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01298 { return EXTERNAL; } /* Deprecated, turn into external */ 01299 YY_BREAK 01300 case 14: 01301 YY_RULE_SETUP 01302 #line 195 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01303 { return EXTERNAL; } 01304 YY_BREAK 01305 case 15: 01306 YY_RULE_SETUP 01307 #line 196 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01308 { return IMPLEMENTATION; } 01309 YY_BREAK 01310 case 16: 01311 YY_RULE_SETUP 01312 #line 197 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01313 { return ZEROINITIALIZER; } 01314 YY_BREAK 01315 case 17: 01316 YY_RULE_SETUP 01317 #line 198 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01318 { return DOTDOTDOT; } 01319 YY_BREAK 01320 case 18: 01321 YY_RULE_SETUP 01322 #line 199 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01323 { return UNDEF; } 01324 YY_BREAK 01325 case 19: 01326 YY_RULE_SETUP 01327 #line 200 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01328 { return NULL_TOK; } 01329 YY_BREAK 01330 case 20: 01331 YY_RULE_SETUP 01332 #line 201 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01333 { return TO; } 01334 YY_BREAK 01335 case 21: 01336 YY_RULE_SETUP 01337 #line 202 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01338 { RET_TOK(TermOpVal, Unwind, UNWIND); } 01339 YY_BREAK 01340 case 22: 01341 YY_RULE_SETUP 01342 #line 203 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01343 { return NOT; } /* Deprecated, turned into XOR */ 01344 YY_BREAK 01345 case 23: 01346 YY_RULE_SETUP 01347 #line 204 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01348 { return TAIL; } 01349 YY_BREAK 01350 case 24: 01351 YY_RULE_SETUP 01352 #line 205 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01353 { return TARGET; } 01354 YY_BREAK 01355 case 25: 01356 YY_RULE_SETUP 01357 #line 206 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01358 { return TRIPLE; } 01359 YY_BREAK 01360 case 26: 01361 YY_RULE_SETUP 01362 #line 207 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01363 { return DEPLIBS; } 01364 YY_BREAK 01365 case 27: 01366 YY_RULE_SETUP 01367 #line 208 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01368 { return ENDIAN; } 01369 YY_BREAK 01370 case 28: 01371 YY_RULE_SETUP 01372 #line 209 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01373 { return POINTERSIZE; } 01374 YY_BREAK 01375 case 29: 01376 YY_RULE_SETUP 01377 #line 210 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01378 { return LITTLE; } 01379 YY_BREAK 01380 case 30: 01381 YY_RULE_SETUP 01382 #line 211 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01383 { return BIG; } 01384 YY_BREAK 01385 case 31: 01386 YY_RULE_SETUP 01387 #line 212 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01388 { return VOLATILE; } 01389 YY_BREAK 01390 case 32: 01391 YY_RULE_SETUP 01392 #line 213 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01393 { return ALIGN; } 01394 YY_BREAK 01395 case 33: 01396 YY_RULE_SETUP 01397 #line 214 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01398 { return SECTION; } 01399 YY_BREAK 01400 case 34: 01401 YY_RULE_SETUP 01402 #line 215 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01403 { return MODULE; } 01404 YY_BREAK 01405 case 35: 01406 YY_RULE_SETUP 01407 #line 216 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01408 { return ASM_TOK; } 01409 YY_BREAK 01410 case 36: 01411 YY_RULE_SETUP 01412 #line 217 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01413 { return SIDEEFFECT; } 01414 YY_BREAK 01415 case 37: 01416 YY_RULE_SETUP 01417 #line 219 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01418 { return CC_TOK; } 01419 YY_BREAK 01420 case 38: 01421 YY_RULE_SETUP 01422 #line 220 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01423 { return CCC_TOK; } 01424 YY_BREAK 01425 case 39: 01426 YY_RULE_SETUP 01427 #line 221 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01428 { return CSRETCC_TOK; } 01429 YY_BREAK 01430 case 40: 01431 YY_RULE_SETUP 01432 #line 222 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01433 { return FASTCC_TOK; } 01434 YY_BREAK 01435 case 41: 01436 YY_RULE_SETUP 01437 #line 223 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01438 { return COLDCC_TOK; } 01439 YY_BREAK 01440 case 42: 01441 YY_RULE_SETUP 01442 #line 225 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01443 { llvmAsmlval.PrimType = Type::VoidTy ; return VOID; } 01444 YY_BREAK 01445 case 43: 01446 YY_RULE_SETUP 01447 #line 226 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01448 { llvmAsmlval.PrimType = Type::BoolTy ; return BOOL; } 01449 YY_BREAK 01450 case 44: 01451 YY_RULE_SETUP 01452 #line 227 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01453 { llvmAsmlval.PrimType = Type::SByteTy ; return SBYTE; } 01454 YY_BREAK 01455 case 45: 01456 YY_RULE_SETUP 01457 #line 228 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01458 { llvmAsmlval.PrimType = Type::UByteTy ; return UBYTE; } 01459 YY_BREAK 01460 case 46: 01461 YY_RULE_SETUP 01462 #line 229 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01463 { llvmAsmlval.PrimType = Type::ShortTy ; return SHORT; } 01464 YY_BREAK 01465 case 47: 01466 YY_RULE_SETUP 01467 #line 230 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01468 { llvmAsmlval.PrimType = Type::UShortTy; return USHORT; } 01469 YY_BREAK 01470 case 48: 01471 YY_RULE_SETUP 01472 #line 231 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01473 { llvmAsmlval.PrimType = Type::IntTy ; return INT; } 01474 YY_BREAK 01475 case 49: 01476 YY_RULE_SETUP 01477 #line 232 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01478 { llvmAsmlval.PrimType = Type::UIntTy ; return UINT; } 01479 YY_BREAK 01480 case 50: 01481 YY_RULE_SETUP 01482 #line 233 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01483 { llvmAsmlval.PrimType = Type::LongTy ; return LONG; } 01484 YY_BREAK 01485 case 51: 01486 YY_RULE_SETUP 01487 #line 234 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01488 { llvmAsmlval.PrimType = Type::ULongTy ; return ULONG; } 01489 YY_BREAK 01490 case 52: 01491 YY_RULE_SETUP 01492 #line 235 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01493 { llvmAsmlval.PrimType = Type::FloatTy ; return FLOAT; } 01494 YY_BREAK 01495 case 53: 01496 YY_RULE_SETUP 01497 #line 236 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01498 { llvmAsmlval.PrimType = Type::DoubleTy; return DOUBLE; } 01499 YY_BREAK 01500 case 54: 01501 YY_RULE_SETUP 01502 #line 237 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01503 { llvmAsmlval.PrimType = Type::LabelTy ; return LABEL; } 01504 YY_BREAK 01505 case 55: 01506 YY_RULE_SETUP 01507 #line 238 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01508 { return TYPE; } 01509 YY_BREAK 01510 case 56: 01511 YY_RULE_SETUP 01512 #line 239 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01513 { return OPAQUE; } 01514 YY_BREAK 01515 case 57: 01516 YY_RULE_SETUP 01517 #line 241 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01518 { RET_TOK(BinaryOpVal, Add, ADD); } 01519 YY_BREAK 01520 case 58: 01521 YY_RULE_SETUP 01522 #line 242 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01523 { RET_TOK(BinaryOpVal, Sub, SUB); } 01524 YY_BREAK 01525 case 59: 01526 YY_RULE_SETUP 01527 #line 243 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01528 { RET_TOK(BinaryOpVal, Mul, MUL); } 01529 YY_BREAK 01530 case 60: 01531 YY_RULE_SETUP 01532 #line 244 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01533 { RET_TOK(BinaryOpVal, Div, DIV); } 01534 YY_BREAK 01535 case 61: 01536 YY_RULE_SETUP 01537 #line 245 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01538 { RET_TOK(BinaryOpVal, Rem, REM); } 01539 YY_BREAK 01540 case 62: 01541 YY_RULE_SETUP 01542 #line 246 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01543 { RET_TOK(BinaryOpVal, And, AND); } 01544 YY_BREAK 01545 case 63: 01546 YY_RULE_SETUP 01547 #line 247 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01548 { RET_TOK(BinaryOpVal, Or , OR ); } 01549 YY_BREAK 01550 case 64: 01551 YY_RULE_SETUP 01552 #line 248 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01553 { RET_TOK(BinaryOpVal, Xor, XOR); } 01554 YY_BREAK 01555 case 65: 01556 YY_RULE_SETUP 01557 #line 249 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01558 { RET_TOK(BinaryOpVal, SetNE, SETNE); } 01559 YY_BREAK 01560 case 66: 01561 YY_RULE_SETUP 01562 #line 250 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01563 { RET_TOK(BinaryOpVal, SetEQ, SETEQ); } 01564 YY_BREAK 01565 case 67: 01566 YY_RULE_SETUP 01567 #line 251 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01568 { RET_TOK(BinaryOpVal, SetLT, SETLT); } 01569 YY_BREAK 01570 case 68: 01571 YY_RULE_SETUP 01572 #line 252 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01573 { RET_TOK(BinaryOpVal, SetGT, SETGT); } 01574 YY_BREAK 01575 case 69: 01576 YY_RULE_SETUP 01577 #line 253 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01578 { RET_TOK(BinaryOpVal, SetLE, SETLE); } 01579 YY_BREAK 01580 case 70: 01581 YY_RULE_SETUP 01582 #line 254 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01583 { RET_TOK(BinaryOpVal, SetGE, SETGE); } 01584 YY_BREAK 01585 case 71: 01586 YY_RULE_SETUP 01587 #line 256 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01588 { RET_TOK(OtherOpVal, PHI, PHI_TOK); } 01589 YY_BREAK 01590 case 72: 01591 YY_RULE_SETUP 01592 #line 257 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01593 { RET_TOK(OtherOpVal, Call, CALL); } 01594 YY_BREAK 01595 case 73: 01596 YY_RULE_SETUP 01597 #line 258 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01598 { RET_TOK(OtherOpVal, Cast, CAST); } 01599 YY_BREAK 01600 case 74: 01601 YY_RULE_SETUP 01602 #line 259 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01603 { RET_TOK(OtherOpVal, Select, SELECT); } 01604 YY_BREAK 01605 case 75: 01606 YY_RULE_SETUP 01607 #line 260 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01608 { RET_TOK(OtherOpVal, Shl, SHL); } 01609 YY_BREAK 01610 case 76: 01611 YY_RULE_SETUP 01612 #line 261 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01613 { RET_TOK(OtherOpVal, Shr, SHR); } 01614 YY_BREAK 01615 case 77: 01616 YY_RULE_SETUP 01617 #line 262 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01618 { return VANEXT_old; } 01619 YY_BREAK 01620 case 78: 01621 YY_RULE_SETUP 01622 #line 263 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01623 { return VAARG_old; } 01624 YY_BREAK 01625 case 79: 01626 YY_RULE_SETUP 01627 #line 264 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01628 { RET_TOK(OtherOpVal, VAArg , VAARG); } 01629 YY_BREAK 01630 case 80: 01631 YY_RULE_SETUP 01632 #line 265 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01633 { RET_TOK(TermOpVal, Ret, RET); } 01634 YY_BREAK 01635 case 81: 01636 YY_RULE_SETUP 01637 #line 266 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01638 { RET_TOK(TermOpVal, Br, BR); } 01639 YY_BREAK 01640 case 82: 01641 YY_RULE_SETUP 01642 #line 267 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01643 { RET_TOK(TermOpVal, Switch, SWITCH); } 01644 YY_BREAK 01645 case 83: 01646 YY_RULE_SETUP 01647 #line 268 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01648 { RET_TOK(TermOpVal, Invoke, INVOKE); } 01649 YY_BREAK 01650 case 84: 01651 YY_RULE_SETUP 01652 #line 269 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01653 { RET_TOK(TermOpVal, Unwind, UNWIND); } 01654 YY_BREAK 01655 case 85: 01656 YY_RULE_SETUP 01657 #line 270 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01658 { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } 01659 YY_BREAK 01660 case 86: 01661 YY_RULE_SETUP 01662 #line 272 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01663 { RET_TOK(MemOpVal, Malloc, MALLOC); } 01664 YY_BREAK 01665 case 87: 01666 YY_RULE_SETUP 01667 #line 273 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01668 { RET_TOK(MemOpVal, Alloca, ALLOCA); } 01669 YY_BREAK 01670 case 88: 01671 YY_RULE_SETUP 01672 #line 274 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01673 { RET_TOK(MemOpVal, Free, FREE); } 01674 YY_BREAK 01675 case 89: 01676 YY_RULE_SETUP 01677 #line 275 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01678 { RET_TOK(MemOpVal, Load, LOAD); } 01679 YY_BREAK 01680 case 90: 01681 YY_RULE_SETUP 01682 #line 276 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01683 { RET_TOK(MemOpVal, Store, STORE); } 01684 YY_BREAK 01685 case 91: 01686 YY_RULE_SETUP 01687 #line 277 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01688 { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } 01689 YY_BREAK 01690 case 92: 01691 YY_RULE_SETUP 01692 #line 279 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01693 { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } 01694 YY_BREAK 01695 case 93: 01696 YY_RULE_SETUP 01697 #line 280 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01698 { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } 01699 YY_BREAK 01700 case 94: 01701 YY_RULE_SETUP 01702 #line 281 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01703 { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } 01704 YY_BREAK 01705 case 95: 01706 YY_RULE_SETUP 01707 #line 284 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01708 { 01709 UnEscapeLexed(llvmAsmtext+1); 01710 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip % 01711 return VAR_ID; 01712 } 01713 YY_BREAK 01714 case 96: 01715 YY_RULE_SETUP 01716 #line 289 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01717 { 01718 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon 01719 UnEscapeLexed(llvmAsmtext); 01720 llvmAsmlval.StrVal = strdup(llvmAsmtext); 01721 return LABELSTR; 01722 } 01723 YY_BREAK 01724 case 97: 01725 /* rule 97 can match eol */ 01726 YY_RULE_SETUP 01727 #line 295 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01728 { 01729 llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote 01730 UnEscapeLexed(llvmAsmtext+1); 01731 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); 01732 return LABELSTR; 01733 } 01734 YY_BREAK 01735 case 98: 01736 /* rule 98 can match eol */ 01737 YY_RULE_SETUP 01738 #line 302 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01739 { // Note that we cannot unescape a string constant here! The 01740 // string constant might contain a \00 which would not be 01741 // understood by the string stuff. It is valid to make a 01742 // [sbyte] c"Hello World\00" constant, for example. 01743 // 01744 llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote 01745 llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote 01746 return STRINGCONSTANT; 01747 } 01748 YY_BREAK 01749 case 99: 01750 YY_RULE_SETUP 01751 #line 313 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01752 { llvmAsmlval.UInt64Val = atoull(llvmAsmtext); return EUINT64VAL; } 01753 YY_BREAK 01754 case 100: 01755 YY_RULE_SETUP 01756 #line 314 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01757 { 01758 uint64_t Val = atoull(llvmAsmtext+1); 01759 // +1: we have bigger negative range 01760 if (Val > (uint64_t)INT64_MAX+1) 01761 ThrowException("Constant too large for signed 64 bits!"); 01762 llvmAsmlval.SInt64Val = -Val; 01763 return ESINT64VAL; 01764 } 01765 YY_BREAK 01766 case 101: 01767 YY_RULE_SETUP 01768 #line 322 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01769 { 01770 llvmAsmlval.UInt64Val = HexIntToVal(llvmAsmtext+3); 01771 return llvmAsmtext[0] == 's' ? ESINT64VAL : EUINT64VAL; 01772 } 01773 YY_BREAK 01774 case 102: 01775 YY_RULE_SETUP 01776 #line 327 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01777 { 01778 uint64_t Val = atoull(llvmAsmtext+1); 01779 if ((unsigned)Val != Val) 01780 ThrowException("Invalid value number (too large)!"); 01781 llvmAsmlval.UIntVal = unsigned(Val); 01782 return UINTVAL; 01783 } 01784 YY_BREAK 01785 case 103: 01786 YY_RULE_SETUP 01787 #line 334 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01788 { 01789 uint64_t Val = atoull(llvmAsmtext+2); 01790 // +1: we have bigger negative range 01791 if (Val > (uint64_t)INT32_MAX+1) 01792 ThrowException("Constant too large for signed 32 bits!"); 01793 llvmAsmlval.SIntVal = (int)-Val; 01794 return SINTVAL; 01795 } 01796 YY_BREAK 01797 case 104: 01798 YY_RULE_SETUP 01799 #line 343 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01800 { llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; } 01801 YY_BREAK 01802 case 105: 01803 YY_RULE_SETUP 01804 #line 344 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01805 { llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; } 01806 YY_BREAK 01807 case YY_STATE_EOF(INITIAL): 01808 #line 346 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01809 { 01810 /* Make sure to free the internal buffers for flex when we are 01811 * done reading our input! 01812 */ 01813 llvmAsm_delete_buffer(YY_CURRENT_BUFFER); 01814 return EOF; 01815 } 01816 YY_BREAK 01817 case 106: 01818 /* rule 106 can match eol */ 01819 YY_RULE_SETUP 01820 #line 354 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01821 { /* Ignore whitespace */ } 01822 YY_BREAK 01823 case 107: 01824 YY_RULE_SETUP 01825 #line 355 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01826 { return llvmAsmtext[0]; } 01827 YY_BREAK 01828 case 108: 01829 YY_RULE_SETUP 01830 #line 357 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 01831 YY_FATAL_ERROR( "flex scanner jammed" ); 01832 YY_BREAK 01833 #line 1834 "Lexer.cpp" 01834 01835 case YY_END_OF_BUFFER: 01836 { 01837 /* Amount of text matched not including the EOB char. */ 01838 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 01839 01840 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 01841 *yy_cp = (yy_hold_char); 01842 YY_RESTORE_YY_MORE_OFFSET 01843 01844 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 01845 { 01846 /* We're scanning a new file or input source. It's 01847 * possible that this happened because the user 01848 * just pointed llvmAsmin at a new source and called 01849 * llvmAsmlex(). If so, then we have to assure 01850 * consistency between YY_CURRENT_BUFFER and our 01851 * globals. Here is the right place to do so, because 01852 * this is the first action (other than possibly a 01853 * back-up) that will match for the new input source. 01854 */ 01855 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 01856 YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin; 01857 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 01858 } 01859 01860 /* Note that here we test for yy_c_buf_p "<=" to the position 01861 * of the first EOB in the buffer, since yy_c_buf_p will 01862 * already have been incremented past the NUL character 01863 * (since all states make transitions on EOB to the 01864 * end-of-buffer state). Contrast this with the test 01865 * in input(). 01866 */ 01867 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 01868 { /* This was really a NUL. */ 01869 yy_state_type yy_next_state; 01870 01871 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 01872 01873 yy_current_state = yy_get_previous_state( ); 01874 01875 /* Okay, we're now positioned to make the NUL 01876 * transition. We couldn't have 01877 * yy_get_previous_state() go ahead and do it 01878 * for us because it doesn't know how to deal 01879 * with the possibility of jamming (and we don't 01880 * want to build jamming into it because then it 01881 * will run more slowly). 01882 */ 01883 01884 yy_next_state = yy_try_NUL_trans( yy_current_state ); 01885 01886 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01887 01888 if ( yy_next_state ) 01889 { 01890 /* Consume the NUL. */ 01891 yy_cp = ++(yy_c_buf_p); 01892 yy_current_state = yy_next_state; 01893 goto yy_match; 01894 } 01895 01896 else 01897 { 01898 yy_cp = (yy_last_accepting_cpos); 01899 yy_current_state = (yy_last_accepting_state); 01900 goto yy_find_action; 01901 } 01902 } 01903 01904 else switch ( yy_get_next_buffer( ) ) 01905 { 01906 case EOB_ACT_END_OF_FILE: 01907 { 01908 (yy_did_buffer_switch_on_eof) = 0; 01909 01910 if ( llvmAsmwrap( ) ) 01911 { 01912 /* Note: because we've taken care in 01913 * yy_get_next_buffer() to have set up 01914 * llvmAsmtext, we can now set up 01915 * yy_c_buf_p so that if some total 01916 * hoser (like flex itself) wants to 01917 * call the scanner after we return the 01918 * YY_NULL, it'll still work - another 01919 * YY_NULL will get returned. 01920 */ 01921 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 01922 01923 yy_act = YY_STATE_EOF(YY_START); 01924 goto do_action; 01925 } 01926 01927 else 01928 { 01929 if ( ! (yy_did_buffer_switch_on_eof) ) 01930 YY_NEW_FILE; 01931 } 01932 break; 01933 } 01934 01935 case EOB_ACT_CONTINUE_SCAN: 01936 (yy_c_buf_p) = 01937 (yytext_ptr) + yy_amount_of_matched_text; 01938 01939 yy_current_state = yy_get_previous_state( ); 01940 01941 yy_cp = (yy_c_buf_p); 01942 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01943 goto yy_match; 01944 01945 case EOB_ACT_LAST_MATCH: 01946 (yy_c_buf_p) = 01947 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 01948 01949 yy_current_state = yy_get_previous_state( ); 01950 01951 yy_cp = (yy_c_buf_p); 01952 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 01953 goto yy_find_action; 01954 } 01955 break; 01956 } 01957 01958 default: 01959 YY_FATAL_ERROR( 01960 "fatal flex scanner internal error--no action found" ); 01961 } /* end of action switch */ 01962 } /* end of scanning one token */ 01963 } /* end of llvmAsmlex */ 01964 01965 /* yy_get_next_buffer - try to read in a new buffer 01966 * 01967 * Returns a code representing an action: 01968 * EOB_ACT_LAST_MATCH - 01969 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 01970 * EOB_ACT_END_OF_FILE - end of file 01971 */ 01972 static int yy_get_next_buffer (void) 01973 { 01974 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 01975 register char *source = (yytext_ptr); 01976 register int number_to_move, i; 01977 int ret_val; 01978 01979 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 01980 YY_FATAL_ERROR( 01981 "fatal flex scanner internal error--end of buffer missed" ); 01982 01983 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 01984 { /* Don't try to fill the buffer, so this is an EOF. */ 01985 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 01986 { 01987 /* We matched a single character, the EOB, so 01988 * treat this as a final EOF. 01989 */ 01990 return EOB_ACT_END_OF_FILE; 01991 } 01992 01993 else 01994 { 01995 /* We matched some text prior to the EOB, first 01996 * process it. 01997 */ 01998 return EOB_ACT_LAST_MATCH; 01999 } 02000 } 02001 02002 /* Try to read more data. */ 02003 02004 /* First move last chars to start of buffer. */ 02005 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 02006 02007 for ( i = 0; i < number_to_move; ++i ) 02008 *(dest++) = *(source++); 02009 02010 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 02011 /* don't do the read, it's not guaranteed to return an EOF, 02012 * just force an EOF 02013 */ 02014 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 02015 02016 else 02017 { 02018 int num_to_read = 02019 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 02020 02021 while ( num_to_read <= 0 ) 02022 { /* Not enough room in the buffer - grow it. */ 02023 02024 /* just a shorter name for the current buffer */ 02025 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 02026 02027 int yy_c_buf_p_offset = 02028 (int) ((yy_c_buf_p) - b->yy_ch_buf); 02029 02030 if ( b->yy_is_our_buffer ) 02031 { 02032 int new_size = b->yy_buf_size * 2; 02033 02034 if ( new_size <= 0 ) 02035 b->yy_buf_size += b->yy_buf_size / 8; 02036 else 02037 b->yy_buf_size *= 2; 02038 02039 b->yy_ch_buf = (char *) 02040 /* Include room in for 2 EOB chars. */ 02041 llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 02042 } 02043 else 02044 /* Can't grow it, we don't own it. */ 02045 b->yy_ch_buf = 0; 02046 02047 if ( ! b->yy_ch_buf ) 02048 YY_FATAL_ERROR( 02049 "fatal error - scanner input buffer overflow" ); 02050 02051 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 02052 02053 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 02054 number_to_move - 1; 02055 02056 } 02057 02058 if ( num_to_read > YY_READ_BUF_SIZE ) 02059 num_to_read = YY_READ_BUF_SIZE; 02060 02061 /* Read in more data. */ 02062 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 02063 (yy_n_chars), (size_t) num_to_read ); 02064 02065 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02066 } 02067 02068 if ( (yy_n_chars) == 0 ) 02069 { 02070 if ( number_to_move == YY_MORE_ADJ ) 02071 { 02072 ret_val = EOB_ACT_END_OF_FILE; 02073 llvmAsmrestart(llvmAsmin ); 02074 } 02075 02076 else 02077 { 02078 ret_val = EOB_ACT_LAST_MATCH; 02079 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 02080 YY_BUFFER_EOF_PENDING; 02081 } 02082 } 02083 02084 else 02085 ret_val = EOB_ACT_CONTINUE_SCAN; 02086 02087 (yy_n_chars) += number_to_move; 02088 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 02089 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 02090 02091 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 02092 02093 return ret_val; 02094 } 02095 02096 /* yy_get_previous_state - get the state just before the EOB char was reached */ 02097 02098 static yy_state_type yy_get_previous_state (void) 02099 { 02100 register yy_state_type yy_current_state; 02101 register char *yy_cp; 02102 02103 yy_current_state = (yy_start); 02104 02105 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 02106 { 02107 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 02108 if ( yy_accept[yy_current_state] ) 02109 { 02110 (yy_last_accepting_state) = yy_current_state; 02111 (yy_last_accepting_cpos) = yy_cp; 02112 } 02113 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 02114 { 02115 yy_current_state = (int) yy_def[yy_current_state]; 02116 if ( yy_current_state >= 460 ) 02117 yy_c = yy_meta[(unsigned int) yy_c]; 02118 } 02119 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 02120 } 02121 02122 return yy_current_state; 02123 } 02124 02125 /* yy_try_NUL_trans - try to make a transition on the NUL character 02126 * 02127 * synopsis 02128 * next_state = yy_try_NUL_trans( current_state ); 02129 */ 02130 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 02131 { 02132 register int yy_is_jam; 02133 register char *yy_cp = (yy_c_buf_p); 02134 02135 register YY_CHAR yy_c = 1; 02136 if ( yy_accept[yy_current_state] ) 02137 { 02138 (yy_last_accepting_state) = yy_current_state; 02139 (yy_last_accepting_cpos) = yy_cp; 02140 } 02141 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 02142 { 02143 yy_current_state = (int) yy_def[yy_current_state]; 02144 if ( yy_current_state >= 460 ) 02145 yy_c = yy_meta[(unsigned int) yy_c]; 02146 } 02147 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 02148 yy_is_jam = (yy_current_state == 459); 02149 02150 return yy_is_jam ? 0 : yy_current_state; 02151 } 02152 02153 static inline void yyunput (int c, register char * yy_bp ) 02154 { 02155 register char *yy_cp; 02156 02157 yy_cp = (yy_c_buf_p); 02158 02159 /* undo effects of setting up llvmAsmtext */ 02160 *yy_cp = (yy_hold_char); 02161 02162 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 02163 { /* need to shift things up to make room */ 02164 /* +2 for EOB chars. */ 02165 register int number_to_move = (yy_n_chars) + 2; 02166 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 02167 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 02168 register char *source = 02169 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 02170 02171 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 02172 *--dest = *--source; 02173 02174 yy_cp += (int) (dest - source); 02175 yy_bp += (int) (dest - source); 02176 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 02177 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 02178 02179 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 02180 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 02181 } 02182 02183 *--yy_cp = (char) c; 02184 02185 if ( c == '\n' ){ 02186 --llvmAsmlineno; 02187 } 02188 02189 (yytext_ptr) = yy_bp; 02190 (yy_hold_char) = *yy_cp; 02191 (yy_c_buf_p) = yy_cp; 02192 } 02193 02194 #ifndef YY_NO_INPUT 02195 #ifdef __cplusplus 02196 static int yyinput (void) 02197 #else 02198 static int input (void) 02199 #endif 02200 02201 { 02202 int c; 02203 02204 *(yy_c_buf_p) = (yy_hold_char); 02205 02206 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 02207 { 02208 /* yy_c_buf_p now points to the character we want to return. 02209 * If this occurs *before* the EOB characters, then it's a 02210 * valid NUL; if not, then we've hit the end of the buffer. 02211 */ 02212 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 02213 /* This was really a NUL. */ 02214 *(yy_c_buf_p) = '\0'; 02215 02216 else 02217 { /* need more input */ 02218 int offset = (yy_c_buf_p) - (yytext_ptr); 02219 ++(yy_c_buf_p); 02220 02221 switch ( yy_get_next_buffer( ) ) 02222 { 02223 case EOB_ACT_LAST_MATCH: 02224 /* This happens because yy_g_n_b() 02225 * sees that we've accumulated a 02226 * token and flags that we need to 02227 * try matching the token before 02228 * proceeding. But for input(), 02229 * there's no matching to consider. 02230 * So convert the EOB_ACT_LAST_MATCH 02231 * to EOB_ACT_END_OF_FILE. 02232 */ 02233 02234 /* Reset buffer status. */ 02235 llvmAsmrestart(llvmAsmin ); 02236 02237 /*FALLTHROUGH*/ 02238 02239 case EOB_ACT_END_OF_FILE: 02240 { 02241 if ( llvmAsmwrap( ) ) 02242 return EOF; 02243 02244 if ( ! (yy_did_buffer_switch_on_eof) ) 02245 YY_NEW_FILE; 02246 #ifdef __cplusplus 02247 return yyinput(); 02248 #else 02249 return input(); 02250 #endif 02251 } 02252 02253 case EOB_ACT_CONTINUE_SCAN: 02254 (yy_c_buf_p) = (yytext_ptr) + offset; 02255 break; 02256 } 02257 } 02258 } 02259 02260 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 02261 *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */ 02262 (yy_hold_char) = *++(yy_c_buf_p); 02263 02264 if ( c == '\n' ) 02265 02266 llvmAsmlineno++; 02267 ; 02268 02269 return c; 02270 } 02271 #endif /* ifndef YY_NO_INPUT */ 02272 02273 /** Immediately switch to a different input stream. 02274 * @param input_file A readable stream. 02275 * 02276 * @note This function does not reset the start condition to @c INITIAL . 02277 */ 02278 void llvmAsmrestart (FILE * input_file ) 02279 { 02280 02281 if ( ! YY_CURRENT_BUFFER ){ 02282 llvmAsmensure_buffer_stack (); 02283 YY_CURRENT_BUFFER_LVALUE = 02284 llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); 02285 } 02286 02287 llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file ); 02288 llvmAsm_load_buffer_state( ); 02289 } 02290 02291 /** Switch to a different input buffer. 02292 * @param new_buffer The new input buffer. 02293 * 02294 */ 02295 void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 02296 { 02297 02298 /* TODO. We should be able to replace this entire function body 02299 * with 02300 * llvmAsmpop_buffer_state(); 02301 * llvmAsmpush_buffer_state(new_buffer); 02302 */ 02303 llvmAsmensure_buffer_stack (); 02304 if ( YY_CURRENT_BUFFER == new_buffer ) 02305 return; 02306 02307 if ( YY_CURRENT_BUFFER ) 02308 { 02309 /* Flush out information for old buffer. */ 02310 *(yy_c_buf_p) = (yy_hold_char); 02311 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 02312 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02313 } 02314 02315 YY_CURRENT_BUFFER_LVALUE = new_buffer; 02316 llvmAsm_load_buffer_state( ); 02317 02318 /* We don't actually know whether we did this switch during 02319 * EOF (llvmAsmwrap()) processing, but the only time this flag 02320 * is looked at is after llvmAsmwrap() is called, so it's safe 02321 * to go ahead and always set it. 02322 */ 02323 (yy_did_buffer_switch_on_eof) = 1; 02324 } 02325 02326 static void llvmAsm_load_buffer_state (void) 02327 { 02328 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 02329 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 02330 llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 02331 (yy_hold_char) = *(yy_c_buf_p); 02332 } 02333 02334 /** Allocate and initialize an input buffer state. 02335 * @param file A readable stream. 02336 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 02337 * 02338 * @return the allocated buffer state. 02339 */ 02340 YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size ) 02341 { 02342 YY_BUFFER_STATE b; 02343 02344 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) ); 02345 if ( ! b ) 02346 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" ); 02347 02348 b->yy_buf_size = size; 02349 02350 /* yy_ch_buf has to be 2 characters longer than the size given because 02351 * we need to put in 2 end-of-buffer characters. 02352 */ 02353 b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 ); 02354 if ( ! b->yy_ch_buf ) 02355 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" ); 02356 02357 b->yy_is_our_buffer = 1; 02358 02359 llvmAsm_init_buffer(b,file ); 02360 02361 return b; 02362 } 02363 02364 /** Destroy the buffer. 02365 * @param b a buffer created with llvmAsm_create_buffer() 02366 * 02367 */ 02368 void llvmAsm_delete_buffer (YY_BUFFER_STATE b ) 02369 { 02370 02371 if ( ! b ) 02372 return; 02373 02374 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 02375 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 02376 02377 if ( b->yy_is_our_buffer ) 02378 llvmAsmfree((void *) b->yy_ch_buf ); 02379 02380 llvmAsmfree((void *) b ); 02381 } 02382 02383 /* Initializes or reinitializes a buffer. 02384 * This function is sometimes called more than once on the same buffer, 02385 * such as during a llvmAsmrestart() or at EOF. 02386 */ 02387 static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file ) 02388 02389 { 02390 int oerrno = errno; 02391 02392 llvmAsm_flush_buffer(b ); 02393 02394 b->yy_input_file = file; 02395 b->yy_fill_buffer = 1; 02396 02397 /* If b is the current buffer, then llvmAsm_init_buffer was _probably_ 02398 * called from llvmAsmrestart() or through yy_get_next_buffer. 02399 * In that case, we don't want to reset the lineno or column. 02400 */ 02401 if (b != YY_CURRENT_BUFFER){ 02402 b->yy_bs_lineno = 1; 02403 b->yy_bs_column = 0; 02404 } 02405 02406 b->yy_is_interactive = 0; 02407 02408 errno = oerrno; 02409 } 02410 02411 /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 02412 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 02413 * 02414 */ 02415 void llvmAsm_flush_buffer (YY_BUFFER_STATE b ) 02416 { 02417 if ( ! b ) 02418 return; 02419 02420 b->yy_n_chars = 0; 02421 02422 /* We always need two end-of-buffer characters. The first causes 02423 * a transition to the end-of-buffer state. The second causes 02424 * a jam in that state. 02425 */ 02426 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 02427 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 02428 02429 b->yy_buf_pos = &b->yy_ch_buf[0]; 02430 02431 b->yy_at_bol = 1; 02432 b->yy_buffer_status = YY_BUFFER_NEW; 02433 02434 if ( b == YY_CURRENT_BUFFER ) 02435 llvmAsm_load_buffer_state( ); 02436 } 02437 02438 /** Pushes the new state onto the stack. The new state becomes 02439 * the current state. This function will allocate the stack 02440 * if necessary. 02441 * @param new_buffer The new state. 02442 * 02443 */ 02444 void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer ) 02445 { 02446 if (new_buffer == NULL) 02447 return; 02448 02449 llvmAsmensure_buffer_stack(); 02450 02451 /* This block is copied from llvmAsm_switch_to_buffer. */ 02452 if ( YY_CURRENT_BUFFER ) 02453 { 02454 /* Flush out information for old buffer. */ 02455 *(yy_c_buf_p) = (yy_hold_char); 02456 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 02457 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 02458 } 02459 02460 /* Only push if top exists. Otherwise, replace top. */ 02461 if (YY_CURRENT_BUFFER) 02462 (yy_buffer_stack_top)++; 02463 YY_CURRENT_BUFFER_LVALUE = new_buffer; 02464 02465 /* copied from llvmAsm_switch_to_buffer. */ 02466 llvmAsm_load_buffer_state( ); 02467 (yy_did_buffer_switch_on_eof) = 1; 02468 } 02469 02470 /** Removes and deletes the top of the stack, if present. 02471 * The next element becomes the new top. 02472 * 02473 */ 02474 void llvmAsmpop_buffer_state (void) 02475 { 02476 if (!YY_CURRENT_BUFFER) 02477 return; 02478 02479 llvmAsm_delete_buffer(YY_CURRENT_BUFFER ); 02480 YY_CURRENT_BUFFER_LVALUE = NULL; 02481 if ((yy_buffer_stack_top) > 0) 02482 --(yy_buffer_stack_top); 02483 02484 if (YY_CURRENT_BUFFER) { 02485 llvmAsm_load_buffer_state( ); 02486 (yy_did_buffer_switch_on_eof) = 1; 02487 } 02488 } 02489 02490 /* Allocates the stack if it does not exist. 02491 * Guarantees space for at least one push. 02492 */ 02493 static void llvmAsmensure_buffer_stack (void) 02494 { 02495 int num_to_alloc; 02496 02497 if (!(yy_buffer_stack)) { 02498 02499 /* First allocation is just for 2 elements, since we don't know if this 02500 * scanner will even need a stack. We use 2 instead of 1 to avoid an 02501 * immediate realloc on the next call. 02502 */ 02503 num_to_alloc = 1; 02504 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc 02505 (num_to_alloc * sizeof(struct yy_buffer_state*) 02506 ); 02507 02508 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 02509 02510 (yy_buffer_stack_max) = num_to_alloc; 02511 (yy_buffer_stack_top) = 0; 02512 return; 02513 } 02514 02515 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 02516 02517 /* Increase the buffer to prepare for a possible push. */ 02518 int grow_size = 8 /* arbitrary grow size */; 02519 02520 num_to_alloc = (yy_buffer_stack_max) + grow_size; 02521 (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc 02522 ((yy_buffer_stack), 02523 num_to_alloc * sizeof(struct yy_buffer_state*) 02524 ); 02525 02526 /* zero only the new slots.*/ 02527 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 02528 (yy_buffer_stack_max) = num_to_alloc; 02529 } 02530 } 02531 02532 /** Setup the input buffer state to scan directly from a user-specified character buffer. 02533 * @param base the character buffer 02534 * @param size the size in bytes of the character buffer 02535 * 02536 * @return the newly allocated buffer state object. 02537 */ 02538 YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size ) 02539 { 02540 YY_BUFFER_STATE b; 02541 02542 if ( size < 2 || 02543 base[size-2] != YY_END_OF_BUFFER_CHAR || 02544 base[size-1] != YY_END_OF_BUFFER_CHAR ) 02545 /* They forgot to leave room for the EOB's. */ 02546 return 0; 02547 02548 b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) ); 02549 if ( ! b ) 02550 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" ); 02551 02552 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 02553 b->yy_buf_pos = b->yy_ch_buf = base; 02554 b->yy_is_our_buffer = 0; 02555 b->yy_input_file = 0; 02556 b->yy_n_chars = b->yy_buf_size; 02557 b->yy_is_interactive = 0; 02558 b->yy_at_bol = 1; 02559 b->yy_fill_buffer = 0; 02560 b->yy_buffer_status = YY_BUFFER_NEW; 02561 02562 llvmAsm_switch_to_buffer(b ); 02563 02564 return b; 02565 } 02566 02567 /** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will 02568 * scan from a @e copy of @a str. 02569 * @param yystr a NUL-terminated string to scan 02570 * 02571 * @return the newly allocated buffer state object. 02572 * @note If you want to scan bytes that may contain NUL values, then use 02573 * llvmAsm_scan_bytes() instead. 02574 */ 02575 YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr ) 02576 { 02577 02578 return llvmAsm_scan_bytes(yystr,strlen(yystr) ); 02579 } 02580 02581 /** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will 02582 * scan from a @e copy of @a bytes. 02583 * @param bytes the byte buffer to scan 02584 * @param len the number of bytes in the buffer pointed to by @a bytes. 02585 * 02586 * @return the newly allocated buffer state object. 02587 */ 02588 YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 02589 { 02590 YY_BUFFER_STATE b; 02591 char *buf; 02592 yy_size_t n; 02593 int i; 02594 02595 /* Get memory for full buffer, including space for trailing EOB's. */ 02596 n = _yybytes_len + 2; 02597 buf = (char *) llvmAsmalloc(n ); 02598 if ( ! buf ) 02599 YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" ); 02600 02601 for ( i = 0; i < _yybytes_len; ++i ) 02602 buf[i] = yybytes[i]; 02603 02604 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 02605 02606 b = llvmAsm_scan_buffer(buf,n ); 02607 if ( ! b ) 02608 YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" ); 02609 02610 /* It's okay to grow etc. this buffer, and we should throw it 02611 * away when we're done. 02612 */ 02613 b->yy_is_our_buffer = 1; 02614 02615 return b; 02616 } 02617 02618 #ifndef YY_EXIT_FAILURE 02619 #define YY_EXIT_FAILURE 2 02620 #endif 02621 02622 static void yy_fatal_error (yyconst char* msg ) 02623 { 02624 (void) fprintf( stderr, "%s\n", msg ); 02625 exit( YY_EXIT_FAILURE ); 02626 } 02627 02628 /* Redefine yyless() so it works in section 3 code. */ 02629 02630 #undef yyless 02631 #define yyless(n) \ 02632 do \ 02633 { \ 02634 /* Undo effects of setting up llvmAsmtext. */ \ 02635 int yyless_macro_arg = (n); \ 02636 YY_LESS_LINENO(yyless_macro_arg);\ 02637 llvmAsmtext[llvmAsmleng] = (yy_hold_char); \ 02638 (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \ 02639 (yy_hold_char) = *(yy_c_buf_p); \ 02640 *(yy_c_buf_p) = '\0'; \ 02641 llvmAsmleng = yyless_macro_arg; \ 02642 } \ 02643 while ( 0 ) 02644 02645 /* Accessor methods (get/set functions) to struct members. */ 02646 02647 /** Get the current line number. 02648 * 02649 */ 02650 int llvmAsmget_lineno (void) 02651 { 02652 02653 return llvmAsmlineno; 02654 } 02655 02656 /** Get the input stream. 02657 * 02658 */ 02659 FILE *llvmAsmget_in (void) 02660 { 02661 return llvmAsmin; 02662 } 02663 02664 /** Get the output stream. 02665 * 02666 */ 02667 FILE *llvmAsmget_out (void) 02668 { 02669 return llvmAsmout; 02670 } 02671 02672 /** Get the length of the current token. 02673 * 02674 */ 02675 int llvmAsmget_leng (void) 02676 { 02677 return llvmAsmleng; 02678 } 02679 02680 /** Get the current token. 02681 * 02682 */ 02683 02684 char *llvmAsmget_text (void) 02685 { 02686 return llvmAsmtext; 02687 } 02688 02689 /** Set the current line number. 02690 * @param line_number 02691 * 02692 */ 02693 void llvmAsmset_lineno (int line_number ) 02694 { 02695 02696 llvmAsmlineno = line_number; 02697 } 02698 02699 /** Set the input stream. This does not discard the current 02700 * input buffer. 02701 * @param in_str A readable stream. 02702 * 02703 * @see llvmAsm_switch_to_buffer 02704 */ 02705 void llvmAsmset_in (FILE * in_str ) 02706 { 02707 llvmAsmin = in_str ; 02708 } 02709 02710 void llvmAsmset_out (FILE * out_str ) 02711 { 02712 llvmAsmout = out_str ; 02713 } 02714 02715 int llvmAsmget_debug (void) 02716 { 02717 return llvmAsm_flex_debug; 02718 } 02719 02720 void llvmAsmset_debug (int bdebug ) 02721 { 02722 llvmAsm_flex_debug = bdebug ; 02723 } 02724 02725 static int yy_init_globals (void) 02726 { 02727 /* Initialization is the same as for the non-reentrant scanner. 02728 * This function is called from llvmAsmlex_destroy(), so don't allocate here. 02729 */ 02730 02731 /* We do not touch llvmAsmlineno unless the option is enabled. */ 02732 llvmAsmlineno = 1; 02733 02734 (yy_buffer_stack) = 0; 02735 (yy_buffer_stack_top) = 0; 02736 (yy_buffer_stack_max) = 0; 02737 (yy_c_buf_p) = (char *) 0; 02738 (yy_init) = 0; 02739 (yy_start) = 0; 02740 02741 /* Defined in main.c */ 02742 #ifdef YY_STDINIT 02743 llvmAsmin = stdin; 02744 llvmAsmout = stdout; 02745 #else 02746 llvmAsmin = (FILE *) 0; 02747 llvmAsmout = (FILE *) 0; 02748 #endif 02749 02750 /* For future reference: Set errno on error, since we are called by 02751 * llvmAsmlex_init() 02752 */ 02753 return 0; 02754 } 02755 02756 /* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */ 02757 int llvmAsmlex_destroy (void) 02758 { 02759 02760 /* Pop the buffer stack, destroying each element. */ 02761 while(YY_CURRENT_BUFFER){ 02762 llvmAsm_delete_buffer(YY_CURRENT_BUFFER ); 02763 YY_CURRENT_BUFFER_LVALUE = NULL; 02764 llvmAsmpop_buffer_state(); 02765 } 02766 02767 /* Destroy the stack itself. */ 02768 llvmAsmfree((yy_buffer_stack) ); 02769 (yy_buffer_stack) = NULL; 02770 02771 /* Reset the globals. This is important in a non-reentrant scanner so the next time 02772 * llvmAsmlex() is called, initialization will occur. */ 02773 yy_init_globals( ); 02774 02775 return 0; 02776 } 02777 02778 /* 02779 * Internal utility routines. 02780 */ 02781 02782 #ifndef yytext_ptr 02783 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 02784 { 02785 register int i; 02786 for ( i = 0; i < n; ++i ) 02787 s1[i] = s2[i]; 02788 } 02789 #endif 02790 02791 #ifdef YY_NEED_STRLEN 02792 static int yy_flex_strlen (yyconst char * s ) 02793 { 02794 register int n; 02795 for ( n = 0; s[n]; ++n ) 02796 ; 02797 02798 return n; 02799 } 02800 #endif 02801 02802 void *llvmAsmalloc (yy_size_t size ) 02803 { 02804 return (void *) malloc( size ); 02805 } 02806 02807 void *llvmAsmrealloc (void * ptr, yy_size_t size ) 02808 { 02809 /* The cast to (char *) in the following accommodates both 02810 * implementations that use char* generic pointers, and those 02811 * that use void* generic pointers. It works with the latter 02812 * because both ANSI C and C++ allow castless assignment from 02813 * any pointer type to void*, and deal with argument conversions 02814 * as though doing an assignment. 02815 */ 02816 return (void *) realloc( (char *) ptr, size ); 02817 } 02818 02819 void llvmAsmfree (void * ptr ) 02820 { 02821 free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */ 02822 } 02823 02824 #define YYTABLES_NAME "yytables" 02825 02826 #line 357 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/Lexer.l" 02827 02828 02829 02830