1 #define yy_create_buffer Stacker_create_buffer
2 #define yy_delete_buffer Stacker_delete_buffer
3 #define yy_scan_buffer Stacker_scan_buffer
4 #define yy_scan_string Stacker_scan_string
5 #define yy_scan_bytes Stacker_scan_bytes
6 #define yy_flex_debug Stacker_flex_debug
7 #define yy_init_buffer Stacker_init_buffer
8 #define yy_flush_buffer Stacker_flush_buffer
9 #define yy_load_buffer_state Stacker_load_buffer_state
10 #define yy_switch_to_buffer Stacker_switch_to_buffer
11 #define yyin Stackerin
12 #define yyleng Stackerleng
13 #define yylex Stackerlex
14 #define yyout Stackerout
15 #define yyrestart Stackerrestart
16 #define yytext Stackertext
17 #define yylineno Stackerlineno
20 /* A lexical scanner generated by flex */
22 /* Scanner skeleton version:
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
34 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
46 /* Use prototypes in function declarations. */
49 /* The "const" storage-class-modifier is valid. */
52 #else /* ! __cplusplus */
60 #endif /* ! __cplusplus */
79 #define YY_PROTO(proto) proto
81 #define YY_PROTO(proto) ()
84 /* Returned upon end-of-file. */
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
92 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
98 #define BEGIN yy_start = 1 + 2 *
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
104 #define YY_START ((yy_start - 1) / 2)
105 #define YYSTATE YY_START
107 /* Action number for EOF rule of a given start state. */
108 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
110 /* Special action meaning "start processing a new file". */
111 #define YY_NEW_FILE yyrestart( yyin )
113 #define YY_END_OF_BUFFER_CHAR 0
115 /* Size of default input buffer. */
116 #define YY_BUF_SIZE (16384*64)
118 typedef struct yy_buffer_state *YY_BUFFER_STATE;
121 extern FILE *yyin, *yyout;
123 #define EOB_ACT_CONTINUE_SCAN 0
124 #define EOB_ACT_END_OF_FILE 1
125 #define EOB_ACT_LAST_MATCH 2
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:
131 * if ( condition_holds )
134 * do_something_else();
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.
141 /* Return all but the first 'n' matched characters back to the input stream. */
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 */ \
154 #define unput(c) yyunput( c, yytext_ptr )
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).
160 typedef unsigned int yy_size_t;
163 struct yy_buffer_state
167 char *yy_ch_buf; /* input buffer */
168 char *yy_buf_pos; /* current position in input buffer */
170 /* Size of input buffer in bytes, not including room for EOB
173 yy_size_t yy_buf_size;
175 /* Number of characters read into yy_ch_buf, not including EOB
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
184 int yy_is_our_buffer;
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
191 int yy_is_interactive;
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
199 /* Whether to try to fill the input buffer when we reach the
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.
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.
217 #define YY_BUFFER_EOF_PENDING 2
220 static YY_BUFFER_STATE yy_current_buffer = 0;
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
226 #define YY_CURRENT_BUFFER yy_current_buffer
229 /* yy_hold_char holds the character lost when yytext is formed. */
230 static char yy_hold_char;
232 static int yy_n_chars; /* number of characters read into yy_ch_buf */
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 */
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 ...
245 static int yy_did_buffer_switch_on_eof;
247 void yyrestart YY_PROTO(( FILE *input_file ));
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 )
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 ));
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 * ));
265 #define yy_new_buffer yy_create_buffer
267 #define yy_set_interactive(is_interactive) \
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; \
274 #define yy_set_bol(at_bol) \
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; \
281 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
284 #define YY_USES_REJECT
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;
294 #define yytext_ptr yytext
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[] ));
301 /* Done after the current pattern has been matched and before the
302 * corresponding action - sets up yytext.
304 #define YY_DO_BEFORE_ACTION \
305 yytext_ptr = yy_bp; \
306 yyleng = (int) (yy_cp - yy_bp); \
307 yy_hold_char = *yy_cp; \
311 #define YY_NUM_RULES 89
312 #define YY_END_OF_BUFFER 90
313 static yyconst short int yy_acclist[266] =
315 90, 89, 88, 89, 89, 89, 89, 89, 25, 89,
316 21, 89, 22, 89, 26, 89, 83, 89, 83, 89,
317 3, 89, 4, 89, 9, 89, 19, 89, 11, 89,
318 87, 89, 87, 89, 87, 89, 87, 89, 87, 89,
319 87, 89, 87, 89, 87, 89, 87, 89, 87, 89,
320 87, 89, 87, 89, 87, 89, 87, 89, 87, 89,
321 87, 89, 87, 89, 87, 89, 81, 86, 1, 2,
322 32, 23, 83, 24, 84, 36, 13, 17, 75, 74,
323 73, 82, 15, 37, 78, 77, 76, 87, 87, 87,
324 72, 87, 87, 87, 87, 87, 20, 87, 87, 87,
326 87, 87, 16, 87, 12, 87, 61, 87, 14, 87,
327 10, 87, 87, 87, 87, 18, 87, 87, 87, 7,
328 87, 34, 87, 87, 87, 87, 87, 87, 87, 87,
329 87, 87, 87, 87, 87, 87, 87, 85, 29, 87,
330 33, 87, 87, 87, 40, 87, 87, 65, 87, 87,
331 87, 87, 87, 59, 87, 87, 87, 31, 87, 30,
332 87, 27, 87, 28, 87, 39, 87, 8, 87, 87,
333 87, 60, 87, 87, 87, 87, 45, 87, 87, 87,
334 87, 87, 70, 87, 87, 87, 87, 35, 87, 38,
335 87, 80, 87, 51, 87, 62, 87, 87, 68, 87,
337 87, 87, 58, 87, 79, 87, 87, 50, 87, 42,
338 87, 43, 87, 87, 87, 47, 87, 55, 87, 46,
339 87, 87, 87, 41, 87, 5, 87, 48, 87, 87,
340 49, 87, 63, 87, 6, 87, 87, 87, 53, 87,
341 87, 87, 56, 87, 87, 71, 87, 52, 87, 54,
342 87, 64, 87, 87, 57, 87, 87, 67, 87, 44,
346 static yyconst short int yy_accept[189] =
348 1, 1, 1, 2, 3, 5, 6, 7, 8, 9,
349 11, 13, 15, 17, 19, 21, 23, 25, 27, 29,
350 31, 33, 35, 37, 39, 41, 43, 45, 47, 49,
351 51, 53, 55, 57, 59, 61, 63, 65, 67, 68,
352 68, 69, 69, 70, 70, 71, 72, 73, 74, 75,
353 76, 76, 77, 78, 79, 80, 81, 82, 83, 84,
354 85, 86, 87, 88, 89, 90, 91, 93, 94, 95,
355 96, 97, 99, 100, 101, 102, 103, 105, 107, 109,
356 111, 113, 114, 115, 116, 118, 119, 120, 122, 124,
357 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
359 135, 136, 137, 138, 139, 141, 143, 144, 145, 147,
360 148, 150, 151, 152, 153, 154, 156, 157, 158, 160,
361 162, 164, 166, 168, 170, 171, 172, 174, 175, 176,
362 177, 179, 180, 181, 182, 183, 185, 186, 187, 188,
363 190, 192, 194, 196, 198, 199, 201, 202, 203, 205,
364 207, 208, 210, 212, 214, 215, 216, 218, 220, 222,
365 223, 224, 226, 228, 230, 231, 233, 235, 237, 238,
366 239, 241, 242, 243, 245, 246, 248, 250, 252, 254,
367 255, 257, 258, 260, 262, 264, 266, 266
370 static yyconst int yy_ec[256] =
372 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
373 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 2, 4, 5, 6, 1, 1, 1, 1, 7,
376 8, 9, 10, 1, 11, 1, 12, 13, 14, 15,
377 14, 14, 14, 14, 14, 14, 14, 16, 17, 18,
378 19, 20, 1, 1, 21, 22, 23, 24, 25, 26,
379 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
380 37, 38, 39, 40, 41, 42, 43, 44, 30, 30,
381 1, 1, 1, 1, 45, 1, 46, 46, 47, 48,
383 46, 46, 30, 30, 30, 30, 30, 30, 30, 30,
384 30, 30, 30, 30, 49, 30, 30, 30, 30, 50,
385 30, 30, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 static yyconst int yy_meta[51] =
404 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
405 3, 1, 4, 4, 4, 1, 1, 1, 1, 1,
406 4, 4, 4, 4, 4, 4, 3, 3, 3, 3,
407 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
408 3, 3, 3, 3, 3, 4, 4, 4, 3, 3
411 static yyconst short int yy_base[193] =
413 0, 0, 228, 229, 229, 208, 221, 222, 216, 211,
414 41, 46, 229, 49, 52, 229, 229, 53, 203, 33,
415 36, 0, 183, 36, 51, 54, 44, 194, 51, 58,
416 61, 70, 65, 72, 73, 82, 191, 183, 229, 212,
417 229, 213, 229, 207, 206, 229, 229, 100, 229, 104,
418 0, 229, 229, 229, 229, 229, 229, 229, 229, 229,
419 229, 229, 229, 0, 174, 188, 0, 176, 88, 171,
420 185, 0, 179, 175, 168, 180, 164, 0, 0, 0,
421 0, 93, 169, 178, 174, 164, 173, 0, 0, 173,
422 174, 156, 88, 94, 160, 162, 172, 171, 169, 149,
424 166, 159, 149, 0, 0, 0, 150, 149, 169, 158,
425 153, 141, 141, 136, 153, 0, 143, 144, 0, 0,
426 0, 0, 160, 0, 136, 142, 0, 131, 130, 138,
427 154, 128, 142, 143, 129, 0, 139, 132, 130, 0,
428 146, 0, 0, 0, 134, 0, 134, 137, 0, 0,
429 122, 0, 141, 0, 117, 116, 0, 0, 138, 129,
430 122, 121, 0, 120, 108, 0, 0, 0, 94, 108,
431 0, 91, 95, 0, 87, 0, 0, 0, 0, 81,
432 0, 53, 0, 0, 0, 0, 229, 137, 141, 145,
437 static yyconst short int yy_def[193] =
439 187, 1, 187, 187, 187, 187, 188, 189, 190, 187,
440 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
441 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
442 191, 191, 191, 191, 191, 191, 191, 191, 187, 188,
443 187, 189, 187, 190, 190, 187, 187, 187, 187, 187,
444 192, 187, 187, 187, 187, 187, 187, 187, 187, 187,
445 187, 187, 187, 191, 191, 191, 191, 191, 191, 191,
446 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
447 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
448 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
450 191, 191, 191, 192, 191, 191, 191, 191, 191, 191,
451 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
452 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
453 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
454 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
455 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
456 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
457 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
458 191, 191, 191, 191, 191, 191, 0, 187, 187, 187,
463 static yyconst short int yy_nxt[280] =
465 4, 5, 5, 6, 7, 8, 9, 4, 10, 11,
466 12, 13, 14, 15, 15, 16, 17, 18, 19, 20,
467 21, 22, 23, 24, 25, 26, 27, 22, 28, 22,
468 22, 29, 30, 31, 32, 33, 22, 34, 35, 36,
469 22, 22, 37, 38, 4, 22, 22, 22, 22, 22,
470 47, 59, 60, 48, 48, 48, 49, 65, 50, 50,
471 50, 48, 48, 48, 48, 48, 48, 104, 77, 66,
472 52, 53, 54, 68, 74, 80, 69, 186, 82, 61,
473 62, 63, 70, 78, 71, 85, 83, 72, 75, 86,
474 81, 76, 84, 91, 73, 87, 93, 96, 51, 55,
476 56, 57, 99, 88, 185, 92, 94, 89, 97, 95,
477 128, 90, 48, 48, 48, 98, 50, 50, 50, 100,
478 108, 117, 101, 109, 118, 130, 184, 129, 183, 182,
479 181, 180, 179, 131, 178, 177, 119, 40, 40, 40,
480 40, 42, 42, 42, 42, 44, 176, 44, 44, 64,
481 64, 175, 174, 173, 172, 171, 170, 169, 168, 167,
482 166, 165, 164, 163, 162, 161, 160, 159, 158, 157,
483 156, 155, 154, 153, 152, 151, 150, 149, 148, 147,
484 146, 145, 144, 143, 142, 141, 140, 139, 138, 137,
485 136, 135, 134, 133, 132, 127, 126, 125, 124, 123,
487 122, 121, 120, 116, 115, 114, 113, 112, 111, 110,
488 107, 106, 105, 45, 45, 43, 41, 103, 102, 79,
489 67, 58, 46, 45, 43, 41, 39, 187, 3, 187,
490 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
491 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
492 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
493 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
494 187, 187, 187, 187, 187, 187, 187, 187, 187
497 static yyconst short int yy_chk[280] =
499 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
500 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
502 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
503 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
504 11, 20, 20, 11, 11, 11, 12, 21, 12, 12,
505 12, 14, 14, 14, 15, 15, 15, 192, 27, 21,
506 18, 18, 18, 24, 26, 29, 24, 182, 30, 20,
507 20, 20, 25, 27, 25, 31, 30, 25, 26, 31,
508 29, 26, 30, 33, 25, 32, 34, 35, 14, 18,
510 18, 18, 36, 32, 180, 33, 34, 32, 35, 34,
511 93, 32, 48, 48, 48, 35, 50, 50, 50, 36,
512 69, 82, 36, 69, 82, 94, 175, 93, 173, 172,
513 170, 169, 165, 94, 164, 162, 82, 188, 188, 188,
514 188, 189, 189, 189, 189, 190, 161, 190, 190, 191,
515 191, 160, 159, 156, 155, 153, 151, 148, 147, 145,
516 141, 139, 138, 137, 135, 134, 133, 132, 131, 130,
517 129, 128, 126, 125, 123, 118, 117, 115, 114, 113,
518 112, 111, 110, 109, 108, 107, 103, 102, 101, 100,
519 99, 98, 97, 96, 95, 92, 91, 90, 87, 86,
521 85, 84, 83, 77, 76, 75, 74, 73, 71, 70,
522 68, 66, 65, 45, 44, 42, 40, 38, 37, 28,
523 23, 19, 10, 9, 8, 7, 6, 3, 187, 187,
524 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
525 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
526 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
527 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
528 187, 187, 187, 187, 187, 187, 187, 187, 187
531 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
532 static char *yy_full_match;
536 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
537 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
541 #define yymore() yymore_used_but_not_detected
542 #define YY_MORE_ADJ 0
543 #define YY_RESTORE_YY_MORE_OFFSET
545 #line 1 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
547 /*===-- Lexer.l - Scanner for Stacker language -----------------*- C++ -*--===//
549 // The LLVM Compiler Infrastructure
551 // This file was developed by Reid Spencer and donated to the LLVM research
552 // group and is distributed under the University of Illinois Open Source
553 // License. See LICENSE.TXT for details.
555 //===----------------------------------------------------------------------===//
557 // This file implements the flex scanner for Stacker languages files.
559 //===----------------------------------------------------------------------===*/
560 #define YY_NEVER_INTERACTIVE 1
561 #line 29 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
563 #include "StackerCompiler.h"
564 #include "StackerParser.h"
566 /* Conversion of text ints to binary */
567 static int64_t IntToVal(const char *Buffer) {
569 for (; *Buffer; Buffer++) {
570 int64_t OldRes = Result;
572 Result += *Buffer-'0';
573 if (Result < OldRes) // Uh, oh, overflow detected!!!
574 StackerCompiler::ThrowException("constant bigger than 64 bits detected!");
579 /* Conversion of text hexadecimal ints to binary */
580 static int64_t HexIntToVal(const char *Buffer) {
582 for (; *Buffer; ++Buffer) {
583 int64_t OldRes = Result;
586 if (C >= '0' && C <= '9')
588 else if (C >= 'A' && C <= 'F')
590 else if (C >= 'a' && C <= 'f')
593 if (Result < OldRes) // Uh, oh, overflow detected!!!
594 StackerCompiler::ThrowException("constant bigger than 64 bits detected!");
599 #define YY_NEVER_INTERACTIVE 1
600 /* Comments start with a ; and go till end of line */
601 /* You can also embed them in ( ... ) */
602 /* We ignore white space */
603 /* jdentifiers start with a % sign */
604 /* Strings can contain any character except " and \ */
605 /* Positive and negative integer constants*/
606 /* Special Characters - name them to avoid flex confusion */
607 #line 608 "Lexer.cpp"
609 /* Macros after this point can all be overridden by user definitions in
613 #ifndef YY_SKIP_YYWRAP
615 extern "C" int yywrap YY_PROTO(( void ));
617 extern int yywrap YY_PROTO(( void ));
622 static inline void yyunput YY_PROTO(( int c, char *buf_ptr ));
626 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
629 #ifdef YY_NEED_STRLEN
630 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
635 static int yyinput YY_PROTO(( void ));
637 static int input YY_PROTO(( void ));
642 static int yy_start_stack_ptr = 0;
643 static int yy_start_stack_depth = 0;
644 static int *yy_start_stack = 0;
645 #ifndef YY_NO_PUSH_STATE
646 static void yy_push_state YY_PROTO(( int new_state ));
648 #ifndef YY_NO_POP_STATE
649 static void yy_pop_state YY_PROTO(( void ));
651 #ifndef YY_NO_TOP_STATE
652 static int yy_top_state YY_PROTO(( void ));
656 #define YY_NO_PUSH_STATE 1
657 #define YY_NO_POP_STATE 1
658 #define YY_NO_TOP_STATE 1
661 #ifdef YY_MALLOC_DECL
669 /* Just try to get by without declaring the routines. This will fail
670 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
671 * or sizeof(void*) != sizeof(int).
676 /* Amount of stuff to slurp up with each read. */
677 #ifndef YY_READ_BUF_SIZE
678 #define YY_READ_BUF_SIZE 8192
681 /* Copy whatever the last rule matched to the standard output. */
684 /* This used to be an fputs(), but since the string might contain NUL's,
685 * we now use fwrite().
687 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
690 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
691 * is returned in "result".
694 #define YY_INPUT(buf,result,max_size) \
695 if ( yy_current_buffer->yy_is_interactive ) \
698 for ( n = 0; n < max_size && \
699 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
702 buf[n++] = (char) c; \
703 if ( c == EOF && ferror( yyin ) ) \
704 YY_FATAL_ERROR( "input in flex scanner failed" ); \
707 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
708 && ferror( yyin ) ) \
709 YY_FATAL_ERROR( "input in flex scanner failed" );
712 /* No semi-colon after return; correct usage is to write "yyterminate();" -
713 * we don't want an extra ';' after the "return" because that will cause
714 * some compilers to complain about unreachable statements.
717 #define yyterminate() return YY_NULL
720 /* Number of entries by which start-condition stack grows. */
721 #ifndef YY_START_STACK_INCR
722 #define YY_START_STACK_INCR 25
725 /* Report a fatal error. */
726 #ifndef YY_FATAL_ERROR
727 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
730 /* Default declaration of generated scanner - a define so the user can
731 * easily add parameters.
734 #define YY_DECL int yylex YY_PROTO(( void ))
737 /* Code executed at the beginning of each rule, after yytext and yyleng
740 #ifndef YY_USER_ACTION
741 #define YY_USER_ACTION
744 /* Code executed at the end of each rule. */
746 #define YY_BREAK break;
749 #define YY_RULE_SETUP \
754 register yy_state_type yy_current_state;
755 register char *yy_cp = NULL, *yy_bp = NULL;
758 #line 112 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
761 #line 762 "Lexer.cpp"
772 yy_start = 1; /* first start state */
780 if ( ! yy_current_buffer )
782 yy_create_buffer( yyin, YY_BUF_SIZE );
784 yy_load_buffer_state();
787 while ( 1 ) /* loops until end-of-file is reached */
791 /* Support of yytext. */
792 *yy_cp = yy_hold_char;
794 /* yy_bp points to the position in yy_ch_buf of the start of
799 yy_current_state = yy_start;
800 yy_state_ptr = yy_state_buf;
801 *yy_state_ptr++ = yy_current_state;
805 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
806 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
808 yy_current_state = (int) yy_def[yy_current_state];
809 if ( yy_current_state >= 188 )
810 yy_c = yy_meta[(unsigned int) yy_c];
812 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
813 *yy_state_ptr++ = yy_current_state;
816 while ( yy_current_state != 187 );
819 yy_current_state = *--yy_state_ptr;
820 yy_lp = yy_accept[yy_current_state];
821 find_rule: /* we branch to this label when backing up */
822 for ( ; ; ) /* until we find what rule we matched */
824 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
826 yy_act = yy_acclist[yy_lp];
828 yy_full_match = yy_cp;
833 yy_current_state = *--yy_state_ptr;
834 yy_lp = yy_accept[yy_current_state];
839 if ( yy_act != YY_END_OF_BUFFER )
842 for ( yyl = 0; yyl < yyleng; ++yyl )
843 if ( yytext[yyl] == '\n' )
847 do_action: /* This label is used only to access EOF actions. */
851 { /* beginning of action switch */
853 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
854 yy_c_buf_p = yy_cp -= 1;
855 YY_DO_BEFORE_ACTION; /* set up yytext again */
857 #line 114 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
858 { /* Ignore comments */ }
862 #line 115 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
863 { /* Ignore comments */ }
867 #line 117 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
872 #line 118 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
877 #line 120 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
882 #line 121 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
887 #line 122 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
892 #line 123 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
897 #line 124 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
902 #line 125 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
907 #line 126 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
912 #line 127 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
917 #line 128 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
918 { return LESS_EQUAL; }
922 #line 129 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
923 { return LESS_EQUAL; }
927 #line 130 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
928 { return MORE_EQUAL; }
932 #line 131 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
933 { return MORE_EQUAL; }
937 #line 132 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
938 { return NOT_EQUAL; }
942 #line 133 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
943 { return NOT_EQUAL; }
947 #line 134 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
952 #line 135 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
957 #line 137 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
962 #line 138 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
967 #line 139 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
972 #line 140 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
977 #line 141 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
982 #line 142 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
987 #line 143 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
992 #line 144 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
997 #line 145 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1002 #line 146 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1007 #line 147 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1012 #line 148 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1013 { return STAR_SLASH; }
1017 #line 150 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1022 #line 151 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1027 #line 152 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1032 #line 153 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1037 #line 154 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1042 #line 156 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1047 #line 157 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1052 #line 158 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1057 #line 159 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1062 #line 160 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1067 #line 161 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1072 #line 162 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1077 #line 163 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1082 #line 164 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1087 #line 165 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1092 #line 166 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1097 #line 167 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1102 #line 168 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1107 #line 169 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1112 #line 170 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1117 #line 171 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1122 #line 172 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1127 #line 173 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1132 #line 174 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1137 #line 176 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1142 #line 177 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1147 #line 178 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1152 #line 179 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1157 #line 181 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1162 #line 182 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1167 #line 183 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1172 #line 184 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1177 #line 185 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1182 #line 187 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1187 #line 188 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1192 #line 189 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1197 #line 190 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1202 #line 191 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1207 #line 192 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1212 #line 193 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1217 #line 195 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1222 #line 196 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1227 #line 197 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1232 #line 199 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1237 #line 200 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1242 #line 201 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1243 { return OUT_CHAR; }
1247 #line 203 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1252 #line 205 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1257 #line 207 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1258 { StackerCompiler::ThrowException(
1259 "You probably meant to use a <> instead of !=" ); }
1263 #line 210 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1264 { StackerCompiler::ThrowException(
1265 "You probably meant to use a single = .. this isn't C"); }
1269 #line 213 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1270 { Stackerlval.IntegerVal = IntToVal(yytext); return INTEGER; }
1274 #line 214 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1275 { uint64_t Val = IntToVal(yytext+1);
1276 // +1: we have bigger negative range
1277 if (Val > (uint64_t)INT64_MAX+1)
1278 StackerCompiler::ThrowException(
1279 "Constant too large for signed 64 bits!");
1280 Stackerlval.IntegerVal = -Val;
1286 #line 222 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1287 { Stackerlval.IntegerVal = HexIntToVal(yytext+3);
1293 #line 226 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1294 { yytext[strlen(yytext)-1] = 0; // nuke end quote
1295 Stackerlval.StringVal = strdup(yytext+1); // Nuke start quote
1301 #line 231 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1302 { Stackerlval.StringVal = strdup(yytext); return IDENTIFIER; }
1306 #line 233 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1307 { /* Ignore whitespace */ }
1311 #line 234 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"
1312 YY_FATAL_ERROR( "flex scanner jammed" );
1314 #line 1315 "Lexer.cpp"
1315 case YY_STATE_EOF(INITIAL):
1318 case YY_END_OF_BUFFER:
1320 /* Amount of text matched not including the EOB char. */
1321 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1323 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1324 *yy_cp = yy_hold_char;
1325 YY_RESTORE_YY_MORE_OFFSET
1327 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1329 /* We're scanning a new file or input source. It's
1330 * possible that this happened because the user
1331 * just pointed yyin at a new source and called
1332 * yylex(). If so, then we have to assure
1333 * consistency between yy_current_buffer and our
1334 * globals. Here is the right place to do so, because
1335 * this is the first action (other than possibly a
1336 * back-up) that will match for the new input source.
1338 yy_n_chars = yy_current_buffer->yy_n_chars;
1339 yy_current_buffer->yy_input_file = yyin;
1340 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1343 /* Note that here we test for yy_c_buf_p "<=" to the position
1344 * of the first EOB in the buffer, since yy_c_buf_p will
1345 * already have been incremented past the NUL character
1346 * (since all states make transitions on EOB to the
1347 * end-of-buffer state). Contrast this with the test
1350 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1351 { /* This was really a NUL. */
1352 yy_state_type yy_next_state;
1354 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1356 yy_current_state = yy_get_previous_state();
1358 /* Okay, we're now positioned to make the NUL
1359 * transition. We couldn't have
1360 * yy_get_previous_state() go ahead and do it
1361 * for us because it doesn't know how to deal
1362 * with the possibility of jamming (and we don't
1363 * want to build jamming into it because then it
1364 * will run more slowly).
1367 yy_next_state = yy_try_NUL_trans( yy_current_state );
1369 yy_bp = yytext_ptr + YY_MORE_ADJ;
1371 if ( yy_next_state )
1373 /* Consume the NUL. */
1374 yy_cp = ++yy_c_buf_p;
1375 yy_current_state = yy_next_state;
1382 goto yy_find_action;
1386 else switch ( yy_get_next_buffer() )
1388 case EOB_ACT_END_OF_FILE:
1390 yy_did_buffer_switch_on_eof = 0;
1394 /* Note: because we've taken care in
1395 * yy_get_next_buffer() to have set up
1396 * yytext, we can now set up
1397 * yy_c_buf_p so that if some total
1398 * hoser (like flex itself) wants to
1399 * call the scanner after we return the
1400 * YY_NULL, it'll still work - another
1401 * YY_NULL will get returned.
1403 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1405 yy_act = YY_STATE_EOF(YY_START);
1411 if ( ! yy_did_buffer_switch_on_eof )
1417 case EOB_ACT_CONTINUE_SCAN:
1419 yytext_ptr + yy_amount_of_matched_text;
1421 yy_current_state = yy_get_previous_state();
1424 yy_bp = yytext_ptr + YY_MORE_ADJ;
1427 case EOB_ACT_LAST_MATCH:
1429 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1431 yy_current_state = yy_get_previous_state();
1434 yy_bp = yytext_ptr + YY_MORE_ADJ;
1435 goto yy_find_action;
1442 "fatal flex scanner internal error--no action found" );
1443 } /* end of action switch */
1444 } /* end of scanning one token */
1445 } /* end of yylex */
1448 /* yy_get_next_buffer - try to read in a new buffer
1450 * Returns a code representing an action:
1451 * EOB_ACT_LAST_MATCH -
1452 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1453 * EOB_ACT_END_OF_FILE - end of file
1456 static int yy_get_next_buffer()
1458 register char *dest = yy_current_buffer->yy_ch_buf;
1459 register char *source = yytext_ptr;
1460 register int number_to_move, i;
1463 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1465 "fatal flex scanner internal error--end of buffer missed" );
1467 if ( yy_current_buffer->yy_fill_buffer == 0 )
1468 { /* Don't try to fill the buffer, so this is an EOF. */
1469 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1471 /* We matched a single character, the EOB, so
1472 * treat this as a final EOF.
1474 return EOB_ACT_END_OF_FILE;
1479 /* We matched some text prior to the EOB, first
1482 return EOB_ACT_LAST_MATCH;
1486 /* Try to read more data. */
1488 /* First move last chars to start of buffer. */
1489 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1491 for ( i = 0; i < number_to_move; ++i )
1492 *(dest++) = *(source++);
1494 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1495 /* don't do the read, it's not guaranteed to return an EOF,
1498 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1503 yy_current_buffer->yy_buf_size - number_to_move - 1;
1505 while ( num_to_read <= 0 )
1506 { /* Not enough room in the buffer - grow it. */
1507 #ifdef YY_USES_REJECT
1509 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1512 /* just a shorter name for the current buffer */
1513 YY_BUFFER_STATE b = yy_current_buffer;
1515 int yy_c_buf_p_offset =
1516 (int) (yy_c_buf_p - b->yy_ch_buf);
1518 if ( b->yy_is_our_buffer )
1520 int new_size = b->yy_buf_size * 2;
1522 if ( new_size <= 0 )
1523 b->yy_buf_size += b->yy_buf_size / 8;
1525 b->yy_buf_size *= 2;
1527 b->yy_ch_buf = (char *)
1528 /* Include room in for 2 EOB chars. */
1529 yy_flex_realloc( (void *) b->yy_ch_buf,
1530 b->yy_buf_size + 2 );
1533 /* Can't grow it, we don't own it. */
1536 if ( ! b->yy_ch_buf )
1538 "fatal error - scanner input buffer overflow" );
1540 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1542 num_to_read = yy_current_buffer->yy_buf_size -
1547 if ( num_to_read > YY_READ_BUF_SIZE )
1548 num_to_read = YY_READ_BUF_SIZE;
1550 /* Read in more data. */
1551 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1552 yy_n_chars, num_to_read );
1554 yy_current_buffer->yy_n_chars = yy_n_chars;
1557 if ( yy_n_chars == 0 )
1559 if ( number_to_move == YY_MORE_ADJ )
1561 ret_val = EOB_ACT_END_OF_FILE;
1567 ret_val = EOB_ACT_LAST_MATCH;
1568 yy_current_buffer->yy_buffer_status =
1569 YY_BUFFER_EOF_PENDING;
1574 ret_val = EOB_ACT_CONTINUE_SCAN;
1576 yy_n_chars += number_to_move;
1577 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1578 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1580 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1586 /* yy_get_previous_state - get the state just before the EOB char was reached */
1588 static yy_state_type yy_get_previous_state()
1590 register yy_state_type yy_current_state;
1591 register char *yy_cp;
1593 yy_current_state = yy_start;
1594 yy_state_ptr = yy_state_buf;
1595 *yy_state_ptr++ = yy_current_state;
1597 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1599 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1600 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1602 yy_current_state = (int) yy_def[yy_current_state];
1603 if ( yy_current_state >= 188 )
1604 yy_c = yy_meta[(unsigned int) yy_c];
1606 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1607 *yy_state_ptr++ = yy_current_state;
1610 return yy_current_state;
1614 /* yy_try_NUL_trans - try to make a transition on the NUL character
1617 * next_state = yy_try_NUL_trans( current_state );
1620 #ifdef YY_USE_PROTOS
1621 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1623 static yy_state_type yy_try_NUL_trans( yy_current_state )
1624 yy_state_type yy_current_state;
1627 register int yy_is_jam;
1629 register YY_CHAR yy_c = 1;
1630 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1632 yy_current_state = (int) yy_def[yy_current_state];
1633 if ( yy_current_state >= 188 )
1634 yy_c = yy_meta[(unsigned int) yy_c];
1636 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1637 yy_is_jam = (yy_current_state == 187);
1639 *yy_state_ptr++ = yy_current_state;
1641 return yy_is_jam ? 0 : yy_current_state;
1646 #ifdef YY_USE_PROTOS
1647 static inline void yyunput( int c, register char *yy_bp )
1649 static inline void yyunput( c, yy_bp )
1651 register char *yy_bp;
1654 register char *yy_cp = yy_c_buf_p;
1656 /* undo effects of setting up yytext */
1657 *yy_cp = yy_hold_char;
1659 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1660 { /* need to shift things up to make room */
1661 /* +2 for EOB chars. */
1662 register int number_to_move = yy_n_chars + 2;
1663 register char *dest = &yy_current_buffer->yy_ch_buf[
1664 yy_current_buffer->yy_buf_size + 2];
1665 register char *source =
1666 &yy_current_buffer->yy_ch_buf[number_to_move];
1668 while ( source > yy_current_buffer->yy_ch_buf )
1669 *--dest = *--source;
1671 yy_cp += (int) (dest - source);
1672 yy_bp += (int) (dest - source);
1673 yy_current_buffer->yy_n_chars =
1674 yy_n_chars = yy_current_buffer->yy_buf_size;
1676 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1677 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1680 *--yy_cp = (char) c;
1686 yy_hold_char = *yy_cp;
1689 #endif /* ifndef YY_NO_UNPUT */
1694 static int yyinput()
1701 *yy_c_buf_p = yy_hold_char;
1703 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1705 /* yy_c_buf_p now points to the character we want to return.
1706 * If this occurs *before* the EOB characters, then it's a
1707 * valid NUL; if not, then we've hit the end of the buffer.
1709 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1710 /* This was really a NUL. */
1714 { /* need more input */
1715 int offset = yy_c_buf_p - yytext_ptr;
1718 switch ( yy_get_next_buffer() )
1720 case EOB_ACT_LAST_MATCH:
1721 /* This happens because yy_g_n_b()
1722 * sees that we've accumulated a
1723 * token and flags that we need to
1724 * try matching the token before
1725 * proceeding. But for input(),
1726 * there's no matching to consider.
1727 * So convert the EOB_ACT_LAST_MATCH
1728 * to EOB_ACT_END_OF_FILE.
1731 /* Reset buffer status. */
1736 case EOB_ACT_END_OF_FILE:
1741 if ( ! yy_did_buffer_switch_on_eof )
1750 case EOB_ACT_CONTINUE_SCAN:
1751 yy_c_buf_p = yytext_ptr + offset;
1757 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1758 *yy_c_buf_p = '\0'; /* preserve yytext */
1759 yy_hold_char = *++yy_c_buf_p;
1766 #endif /* YY_NO_INPUT */
1768 #ifdef YY_USE_PROTOS
1769 void yyrestart( FILE *input_file )
1771 void yyrestart( input_file )
1775 if ( ! yy_current_buffer )
1776 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1778 yy_init_buffer( yy_current_buffer, input_file );
1779 yy_load_buffer_state();
1783 #ifdef YY_USE_PROTOS
1784 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1786 void yy_switch_to_buffer( new_buffer )
1787 YY_BUFFER_STATE new_buffer;
1790 if ( yy_current_buffer == new_buffer )
1793 if ( yy_current_buffer )
1795 /* Flush out information for old buffer. */
1796 *yy_c_buf_p = yy_hold_char;
1797 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1798 yy_current_buffer->yy_n_chars = yy_n_chars;
1801 yy_current_buffer = new_buffer;
1802 yy_load_buffer_state();
1804 /* We don't actually know whether we did this switch during
1805 * EOF (yywrap()) processing, but the only time this flag
1806 * is looked at is after yywrap() is called, so it's safe
1807 * to go ahead and always set it.
1809 yy_did_buffer_switch_on_eof = 1;
1813 #ifdef YY_USE_PROTOS
1814 void yy_load_buffer_state( void )
1816 void yy_load_buffer_state()
1819 yy_n_chars = yy_current_buffer->yy_n_chars;
1820 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1821 yyin = yy_current_buffer->yy_input_file;
1822 yy_hold_char = *yy_c_buf_p;
1826 #ifdef YY_USE_PROTOS
1827 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1829 YY_BUFFER_STATE yy_create_buffer( file, size )
1836 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1838 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1840 b->yy_buf_size = size;
1842 /* yy_ch_buf has to be 2 characters longer than the size given because
1843 * we need to put in 2 end-of-buffer characters.
1845 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1846 if ( ! b->yy_ch_buf )
1847 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1849 b->yy_is_our_buffer = 1;
1851 yy_init_buffer( b, file );
1857 #ifdef YY_USE_PROTOS
1858 void yy_delete_buffer( YY_BUFFER_STATE b )
1860 void yy_delete_buffer( b )
1867 if ( b == yy_current_buffer )
1868 yy_current_buffer = (YY_BUFFER_STATE) 0;
1870 if ( b->yy_is_our_buffer )
1871 yy_flex_free( (void *) b->yy_ch_buf );
1873 yy_flex_free( (void *) b );
1878 #ifdef YY_USE_PROTOS
1879 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1881 void yy_init_buffer( b, file )
1888 yy_flush_buffer( b );
1890 b->yy_input_file = file;
1891 b->yy_fill_buffer = 1;
1893 #if YY_ALWAYS_INTERACTIVE
1894 b->yy_is_interactive = 1;
1896 #if YY_NEVER_INTERACTIVE
1897 b->yy_is_interactive = 0;
1899 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1905 #ifdef YY_USE_PROTOS
1906 void yy_flush_buffer( YY_BUFFER_STATE b )
1908 void yy_flush_buffer( b )
1918 /* We always need two end-of-buffer characters. The first causes
1919 * a transition to the end-of-buffer state. The second causes
1920 * a jam in that state.
1922 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1923 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1925 b->yy_buf_pos = &b->yy_ch_buf[0];
1928 b->yy_buffer_status = YY_BUFFER_NEW;
1930 if ( b == yy_current_buffer )
1931 yy_load_buffer_state();
1935 #ifndef YY_NO_SCAN_BUFFER
1936 #ifdef YY_USE_PROTOS
1937 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1939 YY_BUFFER_STATE yy_scan_buffer( base, size )
1947 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1948 base[size-1] != YY_END_OF_BUFFER_CHAR )
1949 /* They forgot to leave room for the EOB's. */
1952 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1954 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1956 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1957 b->yy_buf_pos = b->yy_ch_buf = base;
1958 b->yy_is_our_buffer = 0;
1959 b->yy_input_file = 0;
1960 b->yy_n_chars = b->yy_buf_size;
1961 b->yy_is_interactive = 0;
1963 b->yy_fill_buffer = 0;
1964 b->yy_buffer_status = YY_BUFFER_NEW;
1966 yy_switch_to_buffer( b );
1973 #ifndef YY_NO_SCAN_STRING
1974 #ifdef YY_USE_PROTOS
1975 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1977 YY_BUFFER_STATE yy_scan_string( yy_str )
1978 yyconst char *yy_str;
1982 for ( len = 0; yy_str[len]; ++len )
1985 return yy_scan_bytes( yy_str, len );
1990 #ifndef YY_NO_SCAN_BYTES
1991 #ifdef YY_USE_PROTOS
1992 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1994 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1995 yyconst char *bytes;
2004 /* Get memory for full buffer, including space for trailing EOB's. */
2006 buf = (char *) yy_flex_alloc( n );
2008 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2010 for ( i = 0; i < len; ++i )
2013 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2015 b = yy_scan_buffer( buf, n );
2017 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2019 /* It's okay to grow etc. this buffer, and we should throw it
2020 * away when we're done.
2022 b->yy_is_our_buffer = 1;
2029 #ifndef YY_NO_PUSH_STATE
2030 #ifdef YY_USE_PROTOS
2031 static void yy_push_state( int new_state )
2033 static void yy_push_state( new_state )
2037 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2041 yy_start_stack_depth += YY_START_STACK_INCR;
2042 new_size = yy_start_stack_depth * sizeof( int );
2044 if ( ! yy_start_stack )
2045 yy_start_stack = (int *) yy_flex_alloc( new_size );
2048 yy_start_stack = (int *) yy_flex_realloc(
2049 (void *) yy_start_stack, new_size );
2051 if ( ! yy_start_stack )
2053 "out of memory expanding start-condition stack" );
2056 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2063 #ifndef YY_NO_POP_STATE
2064 static void yy_pop_state()
2066 if ( --yy_start_stack_ptr < 0 )
2067 YY_FATAL_ERROR( "start-condition stack underflow" );
2069 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2074 #ifndef YY_NO_TOP_STATE
2075 static int yy_top_state()
2077 return yy_start_stack[yy_start_stack_ptr - 1];
2081 #ifndef YY_EXIT_FAILURE
2082 #define YY_EXIT_FAILURE 2
2085 #ifdef YY_USE_PROTOS
2086 static void yy_fatal_error( yyconst char msg[] )
2088 static void yy_fatal_error( msg )
2092 (void) fprintf( stderr, "%s\n", msg );
2093 exit( YY_EXIT_FAILURE );
2098 /* Redefine yyless() so it works in section 3 code. */
2104 /* Undo effects of setting up yytext. */ \
2105 yytext[yyleng] = yy_hold_char; \
2106 yy_c_buf_p = yytext + n; \
2107 yy_hold_char = *yy_c_buf_p; \
2108 *yy_c_buf_p = '\0'; \
2114 /* Internal utility routines. */
2117 #ifdef YY_USE_PROTOS
2118 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2120 static void yy_flex_strncpy( s1, s2, n )
2127 for ( i = 0; i < n; ++i )
2132 #ifdef YY_NEED_STRLEN
2133 #ifdef YY_USE_PROTOS
2134 static int yy_flex_strlen( yyconst char *s )
2136 static int yy_flex_strlen( s )
2141 for ( n = 0; s[n]; ++n )
2149 #ifdef YY_USE_PROTOS
2150 static void *yy_flex_alloc( yy_size_t size )
2152 static void *yy_flex_alloc( size )
2156 return (void *) malloc( size );
2159 #ifdef YY_USE_PROTOS
2160 static inline void *yy_flex_realloc( void *ptr, yy_size_t size )
2162 static inline void *yy_flex_realloc( ptr, size )
2167 /* The cast to (char *) in the following accommodates both
2168 * implementations that use char* generic pointers, and those
2169 * that use void* generic pointers. It works with the latter
2170 * because both ANSI C and C++ allow castless assignment from
2171 * any pointer type to void*, and deal with argument conversions
2172 * as though doing an assignment.
2174 return (void *) realloc( (char *) ptr, size );
2177 #ifdef YY_USE_PROTOS
2178 static void yy_flex_free( void *ptr )
2180 static void yy_flex_free( ptr )
2194 #line 234 "/proj/llvm/build/projects/Stacker/../../../llvm/projects/Stacker/lib/compiler/Lexer.l"