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