Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1 | #line 2 "Lexer.cpp" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3 | #line 4 "Lexer.cpp" |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 4 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 5 | #define YY_INT_ALIGNED short int |
| 6 | |
| 7 | /* A lexical scanner generated by flex */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 8 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 9 | #define FLEX_SCANNER |
| 10 | #define YY_FLEX_MAJOR_VERSION 2 |
| 11 | #define YY_FLEX_MINOR_VERSION 5 |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 12 | #define YY_FLEX_SUBMINOR_VERSION 33 |
| 13 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
| 14 | #define FLEX_BETA |
| 15 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 16 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 17 | /* First, we deal with platform-specific or compiler-specific issues. */ |
| 18 | |
| 19 | /* begin standard C headers. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 20 | #include <stdio.h> |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 21 | #include <string.h> |
| 22 | #include <errno.h> |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 23 | #include <stdlib.h> |
| 24 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 25 | /* end standard C headers. */ |
| 26 | |
| 27 | /* flex integer type definitions */ |
| 28 | |
| 29 | #ifndef FLEXINT_H |
| 30 | #define FLEXINT_H |
| 31 | |
| 32 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
| 33 | |
| 34 | #if __STDC_VERSION__ >= 199901L |
| 35 | |
| 36 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
| 37 | * if you want the limit (max/min) macros for int types. |
| 38 | */ |
| 39 | #ifndef __STDC_LIMIT_MACROS |
| 40 | #define __STDC_LIMIT_MACROS 1 |
| 41 | #endif |
| 42 | |
| 43 | #include <inttypes.h> |
| 44 | typedef int8_t flex_int8_t; |
| 45 | typedef uint8_t flex_uint8_t; |
| 46 | typedef int16_t flex_int16_t; |
| 47 | typedef uint16_t flex_uint16_t; |
| 48 | typedef int32_t flex_int32_t; |
| 49 | typedef uint32_t flex_uint32_t; |
| 50 | #else |
| 51 | typedef signed char flex_int8_t; |
| 52 | typedef short int flex_int16_t; |
| 53 | typedef int flex_int32_t; |
| 54 | typedef unsigned char flex_uint8_t; |
| 55 | typedef unsigned short int flex_uint16_t; |
| 56 | typedef unsigned int flex_uint32_t; |
| 57 | #endif /* ! C99 */ |
| 58 | |
| 59 | /* Limits of integral types. */ |
| 60 | #ifndef INT8_MIN |
| 61 | #define INT8_MIN (-128) |
| 62 | #endif |
| 63 | #ifndef INT16_MIN |
| 64 | #define INT16_MIN (-32767-1) |
| 65 | #endif |
| 66 | #ifndef INT32_MIN |
| 67 | #define INT32_MIN (-2147483647-1) |
| 68 | #endif |
| 69 | #ifndef INT8_MAX |
| 70 | #define INT8_MAX (127) |
| 71 | #endif |
| 72 | #ifndef INT16_MAX |
| 73 | #define INT16_MAX (32767) |
| 74 | #endif |
| 75 | #ifndef INT32_MAX |
| 76 | #define INT32_MAX (2147483647) |
| 77 | #endif |
| 78 | #ifndef UINT8_MAX |
| 79 | #define UINT8_MAX (255U) |
| 80 | #endif |
| 81 | #ifndef UINT16_MAX |
| 82 | #define UINT16_MAX (65535U) |
| 83 | #endif |
| 84 | #ifndef UINT32_MAX |
| 85 | #define UINT32_MAX (4294967295U) |
| 86 | #endif |
| 87 | |
| 88 | #endif /* ! FLEXINT_H */ |
| 89 | |
| 90 | #ifdef __cplusplus |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 91 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 92 | /* The "const" storage-class-modifier is valid. */ |
| 93 | #define YY_USE_CONST |
| 94 | |
| 95 | #else /* ! __cplusplus */ |
| 96 | |
| 97 | #if __STDC__ |
| 98 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 99 | #define YY_USE_CONST |
| 100 | |
| 101 | #endif /* __STDC__ */ |
| 102 | #endif /* ! __cplusplus */ |
| 103 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 104 | #ifdef YY_USE_CONST |
| 105 | #define yyconst const |
| 106 | #else |
| 107 | #define yyconst |
| 108 | #endif |
| 109 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 110 | /* Returned upon end-of-file. */ |
| 111 | #define YY_NULL 0 |
| 112 | |
| 113 | /* Promotes a possibly negative, possibly signed char to an unsigned |
| 114 | * integer for use as an array index. If the signed char is negative, |
| 115 | * we want to instead treat it as an 8-bit unsigned char, hence the |
| 116 | * double cast. |
| 117 | */ |
| 118 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
| 119 | |
| 120 | /* Enter a start condition. This macro really ought to take a parameter, |
| 121 | * but we do it the disgusting crufty way forced on us by the ()-less |
| 122 | * definition of BEGIN. |
| 123 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 124 | #define BEGIN (yy_start) = 1 + 2 * |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 125 | |
| 126 | /* Translate the current start state into a value that can be later handed |
| 127 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
| 128 | * compatibility. |
| 129 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 130 | #define YY_START (((yy_start) - 1) / 2) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 131 | #define YYSTATE YY_START |
| 132 | |
| 133 | /* Action number for EOF rule of a given start state. */ |
| 134 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
| 135 | |
| 136 | /* Special action meaning "start processing a new file". */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 137 | #define YY_NEW_FILE llvmAsmrestart(llvmAsmin ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 138 | |
| 139 | #define YY_END_OF_BUFFER_CHAR 0 |
| 140 | |
| 141 | /* Size of default input buffer. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 142 | #ifndef YY_BUF_SIZE |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 143 | #define YY_BUF_SIZE (16384*64) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 144 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 145 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 146 | /* The state buf must be large enough to hold one state per character in the main buffer. |
| 147 | */ |
| 148 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
| 149 | |
| 150 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
| 151 | #define YY_TYPEDEF_YY_BUFFER_STATE |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 152 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 153 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 154 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 155 | extern int llvmAsmleng; |
| 156 | |
| 157 | extern FILE *llvmAsmin, *llvmAsmout; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 158 | |
| 159 | #define EOB_ACT_CONTINUE_SCAN 0 |
| 160 | #define EOB_ACT_END_OF_FILE 1 |
| 161 | #define EOB_ACT_LAST_MATCH 2 |
| 162 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 163 | /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
| 164 | * access to the local variable yy_act. Since yyless() is a macro, it would break |
| 165 | * existing scanners that call yyless() from OUTSIDE llvmAsmlex. |
| 166 | * One obvious solution it to make yy_act a global. I tried that, and saw |
| 167 | * a 5% performance hit in a non-llvmAsmlineno scanner, because yy_act is |
| 168 | * normally declared as a register variable-- so it is not worth it. |
| 169 | */ |
| 170 | #define YY_LESS_LINENO(n) \ |
| 171 | do { \ |
| 172 | int yyl;\ |
| 173 | for ( yyl = n; yyl < llvmAsmleng; ++yyl )\ |
| 174 | if ( llvmAsmtext[yyl] == '\n' )\ |
| 175 | --llvmAsmlineno;\ |
| 176 | }while(0) |
| 177 | |
| 178 | /* Return all but the first "n" matched characters back to the input stream. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 179 | #define yyless(n) \ |
| 180 | do \ |
| 181 | { \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 182 | /* Undo effects of setting up llvmAsmtext. */ \ |
| 183 | int yyless_macro_arg = (n); \ |
| 184 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 185 | *yy_cp = (yy_hold_char); \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 186 | YY_RESTORE_YY_MORE_OFFSET \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 187 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
| 188 | YY_DO_BEFORE_ACTION; /* set up llvmAsmtext again */ \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 189 | } \ |
| 190 | while ( 0 ) |
| 191 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 192 | #define unput(c) yyunput( c, (yytext_ptr) ) |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 193 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 194 | /* The following is because we cannot portably get our hands on size_t |
| 195 | * (without autoconf's help, which isn't available because we want |
| 196 | * flex-generated scanners to compile on their own). |
| 197 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 198 | |
| 199 | #ifndef YY_TYPEDEF_YY_SIZE_T |
| 200 | #define YY_TYPEDEF_YY_SIZE_T |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 201 | typedef unsigned int yy_size_t; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 202 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 203 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 204 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
| 205 | #define YY_STRUCT_YY_BUFFER_STATE |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 206 | struct yy_buffer_state |
| 207 | { |
| 208 | FILE *yy_input_file; |
| 209 | |
| 210 | char *yy_ch_buf; /* input buffer */ |
| 211 | char *yy_buf_pos; /* current position in input buffer */ |
| 212 | |
| 213 | /* Size of input buffer in bytes, not including room for EOB |
| 214 | * characters. |
| 215 | */ |
| 216 | yy_size_t yy_buf_size; |
| 217 | |
| 218 | /* Number of characters read into yy_ch_buf, not including EOB |
| 219 | * characters. |
| 220 | */ |
| 221 | int yy_n_chars; |
| 222 | |
| 223 | /* Whether we "own" the buffer - i.e., we know we created it, |
| 224 | * and can realloc() it to grow it, and should free() it to |
| 225 | * delete it. |
| 226 | */ |
| 227 | int yy_is_our_buffer; |
| 228 | |
| 229 | /* Whether this is an "interactive" input source; if so, and |
| 230 | * if we're using stdio for input, then we want to use getc() |
| 231 | * instead of fread(), to make sure we stop fetching input after |
| 232 | * each newline. |
| 233 | */ |
| 234 | int yy_is_interactive; |
| 235 | |
| 236 | /* Whether we're considered to be at the beginning of a line. |
| 237 | * If so, '^' rules will be active on the next match, otherwise |
| 238 | * not. |
| 239 | */ |
| 240 | int yy_at_bol; |
| 241 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 242 | int yy_bs_lineno; /**< The line count. */ |
| 243 | int yy_bs_column; /**< The column count. */ |
| 244 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 245 | /* Whether to try to fill the input buffer when we reach the |
| 246 | * end of it. |
| 247 | */ |
| 248 | int yy_fill_buffer; |
| 249 | |
| 250 | int yy_buffer_status; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 251 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 252 | #define YY_BUFFER_NEW 0 |
| 253 | #define YY_BUFFER_NORMAL 1 |
| 254 | /* When an EOF's been seen but there's still some text to process |
| 255 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
| 256 | * shouldn't try reading from the input source any more. We might |
| 257 | * still have a bunch of tokens to match, though, because of |
| 258 | * possible backing-up. |
| 259 | * |
| 260 | * When we actually see the EOF, we change the status to "new" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 261 | * (via llvmAsmrestart()), so that the user can continue scanning by |
| 262 | * just pointing llvmAsmin at a new input file. |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 263 | */ |
| 264 | #define YY_BUFFER_EOF_PENDING 2 |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 265 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 266 | }; |
| 267 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
| 268 | |
| 269 | /* Stack of input buffers. */ |
| 270 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
| 271 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
| 272 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 273 | |
| 274 | /* We provide macros for accessing buffer states in case in the |
| 275 | * future we want to put the buffer states in a more general |
| 276 | * "scanner state". |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 277 | * |
| 278 | * Returns the top of the stack, or NULL. |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 279 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 280 | #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ |
| 281 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ |
| 282 | : NULL) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 283 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 284 | /* Same as previous macro, but useful when we know that the buffer stack is not |
| 285 | * NULL or when we need an lvalue. For internal use only. |
| 286 | */ |
| 287 | #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 288 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 289 | /* yy_hold_char holds the character lost when llvmAsmtext is formed. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 290 | static char yy_hold_char; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 291 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 292 | int llvmAsmleng; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 293 | |
| 294 | /* Points to current character in buffer. */ |
| 295 | static char *yy_c_buf_p = (char *) 0; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 296 | static int yy_init = 0; /* whether we need to initialize */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 297 | static int yy_start = 0; /* start state number */ |
| 298 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 299 | /* Flag which is used to allow llvmAsmwrap()'s to do buffer switches |
| 300 | * instead of setting up a fresh llvmAsmin. A bit of a hack ... |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 301 | */ |
| 302 | static int yy_did_buffer_switch_on_eof; |
| 303 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 304 | void llvmAsmrestart (FILE *input_file ); |
| 305 | void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer ); |
| 306 | YY_BUFFER_STATE llvmAsm_create_buffer (FILE *file,int size ); |
| 307 | void llvmAsm_delete_buffer (YY_BUFFER_STATE b ); |
| 308 | void llvmAsm_flush_buffer (YY_BUFFER_STATE b ); |
| 309 | void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer ); |
| 310 | void llvmAsmpop_buffer_state (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 311 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 312 | static void llvmAsmensure_buffer_stack (void ); |
| 313 | static void llvmAsm_load_buffer_state (void ); |
| 314 | static void llvmAsm_init_buffer (YY_BUFFER_STATE b,FILE *file ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 315 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 316 | #define YY_FLUSH_BUFFER llvmAsm_flush_buffer(YY_CURRENT_BUFFER ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 317 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 318 | YY_BUFFER_STATE llvmAsm_scan_buffer (char *base,yy_size_t size ); |
| 319 | YY_BUFFER_STATE llvmAsm_scan_string (yyconst char *yy_str ); |
| 320 | YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char *bytes,int len ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 321 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 322 | void *llvmAsmalloc (yy_size_t ); |
| 323 | void *llvmAsmrealloc (void *,yy_size_t ); |
| 324 | void llvmAsmfree (void * ); |
| 325 | |
| 326 | #define yy_new_buffer llvmAsm_create_buffer |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 327 | |
| 328 | #define yy_set_interactive(is_interactive) \ |
| 329 | { \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 330 | if ( ! YY_CURRENT_BUFFER ){ \ |
| 331 | llvmAsmensure_buffer_stack (); \ |
| 332 | YY_CURRENT_BUFFER_LVALUE = \ |
| 333 | llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \ |
| 334 | } \ |
| 335 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 336 | } |
| 337 | |
| 338 | #define yy_set_bol(at_bol) \ |
| 339 | { \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 340 | if ( ! YY_CURRENT_BUFFER ){\ |
| 341 | llvmAsmensure_buffer_stack (); \ |
| 342 | YY_CURRENT_BUFFER_LVALUE = \ |
| 343 | llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); \ |
| 344 | } \ |
| 345 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 346 | } |
| 347 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 348 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 349 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 350 | /* Begin user sect3 */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 351 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 352 | #define llvmAsmwrap(n) 1 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 353 | #define YY_SKIP_YYWRAP |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 354 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 355 | typedef unsigned char YY_CHAR; |
| 356 | |
| 357 | FILE *llvmAsmin = (FILE *) 0, *llvmAsmout = (FILE *) 0; |
| 358 | |
| 359 | typedef int yy_state_type; |
| 360 | |
| 361 | extern int llvmAsmlineno; |
| 362 | |
| 363 | int llvmAsmlineno = 1; |
| 364 | |
| 365 | extern char *llvmAsmtext; |
| 366 | #define yytext_ptr llvmAsmtext |
| 367 | |
| 368 | static yy_state_type yy_get_previous_state (void ); |
| 369 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); |
| 370 | static int yy_get_next_buffer (void ); |
| 371 | static void yy_fatal_error (yyconst char msg[] ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 372 | |
| 373 | /* Done after the current pattern has been matched and before the |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 374 | * corresponding action - sets up llvmAsmtext. |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 375 | */ |
| 376 | #define YY_DO_BEFORE_ACTION \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 377 | (yytext_ptr) = yy_bp; \ |
| 378 | llvmAsmleng = (size_t) (yy_cp - yy_bp); \ |
| 379 | (yy_hold_char) = *yy_cp; \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 380 | *yy_cp = '\0'; \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 381 | (yy_c_buf_p) = yy_cp; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 382 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 383 | #define YY_NUM_RULES 137 |
| 384 | #define YY_END_OF_BUFFER 138 |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 385 | /* This struct is not used in this scanner, |
| 386 | but its presence is necessary. */ |
| 387 | struct yy_trans_info |
| 388 | { |
| 389 | flex_int32_t yy_verify; |
| 390 | flex_int32_t yy_nxt; |
| 391 | }; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 392 | static yyconst flex_int16_t yy_accept[552] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 393 | { 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 394 | 0, 0, 138, 136, 135, 135, 136, 136, 136, 136, |
| 395 | 136, 136, 128, 128, 1, 136, 136, 136, 136, 136, |
| 396 | 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, |
| 397 | 136, 136, 136, 136, 136, 136, 136, 136, 0, 126, |
| 398 | 0, 124, 122, 131, 0, 129, 0, 133, 128, 0, |
| 399 | 1, 0, 123, 132, 0, 0, 0, 0, 0, 0, |
| 400 | 0, 108, 0, 37, 0, 0, 0, 0, 0, 0, |
| 401 | 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 402 | 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, |
| 403 | 0, 72, 0, 0, 0, 0, 0, 0, 0, 67, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 404 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 405 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 406 | 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, |
| 407 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 408 | 0, 0, 126, 122, 133, 21, 133, 0, 134, 0, |
| 409 | 127, 123, 54, 0, 0, 66, 0, 0, 35, 0, |
| 410 | 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 411 | 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, |
| 412 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 413 | 0, 0, 0, 0, 0, 56, 0, 0, 0, 81, |
| 414 | 86, 84, 85, 83, 82, 0, 87, 91, 0, 107, |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 415 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 416 | 0, 0, 0, 0, 0, 76, 74, 63, 0, 0, |
| 417 | 0, 75, 73, 0, 0, 55, 0, 0, 0, 0, |
| 418 | 0, 0, 0, 0, 89, 80, 78, 0, 79, 77, |
| 419 | 0, 90, 88, 0, 0, 0, 0, 0, 0, 0, |
| 420 | 0, 68, 0, 0, 125, 133, 0, 0, 0, 133, |
| 421 | 0, 0, 0, 0, 65, 0, 0, 92, 0, 0, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 422 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 423 | 0, 70, 59, 0, 0, 0, 0, 115, 62, 0, |
| 424 | 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, |
| 425 | 116, 64, 0, 0, 0, 0, 23, 0, 0, 130, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 426 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 427 | 58, 0, 0, 95, 0, 0, 0, 61, 44, 0, |
| 428 | 0, 25, 0, 0, 0, 4, 0, 51, 57, 0, |
| 429 | 0, 0, 0, 60, 0, 47, 0, 12, 0, 0, |
| 430 | 94, 133, 33, 31, 0, 0, 2, 0, 0, 0, |
| 431 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, |
| 432 | 0, 48, 97, 0, 0, 0, 0, 0, 0, 43, |
| 433 | 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, |
| 434 | 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, |
| 435 | 0, 0, 93, 0, 22, 0, 0, 0, 0, 0, |
| 436 | 0, 0, 114, 0, 0, 40, 0, 0, 0, 7, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 437 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 438 | 0, 0, 0, 49, 0, 0, 39, 101, 100, 0, |
| 439 | 0, 8, 16, 0, 0, 0, 110, 0, 113, 34, |
| 440 | 0, 0, 52, 0, 0, 105, 0, 0, 99, 109, |
| 441 | 26, 0, 27, 98, 0, 111, 106, 0, 0, 0, |
| 442 | 0, 0, 104, 0, 0, 6, 28, 0, 0, 0, |
| 443 | 0, 0, 96, 0, 0, 0, 0, 0, 0, 0, |
| 444 | 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, |
| 445 | 0, 9, 0, 0, 0, 0, 18, 0, 0, 0, |
| 446 | 10, 102, 11, 46, 45, 103, 0, 0, 0, 0, |
| 447 | 30, 0, 0, 0, 13, 0, 15, 14, 0, 0, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 448 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 449 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, |
| 450 | 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, |
| 451 | 0, 17, 0, 0, 0, 0, 0, 112, 0, 0, |
| 452 | 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, |
| 453 | 118, 120, 121, 0, 41, 0, 119, 42, 0, 20, |
| 454 | 0 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 455 | } ; |
| 456 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 457 | static yyconst flex_int32_t yy_ec[256] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 458 | { 0, |
| 459 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
| 460 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, |
| 461 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 462 | 1, 2, 1, 4, 1, 5, 6, 1, 1, 1, |
Reid Spencer | a54b7cb | 2007-01-12 07:05:14 +0000 | [diff] [blame] | 463 | 1, 1, 7, 1, 8, 9, 1, 10, 11, 11, |
| 464 | 11, 11, 11, 12, 11, 13, 11, 14, 15, 1, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 465 | 1, 1, 1, 16, 17, 17, 17, 17, 18, 17, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 466 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 467 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 468 | 1, 1, 1, 1, 19, 1, 20, 21, 22, 23, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 469 | |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 470 | 24, 25, 26, 27, 28, 5, 29, 30, 31, 32, |
| 471 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, |
| 472 | 43, 44, 1, 1, 1, 1, 1, 1, 1, 1, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 473 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 474 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 475 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 476 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 477 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 478 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 479 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 480 | |
| 481 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 482 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 483 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 484 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 485 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 486 | 1, 1, 1, 1, 1 |
| 487 | } ; |
| 488 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 489 | static yyconst flex_int32_t yy_meta[45] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 490 | { 0, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 491 | 1, 1, 2, 3, 4, 1, 1, 4, 4, 4, |
| 492 | 4, 4, 4, 5, 1, 1, 4, 4, 4, 4, |
| 493 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
| 494 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, |
| 495 | 4, 4, 4, 4 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 496 | } ; |
| 497 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 498 | static yyconst flex_int16_t yy_base[560] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 499 | { 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 500 | 0, 0, 1201, 1202, 1202, 1202, 1196, 1185, 35, 39, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 501 | 43, 49, 55, 61, 0, 72, 64, 67, 66, 86, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 502 | 76, 106, 91, 65, 133, 121, 117, 99, 152, 95, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 503 | 78, 179, 137, 211, 139, 90, 148, 93, 1194, 1202, |
| 504 | 1183, 1202, 0, 49, 185, 217, 116, 238, 254, 259, |
| 505 | 0, 1192, 0, 200, 125, 149, 146, 153, 177, 63, |
| 506 | 154, 1181, 160, 161, 208, 185, 264, 171, 113, 210, |
| 507 | 1180, 222, 260, 228, 186, 261, 271, 110, 273, 274, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 508 | 230, 289, 277, 278, 240, 290, 292, 205, 291, 232, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 509 | 296, 1179, 299, 303, 305, 306, 310, 313, 309, 318, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 510 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 511 | 311, 314, 317, 322, 328, 329, 338, 331, 335, 339, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 512 | 333, 332, 346, 340, 352, 355, 1178, 358, 360, 361, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 513 | 364, 368, 365, 369, 381, 376, 382, 388, 367, 396, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 514 | 384, 395, 1177, 0, 414, 1176, 429, 447, 0, 1185, |
| 515 | 1202, 0, 1174, 409, 397, 1173, 420, 414, 1172, 405, |
| 516 | 399, 422, 1171, 442, 431, 449, 432, 450, 437, 452, |
| 517 | 456, 1170, 457, 435, 459, 460, 461, 465, 370, 469, |
| 518 | 468, 472, 470, 475, 473, 476, 489, 490, 492, 494, |
| 519 | 481, 497, 495, 502, 498, 1169, 503, 501, 505, 1168, |
| 520 | 1167, 1166, 1165, 1164, 1163, 507, 1162, 1161, 508, 1160, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 521 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 522 | 537, 512, 515, 510, 525, 1159, 1158, 1157, 516, 542, |
| 523 | 531, 1156, 1155, 537, 529, 1154, 553, 555, 231, 556, |
| 524 | 558, 557, 559, 560, 1153, 1152, 1151, 562, 1150, 1149, |
| 525 | 563, 1148, 1147, 564, 565, 509, 524, 576, 582, 568, |
| 526 | 584, 1146, 572, 570, 1202, 599, 608, 614, 618, 623, |
| 527 | 608, 624, 592, 625, 1145, 626, 587, 1144, 627, 628, |
| 528 | 629, 630, 632, 633, 634, 637, 639, 638, 640, 580, |
| 529 | 641, 1143, 1142, 648, 651, 653, 656, 1141, 1140, 657, |
| 530 | 658, 659, 1139, 665, 661, 663, 667, 674, 666, 668, |
| 531 | 1138, 1137, 671, 679, 670, 680, 1136, 684, 691, 0, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 532 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 533 | 1135, 688, 692, 1134, 693, 696, 697, 1133, 1132, 701, |
| 534 | 705, 1131, 712, 714, 699, 1130, 716, 1129, 1128, 717, |
| 535 | 718, 719, 703, 1127, 723, 1126, 726, 1125, 730, 732, |
| 536 | 1124, 737, 1123, 1122, 731, 738, 1121, 739, 740, 743, |
| 537 | 751, 742, 744, 752, 755, 756, 758, 760, 761, 1120, |
| 538 | 763, 1119, 1118, 765, 766, 767, 772, 770, 773, 1117, |
| 539 | 774, 777, 781, 783, 1116, 784, 788, 787, 789, 790, |
| 540 | 799, 792, 794, 800, 803, 805, 807, 1115, 808, 810, |
| 541 | 811, 812, 1114, 815, 1113, 817, 823, 818, 826, 831, |
| 542 | 828, 829, 1112, 836, 833, 1111, 838, 698, 839, 1110, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 543 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 544 | 841, 842, 843, 1109, 848, 844, 1108, 1107, 1106, 851, |
| 545 | 846, 1105, 1104, 845, 860, 858, 1103, 865, 1102, 1101, |
| 546 | 867, 869, 1100, 870, 872, 1099, 871, 874, 1098, 1097, |
| 547 | 1096, 875, 1095, 1094, 878, 1093, 1092, 876, 877, 884, |
| 548 | 883, 886, 1091, 879, 894, 1090, 1089, 895, 896, 898, |
| 549 | 899, 901, 1088, 902, 905, 906, 907, 909, 908, 914, |
| 550 | 910, 1087, 916, 920, 924, 927, 928, 931, 935, 932, |
| 551 | 936, 1086, 937, 939, 941, 944, 1085, 945, 946, 947, |
| 552 | 1074, 1064, 1063, 1062, 1061, 1060, 949, 950, 951, 953, |
| 553 | 1059, 966, 967, 968, 1058, 952, 1057, 1056, 969, 971, |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 554 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 555 | 972, 977, 978, 979, 980, 983, 984, 985, 987, 1055, |
| 556 | 989, 991, 992, 995, 997, 1053, 1000, 1007, 998, 1002, |
| 557 | 1009, 1049, 1010, 1011, 1013, 1015, 1016, 1046, 1022, 1019, |
| 558 | 1023, 1024, 1026, 1028, 1029, 1045, 1033, 1036, 371, 1030, |
| 559 | 599, 522, 474, 1039, 434, 1040, 282, 279, 1043, 244, |
| 560 | 1202, 1079, 1081, 212, 1086, 1089, 167, 1093, 108 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 561 | } ; |
| 562 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 563 | static yyconst flex_int16_t yy_def[560] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 564 | { 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 565 | 551, 1, 551, 551, 551, 551, 552, 553, 554, 551, |
| 566 | 553, 553, 553, 553, 555, 556, 553, 553, 553, 553, |
| 567 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 568 | 553, 553, 553, 553, 553, 553, 553, 553, 552, 551, |
| 569 | 553, 551, 557, 551, 551, 553, 553, 553, 553, 553, |
| 570 | 555, 558, 559, 551, 553, 553, 553, 553, 553, 553, |
| 571 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 572 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 573 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 574 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 575 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 576 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 577 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 578 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 579 | 553, 553, 551, 557, 551, 553, 553, 553, 50, 558, |
| 580 | 551, 559, 553, 553, 553, 553, 553, 553, 553, 553, |
| 581 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 582 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 583 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 584 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 585 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 586 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 587 | 50, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 588 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 589 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 590 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 591 | 553, 553, 553, 553, 551, 551, 551, 551, 553, 553, |
| 592 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 593 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 594 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 595 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 596 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 201, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 597 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 598 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 599 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 600 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 601 | 553, 551, 553, 553, 553, 553, 553, 553, 553, 553, |
| 602 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 603 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 604 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 605 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 606 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 607 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 608 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 609 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 610 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 611 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 612 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 613 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 614 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 615 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 616 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 617 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 618 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 619 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 620 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 621 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 622 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 623 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 624 | 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, |
| 625 | 0, 551, 551, 551, 551, 551, 551, 551, 551 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 626 | } ; |
| 627 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 628 | static yyconst flex_int16_t yy_nxt[1247] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 629 | { 0, |
| 630 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 631 | 14, 14, 14, 4, 15, 16, 8, 8, 8, 17, |
| 632 | 18, 19, 20, 21, 22, 23, 24, 25, 8, 26, |
| 633 | 27, 28, 29, 30, 8, 31, 32, 33, 34, 35, |
| 634 | 36, 37, 8, 38, 44, 44, 44, 44, 45, 45, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 635 | 45, 45, 46, 46, 46, 46, 42, 47, 44, 44, |
| 636 | 44, 44, 42, 48, 49, 49, 49, 49, 42, 48, |
| 637 | 49, 49, 49, 49, 42, 52, 42, 42, 42, 42, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 638 | 42, 54, 54, 54, 54, 63, 55, 64, 150, 42, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 639 | 60, 42, 81, 56, 61, 57, 50, 58, 65, 42, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 640 | |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 641 | 59, 103, 62, 42, 42, 66, 42, 70, 42, 67, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 642 | 71, 142, 42, 129, 79, 68, 132, 72, 69, 42, |
| 643 | 80, 101, 92, 42, 136, 73, 42, 74, 75, 42, |
| 644 | 42, 93, 102, 171, 42, 76, 89, 94, 42, 77, |
| 645 | 85, 78, 82, 82, 82, 82, 42, 143, 86, 90, |
| 646 | 42, 161, 42, 87, 83, 91, 115, 88, 127, 42, |
| 647 | 130, 42, 42, 116, 84, 42, 42, 42, 146, 117, |
| 648 | 134, 128, 118, 42, 42, 95, 144, 96, 145, 119, |
| 649 | 131, 97, 153, 98, 42, 99, 147, 100, 104, 152, |
| 650 | 42, 151, 42, 135, 45, 45, 45, 45, 42, 42, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 651 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 652 | 160, 105, 106, 148, 107, 108, 109, 149, 110, 54, |
| 653 | 54, 54, 54, 167, 111, 43, 112, 113, 42, 114, |
| 654 | 104, 42, 156, 42, 42, 48, 46, 46, 46, 46, |
| 655 | 42, 183, 162, 120, 121, 42, 122, 154, 123, 155, |
| 656 | 124, 42, 125, 42, 42, 42, 126, 137, 137, 137, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 657 | 137, 42, 174, 42, 185, 138, 313, 42, 166, 163, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 658 | 180, 138, 48, 49, 49, 49, 49, 42, 139, 139, |
| 659 | 139, 139, 42, 42, 42, 139, 139, 42, 139, 139, |
| 660 | 139, 139, 139, 139, 42, 157, 42, 42, 158, 164, |
| 661 | 42, 42, 42, 168, 169, 42, 165, 159, 82, 82, |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 662 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 663 | 82, 82, 42, 42, 42, 42, 173, 175, 170, 42, |
| 664 | 172, 182, 42, 176, 177, 178, 42, 179, 42, 42, |
| 665 | 184, 181, 42, 42, 42, 186, 42, 42, 196, 191, |
| 666 | 42, 42, 189, 193, 187, 42, 195, 188, 198, 190, |
| 667 | 197, 42, 42, 192, 42, 42, 42, 194, 42, 199, |
| 668 | 203, 42, 42, 42, 200, 202, 214, 210, 204, 42, |
| 669 | 208, 206, 212, 201, 215, 42, 216, 217, 42, 209, |
| 670 | 205, 42, 211, 42, 42, 207, 213, 42, 42, 218, |
| 671 | 42, 42, 42, 42, 42, 221, 240, 219, 224, 42, |
| 672 | 220, 226, 229, 223, 42, 42, 222, 42, 225, 236, |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 673 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 674 | 237, 42, 228, 231, 232, 227, 230, 241, 42, 42, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 675 | 42, 275, 42, 233, 546, 238, 234, 239, 42, 242, |
| 676 | 257, 235, 42, 246, 246, 246, 246, 42, 251, 253, |
| 677 | 243, 247, 256, 42, 252, 42, 244, 247, 137, 137, |
| 678 | 137, 137, 42, 254, 42, 42, 138, 42, 42, 255, |
| 679 | 42, 258, 138, 248, 249, 42, 250, 250, 250, 250, |
| 680 | 42, 262, 42, 42, 259, 42, 264, 260, 261, 42, |
| 681 | 42, 270, 42, 42, 42, 265, 267, 263, 42, 266, |
| 682 | 268, 42, 42, 42, 274, 42, 42, 42, 42, 42, |
| 683 | 281, 278, 269, 272, 42, 280, 271, 282, 279, 284, |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 684 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 685 | 273, 276, 42, 42, 277, 42, 283, 42, 42, 290, |
| 686 | 42, 42, 285, 286, 42, 42, 42, 289, 42, 291, |
| 687 | 42, 42, 42, 42, 288, 42, 295, 287, 42, 42, |
| 688 | 292, 293, 296, 303, 297, 42, 294, 42, 42, 324, |
| 689 | 305, 298, 42, 325, 42, 299, 300, 300, 300, 300, |
| 690 | 42, 301, 302, 300, 300, 42, 300, 300, 300, 300, |
| 691 | 300, 300, 304, 307, 310, 306, 42, 308, 42, 42, |
| 692 | 42, 42, 42, 42, 309, 42, 42, 42, 42, 314, |
| 693 | 316, 42, 318, 42, 312, 42, 321, 322, 317, 42, |
| 694 | 311, 315, 323, 42, 320, 42, 328, 42, 326, 319, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 695 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 696 | 42, 327, 329, 350, 330, 42, 338, 331, 246, 246, |
| 697 | 246, 246, 42, 335, 248, 248, 247, 332, 332, 332, |
| 698 | 332, 42, 247, 332, 332, 332, 332, 250, 250, 250, |
| 699 | 250, 42, 250, 250, 250, 250, 42, 42, 42, 42, |
| 700 | 42, 42, 42, 42, 333, 42, 42, 42, 339, 342, |
| 701 | 42, 42, 42, 42, 42, 334, 336, 337, 341, 349, |
| 702 | 344, 42, 351, 343, 42, 340, 42, 346, 347, 42, |
| 703 | 42, 42, 42, 348, 42, 345, 42, 358, 42, 42, |
| 704 | 42, 42, 359, 42, 42, 352, 357, 42, 353, 354, |
| 705 | 360, 355, 42, 42, 356, 365, 361, 42, 362, 363, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 706 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 707 | 366, 42, 364, 367, 42, 42, 42, 369, 368, 42, |
| 708 | 42, 42, 42, 374, 42, 373, 42, 375, 42, 376, |
| 709 | 370, 377, 371, 372, 378, 42, 379, 42, 382, 42, |
| 710 | 42, 42, 42, 381, 387, 380, 42, 383, 386, 42, |
| 711 | 445, 384, 385, 42, 42, 42, 332, 332, 332, 332, |
| 712 | 393, 42, 42, 42, 390, 42, 42, 42, 388, 392, |
| 713 | 394, 396, 397, 389, 42, 42, 391, 400, 42, 42, |
| 714 | 398, 42, 401, 42, 42, 395, 42, 399, 42, 42, |
| 715 | 42, 404, 406, 42, 407, 42, 42, 42, 402, 403, |
| 716 | 42, 405, 408, 409, 42, 411, 42, 42, 410, 412, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 717 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 718 | 42, 42, 42, 42, 413, 42, 417, 42, 415, 419, |
| 719 | 420, 414, 42, 42, 416, 418, 42, 422, 42, 424, |
| 720 | 42, 42, 423, 42, 42, 42, 425, 421, 42, 428, |
| 721 | 42, 42, 427, 432, 430, 433, 42, 426, 435, 42, |
| 722 | 429, 42, 42, 437, 42, 436, 42, 431, 434, 42, |
| 723 | 439, 42, 42, 438, 42, 42, 42, 42, 42, 42, |
| 724 | 441, 42, 446, 442, 42, 440, 450, 451, 455, 444, |
| 725 | 443, 42, 453, 42, 448, 449, 454, 447, 42, 456, |
| 726 | 42, 452, 42, 42, 42, 42, 458, 42, 42, 42, |
| 727 | 42, 42, 42, 465, 463, 457, 42, 42, 464, 42, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 728 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 729 | 460, 461, 459, 462, 466, 467, 469, 42, 42, 42, |
| 730 | 470, 42, 42, 468, 42, 42, 472, 471, 42, 42, |
| 731 | 42, 42, 42, 42, 478, 479, 473, 42, 477, 42, |
| 732 | 474, 475, 483, 42, 480, 481, 485, 42, 476, 484, |
| 733 | 42, 42, 482, 488, 42, 42, 490, 486, 42, 42, |
| 734 | 42, 491, 42, 489, 42, 487, 493, 42, 42, 42, |
| 735 | 42, 495, 42, 42, 42, 42, 42, 499, 492, 494, |
| 736 | 502, 504, 503, 506, 500, 496, 497, 501, 498, 42, |
| 737 | 42, 42, 42, 505, 42, 42, 508, 507, 511, 510, |
| 738 | 42, 42, 42, 42, 512, 509, 42, 42, 42, 515, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 739 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 740 | 42, 517, 42, 519, 42, 42, 521, 514, 42, 513, |
| 741 | 42, 42, 518, 42, 520, 42, 516, 522, 525, 527, |
| 742 | 42, 523, 42, 42, 42, 524, 42, 529, 42, 42, |
| 743 | 528, 530, 42, 532, 526, 42, 42, 42, 531, 42, |
| 744 | 538, 42, 42, 42, 534, 536, 42, 535, 533, 42, |
| 745 | 539, 537, 42, 42, 544, 540, 42, 545, 42, 42, |
| 746 | 548, 541, 42, 549, 543, 542, 42, 547, 42, 42, |
| 747 | 42, 42, 42, 42, 42, 42, 42, 42, 550, 39, |
| 748 | 39, 39, 39, 39, 41, 41, 51, 42, 51, 51, |
| 749 | 51, 53, 53, 140, 140, 140, 140, 140, 42, 42, |
Reid Spencer | 1431061 | 2006-12-31 05:40:51 +0000 | [diff] [blame] | 750 | |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 751 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 752 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 753 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 754 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 755 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 756 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 757 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
| 758 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 759 | 42, 42, 42, 42, 42, 42, 42, 42, 141, 42, |
| 760 | 245, 42, 42, 42, 42, 141, 42, 133, 42, 40, |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 761 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 762 | 551, 3, 551, 551, 551, 551, 551, 551, 551, 551, |
| 763 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 764 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 765 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 766 | 551, 551, 551, 551, 551, 551 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 767 | } ; |
| 768 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 769 | static yyconst flex_int16_t yy_chk[1247] = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 770 | { 0, |
| 771 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 772 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 773 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 774 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 775 | 1, 1, 1, 1, 9, 9, 9, 9, 10, 10, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 776 | 10, 10, 11, 11, 11, 11, 11, 12, 44, 44, |
| 777 | 44, 44, 12, 13, 13, 13, 13, 13, 13, 14, |
| 778 | 14, 14, 14, 14, 14, 16, 60, 17, 24, 19, |
| 779 | 18, 16, 16, 16, 16, 19, 17, 19, 60, 21, |
| 780 | 18, 31, 24, 17, 18, 17, 13, 17, 19, 20, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 781 | |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 782 | 17, 31, 18, 36, 23, 20, 38, 21, 30, 20, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 783 | 21, 559, 28, 36, 23, 20, 38, 21, 20, 22, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 784 | 23, 30, 28, 78, 47, 22, 69, 22, 22, 47, |
| 785 | 27, 28, 30, 78, 26, 22, 27, 28, 55, 22, |
| 786 | 26, 22, 25, 25, 25, 25, 25, 55, 26, 27, |
| 787 | 33, 69, 35, 26, 25, 27, 33, 26, 35, 57, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 788 | 37, 37, 56, 33, 25, 29, 58, 61, 57, 33, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 789 | 557, 35, 33, 63, 64, 29, 56, 29, 56, 33, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 790 | 37, 29, 64, 29, 68, 29, 58, 29, 32, 63, |
| 791 | 59, 61, 32, 45, 45, 45, 45, 45, 66, 75, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 792 | |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 793 | 68, 32, 32, 59, 32, 32, 32, 59, 32, 54, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 794 | 54, 54, 54, 75, 32, 554, 32, 32, 88, 32, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 795 | 34, 65, 66, 70, 34, 46, 46, 46, 46, 46, |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 796 | 46, 88, 70, 34, 34, 72, 34, 65, 34, 65, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 797 | 34, 74, 34, 81, 219, 90, 34, 48, 48, 48, |
| 798 | 48, 48, 81, 85, 90, 48, 219, 550, 74, 72, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 799 | 85, 48, 49, 49, 49, 49, 49, 49, 50, 50, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 800 | 50, 50, 50, 73, 76, 50, 50, 67, 50, 50, |
| 801 | 50, 50, 50, 50, 77, 67, 79, 80, 67, 73, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 802 | 83, 84, 548, 76, 77, 547, 73, 67, 82, 82, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 803 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 804 | 82, 82, 82, 86, 89, 87, 80, 83, 77, 91, |
| 805 | 79, 87, 93, 84, 84, 84, 94, 84, 95, 96, |
| 806 | 89, 86, 99, 97, 101, 91, 98, 102, 99, 96, |
| 807 | 103, 100, 94, 97, 93, 104, 98, 93, 101, 95, |
| 808 | 100, 105, 106, 96, 108, 112, 111, 97, 109, 102, |
| 809 | 106, 107, 110, 114, 103, 105, 111, 109, 106, 113, |
| 810 | 108, 107, 110, 104, 112, 115, 113, 114, 116, 108, |
| 811 | 106, 118, 109, 119, 120, 107, 110, 121, 123, 115, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 812 | 129, 122, 124, 169, 539, 118, 129, 115, 120, 126, |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 813 | 116, 122, 124, 119, 125, 127, 118, 131, 121, 126, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 814 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 815 | 127, 128, 123, 125, 125, 122, 124, 130, 132, 130, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 816 | 145, 169, 151, 125, 539, 128, 125, 128, 150, 131, |
| 817 | 151, 125, 144, 135, 135, 135, 135, 148, 144, 145, |
| 818 | 132, 135, 150, 147, 144, 152, 132, 135, 137, 137, |
| 819 | 137, 137, 137, 147, 155, 157, 137, 545, 164, 148, |
| 820 | 159, 152, 137, 138, 138, 154, 138, 138, 138, 138, |
| 821 | 138, 157, 156, 158, 154, 160, 159, 155, 156, 161, |
| 822 | 163, 164, 165, 166, 167, 160, 161, 158, 168, 160, |
| 823 | 163, 171, 170, 173, 168, 172, 175, 543, 174, 176, |
| 824 | 173, 171, 163, 166, 181, 172, 165, 174, 171, 176, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 825 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 826 | 167, 170, 177, 178, 170, 179, 175, 180, 183, 181, |
| 827 | 182, 185, 177, 178, 188, 184, 187, 180, 189, 182, |
| 828 | 196, 199, 236, 204, 179, 202, 187, 178, 203, 209, |
| 829 | 183, 184, 188, 204, 189, 542, 185, 237, 205, 236, |
| 830 | 209, 196, 215, 237, 211, 199, 201, 201, 201, 201, |
| 831 | 214, 202, 203, 201, 201, 210, 201, 201, 201, 201, |
| 832 | 201, 201, 205, 211, 215, 210, 217, 214, 218, 220, |
| 833 | 222, 221, 223, 224, 214, 228, 231, 234, 235, 220, |
| 834 | 222, 240, 223, 244, 218, 243, 231, 234, 222, 238, |
| 835 | 217, 221, 235, 270, 228, 239, 240, 241, 238, 224, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 836 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 837 | 257, 239, 241, 270, 243, 253, 257, 244, 246, 246, |
| 838 | 246, 246, 541, 253, 247, 247, 246, 247, 247, 247, |
| 839 | 247, 251, 246, 248, 248, 248, 248, 249, 249, 249, |
| 840 | 249, 249, 250, 250, 250, 250, 250, 252, 254, 256, |
| 841 | 259, 260, 261, 262, 251, 263, 264, 265, 259, 262, |
| 842 | 266, 268, 267, 269, 271, 252, 254, 256, 261, 269, |
| 843 | 264, 274, 271, 263, 275, 260, 276, 266, 267, 277, |
| 844 | 280, 281, 282, 268, 285, 265, 286, 281, 284, 289, |
| 845 | 287, 290, 282, 295, 293, 274, 280, 288, 275, 276, |
| 846 | 284, 276, 294, 296, 277, 289, 285, 298, 286, 287, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 847 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 848 | 290, 302, 288, 293, 299, 303, 305, 295, 294, 306, |
| 849 | 307, 398, 315, 303, 310, 302, 323, 305, 311, 306, |
| 850 | 296, 307, 298, 299, 310, 313, 311, 314, 315, 317, |
| 851 | 320, 321, 322, 314, 323, 313, 325, 317, 322, 327, |
| 852 | 398, 320, 321, 329, 335, 330, 332, 332, 332, 332, |
| 853 | 335, 336, 338, 339, 329, 342, 340, 343, 325, 330, |
| 854 | 336, 339, 340, 327, 341, 344, 329, 343, 345, 346, |
| 855 | 341, 347, 344, 348, 349, 338, 351, 342, 354, 355, |
| 856 | 356, 347, 349, 358, 351, 357, 359, 361, 345, 346, |
| 857 | 362, 348, 354, 355, 363, 357, 364, 366, 356, 358, |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 858 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 859 | 368, 367, 369, 370, 359, 372, 364, 373, 362, 367, |
| 860 | 368, 361, 371, 374, 363, 366, 375, 370, 376, 372, |
| 861 | 377, 379, 371, 380, 381, 382, 373, 369, 384, 376, |
| 862 | 386, 388, 375, 381, 379, 382, 387, 374, 386, 389, |
| 863 | 377, 391, 392, 388, 390, 387, 395, 380, 384, 394, |
| 864 | 390, 397, 399, 389, 401, 402, 403, 406, 414, 411, |
| 865 | 392, 405, 399, 394, 410, 391, 405, 405, 414, 397, |
| 866 | 395, 416, 410, 415, 402, 403, 411, 401, 418, 415, |
| 867 | 421, 406, 422, 424, 427, 425, 418, 428, 432, 438, |
| 868 | 439, 435, 444, 432, 427, 416, 441, 440, 428, 442, |
Chris Lattner | e869eef | 2005-11-12 00:11:49 +0000 | [diff] [blame] | 869 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 870 | 422, 424, 421, 425, 435, 438, 440, 445, 448, 449, |
| 871 | 441, 450, 451, 439, 452, 454, 444, 442, 455, 456, |
| 872 | 457, 459, 458, 461, 452, 454, 445, 460, 451, 463, |
| 873 | 448, 449, 458, 464, 455, 456, 460, 465, 450, 459, |
| 874 | 466, 467, 457, 464, 468, 470, 466, 461, 469, 471, |
| 875 | 473, 467, 474, 465, 475, 463, 469, 476, 478, 479, |
| 876 | 480, 471, 487, 488, 489, 496, 490, 476, 468, 470, |
| 877 | 480, 488, 487, 490, 478, 473, 474, 479, 475, 492, |
| 878 | 493, 494, 499, 489, 500, 501, 493, 492, 499, 496, |
| 879 | 502, 503, 504, 505, 500, 494, 506, 507, 508, 503, |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 880 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 881 | 509, 505, 511, 507, 512, 513, 509, 502, 514, 501, |
| 882 | 515, 519, 506, 517, 508, 520, 504, 511, 514, 517, |
| 883 | 518, 512, 521, 523, 524, 513, 525, 519, 526, 527, |
| 884 | 518, 520, 530, 523, 515, 529, 531, 532, 521, 533, |
| 885 | 530, 534, 535, 540, 525, 527, 537, 526, 524, 538, |
| 886 | 531, 529, 544, 546, 537, 532, 549, 538, 536, 528, |
| 887 | 544, 533, 522, 546, 535, 534, 516, 540, 510, 498, |
| 888 | 497, 495, 491, 486, 485, 484, 483, 482, 549, 552, |
| 889 | 552, 552, 552, 552, 553, 553, 555, 481, 555, 555, |
| 890 | 555, 556, 556, 558, 558, 558, 558, 558, 477, 472, |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 891 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 892 | 462, 453, 447, 446, 443, 437, 436, 434, 433, 431, |
| 893 | 430, 429, 426, 423, 420, 419, 417, 413, 412, 409, |
| 894 | 408, 407, 404, 400, 396, 393, 385, 383, 378, 365, |
| 895 | 360, 353, 352, 350, 337, 334, 333, 331, 328, 326, |
| 896 | 324, 319, 318, 316, 312, 309, 308, 304, 301, 297, |
| 897 | 292, 291, 283, 279, 278, 273, 272, 258, 255, 242, |
| 898 | 233, 232, 230, 229, 227, 226, 225, 216, 213, 212, |
| 899 | 208, 207, 206, 200, 198, 197, 195, 194, 193, 192, |
| 900 | 191, 190, 186, 162, 153, 149, 146, 143, 140, 136, |
| 901 | 133, 117, 92, 71, 62, 52, 41, 39, 8, 7, |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 902 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 903 | 3, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 904 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 905 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 906 | 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, |
| 907 | 551, 551, 551, 551, 551, 551 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 908 | } ; |
| 909 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 910 | /* Table of booleans, true if rule could match eol. */ |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 911 | static yyconst flex_int32_t yy_rule_can_match_eol[138] = |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 912 | { 0, |
| 913 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 914 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 915 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 916 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 917 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 918 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 919 | 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 920 | |
| 921 | static yy_state_type yy_last_accepting_state; |
| 922 | static char *yy_last_accepting_cpos; |
| 923 | |
| 924 | extern int llvmAsm_flex_debug; |
| 925 | int llvmAsm_flex_debug = 0; |
| 926 | |
| 927 | /* The intent behind this definition is that it'll catch |
| 928 | * any uses of REJECT which flex missed. |
| 929 | */ |
| 930 | #define REJECT reject_used_but_not_detected |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 931 | #define yymore() yymore_used_but_not_detected |
| 932 | #define YY_MORE_ADJ 0 |
| 933 | #define YY_RESTORE_YY_MORE_OFFSET |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 934 | char *llvmAsmtext; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 935 | #line 1 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 936 | /*===-- Lexer.l - Scanner for llvm assembly files --------------*- C++ -*--===// |
| 937 | // |
| 938 | // The LLVM Compiler Infrastructure |
| 939 | // |
| 940 | // This file was developed by the LLVM research group and is distributed under |
| 941 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
| 942 | // |
| 943 | //===----------------------------------------------------------------------===// |
| 944 | // |
| 945 | // This file implements the flex scanner for LLVM assembly languages files. |
| 946 | // |
| 947 | //===----------------------------------------------------------------------===*/ |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 948 | #line 28 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 949 | #include "ParserInternals.h" |
| 950 | #include "llvm/Module.h" |
| 951 | #include <list> |
| 952 | #include "llvmAsmParser.h" |
| 953 | #include <cctype> |
| 954 | #include <cstdlib> |
| 955 | |
| 956 | void set_scan_file(FILE * F){ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 957 | llvmAsm_switch_to_buffer(llvmAsm_create_buffer(F,YY_BUF_SIZE ) ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 958 | } |
| 959 | void set_scan_string (const char * str) { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 960 | llvmAsm_scan_string (str); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 961 | } |
| 962 | |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 963 | // Construct a token value for a non-obsolete token |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 964 | #define RET_TOK(type, Enum, sym) \ |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 965 | llvmAsmlval.type = Instruction::Enum; \ |
| 966 | return sym |
| 967 | |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 968 | // Construct a token value for an obsolete token |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 969 | #define RET_TY(CTYPE, SYM) \ |
| 970 | llvmAsmlval.PrimType = CTYPE;\ |
Reid Spencer | 481169e | 2006-12-01 00:33:46 +0000 | [diff] [blame] | 971 | return SYM |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 972 | |
| 973 | namespace llvm { |
| 974 | |
| 975 | // TODO: All of the static identifiers are figured out by the lexer, |
| 976 | // these should be hashed to reduce the lexer size |
| 977 | |
| 978 | |
| 979 | // atoull - Convert an ascii string of decimal digits into the unsigned long |
| 980 | // long representation... this does not have to do input error checking, |
| 981 | // because we know that the input will be matched by a suitable regex... |
| 982 | // |
| 983 | static uint64_t atoull(const char *Buffer) { |
| 984 | uint64_t Result = 0; |
| 985 | for (; *Buffer; Buffer++) { |
| 986 | uint64_t OldRes = Result; |
| 987 | Result *= 10; |
| 988 | Result += *Buffer-'0'; |
| 989 | if (Result < OldRes) // Uh, oh, overflow detected!!! |
Reid Spencer | 61c83e0 | 2006-08-18 08:43:06 +0000 | [diff] [blame] | 990 | GenerateError("constant bigger than 64 bits detected!"); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 991 | } |
| 992 | return Result; |
| 993 | } |
| 994 | |
| 995 | static uint64_t HexIntToVal(const char *Buffer) { |
| 996 | uint64_t Result = 0; |
| 997 | for (; *Buffer; ++Buffer) { |
| 998 | uint64_t OldRes = Result; |
| 999 | Result *= 16; |
| 1000 | char C = *Buffer; |
| 1001 | if (C >= '0' && C <= '9') |
| 1002 | Result += C-'0'; |
| 1003 | else if (C >= 'A' && C <= 'F') |
| 1004 | Result += C-'A'+10; |
| 1005 | else if (C >= 'a' && C <= 'f') |
| 1006 | Result += C-'a'+10; |
| 1007 | |
| 1008 | if (Result < OldRes) // Uh, oh, overflow detected!!! |
Reid Spencer | 61c83e0 | 2006-08-18 08:43:06 +0000 | [diff] [blame] | 1009 | GenerateError("constant bigger than 64 bits detected!"); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1010 | } |
| 1011 | return Result; |
| 1012 | } |
| 1013 | |
| 1014 | |
| 1015 | // HexToFP - Convert the ascii string in hexidecimal format to the floating |
| 1016 | // point representation of it. |
| 1017 | // |
| 1018 | static double HexToFP(const char *Buffer) { |
| 1019 | // Behave nicely in the face of C TBAA rules... see: |
| 1020 | // http://www.nullstone.com/htmls/category/aliastyp.htm |
| 1021 | union { |
| 1022 | uint64_t UI; |
| 1023 | double FP; |
| 1024 | } UIntToFP; |
| 1025 | UIntToFP.UI = HexIntToVal(Buffer); |
| 1026 | |
| 1027 | assert(sizeof(double) == sizeof(uint64_t) && |
| 1028 | "Data sizes incompatible on this target!"); |
| 1029 | return UIntToFP.FP; // Cast Hex constant to double |
| 1030 | } |
| 1031 | |
| 1032 | |
| 1033 | // UnEscapeLexed - Run through the specified buffer and change \xx codes to the |
| 1034 | // appropriate character. If AllowNull is set to false, a \00 value will cause |
| 1035 | // an exception to be thrown. |
| 1036 | // |
| 1037 | // If AllowNull is set to true, the return value of the function points to the |
| 1038 | // last character of the string in memory. |
| 1039 | // |
| 1040 | char *UnEscapeLexed(char *Buffer, bool AllowNull) { |
| 1041 | char *BOut = Buffer; |
| 1042 | for (char *BIn = Buffer; *BIn; ) { |
| 1043 | if (BIn[0] == '\\' && isxdigit(BIn[1]) && isxdigit(BIn[2])) { |
| 1044 | char Tmp = BIn[3]; BIn[3] = 0; // Terminate string |
| 1045 | *BOut = (char)strtol(BIn+1, 0, 16); // Convert to number |
| 1046 | if (!AllowNull && !*BOut) |
Reid Spencer | 61c83e0 | 2006-08-18 08:43:06 +0000 | [diff] [blame] | 1047 | GenerateError("String literal cannot accept \\00 escape!"); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1048 | |
| 1049 | BIn[3] = Tmp; // Restore character |
| 1050 | BIn += 3; // Skip over handled chars |
| 1051 | ++BOut; |
| 1052 | } else { |
| 1053 | *BOut++ = *BIn++; |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | return BOut; |
| 1058 | } |
| 1059 | |
| 1060 | } // End llvm namespace |
| 1061 | |
| 1062 | using namespace llvm; |
| 1063 | |
| 1064 | #define YY_NEVER_INTERACTIVE 1 |
| 1065 | /* Comments start with a ; and go till end of line */ |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1066 | /* Local Values and Type identifiers start with a % sign */ |
| 1067 | /* Global Value identifiers start with an @ sign */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1068 | /* Label identifiers end with a colon */ |
| 1069 | /* Quoted names can contain any character except " and \ */ |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1070 | /* LocalVarID/GlobalVarID: match an unnamed local variable slot ID. */ |
| 1071 | /* Integer types are specified with i and a bitwidth */ |
| 1072 | /* E[PN]Integer: match positive and negative literal integer values. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1073 | /* FPConstant - A Floating point constant. |
| 1074 | */ |
| 1075 | /* HexFPConstant - Floating point constant represented in IEEE format as a |
| 1076 | * hexadecimal number for when exponential notation is not precise enough. |
| 1077 | */ |
| 1078 | /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing |
| 1079 | * it to deal with 64 bit numbers. |
| 1080 | */ |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1081 | #line 1082 "Lexer.cpp" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1082 | |
| 1083 | #define INITIAL 0 |
| 1084 | |
| 1085 | #ifndef YY_NO_UNISTD_H |
| 1086 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
| 1087 | * down here because we want the user's section 1 to have been scanned first. |
| 1088 | * The user has a chance to override it with an option. |
| 1089 | */ |
| 1090 | #include <unistd.h> |
| 1091 | #endif |
| 1092 | |
| 1093 | #ifndef YY_EXTRA_TYPE |
| 1094 | #define YY_EXTRA_TYPE void * |
| 1095 | #endif |
| 1096 | |
| 1097 | static int yy_init_globals (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1098 | |
| 1099 | /* Macros after this point can all be overridden by user definitions in |
| 1100 | * section 1. |
| 1101 | */ |
| 1102 | |
| 1103 | #ifndef YY_SKIP_YYWRAP |
| 1104 | #ifdef __cplusplus |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1105 | extern "C" int llvmAsmwrap (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1106 | #else |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1107 | extern int llvmAsmwrap (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1108 | #endif |
| 1109 | #endif |
| 1110 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1111 | static inline void yyunput (int c,char *buf_ptr ); |
| 1112 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1113 | #ifndef yytext_ptr |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1114 | static void yy_flex_strncpy (char *,yyconst char *,int ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1115 | #endif |
| 1116 | |
| 1117 | #ifdef YY_NEED_STRLEN |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1118 | static int yy_flex_strlen (yyconst char * ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1119 | #endif |
| 1120 | |
| 1121 | #ifndef YY_NO_INPUT |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1122 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1123 | #ifdef __cplusplus |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1124 | static int yyinput (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1125 | #else |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1126 | static int input (void ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1127 | #endif |
| 1128 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1129 | #endif |
| 1130 | |
| 1131 | /* Amount of stuff to slurp up with each read. */ |
| 1132 | #ifndef YY_READ_BUF_SIZE |
| 1133 | #define YY_READ_BUF_SIZE 8192 |
| 1134 | #endif |
| 1135 | |
| 1136 | /* Copy whatever the last rule matched to the standard output. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1137 | #ifndef ECHO |
| 1138 | /* This used to be an fputs(), but since the string might contain NUL's, |
| 1139 | * we now use fwrite(). |
| 1140 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1141 | #define ECHO (void) fwrite( llvmAsmtext, llvmAsmleng, 1, llvmAsmout ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1142 | #endif |
| 1143 | |
| 1144 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
| 1145 | * is returned in "result". |
| 1146 | */ |
| 1147 | #ifndef YY_INPUT |
| 1148 | #define YY_INPUT(buf,result,max_size) \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1149 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1150 | { \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1151 | int c = '*'; \ |
| 1152 | size_t n; \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1153 | for ( n = 0; n < max_size && \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1154 | (c = getc( llvmAsmin )) != EOF && c != '\n'; ++n ) \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1155 | buf[n] = (char) c; \ |
| 1156 | if ( c == '\n' ) \ |
| 1157 | buf[n++] = (char) c; \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1158 | if ( c == EOF && ferror( llvmAsmin ) ) \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1159 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1160 | result = n; \ |
| 1161 | } \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1162 | else \ |
| 1163 | { \ |
| 1164 | errno=0; \ |
| 1165 | while ( (result = fread(buf, 1, max_size, llvmAsmin))==0 && ferror(llvmAsmin)) \ |
| 1166 | { \ |
| 1167 | if( errno != EINTR) \ |
| 1168 | { \ |
| 1169 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
| 1170 | break; \ |
| 1171 | } \ |
| 1172 | errno=0; \ |
| 1173 | clearerr(llvmAsmin); \ |
| 1174 | } \ |
| 1175 | }\ |
| 1176 | \ |
| 1177 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1178 | #endif |
| 1179 | |
| 1180 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
| 1181 | * we don't want an extra ';' after the "return" because that will cause |
| 1182 | * some compilers to complain about unreachable statements. |
| 1183 | */ |
| 1184 | #ifndef yyterminate |
| 1185 | #define yyterminate() return YY_NULL |
| 1186 | #endif |
| 1187 | |
| 1188 | /* Number of entries by which start-condition stack grows. */ |
| 1189 | #ifndef YY_START_STACK_INCR |
| 1190 | #define YY_START_STACK_INCR 25 |
| 1191 | #endif |
| 1192 | |
| 1193 | /* Report a fatal error. */ |
| 1194 | #ifndef YY_FATAL_ERROR |
| 1195 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
| 1196 | #endif |
| 1197 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1198 | /* end tables serialization structures and prototypes */ |
| 1199 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1200 | /* Default declaration of generated scanner - a define so the user can |
| 1201 | * easily add parameters. |
| 1202 | */ |
| 1203 | #ifndef YY_DECL |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1204 | #define YY_DECL_IS_OURS 1 |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1205 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1206 | extern int llvmAsmlex (void); |
| 1207 | |
| 1208 | #define YY_DECL int llvmAsmlex (void) |
| 1209 | #endif /* !YY_DECL */ |
| 1210 | |
| 1211 | /* Code executed at the beginning of each rule, after llvmAsmtext and llvmAsmleng |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1212 | * have been set up. |
| 1213 | */ |
| 1214 | #ifndef YY_USER_ACTION |
| 1215 | #define YY_USER_ACTION |
| 1216 | #endif |
| 1217 | |
| 1218 | /* Code executed at the end of each rule. */ |
| 1219 | #ifndef YY_BREAK |
| 1220 | #define YY_BREAK break; |
| 1221 | #endif |
| 1222 | |
| 1223 | #define YY_RULE_SETUP \ |
| 1224 | YY_USER_ACTION |
| 1225 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1226 | /** The main scanner function which does all the work. |
| 1227 | */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1228 | YY_DECL |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1229 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1230 | register yy_state_type yy_current_state; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1231 | register char *yy_cp, *yy_bp; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1232 | register int yy_act; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1233 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1234 | #line 190 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1235 | |
| 1236 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1237 | #line 1238 "Lexer.cpp" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1238 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1239 | if ( !(yy_init) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1240 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1241 | (yy_init) = 1; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1242 | |
| 1243 | #ifdef YY_USER_INIT |
| 1244 | YY_USER_INIT; |
| 1245 | #endif |
| 1246 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1247 | if ( ! (yy_start) ) |
| 1248 | (yy_start) = 1; /* first start state */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1249 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1250 | if ( ! llvmAsmin ) |
| 1251 | llvmAsmin = stdin; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1252 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1253 | if ( ! llvmAsmout ) |
| 1254 | llvmAsmout = stdout; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1255 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1256 | if ( ! YY_CURRENT_BUFFER ) { |
| 1257 | llvmAsmensure_buffer_stack (); |
| 1258 | YY_CURRENT_BUFFER_LVALUE = |
| 1259 | llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); |
| 1260 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1261 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1262 | llvmAsm_load_buffer_state( ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1263 | } |
| 1264 | |
| 1265 | while ( 1 ) /* loops until end-of-file is reached */ |
| 1266 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1267 | yy_cp = (yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1268 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1269 | /* Support of llvmAsmtext. */ |
| 1270 | *yy_cp = (yy_hold_char); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1271 | |
| 1272 | /* yy_bp points to the position in yy_ch_buf of the start of |
| 1273 | * the current run. |
| 1274 | */ |
| 1275 | yy_bp = yy_cp; |
| 1276 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1277 | yy_current_state = (yy_start); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1278 | yy_match: |
| 1279 | do |
| 1280 | { |
| 1281 | register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1282 | if ( yy_accept[yy_current_state] ) |
| 1283 | { |
| 1284 | (yy_last_accepting_state) = yy_current_state; |
| 1285 | (yy_last_accepting_cpos) = yy_cp; |
| 1286 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1287 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 1288 | { |
| 1289 | yy_current_state = (int) yy_def[yy_current_state]; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1290 | if ( yy_current_state >= 552 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1291 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 1292 | } |
| 1293 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1294 | ++yy_cp; |
| 1295 | } |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1296 | while ( yy_current_state != 551 ); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1297 | yy_cp = (yy_last_accepting_cpos); |
| 1298 | yy_current_state = (yy_last_accepting_state); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1299 | |
| 1300 | yy_find_action: |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1301 | yy_act = yy_accept[yy_current_state]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1302 | |
| 1303 | YY_DO_BEFORE_ACTION; |
| 1304 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1305 | if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1306 | { |
| 1307 | int yyl; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1308 | for ( yyl = 0; yyl < llvmAsmleng; ++yyl ) |
| 1309 | if ( llvmAsmtext[yyl] == '\n' ) |
| 1310 | |
| 1311 | llvmAsmlineno++; |
| 1312 | ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1313 | } |
| 1314 | |
| 1315 | do_action: /* This label is used only to access EOF actions. */ |
| 1316 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1317 | switch ( yy_act ) |
| 1318 | { /* beginning of action switch */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1319 | case 0: /* must back up */ |
| 1320 | /* undo the effects of YY_DO_BEFORE_ACTION */ |
| 1321 | *yy_cp = (yy_hold_char); |
| 1322 | yy_cp = (yy_last_accepting_cpos); |
| 1323 | yy_current_state = (yy_last_accepting_state); |
| 1324 | goto yy_find_action; |
| 1325 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1326 | case 1: |
| 1327 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1328 | #line 192 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1329 | { /* Ignore comments for now */ } |
| 1330 | YY_BREAK |
| 1331 | case 2: |
| 1332 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1333 | #line 194 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1334 | { return BEGINTOK; } |
| 1335 | YY_BREAK |
| 1336 | case 3: |
| 1337 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1338 | #line 195 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1339 | { return ENDTOK; } |
| 1340 | YY_BREAK |
| 1341 | case 4: |
| 1342 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1343 | #line 196 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1344 | { return TRUETOK; } |
| 1345 | YY_BREAK |
| 1346 | case 5: |
| 1347 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1348 | #line 197 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1349 | { return FALSETOK; } |
| 1350 | YY_BREAK |
| 1351 | case 6: |
| 1352 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1353 | #line 198 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1354 | { return DECLARE; } |
| 1355 | YY_BREAK |
| 1356 | case 7: |
| 1357 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1358 | #line 199 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1359 | { return DEFINE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1360 | YY_BREAK |
| 1361 | case 8: |
| 1362 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1363 | #line 200 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1364 | { return GLOBAL; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1365 | YY_BREAK |
| 1366 | case 9: |
| 1367 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1368 | #line 201 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1369 | { return CONSTANT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1370 | YY_BREAK |
| 1371 | case 10: |
| 1372 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1373 | #line 202 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1374 | { return INTERNAL; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1375 | YY_BREAK |
| 1376 | case 11: |
| 1377 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1378 | #line 203 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1379 | { return LINKONCE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1380 | YY_BREAK |
| 1381 | case 12: |
| 1382 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1383 | #line 204 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1384 | { return WEAK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1385 | YY_BREAK |
| 1386 | case 13: |
| 1387 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1388 | #line 205 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1389 | { return APPENDING; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1390 | YY_BREAK |
| 1391 | case 14: |
| 1392 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1393 | #line 206 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1394 | { return DLLIMPORT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1395 | YY_BREAK |
| 1396 | case 15: |
| 1397 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1398 | #line 207 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 1399 | { return DLLEXPORT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1400 | YY_BREAK |
| 1401 | case 16: |
| 1402 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1403 | #line 208 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 178a352 | 2007-01-12 19:22:51 +0000 | [diff] [blame] | 1404 | { return HIDDEN; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1405 | YY_BREAK |
| 1406 | case 17: |
| 1407 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1408 | #line 209 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 178a352 | 2007-01-12 19:22:51 +0000 | [diff] [blame] | 1409 | { return EXTERN_WEAK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1410 | YY_BREAK |
| 1411 | case 18: |
| 1412 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1413 | #line 210 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 178a352 | 2007-01-12 19:22:51 +0000 | [diff] [blame] | 1414 | { return EXTERNAL; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1415 | YY_BREAK |
| 1416 | case 19: |
| 1417 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1418 | #line 211 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1419 | { return THREAD_LOCAL; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1420 | YY_BREAK |
| 1421 | case 20: |
| 1422 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1423 | #line 212 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1424 | { return ZEROINITIALIZER; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1425 | YY_BREAK |
| 1426 | case 21: |
| 1427 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1428 | #line 213 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1429 | { return DOTDOTDOT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1430 | YY_BREAK |
| 1431 | case 22: |
| 1432 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1433 | #line 214 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1434 | { return UNDEF; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1435 | YY_BREAK |
| 1436 | case 23: |
| 1437 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1438 | #line 215 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1439 | { return NULL_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1440 | YY_BREAK |
| 1441 | case 24: |
| 1442 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1443 | #line 216 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1444 | { return TO; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1445 | YY_BREAK |
| 1446 | case 25: |
| 1447 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1448 | #line 217 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1449 | { return TAIL; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1450 | YY_BREAK |
| 1451 | case 26: |
| 1452 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1453 | #line 218 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1454 | { return TARGET; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1455 | YY_BREAK |
| 1456 | case 27: |
| 1457 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1458 | #line 219 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1459 | { return TRIPLE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1460 | YY_BREAK |
| 1461 | case 28: |
| 1462 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1463 | #line 220 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1464 | { return DEPLIBS; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1465 | YY_BREAK |
| 1466 | case 29: |
| 1467 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1468 | #line 221 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1469 | { return DATALAYOUT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1470 | YY_BREAK |
| 1471 | case 30: |
| 1472 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1473 | #line 222 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1474 | { return VOLATILE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1475 | YY_BREAK |
| 1476 | case 31: |
| 1477 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1478 | #line 223 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1479 | { return ALIGN; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1480 | YY_BREAK |
| 1481 | case 32: |
| 1482 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1483 | #line 224 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1484 | { return SECTION; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1485 | YY_BREAK |
| 1486 | case 33: |
| 1487 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1488 | #line 225 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1489 | { return ALIAS; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1490 | YY_BREAK |
| 1491 | case 34: |
| 1492 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1493 | #line 226 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1494 | { return MODULE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1495 | YY_BREAK |
| 1496 | case 35: |
| 1497 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1498 | #line 227 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1499 | { return ASM_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1500 | YY_BREAK |
| 1501 | case 36: |
| 1502 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1503 | #line 228 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1504 | { return SIDEEFFECT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1505 | YY_BREAK |
| 1506 | case 37: |
| 1507 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1508 | #line 230 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1509 | { return CC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1510 | YY_BREAK |
| 1511 | case 38: |
| 1512 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1513 | #line 231 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1514 | { return CCC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1515 | YY_BREAK |
| 1516 | case 39: |
| 1517 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1518 | #line 232 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1519 | { return FASTCC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1520 | YY_BREAK |
| 1521 | case 40: |
| 1522 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1523 | #line 233 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1524 | { return COLDCC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1525 | YY_BREAK |
| 1526 | case 41: |
| 1527 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1528 | #line 234 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1529 | { return X86_STDCALLCC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1530 | YY_BREAK |
| 1531 | case 42: |
| 1532 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1533 | #line 235 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1534 | { return X86_FASTCALLCC_TOK; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1535 | YY_BREAK |
| 1536 | case 43: |
| 1537 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1538 | #line 237 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1539 | { return INREG; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1540 | YY_BREAK |
| 1541 | case 44: |
| 1542 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1543 | #line 238 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1544 | { return SRET; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1545 | YY_BREAK |
| 1546 | case 45: |
| 1547 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1548 | #line 239 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1549 | { return NOUNWIND; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1550 | YY_BREAK |
| 1551 | case 46: |
| 1552 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1553 | #line 240 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1554 | { return NORETURN; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1555 | YY_BREAK |
| 1556 | case 47: |
| 1557 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1558 | #line 242 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1559 | { RET_TY(Type::VoidTy, VOID); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1560 | YY_BREAK |
| 1561 | case 48: |
| 1562 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1563 | #line 243 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1564 | { RET_TY(Type::FloatTy, FLOAT); } |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 1565 | YY_BREAK |
| 1566 | case 49: |
| 1567 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1568 | #line 244 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1569 | { RET_TY(Type::DoubleTy,DOUBLE);} |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 1570 | YY_BREAK |
| 1571 | case 50: |
| 1572 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1573 | #line 245 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1574 | { RET_TY(Type::LabelTy, LABEL); } |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 1575 | YY_BREAK |
| 1576 | case 51: |
| 1577 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1578 | #line 246 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1579 | { return TYPE; } |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1580 | YY_BREAK |
| 1581 | case 52: |
| 1582 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1583 | #line 247 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1584 | { return OPAQUE; } |
| 1585 | YY_BREAK |
| 1586 | case 53: |
| 1587 | YY_RULE_SETUP |
| 1588 | #line 248 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1589 | { uint64_t NumBits = atoull(llvmAsmtext+1); |
Reid Spencer | a54b7cb | 2007-01-12 07:05:14 +0000 | [diff] [blame] | 1590 | if (NumBits < IntegerType::MIN_INT_BITS || |
| 1591 | NumBits > IntegerType::MAX_INT_BITS) |
| 1592 | GenerateError("Bitwidth for integer type out of range!"); |
| 1593 | const Type* Ty = IntegerType::get(NumBits); |
| 1594 | RET_TY(Ty, INTTYPE); |
| 1595 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1596 | YY_BREAK |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 1597 | case 54: |
| 1598 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1599 | #line 256 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1600 | { RET_TOK(BinaryOpVal, Add, ADD); } |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 1601 | YY_BREAK |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1602 | case 55: |
| 1603 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1604 | #line 257 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1605 | { RET_TOK(BinaryOpVal, Sub, SUB); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1606 | YY_BREAK |
| 1607 | case 56: |
| 1608 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1609 | #line 258 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1610 | { RET_TOK(BinaryOpVal, Mul, MUL); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1611 | YY_BREAK |
| 1612 | case 57: |
| 1613 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1614 | #line 259 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1615 | { RET_TOK(BinaryOpVal, UDiv, UDIV); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1616 | YY_BREAK |
| 1617 | case 58: |
| 1618 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1619 | #line 260 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1620 | { RET_TOK(BinaryOpVal, SDiv, SDIV); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1621 | YY_BREAK |
| 1622 | case 59: |
| 1623 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1624 | #line 261 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1625 | { RET_TOK(BinaryOpVal, FDiv, FDIV); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1626 | YY_BREAK |
| 1627 | case 60: |
| 1628 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1629 | #line 262 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1630 | { RET_TOK(BinaryOpVal, URem, UREM); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1631 | YY_BREAK |
| 1632 | case 61: |
| 1633 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1634 | #line 263 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1635 | { RET_TOK(BinaryOpVal, SRem, SREM); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1636 | YY_BREAK |
| 1637 | case 62: |
| 1638 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1639 | #line 264 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1640 | { RET_TOK(BinaryOpVal, FRem, FREM); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1641 | YY_BREAK |
| 1642 | case 63: |
| 1643 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1644 | #line 265 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1645 | { RET_TOK(BinaryOpVal, Shl, SHL); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1646 | YY_BREAK |
| 1647 | case 64: |
| 1648 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1649 | #line 266 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1650 | { RET_TOK(BinaryOpVal, LShr, LSHR); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1651 | YY_BREAK |
| 1652 | case 65: |
| 1653 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1654 | #line 267 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1655 | { RET_TOK(BinaryOpVal, AShr, ASHR); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1656 | YY_BREAK |
| 1657 | case 66: |
| 1658 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1659 | #line 268 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1660 | { RET_TOK(BinaryOpVal, And, AND); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1661 | YY_BREAK |
| 1662 | case 67: |
| 1663 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1664 | #line 269 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1665 | { RET_TOK(BinaryOpVal, Or , OR ); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1666 | YY_BREAK |
| 1667 | case 68: |
| 1668 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1669 | #line 270 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1670 | { RET_TOK(BinaryOpVal, Xor, XOR); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1671 | YY_BREAK |
| 1672 | case 69: |
| 1673 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1674 | #line 271 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1675 | { RET_TOK(OtherOpVal, ICmp, ICMP); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1676 | YY_BREAK |
| 1677 | case 70: |
| 1678 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1679 | #line 272 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1680 | { RET_TOK(OtherOpVal, FCmp, FCMP); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1681 | YY_BREAK |
| 1682 | case 71: |
| 1683 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1684 | #line 274 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1685 | { return EQ; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1686 | YY_BREAK |
| 1687 | case 72: |
| 1688 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1689 | #line 275 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1690 | { return NE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1691 | YY_BREAK |
| 1692 | case 73: |
| 1693 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1694 | #line 276 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1695 | { return SLT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1696 | YY_BREAK |
| 1697 | case 74: |
| 1698 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1699 | #line 277 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1700 | { return SGT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1701 | YY_BREAK |
| 1702 | case 75: |
| 1703 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1704 | #line 278 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1705 | { return SLE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1706 | YY_BREAK |
| 1707 | case 76: |
| 1708 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1709 | #line 279 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1710 | { return SGE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1711 | YY_BREAK |
| 1712 | case 77: |
| 1713 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1714 | #line 280 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1715 | { return ULT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1716 | YY_BREAK |
| 1717 | case 78: |
| 1718 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1719 | #line 281 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1720 | { return UGT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1721 | YY_BREAK |
| 1722 | case 79: |
| 1723 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1724 | #line 282 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1725 | { return ULE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1726 | YY_BREAK |
| 1727 | case 80: |
| 1728 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1729 | #line 283 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1730 | { return UGE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1731 | YY_BREAK |
| 1732 | case 81: |
| 1733 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1734 | #line 284 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1735 | { return OEQ; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1736 | YY_BREAK |
| 1737 | case 82: |
| 1738 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1739 | #line 285 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1740 | { return ONE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1741 | YY_BREAK |
| 1742 | case 83: |
| 1743 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1744 | #line 286 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1745 | { return OLT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1746 | YY_BREAK |
| 1747 | case 84: |
| 1748 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1749 | #line 287 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1750 | { return OGT; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1751 | YY_BREAK |
| 1752 | case 85: |
| 1753 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1754 | #line 288 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1755 | { return OLE; } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1756 | YY_BREAK |
| 1757 | case 86: |
| 1758 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1759 | #line 289 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1760 | { return OGE; } |
Nate Begeman | 14b0529 | 2005-11-05 09:21:28 +0000 | [diff] [blame] | 1761 | YY_BREAK |
| 1762 | case 87: |
| 1763 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1764 | #line 290 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1765 | { return ORD; } |
Chris Lattner | e869eef | 2005-11-12 00:11:49 +0000 | [diff] [blame] | 1766 | YY_BREAK |
| 1767 | case 88: |
| 1768 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1769 | #line 291 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1770 | { return UNO; } |
Robert Bocchino | 9c62b56 | 2006-01-10 19:04:32 +0000 | [diff] [blame] | 1771 | YY_BREAK |
| 1772 | case 89: |
| 1773 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1774 | #line 292 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1775 | { return UEQ; } |
Robert Bocchino | 2def1b3 | 2006-01-17 20:06:25 +0000 | [diff] [blame] | 1776 | YY_BREAK |
| 1777 | case 90: |
| 1778 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1779 | #line 293 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1780 | { return UNE; } |
Chris Lattner | 8335e84 | 2006-01-23 23:05:42 +0000 | [diff] [blame] | 1781 | YY_BREAK |
| 1782 | case 91: |
| 1783 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1784 | #line 295 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1785 | { RET_TOK(OtherOpVal, PHI, PHI_TOK); } |
Chris Lattner | 6631601 | 2006-01-24 04:14:29 +0000 | [diff] [blame] | 1786 | YY_BREAK |
| 1787 | case 92: |
| 1788 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1789 | #line 296 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1790 | { RET_TOK(OtherOpVal, Call, CALL); } |
Chris Lattner | 0e9c376 | 2006-01-25 22:27:16 +0000 | [diff] [blame] | 1791 | YY_BREAK |
| 1792 | case 93: |
| 1793 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1794 | #line 297 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1795 | { RET_TOK(CastOpVal, Trunc, TRUNC); } |
Chris Lattner | d5efe84 | 2006-04-08 01:18:56 +0000 | [diff] [blame] | 1796 | YY_BREAK |
| 1797 | case 94: |
| 1798 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1799 | #line 298 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1800 | { RET_TOK(CastOpVal, ZExt, ZEXT); } |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 1801 | YY_BREAK |
| 1802 | case 95: |
| 1803 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1804 | #line 299 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1805 | { RET_TOK(CastOpVal, SExt, SEXT); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1806 | YY_BREAK |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 1807 | case 96: |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1808 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1809 | #line 300 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1810 | { RET_TOK(CastOpVal, FPTrunc, FPTRUNC); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1811 | YY_BREAK |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 1812 | case 97: |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1813 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1814 | #line 301 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1815 | { RET_TOK(CastOpVal, FPExt, FPEXT); } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1816 | YY_BREAK |
Chris Lattner | 7546619 | 2006-05-19 21:28:53 +0000 | [diff] [blame] | 1817 | case 98: |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1818 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1819 | #line 302 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1820 | { RET_TOK(CastOpVal, UIToFP, UITOFP); } |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 1821 | YY_BREAK |
| 1822 | case 99: |
| 1823 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1824 | #line 303 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1825 | { RET_TOK(CastOpVal, SIToFP, SITOFP); } |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 1826 | YY_BREAK |
| 1827 | case 100: |
| 1828 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1829 | #line 304 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1830 | { RET_TOK(CastOpVal, FPToUI, FPTOUI); } |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1831 | YY_BREAK |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 1832 | case 101: |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1833 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1834 | #line 305 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1835 | { RET_TOK(CastOpVal, FPToSI, FPTOSI); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1836 | YY_BREAK |
| 1837 | case 102: |
| 1838 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1839 | #line 306 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1840 | { RET_TOK(CastOpVal, IntToPtr, INTTOPTR); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1841 | YY_BREAK |
| 1842 | case 103: |
| 1843 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1844 | #line 307 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1845 | { RET_TOK(CastOpVal, PtrToInt, PTRTOINT); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1846 | YY_BREAK |
| 1847 | case 104: |
| 1848 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1849 | #line 308 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1850 | { RET_TOK(CastOpVal, BitCast, BITCAST); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1851 | YY_BREAK |
| 1852 | case 105: |
| 1853 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1854 | #line 309 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1855 | { RET_TOK(OtherOpVal, Select, SELECT); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1856 | YY_BREAK |
| 1857 | case 106: |
| 1858 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1859 | #line 310 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1860 | { RET_TOK(OtherOpVal, VAArg , VAARG); } |
Reid Spencer | 3ed469c | 2006-11-02 20:25:50 +0000 | [diff] [blame] | 1861 | YY_BREAK |
| 1862 | case 107: |
| 1863 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1864 | #line 311 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1865 | { RET_TOK(TermOpVal, Ret, RET); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1866 | YY_BREAK |
| 1867 | case 108: |
| 1868 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1869 | #line 312 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1870 | { RET_TOK(TermOpVal, Br, BR); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1871 | YY_BREAK |
| 1872 | case 109: |
| 1873 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1874 | #line 313 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1875 | { RET_TOK(TermOpVal, Switch, SWITCH); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1876 | YY_BREAK |
| 1877 | case 110: |
| 1878 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1879 | #line 314 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1880 | { RET_TOK(TermOpVal, Invoke, INVOKE); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1881 | YY_BREAK |
| 1882 | case 111: |
| 1883 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1884 | #line 315 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1885 | { RET_TOK(TermOpVal, Unwind, UNWIND); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1886 | YY_BREAK |
| 1887 | case 112: |
| 1888 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1889 | #line 316 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1890 | { RET_TOK(TermOpVal, Unreachable, UNREACHABLE); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1891 | YY_BREAK |
| 1892 | case 113: |
| 1893 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1894 | #line 318 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1895 | { RET_TOK(MemOpVal, Malloc, MALLOC); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1896 | YY_BREAK |
| 1897 | case 114: |
| 1898 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1899 | #line 319 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1900 | { RET_TOK(MemOpVal, Alloca, ALLOCA); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1901 | YY_BREAK |
| 1902 | case 115: |
| 1903 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1904 | #line 320 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1905 | { RET_TOK(MemOpVal, Free, FREE); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1906 | YY_BREAK |
| 1907 | case 116: |
| 1908 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1909 | #line 321 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1910 | { RET_TOK(MemOpVal, Load, LOAD); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1911 | YY_BREAK |
| 1912 | case 117: |
| 1913 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1914 | #line 322 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1915 | { RET_TOK(MemOpVal, Store, STORE); } |
Reid Spencer | 3da59db | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1916 | YY_BREAK |
| 1917 | case 118: |
| 1918 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1919 | #line 323 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1920 | { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); } |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1921 | YY_BREAK |
Reid Spencer | 41dff5e | 2007-01-26 08:05:27 +0000 | [diff] [blame] | 1922 | case 119: |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1923 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1924 | #line 325 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1925 | { RET_TOK(OtherOpVal, ExtractElement, EXTRACTELEMENT); } |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 1926 | YY_BREAK |
| 1927 | case 120: |
| 1928 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1929 | #line 326 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1930 | { RET_TOK(OtherOpVal, InsertElement, INSERTELEMENT); } |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1931 | YY_BREAK |
Reid Spencer | 3d6b71e | 2007-04-09 01:56:05 +0000 | [diff] [blame] | 1932 | case 121: |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1933 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1934 | #line 327 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 1935 | { RET_TOK(OtherOpVal, ShuffleVector, SHUFFLEVECTOR); } |
| 1936 | YY_BREAK |
| 1937 | case 122: |
| 1938 | YY_RULE_SETUP |
| 1939 | #line 330 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Owen Anderson | 1dc6969 | 2006-10-18 02:21:48 +0000 | [diff] [blame] | 1940 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1941 | UnEscapeLexed(llvmAsmtext+1); |
| 1942 | llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip % |
| 1943 | return LOCALVAR; |
Owen Anderson | 1dc6969 | 2006-10-18 02:21:48 +0000 | [diff] [blame] | 1944 | } |
| 1945 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1946 | case 123: |
Owen Anderson | 1dc6969 | 2006-10-18 02:21:48 +0000 | [diff] [blame] | 1947 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1948 | #line 335 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1949 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1950 | UnEscapeLexed(llvmAsmtext+1); |
| 1951 | llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Skip @ |
| 1952 | return GLOBALVAR; |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1953 | } |
| 1954 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1955 | case 124: |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1956 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1957 | #line 340 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1958 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1959 | llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke colon |
| 1960 | UnEscapeLexed(llvmAsmtext); |
| 1961 | llvmAsmlval.StrVal = strdup(llvmAsmtext); |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1962 | return LABELSTR; |
| 1963 | } |
| 1964 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1965 | case 125: |
| 1966 | /* rule 125 can match eol */ |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1967 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1968 | #line 346 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1969 | { |
| 1970 | llvmAsmtext[strlen(llvmAsmtext)-2] = 0; // nuke colon, end quote |
| 1971 | UnEscapeLexed(llvmAsmtext+1); |
| 1972 | llvmAsmlval.StrVal = strdup(llvmAsmtext+1); |
| 1973 | return LABELSTR; |
| 1974 | } |
| 1975 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1976 | case 126: |
| 1977 | /* rule 126 can match eol */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1978 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1979 | #line 353 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1980 | { // Note that we cannot unescape a string constant here! The |
| 1981 | // string constant might contain a \00 which would not be |
| 1982 | // understood by the string stuff. It is valid to make a |
| 1983 | // [sbyte] c"Hello World\00" constant, for example. |
| 1984 | // |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1985 | llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote |
| 1986 | llvmAsmlval.StrVal = strdup(llvmAsmtext+1); // Nuke start quote |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1987 | return STRINGCONSTANT; |
| 1988 | } |
| 1989 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1990 | case 127: |
| 1991 | /* rule 127 can match eol */ |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 1992 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 1993 | #line 362 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 1994 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 1995 | llvmAsmtext[strlen(llvmAsmtext)-1] = 0; // nuke end quote |
| 1996 | llvmAsmlval.StrVal = strdup(llvmAsmtext+2); // Nuke @, quote |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 1997 | return ATSTRINGCONSTANT; |
| 1998 | } |
| 1999 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2000 | case 128: |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2001 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2002 | #line 368 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2003 | { int len = strlen(llvmAsmtext); |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2004 | uint32_t numBits = ((len * 64) / 19) + 1; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2005 | APInt Tmp(numBits, llvmAsmtext, len, 10); |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2006 | uint32_t activeBits = Tmp.getActiveBits(); |
| 2007 | if (activeBits > 0 && activeBits < numBits) |
| 2008 | Tmp.trunc(activeBits); |
| 2009 | if (Tmp.getBitWidth() > 64) { |
| 2010 | llvmAsmlval.APIntVal = new APInt(Tmp); |
| 2011 | return EUAPINTVAL; |
| 2012 | } else { |
| 2013 | llvmAsmlval.UInt64Val = Tmp.getZExtValue(); |
| 2014 | return EUINT64VAL; |
| 2015 | } |
| 2016 | } |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2017 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2018 | case 129: |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2019 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2020 | #line 382 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2021 | { int len = strlen(llvmAsmtext); |
Reid Spencer | afc3782 | 2007-03-09 21:19:09 +0000 | [diff] [blame] | 2022 | uint32_t numBits = (((len-1) * 64) / 19) + 2; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2023 | APInt Tmp(numBits, llvmAsmtext, len, 10); |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2024 | uint32_t minBits = Tmp.getMinSignedBits(); |
| 2025 | if (minBits > 0 && minBits < numBits) |
| 2026 | Tmp.trunc(minBits); |
| 2027 | if (Tmp.getBitWidth() > 64) { |
| 2028 | llvmAsmlval.APIntVal = new APInt(Tmp); |
| 2029 | return ESAPINTVAL; |
| 2030 | } else { |
| 2031 | llvmAsmlval.SInt64Val = Tmp.getSExtValue(); |
| 2032 | return ESINT64VAL; |
| 2033 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2034 | } |
| 2035 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2036 | case 130: |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 2037 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2038 | #line 397 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2039 | { int len = strlen(llvmAsmtext+3) - 3; |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2040 | uint32_t bits = len * 4; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2041 | APInt Tmp(bits, llvmAsmtext+3, len, 16); |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2042 | uint32_t activeBits = Tmp.getActiveBits(); |
| 2043 | if (activeBits > 0 && activeBits < bits) |
| 2044 | Tmp.trunc(activeBits); |
| 2045 | if (Tmp.getBitWidth() > 64) { |
| 2046 | llvmAsmlval.APIntVal = new APInt(Tmp); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2047 | return llvmAsmtext[0] == 's' ? ESAPINTVAL : EUAPINTVAL; |
| 2048 | } else if (llvmAsmtext[0] == 's') { |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 2049 | llvmAsmlval.SInt64Val = Tmp.getSExtValue(); |
| 2050 | return ESINT64VAL; |
| 2051 | } else { |
| 2052 | llvmAsmlval.UInt64Val = Tmp.getZExtValue(); |
| 2053 | return EUINT64VAL; |
| 2054 | } |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2055 | } |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 2056 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2057 | case 131: |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 2058 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2059 | #line 415 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2060 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2061 | uint64_t Val = atoull(llvmAsmtext+1); |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2062 | if ((unsigned)Val != Val) |
| 2063 | GenerateError("Invalid value number (too large)!"); |
| 2064 | llvmAsmlval.UIntVal = unsigned(Val); |
| 2065 | return LOCALVAL_ID; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2066 | } |
| 2067 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2068 | case 132: |
Owen Anderson | 1dc6969 | 2006-10-18 02:21:48 +0000 | [diff] [blame] | 2069 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2070 | #line 422 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2071 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2072 | uint64_t Val = atoull(llvmAsmtext+1); |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2073 | if ((unsigned)Val != Val) |
| 2074 | GenerateError("Invalid value number (too large)!"); |
| 2075 | llvmAsmlval.UIntVal = unsigned(Val); |
| 2076 | return GLOBALVAL_ID; |
| 2077 | } |
Reid Spencer | 6fd36ab | 2006-12-29 20:35:03 +0000 | [diff] [blame] | 2078 | YY_BREAK |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2079 | case 133: |
| 2080 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2081 | #line 430 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 2082 | { llvmAsmlval.FPVal = atof(llvmAsmtext); return FPVAL; } |
| 2083 | YY_BREAK |
| 2084 | case 134: |
| 2085 | YY_RULE_SETUP |
| 2086 | #line 431 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2087 | { llvmAsmlval.FPVal = HexToFP(llvmAsmtext); return FPVAL; } |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2088 | YY_BREAK |
| 2089 | case YY_STATE_EOF(INITIAL): |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2090 | #line 433 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2091 | { |
| 2092 | /* Make sure to free the internal buffers for flex when we are |
| 2093 | * done reading our input! |
| 2094 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2095 | llvmAsm_delete_buffer(YY_CURRENT_BUFFER); |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2096 | return EOF; |
| 2097 | } |
| 2098 | YY_BREAK |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 2099 | case 135: |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2100 | /* rule 135 can match eol */ |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 2101 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2102 | #line 441 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 2103 | { /* Ignore whitespace */ } |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2104 | YY_BREAK |
| 2105 | case 136: |
| 2106 | YY_RULE_SETUP |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2107 | #line 442 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
| 2108 | { return llvmAsmtext[0]; } |
| 2109 | YY_BREAK |
| 2110 | case 137: |
| 2111 | YY_RULE_SETUP |
| 2112 | #line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2113 | YY_FATAL_ERROR( "flex scanner jammed" ); |
| 2114 | YY_BREAK |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2115 | #line 2116 "Lexer.cpp" |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2116 | |
| 2117 | case YY_END_OF_BUFFER: |
| 2118 | { |
| 2119 | /* Amount of text matched not including the EOB char. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2120 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2121 | |
| 2122 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2123 | *yy_cp = (yy_hold_char); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2124 | YY_RESTORE_YY_MORE_OFFSET |
| 2125 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2126 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2127 | { |
| 2128 | /* We're scanning a new file or input source. It's |
| 2129 | * possible that this happened because the user |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2130 | * just pointed llvmAsmin at a new source and called |
| 2131 | * llvmAsmlex(). If so, then we have to assure |
| 2132 | * consistency between YY_CURRENT_BUFFER and our |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2133 | * globals. Here is the right place to do so, because |
| 2134 | * this is the first action (other than possibly a |
| 2135 | * back-up) that will match for the new input source. |
| 2136 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2137 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 2138 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = llvmAsmin; |
| 2139 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2140 | } |
| 2141 | |
| 2142 | /* Note that here we test for yy_c_buf_p "<=" to the position |
| 2143 | * of the first EOB in the buffer, since yy_c_buf_p will |
| 2144 | * already have been incremented past the NUL character |
| 2145 | * (since all states make transitions on EOB to the |
| 2146 | * end-of-buffer state). Contrast this with the test |
| 2147 | * in input(). |
| 2148 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2149 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2150 | { /* This was really a NUL. */ |
| 2151 | yy_state_type yy_next_state; |
| 2152 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2153 | (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2154 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2155 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2156 | |
| 2157 | /* Okay, we're now positioned to make the NUL |
| 2158 | * transition. We couldn't have |
| 2159 | * yy_get_previous_state() go ahead and do it |
| 2160 | * for us because it doesn't know how to deal |
| 2161 | * with the possibility of jamming (and we don't |
| 2162 | * want to build jamming into it because then it |
| 2163 | * will run more slowly). |
| 2164 | */ |
| 2165 | |
| 2166 | yy_next_state = yy_try_NUL_trans( yy_current_state ); |
| 2167 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2168 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2169 | |
| 2170 | if ( yy_next_state ) |
| 2171 | { |
| 2172 | /* Consume the NUL. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2173 | yy_cp = ++(yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2174 | yy_current_state = yy_next_state; |
| 2175 | goto yy_match; |
| 2176 | } |
| 2177 | |
| 2178 | else |
| 2179 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2180 | yy_cp = (yy_last_accepting_cpos); |
| 2181 | yy_current_state = (yy_last_accepting_state); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2182 | goto yy_find_action; |
| 2183 | } |
| 2184 | } |
| 2185 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2186 | else switch ( yy_get_next_buffer( ) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2187 | { |
| 2188 | case EOB_ACT_END_OF_FILE: |
| 2189 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2190 | (yy_did_buffer_switch_on_eof) = 0; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2191 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2192 | if ( llvmAsmwrap( ) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2193 | { |
| 2194 | /* Note: because we've taken care in |
| 2195 | * yy_get_next_buffer() to have set up |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2196 | * llvmAsmtext, we can now set up |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2197 | * yy_c_buf_p so that if some total |
| 2198 | * hoser (like flex itself) wants to |
| 2199 | * call the scanner after we return the |
| 2200 | * YY_NULL, it'll still work - another |
| 2201 | * YY_NULL will get returned. |
| 2202 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2203 | (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2204 | |
| 2205 | yy_act = YY_STATE_EOF(YY_START); |
| 2206 | goto do_action; |
| 2207 | } |
| 2208 | |
| 2209 | else |
| 2210 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2211 | if ( ! (yy_did_buffer_switch_on_eof) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2212 | YY_NEW_FILE; |
| 2213 | } |
| 2214 | break; |
| 2215 | } |
| 2216 | |
| 2217 | case EOB_ACT_CONTINUE_SCAN: |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2218 | (yy_c_buf_p) = |
| 2219 | (yytext_ptr) + yy_amount_of_matched_text; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2220 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2221 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2222 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2223 | yy_cp = (yy_c_buf_p); |
| 2224 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2225 | goto yy_match; |
| 2226 | |
| 2227 | case EOB_ACT_LAST_MATCH: |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2228 | (yy_c_buf_p) = |
| 2229 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2230 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2231 | yy_current_state = yy_get_previous_state( ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2232 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2233 | yy_cp = (yy_c_buf_p); |
| 2234 | yy_bp = (yytext_ptr) + YY_MORE_ADJ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2235 | goto yy_find_action; |
| 2236 | } |
| 2237 | break; |
| 2238 | } |
| 2239 | |
| 2240 | default: |
| 2241 | YY_FATAL_ERROR( |
| 2242 | "fatal flex scanner internal error--no action found" ); |
| 2243 | } /* end of action switch */ |
| 2244 | } /* end of scanning one token */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2245 | } /* end of llvmAsmlex */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2246 | |
| 2247 | /* yy_get_next_buffer - try to read in a new buffer |
| 2248 | * |
| 2249 | * Returns a code representing an action: |
| 2250 | * EOB_ACT_LAST_MATCH - |
| 2251 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
| 2252 | * EOB_ACT_END_OF_FILE - end of file |
| 2253 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2254 | static int yy_get_next_buffer (void) |
| 2255 | { |
| 2256 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
| 2257 | register char *source = (yytext_ptr); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2258 | register int number_to_move, i; |
| 2259 | int ret_val; |
| 2260 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2261 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2262 | YY_FATAL_ERROR( |
| 2263 | "fatal flex scanner internal error--end of buffer missed" ); |
| 2264 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2265 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2266 | { /* Don't try to fill the buffer, so this is an EOF. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2267 | if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2268 | { |
| 2269 | /* We matched a single character, the EOB, so |
| 2270 | * treat this as a final EOF. |
| 2271 | */ |
| 2272 | return EOB_ACT_END_OF_FILE; |
| 2273 | } |
| 2274 | |
| 2275 | else |
| 2276 | { |
| 2277 | /* We matched some text prior to the EOB, first |
| 2278 | * process it. |
| 2279 | */ |
| 2280 | return EOB_ACT_LAST_MATCH; |
| 2281 | } |
| 2282 | } |
| 2283 | |
| 2284 | /* Try to read more data. */ |
| 2285 | |
| 2286 | /* First move last chars to start of buffer. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2287 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2288 | |
| 2289 | for ( i = 0; i < number_to_move; ++i ) |
| 2290 | *(dest++) = *(source++); |
| 2291 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2292 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2293 | /* don't do the read, it's not guaranteed to return an EOF, |
| 2294 | * just force an EOF |
| 2295 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2296 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2297 | |
| 2298 | else |
| 2299 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2300 | int num_to_read = |
| 2301 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2302 | |
| 2303 | while ( num_to_read <= 0 ) |
| 2304 | { /* Not enough room in the buffer - grow it. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2305 | |
| 2306 | /* just a shorter name for the current buffer */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2307 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2308 | |
| 2309 | int yy_c_buf_p_offset = |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2310 | (int) ((yy_c_buf_p) - b->yy_ch_buf); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2311 | |
| 2312 | if ( b->yy_is_our_buffer ) |
| 2313 | { |
| 2314 | int new_size = b->yy_buf_size * 2; |
| 2315 | |
| 2316 | if ( new_size <= 0 ) |
| 2317 | b->yy_buf_size += b->yy_buf_size / 8; |
| 2318 | else |
| 2319 | b->yy_buf_size *= 2; |
| 2320 | |
| 2321 | b->yy_ch_buf = (char *) |
| 2322 | /* Include room in for 2 EOB chars. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2323 | llvmAsmrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2324 | } |
| 2325 | else |
| 2326 | /* Can't grow it, we don't own it. */ |
| 2327 | b->yy_ch_buf = 0; |
| 2328 | |
| 2329 | if ( ! b->yy_ch_buf ) |
| 2330 | YY_FATAL_ERROR( |
| 2331 | "fatal error - scanner input buffer overflow" ); |
| 2332 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2333 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2334 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2335 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2336 | number_to_move - 1; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2337 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2338 | } |
| 2339 | |
| 2340 | if ( num_to_read > YY_READ_BUF_SIZE ) |
| 2341 | num_to_read = YY_READ_BUF_SIZE; |
| 2342 | |
| 2343 | /* Read in more data. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2344 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
| 2345 | (yy_n_chars), num_to_read ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2346 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2347 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2348 | } |
| 2349 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2350 | if ( (yy_n_chars) == 0 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2351 | { |
| 2352 | if ( number_to_move == YY_MORE_ADJ ) |
| 2353 | { |
| 2354 | ret_val = EOB_ACT_END_OF_FILE; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2355 | llvmAsmrestart(llvmAsmin ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2356 | } |
| 2357 | |
| 2358 | else |
| 2359 | { |
| 2360 | ret_val = EOB_ACT_LAST_MATCH; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2361 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2362 | YY_BUFFER_EOF_PENDING; |
| 2363 | } |
| 2364 | } |
| 2365 | |
| 2366 | else |
| 2367 | ret_val = EOB_ACT_CONTINUE_SCAN; |
| 2368 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2369 | (yy_n_chars) += number_to_move; |
| 2370 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
| 2371 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2372 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2373 | (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2374 | |
| 2375 | return ret_val; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2376 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2377 | |
| 2378 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
| 2379 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2380 | static yy_state_type yy_get_previous_state (void) |
| 2381 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2382 | register yy_state_type yy_current_state; |
| 2383 | register char *yy_cp; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2384 | |
| 2385 | yy_current_state = (yy_start); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2386 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2387 | for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2388 | { |
| 2389 | register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2390 | if ( yy_accept[yy_current_state] ) |
| 2391 | { |
| 2392 | (yy_last_accepting_state) = yy_current_state; |
| 2393 | (yy_last_accepting_cpos) = yy_cp; |
| 2394 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2395 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2396 | { |
| 2397 | yy_current_state = (int) yy_def[yy_current_state]; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2398 | if ( yy_current_state >= 552 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2399 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 2400 | } |
| 2401 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2402 | } |
| 2403 | |
| 2404 | return yy_current_state; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2405 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2406 | |
| 2407 | /* yy_try_NUL_trans - try to make a transition on the NUL character |
| 2408 | * |
| 2409 | * synopsis |
| 2410 | * next_state = yy_try_NUL_trans( current_state ); |
| 2411 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2412 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) |
| 2413 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2414 | register int yy_is_jam; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2415 | register char *yy_cp = (yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2416 | |
| 2417 | register YY_CHAR yy_c = 1; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2418 | if ( yy_accept[yy_current_state] ) |
| 2419 | { |
| 2420 | (yy_last_accepting_state) = yy_current_state; |
| 2421 | (yy_last_accepting_cpos) = yy_cp; |
| 2422 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2423 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
| 2424 | { |
| 2425 | yy_current_state = (int) yy_def[yy_current_state]; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2426 | if ( yy_current_state >= 552 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2427 | yy_c = yy_meta[(unsigned int) yy_c]; |
| 2428 | } |
| 2429 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2430 | yy_is_jam = (yy_current_state == 551); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2431 | |
| 2432 | return yy_is_jam ? 0 : yy_current_state; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2433 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2434 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2435 | static inline void yyunput (int c, register char * yy_bp ) |
| 2436 | { |
| 2437 | register char *yy_cp; |
| 2438 | |
| 2439 | yy_cp = (yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2440 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2441 | /* undo effects of setting up llvmAsmtext */ |
| 2442 | *yy_cp = (yy_hold_char); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2443 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2444 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2445 | { /* need to shift things up to make room */ |
| 2446 | /* +2 for EOB chars. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2447 | register int number_to_move = (yy_n_chars) + 2; |
| 2448 | register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
| 2449 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2450 | register char *source = |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2451 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2452 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2453 | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2454 | *--dest = *--source; |
| 2455 | |
| 2456 | yy_cp += (int) (dest - source); |
| 2457 | yy_bp += (int) (dest - source); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2458 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
| 2459 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2460 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2461 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2462 | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
| 2463 | } |
| 2464 | |
| 2465 | *--yy_cp = (char) c; |
| 2466 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2467 | if ( c == '\n' ){ |
| 2468 | --llvmAsmlineno; |
| 2469 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2470 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2471 | (yytext_ptr) = yy_bp; |
| 2472 | (yy_hold_char) = *yy_cp; |
| 2473 | (yy_c_buf_p) = yy_cp; |
| 2474 | } |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 2475 | |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2476 | #ifndef YY_NO_INPUT |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2477 | #ifdef __cplusplus |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2478 | static int yyinput (void) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2479 | #else |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2480 | static int input (void) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2481 | #endif |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2482 | |
| 2483 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2484 | int c; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2485 | |
| 2486 | *(yy_c_buf_p) = (yy_hold_char); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2487 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2488 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2489 | { |
| 2490 | /* yy_c_buf_p now points to the character we want to return. |
| 2491 | * If this occurs *before* the EOB characters, then it's a |
| 2492 | * valid NUL; if not, then we've hit the end of the buffer. |
| 2493 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2494 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2495 | /* This was really a NUL. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2496 | *(yy_c_buf_p) = '\0'; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2497 | |
| 2498 | else |
| 2499 | { /* need more input */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2500 | int offset = (yy_c_buf_p) - (yytext_ptr); |
| 2501 | ++(yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2502 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2503 | switch ( yy_get_next_buffer( ) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2504 | { |
| 2505 | case EOB_ACT_LAST_MATCH: |
| 2506 | /* This happens because yy_g_n_b() |
| 2507 | * sees that we've accumulated a |
| 2508 | * token and flags that we need to |
| 2509 | * try matching the token before |
| 2510 | * proceeding. But for input(), |
| 2511 | * there's no matching to consider. |
| 2512 | * So convert the EOB_ACT_LAST_MATCH |
| 2513 | * to EOB_ACT_END_OF_FILE. |
| 2514 | */ |
| 2515 | |
| 2516 | /* Reset buffer status. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2517 | llvmAsmrestart(llvmAsmin ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2518 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2519 | /*FALLTHROUGH*/ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2520 | |
| 2521 | case EOB_ACT_END_OF_FILE: |
| 2522 | { |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2523 | if ( llvmAsmwrap( ) ) |
Reid Spencer | 61c83e0 | 2006-08-18 08:43:06 +0000 | [diff] [blame] | 2524 | return EOF; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2525 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2526 | if ( ! (yy_did_buffer_switch_on_eof) ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2527 | YY_NEW_FILE; |
| 2528 | #ifdef __cplusplus |
| 2529 | return yyinput(); |
| 2530 | #else |
| 2531 | return input(); |
| 2532 | #endif |
| 2533 | } |
| 2534 | |
| 2535 | case EOB_ACT_CONTINUE_SCAN: |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2536 | (yy_c_buf_p) = (yytext_ptr) + offset; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2537 | break; |
| 2538 | } |
| 2539 | } |
| 2540 | } |
| 2541 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2542 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ |
| 2543 | *(yy_c_buf_p) = '\0'; /* preserve llvmAsmtext */ |
| 2544 | (yy_hold_char) = *++(yy_c_buf_p); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2545 | |
| 2546 | if ( c == '\n' ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2547 | |
| 2548 | llvmAsmlineno++; |
| 2549 | ; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2550 | |
| 2551 | return c; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2552 | } |
| 2553 | #endif /* ifndef YY_NO_INPUT */ |
Anton Korobeynikov | 9adeaa2 | 2007-01-28 13:37:39 +0000 | [diff] [blame] | 2554 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2555 | /** Immediately switch to a different input stream. |
| 2556 | * @param input_file A readable stream. |
| 2557 | * |
| 2558 | * @note This function does not reset the start condition to @c INITIAL . |
| 2559 | */ |
| 2560 | void llvmAsmrestart (FILE * input_file ) |
| 2561 | { |
| 2562 | |
| 2563 | if ( ! YY_CURRENT_BUFFER ){ |
| 2564 | llvmAsmensure_buffer_stack (); |
| 2565 | YY_CURRENT_BUFFER_LVALUE = |
| 2566 | llvmAsm_create_buffer(llvmAsmin,YY_BUF_SIZE ); |
Reid Spencer | 6f40790 | 2007-01-13 05:00:46 +0000 | [diff] [blame] | 2567 | } |
Reid Spencer | 41dff5e | 2007-01-26 08:05:27 +0000 | [diff] [blame] | 2568 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2569 | llvmAsm_init_buffer(YY_CURRENT_BUFFER,input_file ); |
| 2570 | llvmAsm_load_buffer_state( ); |
| 2571 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2572 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2573 | /** Switch to a different input buffer. |
| 2574 | * @param new_buffer The new input buffer. |
| 2575 | * |
| 2576 | */ |
| 2577 | void llvmAsm_switch_to_buffer (YY_BUFFER_STATE new_buffer ) |
| 2578 | { |
| 2579 | |
| 2580 | /* TODO. We should be able to replace this entire function body |
| 2581 | * with |
| 2582 | * llvmAsmpop_buffer_state(); |
| 2583 | * llvmAsmpush_buffer_state(new_buffer); |
| 2584 | */ |
| 2585 | llvmAsmensure_buffer_stack (); |
| 2586 | if ( YY_CURRENT_BUFFER == new_buffer ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2587 | return; |
| 2588 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2589 | if ( YY_CURRENT_BUFFER ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2590 | { |
| 2591 | /* Flush out information for old buffer. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2592 | *(yy_c_buf_p) = (yy_hold_char); |
| 2593 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
| 2594 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2595 | } |
| 2596 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2597 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2598 | llvmAsm_load_buffer_state( ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2599 | |
| 2600 | /* We don't actually know whether we did this switch during |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2601 | * EOF (llvmAsmwrap()) processing, but the only time this flag |
| 2602 | * is looked at is after llvmAsmwrap() is called, so it's safe |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2603 | * to go ahead and always set it. |
| 2604 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2605 | (yy_did_buffer_switch_on_eof) = 1; |
| 2606 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2607 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2608 | static void llvmAsm_load_buffer_state (void) |
| 2609 | { |
| 2610 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
| 2611 | (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
| 2612 | llvmAsmin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
| 2613 | (yy_hold_char) = *(yy_c_buf_p); |
| 2614 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2615 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2616 | /** Allocate and initialize an input buffer state. |
| 2617 | * @param file A readable stream. |
| 2618 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
| 2619 | * |
| 2620 | * @return the allocated buffer state. |
| 2621 | */ |
| 2622 | YY_BUFFER_STATE llvmAsm_create_buffer (FILE * file, int size ) |
| 2623 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2624 | YY_BUFFER_STATE b; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2625 | |
| 2626 | b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2627 | if ( ! b ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2628 | YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2629 | |
| 2630 | b->yy_buf_size = size; |
| 2631 | |
| 2632 | /* yy_ch_buf has to be 2 characters longer than the size given because |
| 2633 | * we need to put in 2 end-of-buffer characters. |
| 2634 | */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2635 | b->yy_ch_buf = (char *) llvmAsmalloc(b->yy_buf_size + 2 ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2636 | if ( ! b->yy_ch_buf ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2637 | YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_create_buffer()" ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2638 | |
| 2639 | b->yy_is_our_buffer = 1; |
| 2640 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2641 | llvmAsm_init_buffer(b,file ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2642 | |
| 2643 | return b; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2644 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2645 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2646 | /** Destroy the buffer. |
| 2647 | * @param b a buffer created with llvmAsm_create_buffer() |
| 2648 | * |
| 2649 | */ |
| 2650 | void llvmAsm_delete_buffer (YY_BUFFER_STATE b ) |
| 2651 | { |
| 2652 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2653 | if ( ! b ) |
| 2654 | return; |
| 2655 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2656 | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
| 2657 | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2658 | |
| 2659 | if ( b->yy_is_our_buffer ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2660 | llvmAsmfree((void *) b->yy_ch_buf ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2661 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2662 | llvmAsmfree((void *) b ); |
| 2663 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2664 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2665 | /* Initializes or reinitializes a buffer. |
| 2666 | * This function is sometimes called more than once on the same buffer, |
| 2667 | * such as during a llvmAsmrestart() or at EOF. |
| 2668 | */ |
| 2669 | static void llvmAsm_init_buffer (YY_BUFFER_STATE b, FILE * file ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2670 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2671 | { |
| 2672 | int oerrno = errno; |
| 2673 | |
| 2674 | llvmAsm_flush_buffer(b ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2675 | |
| 2676 | b->yy_input_file = file; |
| 2677 | b->yy_fill_buffer = 1; |
| 2678 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2679 | /* If b is the current buffer, then llvmAsm_init_buffer was _probably_ |
| 2680 | * called from llvmAsmrestart() or through yy_get_next_buffer. |
| 2681 | * In that case, we don't want to reset the lineno or column. |
| 2682 | */ |
| 2683 | if (b != YY_CURRENT_BUFFER){ |
| 2684 | b->yy_bs_lineno = 1; |
| 2685 | b->yy_bs_column = 0; |
| 2686 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2687 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2688 | b->yy_is_interactive = 0; |
| 2689 | |
| 2690 | errno = oerrno; |
| 2691 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2692 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2693 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
| 2694 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
| 2695 | * |
| 2696 | */ |
| 2697 | void llvmAsm_flush_buffer (YY_BUFFER_STATE b ) |
| 2698 | { |
| 2699 | if ( ! b ) |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2700 | return; |
| 2701 | |
| 2702 | b->yy_n_chars = 0; |
| 2703 | |
| 2704 | /* We always need two end-of-buffer characters. The first causes |
| 2705 | * a transition to the end-of-buffer state. The second causes |
| 2706 | * a jam in that state. |
| 2707 | */ |
| 2708 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
| 2709 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
| 2710 | |
| 2711 | b->yy_buf_pos = &b->yy_ch_buf[0]; |
| 2712 | |
| 2713 | b->yy_at_bol = 1; |
| 2714 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 2715 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2716 | if ( b == YY_CURRENT_BUFFER ) |
| 2717 | llvmAsm_load_buffer_state( ); |
| 2718 | } |
| 2719 | |
| 2720 | /** Pushes the new state onto the stack. The new state becomes |
| 2721 | * the current state. This function will allocate the stack |
| 2722 | * if necessary. |
| 2723 | * @param new_buffer The new state. |
| 2724 | * |
| 2725 | */ |
| 2726 | void llvmAsmpush_buffer_state (YY_BUFFER_STATE new_buffer ) |
| 2727 | { |
| 2728 | if (new_buffer == NULL) |
| 2729 | return; |
| 2730 | |
| 2731 | llvmAsmensure_buffer_stack(); |
| 2732 | |
| 2733 | /* This block is copied from llvmAsm_switch_to_buffer. */ |
| 2734 | if ( YY_CURRENT_BUFFER ) |
| 2735 | { |
| 2736 | /* Flush out information for old buffer. */ |
| 2737 | *(yy_c_buf_p) = (yy_hold_char); |
| 2738 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); |
| 2739 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); |
| 2740 | } |
| 2741 | |
| 2742 | /* Only push if top exists. Otherwise, replace top. */ |
| 2743 | if (YY_CURRENT_BUFFER) |
| 2744 | (yy_buffer_stack_top)++; |
| 2745 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
| 2746 | |
| 2747 | /* copied from llvmAsm_switch_to_buffer. */ |
| 2748 | llvmAsm_load_buffer_state( ); |
| 2749 | (yy_did_buffer_switch_on_eof) = 1; |
| 2750 | } |
| 2751 | |
| 2752 | /** Removes and deletes the top of the stack, if present. |
| 2753 | * The next element becomes the new top. |
| 2754 | * |
| 2755 | */ |
| 2756 | void llvmAsmpop_buffer_state (void) |
| 2757 | { |
| 2758 | if (!YY_CURRENT_BUFFER) |
| 2759 | return; |
| 2760 | |
| 2761 | llvmAsm_delete_buffer(YY_CURRENT_BUFFER ); |
| 2762 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 2763 | if ((yy_buffer_stack_top) > 0) |
| 2764 | --(yy_buffer_stack_top); |
| 2765 | |
| 2766 | if (YY_CURRENT_BUFFER) { |
| 2767 | llvmAsm_load_buffer_state( ); |
| 2768 | (yy_did_buffer_switch_on_eof) = 1; |
| 2769 | } |
| 2770 | } |
| 2771 | |
| 2772 | /* Allocates the stack if it does not exist. |
| 2773 | * Guarantees space for at least one push. |
| 2774 | */ |
| 2775 | static void llvmAsmensure_buffer_stack (void) |
| 2776 | { |
| 2777 | int num_to_alloc; |
| 2778 | |
| 2779 | if (!(yy_buffer_stack)) { |
| 2780 | |
| 2781 | /* First allocation is just for 2 elements, since we don't know if this |
| 2782 | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
| 2783 | * immediate realloc on the next call. |
| 2784 | */ |
| 2785 | num_to_alloc = 1; |
| 2786 | (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmalloc |
| 2787 | (num_to_alloc * sizeof(struct yy_buffer_state*) |
| 2788 | ); |
| 2789 | |
| 2790 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
| 2791 | |
| 2792 | (yy_buffer_stack_max) = num_to_alloc; |
| 2793 | (yy_buffer_stack_top) = 0; |
| 2794 | return; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2795 | } |
| 2796 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2797 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2798 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2799 | /* Increase the buffer to prepare for a possible push. */ |
| 2800 | int grow_size = 8 /* arbitrary grow size */; |
| 2801 | |
| 2802 | num_to_alloc = (yy_buffer_stack_max) + grow_size; |
| 2803 | (yy_buffer_stack) = (struct yy_buffer_state**)llvmAsmrealloc |
| 2804 | ((yy_buffer_stack), |
| 2805 | num_to_alloc * sizeof(struct yy_buffer_state*) |
| 2806 | ); |
| 2807 | |
| 2808 | /* zero only the new slots.*/ |
| 2809 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); |
| 2810 | (yy_buffer_stack_max) = num_to_alloc; |
| 2811 | } |
| 2812 | } |
| 2813 | |
| 2814 | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
| 2815 | * @param base the character buffer |
| 2816 | * @param size the size in bytes of the character buffer |
| 2817 | * |
| 2818 | * @return the newly allocated buffer state object. |
| 2819 | */ |
| 2820 | YY_BUFFER_STATE llvmAsm_scan_buffer (char * base, yy_size_t size ) |
| 2821 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2822 | YY_BUFFER_STATE b; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2823 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2824 | if ( size < 2 || |
| 2825 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
| 2826 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
| 2827 | /* They forgot to leave room for the EOB's. */ |
| 2828 | return 0; |
| 2829 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2830 | b = (YY_BUFFER_STATE) llvmAsmalloc(sizeof( struct yy_buffer_state ) ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2831 | if ( ! b ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2832 | YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_buffer()" ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2833 | |
| 2834 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ |
| 2835 | b->yy_buf_pos = b->yy_ch_buf = base; |
| 2836 | b->yy_is_our_buffer = 0; |
| 2837 | b->yy_input_file = 0; |
| 2838 | b->yy_n_chars = b->yy_buf_size; |
| 2839 | b->yy_is_interactive = 0; |
| 2840 | b->yy_at_bol = 1; |
| 2841 | b->yy_fill_buffer = 0; |
| 2842 | b->yy_buffer_status = YY_BUFFER_NEW; |
| 2843 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2844 | llvmAsm_switch_to_buffer(b ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2845 | |
| 2846 | return b; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2847 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2848 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2849 | /** Setup the input buffer state to scan a string. The next call to llvmAsmlex() will |
| 2850 | * scan from a @e copy of @a str. |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 2851 | * @param str a NUL-terminated string to scan |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2852 | * |
| 2853 | * @return the newly allocated buffer state object. |
| 2854 | * @note If you want to scan bytes that may contain NUL values, then use |
| 2855 | * llvmAsm_scan_bytes() instead. |
| 2856 | */ |
| 2857 | YY_BUFFER_STATE llvmAsm_scan_string (yyconst char * yystr ) |
| 2858 | { |
| 2859 | |
| 2860 | return llvmAsm_scan_bytes(yystr,strlen(yystr) ); |
| 2861 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2862 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2863 | /** Setup the input buffer state to scan the given bytes. The next call to llvmAsmlex() will |
| 2864 | * scan from a @e copy of @a bytes. |
| 2865 | * @param bytes the byte buffer to scan |
| 2866 | * @param len the number of bytes in the buffer pointed to by @a bytes. |
| 2867 | * |
| 2868 | * @return the newly allocated buffer state object. |
| 2869 | */ |
| 2870 | YY_BUFFER_STATE llvmAsm_scan_bytes (yyconst char * yybytes, int _yybytes_len ) |
| 2871 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2872 | YY_BUFFER_STATE b; |
| 2873 | char *buf; |
| 2874 | yy_size_t n; |
| 2875 | int i; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2876 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2877 | /* Get memory for full buffer, including space for trailing EOB's. */ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2878 | n = _yybytes_len + 2; |
| 2879 | buf = (char *) llvmAsmalloc(n ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2880 | if ( ! buf ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2881 | YY_FATAL_ERROR( "out of dynamic memory in llvmAsm_scan_bytes()" ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2882 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2883 | for ( i = 0; i < _yybytes_len; ++i ) |
| 2884 | buf[i] = yybytes[i]; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2885 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2886 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2887 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2888 | b = llvmAsm_scan_buffer(buf,n ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2889 | if ( ! b ) |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2890 | YY_FATAL_ERROR( "bad buffer in llvmAsm_scan_bytes()" ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2891 | |
| 2892 | /* It's okay to grow etc. this buffer, and we should throw it |
| 2893 | * away when we're done. |
| 2894 | */ |
| 2895 | b->yy_is_our_buffer = 1; |
| 2896 | |
| 2897 | return b; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2898 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2899 | |
| 2900 | #ifndef YY_EXIT_FAILURE |
| 2901 | #define YY_EXIT_FAILURE 2 |
| 2902 | #endif |
| 2903 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2904 | static void yy_fatal_error (yyconst char* msg ) |
| 2905 | { |
| 2906 | (void) fprintf( stderr, "%s\n", msg ); |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2907 | exit( YY_EXIT_FAILURE ); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2908 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2909 | |
| 2910 | /* Redefine yyless() so it works in section 3 code. */ |
| 2911 | |
| 2912 | #undef yyless |
| 2913 | #define yyless(n) \ |
| 2914 | do \ |
| 2915 | { \ |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2916 | /* Undo effects of setting up llvmAsmtext. */ \ |
| 2917 | int yyless_macro_arg = (n); \ |
| 2918 | YY_LESS_LINENO(yyless_macro_arg);\ |
| 2919 | llvmAsmtext[llvmAsmleng] = (yy_hold_char); \ |
| 2920 | (yy_c_buf_p) = llvmAsmtext + yyless_macro_arg; \ |
| 2921 | (yy_hold_char) = *(yy_c_buf_p); \ |
| 2922 | *(yy_c_buf_p) = '\0'; \ |
| 2923 | llvmAsmleng = yyless_macro_arg; \ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2924 | } \ |
| 2925 | while ( 0 ) |
| 2926 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2927 | /* Accessor methods (get/set functions) to struct members. */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 2928 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 2929 | /** Get the current line number. |
| 2930 | * |
| 2931 | */ |
| 2932 | int llvmAsmget_lineno (void) |
| 2933 | { |
| 2934 | |
| 2935 | return llvmAsmlineno; |
| 2936 | } |
| 2937 | |
| 2938 | /** Get the input stream. |
| 2939 | * |
| 2940 | */ |
| 2941 | FILE *llvmAsmget_in (void) |
| 2942 | { |
| 2943 | return llvmAsmin; |
| 2944 | } |
| 2945 | |
| 2946 | /** Get the output stream. |
| 2947 | * |
| 2948 | */ |
| 2949 | FILE *llvmAsmget_out (void) |
| 2950 | { |
| 2951 | return llvmAsmout; |
| 2952 | } |
| 2953 | |
| 2954 | /** Get the length of the current token. |
| 2955 | * |
| 2956 | */ |
| 2957 | int llvmAsmget_leng (void) |
| 2958 | { |
| 2959 | return llvmAsmleng; |
| 2960 | } |
| 2961 | |
| 2962 | /** Get the current token. |
| 2963 | * |
| 2964 | */ |
| 2965 | |
| 2966 | char *llvmAsmget_text (void) |
| 2967 | { |
| 2968 | return llvmAsmtext; |
| 2969 | } |
| 2970 | |
| 2971 | /** Set the current line number. |
| 2972 | * @param line_number |
| 2973 | * |
| 2974 | */ |
| 2975 | void llvmAsmset_lineno (int line_number ) |
| 2976 | { |
| 2977 | |
| 2978 | llvmAsmlineno = line_number; |
| 2979 | } |
| 2980 | |
| 2981 | /** Set the input stream. This does not discard the current |
| 2982 | * input buffer. |
| 2983 | * @param in_str A readable stream. |
| 2984 | * |
| 2985 | * @see llvmAsm_switch_to_buffer |
| 2986 | */ |
| 2987 | void llvmAsmset_in (FILE * in_str ) |
| 2988 | { |
| 2989 | llvmAsmin = in_str ; |
| 2990 | } |
| 2991 | |
| 2992 | void llvmAsmset_out (FILE * out_str ) |
| 2993 | { |
| 2994 | llvmAsmout = out_str ; |
| 2995 | } |
| 2996 | |
| 2997 | int llvmAsmget_debug (void) |
| 2998 | { |
| 2999 | return llvmAsm_flex_debug; |
| 3000 | } |
| 3001 | |
| 3002 | void llvmAsmset_debug (int bdebug ) |
| 3003 | { |
| 3004 | llvmAsm_flex_debug = bdebug ; |
| 3005 | } |
| 3006 | |
| 3007 | static int yy_init_globals (void) |
| 3008 | { |
| 3009 | /* Initialization is the same as for the non-reentrant scanner. |
| 3010 | * This function is called from llvmAsmlex_destroy(), so don't allocate here. |
| 3011 | */ |
| 3012 | |
| 3013 | /* We do not touch llvmAsmlineno unless the option is enabled. */ |
| 3014 | llvmAsmlineno = 1; |
| 3015 | |
| 3016 | (yy_buffer_stack) = 0; |
| 3017 | (yy_buffer_stack_top) = 0; |
| 3018 | (yy_buffer_stack_max) = 0; |
| 3019 | (yy_c_buf_p) = (char *) 0; |
| 3020 | (yy_init) = 0; |
| 3021 | (yy_start) = 0; |
| 3022 | |
| 3023 | /* Defined in main.c */ |
| 3024 | #ifdef YY_STDINIT |
| 3025 | llvmAsmin = stdin; |
| 3026 | llvmAsmout = stdout; |
| 3027 | #else |
| 3028 | llvmAsmin = (FILE *) 0; |
| 3029 | llvmAsmout = (FILE *) 0; |
| 3030 | #endif |
| 3031 | |
| 3032 | /* For future reference: Set errno on error, since we are called by |
| 3033 | * llvmAsmlex_init() |
| 3034 | */ |
| 3035 | return 0; |
| 3036 | } |
| 3037 | |
| 3038 | /* llvmAsmlex_destroy is for both reentrant and non-reentrant scanners. */ |
| 3039 | int llvmAsmlex_destroy (void) |
| 3040 | { |
| 3041 | |
| 3042 | /* Pop the buffer stack, destroying each element. */ |
| 3043 | while(YY_CURRENT_BUFFER){ |
| 3044 | llvmAsm_delete_buffer(YY_CURRENT_BUFFER ); |
| 3045 | YY_CURRENT_BUFFER_LVALUE = NULL; |
| 3046 | llvmAsmpop_buffer_state(); |
| 3047 | } |
| 3048 | |
| 3049 | /* Destroy the stack itself. */ |
| 3050 | llvmAsmfree((yy_buffer_stack) ); |
| 3051 | (yy_buffer_stack) = NULL; |
| 3052 | |
| 3053 | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
| 3054 | * llvmAsmlex() is called, initialization will occur. */ |
| 3055 | yy_init_globals( ); |
| 3056 | |
| 3057 | return 0; |
| 3058 | } |
| 3059 | |
| 3060 | /* |
| 3061 | * Internal utility routines. |
| 3062 | */ |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3063 | |
| 3064 | #ifndef yytext_ptr |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3065 | static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) |
| 3066 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3067 | register int i; |
| 3068 | for ( i = 0; i < n; ++i ) |
| 3069 | s1[i] = s2[i]; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3070 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3071 | #endif |
| 3072 | |
| 3073 | #ifdef YY_NEED_STRLEN |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3074 | static int yy_flex_strlen (yyconst char * s ) |
| 3075 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3076 | register int n; |
| 3077 | for ( n = 0; s[n]; ++n ) |
| 3078 | ; |
| 3079 | |
| 3080 | return n; |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3081 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3082 | #endif |
| 3083 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3084 | void *llvmAsmalloc (yy_size_t size ) |
| 3085 | { |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 3086 | return (void *) malloc( size ); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3087 | } |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 3088 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3089 | void *llvmAsmrealloc (void * ptr, yy_size_t size ) |
| 3090 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3091 | /* The cast to (char *) in the following accommodates both |
| 3092 | * implementations that use char* generic pointers, and those |
| 3093 | * that use void* generic pointers. It works with the latter |
| 3094 | * because both ANSI C and C++ allow castless assignment from |
| 3095 | * any pointer type to void*, and deal with argument conversions |
| 3096 | * as though doing an assignment. |
| 3097 | */ |
| 3098 | return (void *) realloc( (char *) ptr, size ); |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3099 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3100 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3101 | void llvmAsmfree (void * ptr ) |
| 3102 | { |
| 3103 | free( (char *) ptr ); /* see llvmAsmrealloc() for (char *) cast */ |
| 3104 | } |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 3105 | |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3106 | #define YYTABLES_NAME "yytables" |
| 3107 | |
Anton Korobeynikov | 77d0f97 | 2007-04-25 14:29:12 +0000 | [diff] [blame] | 3108 | #line 444 "/home/asl/proj/llvm/src/lib/AsmParser/Lexer.l" |
Lauro Ramos Venancio | c763552 | 2007-04-12 18:32:50 +0000 | [diff] [blame] | 3109 | |
| 3110 | |
Chris Lattner | 2fecc0f | 2006-02-15 07:02:59 +0000 | [diff] [blame] | 3111 | |