#define yy_create_buffer ti_yy_create_buffer #define yy_delete_buffer ti_yy_delete_buffer #define yy_scan_buffer ti_yy_scan_buffer #define yy_scan_string ti_yy_scan_string #define yy_scan_bytes ti_yy_scan_bytes #define yy_flex_debug ti_yy_flex_debug #define yy_init_buffer ti_yy_init_buffer #define yy_flush_buffer ti_yy_flush_buffer #define yy_load_buffer_state ti_yy_load_buffer_state #define yy_switch_to_buffer ti_yy_switch_to_buffer #define yyin ti_yyin #define yyleng ti_yyleng #define yylex ti_yylex #define yyout ti_yyout #define yyrestart ti_yyrestart #define yytext ti_yytext /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #ifndef _WIN32 #include #else #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #endif /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 116 #define YY_END_OF_BUFFER 117 static yyconst short int yy_accept[444] = { 0, 0, 0, 117, 115, 1, 2, 91, 89, 115, 71, 91, 91, 87, 90, 91, 91, 91, 90, 91, 73, 72, 91, 91, 91, 91, 91, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 91, 1, 95, 89, 88, 89, 0, 5, 71, 105, 92, 109, 87, 87, 87, 103, 112, 101, 113, 102, 79, 0, 0, 104, 78, 73, 0, 80, 0, 85, 76, 0, 72, 75, 98, 96, 94, 114, 97, 99, 110, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 17, 71, 71, 71, 71, 71, 71, 71, 25, 71, 71, 71, 71, 71, 71, 71, 58, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 111, 93, 89, 89, 89, 89, 89, 87, 86, 87, 87, 87, 87, 79, 0, 83, 0, 0, 0, 4, 78, 78, 0, 82, 0, 81, 74, 106, 107, 100, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 24, 71, 71, 71, 71, 71, 29, 71, 71, 71, 33, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 50, 71, 71, 71, 89, 0, 88, 0, 89, 89, 89, 86, 87, 87, 0, 79, 3, 0, 78, 81, 84, 77, 108, 71, 71, 71, 71, 71, 10, 11, 71, 13, 71, 71, 71, 71, 71, 19, 71, 71, 71, 71, 71, 68, 71, 71, 71, 71, 71, 71, 71, 31, 71, 71, 34, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 46, 71, 71, 69, 51, 71, 71, 0, 0, 0, 89, 87, 71, 71, 71, 9, 71, 12, 14, 67, 71, 71, 71, 71, 70, 21, 23, 71, 71, 71, 71, 71, 71, 71, 59, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 40, 71, 71, 71, 43, 71, 71, 71, 47, 71, 71, 53, 0, 0, 0, 89, 87, 71, 7, 71, 71, 71, 71, 18, 71, 71, 71, 71, 71, 27, 61, 71, 71, 32, 71, 71, 71, 71, 71, 71, 71, 38, 39, 71, 55, 41, 71, 44, 71, 71, 48, 71, 71, 0, 71, 8, 71, 71, 16, 20, 22, 54, 71, 71, 71, 71, 71, 62, 35, 71, 71, 36, 71, 56, 71, 71, 71, 71, 71, 0, 6, 71, 15, 71, 71, 71, 71, 71, 71, 71, 71, 42, 71, 64, 71, 52, 63, 60, 71, 71, 30, 65, 57, 71, 37, 71, 49, 26, 28, 66, 71, 71, 45, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 11, 14, 15, 16, 17, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 11, 22, 23, 24, 21, 21, 25, 25, 25, 26, 27, 28, 7, 7, 7, 7, 7, 29, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 30, 7, 7, 11, 31, 11, 32, 7, 1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 7, 42, 43, 44, 45, 46, 47, 7, 48, 49, 50, 51, 52, 53, 54, 55, 56, 11, 57, 11, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[58] = { 0, 1, 1, 2, 1, 3, 1, 4, 1, 1, 3, 1, 1, 1, 1, 1, 1, 5, 5, 5, 6, 1, 1, 1, 1, 6, 6, 6, 6, 4, 4, 3, 1, 6, 5, 6, 6, 6, 5, 4, 4, 4, 4, 4, 4, 7, 4, 4, 7, 4, 7, 8, 4, 4, 4, 4, 4, 1 } ; static yyconst short int yy_base[459] = { 0, 0, 0, 797, 798, 794, 798, 772, 53, 791, 0, 770, 50, 50, 798, 769, 48, 49, 47, 62, 71, 111, 798, 46, 52, 56, 768, 28, 47, 70, 46, 51, 78, 744, 89, 743, 99, 35, 109, 751, 112, 75, 741, 746, 47, 783, 798, 91, 798, 163, 781, 798, 0, 798, 798, 798, 773, 798, 210, 798, 798, 798, 798, 798, 245, 770, 778, 798, 267, 87, 291, 798, 157, 798, 798, 0, 0, 798, 757, 798, 798, 798, 798, 120, 798, 730, 729, 731, 132, 726, 109, 742, 741, 728, 734, 720, 721, 719, 725, 722, 720, 717, 714, 0, 117, 136, 111, 713, 709, 716, 717, 0, 722, 148, 715, 143, 723, 706, 712, 708, 708, 87, 705, 710, 705, 705, 147, 154, 149, 707, 798, 798, 742, 167, 199, 205, 325, 736, 798, 735, 215, 221, 367, 798, 232, 798, 732, 187, 740, 798, 0, 798, 318, 798, 249, 329, 164, 798, 798, 719, 691, 703, 696, 705, 704, 699, 698, 699, 685, 683, 193, 698, 696, 692, 691, 678, 693, 692, 687, 677, 671, 210, 680, 670, 682, 685, 678, 675, 0, 666, 671, 665, 670, 661, 655, 657, 658, 664, 655, 659, 656, 664, 652, 660, 663, 649, 663, 650, 647, 649, 649, 656, 0, 656, 658, 640, 798, 195, 798, 261, 271, 216, 414, 798, 281, 443, 296, 352, 798, 303, 389, 798, 798, 798, 798, 630, 628, 631, 600, 598, 0, 0, 586, 0, 556, 547, 555, 544, 551, 0, 544, 551, 544, 536, 542, 0, 524, 536, 524, 522, 533, 517, 521, 0, 506, 517, 0, 513, 522, 513, 504, 519, 514, 509, 501, 514, 494, 500, 495, 500, 486, 493, 487, 483, 0, 472, 465, 0, 0, 463, 475, 393, 467, 460, 482, 504, 473, 455, 471, 0, 468, 0, 0, 0, 452, 453, 458, 458, 0, 450, 0, 457, 458, 446, 439, 451, 442, 445, 0, 445, 442, 441, 434, 417, 426, 415, 429, 424, 413, 424, 0, 419, 420, 404, 0, 406, 397, 411, 394, 397, 396, 0, 528, 265, 0, 543, 565, 401, 0, 390, 397, 378, 378, 0, 377, 368, 382, 387, 383, 0, 0, 381, 381, 0, 365, 352, 360, 355, 358, 352, 333, 0, 0, 339, 0, 0, 343, 0, 333, 325, 0, 337, 330, 0, 318, 0, 317, 327, 0, 0, 0, 0, 313, 309, 304, 305, 302, 0, 0, 288, 285, 0, 289, 0, 278, 279, 270, 256, 260, 0, 0, 242, 0, 240, 225, 228, 222, 221, 209, 200, 199, 0, 178, 0, 162, 0, 0, 0, 157, 164, 0, 0, 0, 155, 0, 110, 0, 0, 0, 0, 81, 70, 0, 798, 603, 611, 616, 624, 632, 640, 648, 656, 660, 666, 672, 676, 680, 682, 684 } ; static yyconst short int yy_def[459] = { 0, 443, 1, 443, 443, 443, 443, 443, 444, 445, 446, 443, 443, 447, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 443, 443, 443, 444, 443, 448, 445, 443, 446, 443, 443, 443, 449, 443, 449, 443, 443, 443, 443, 443, 443, 450, 451, 443, 443, 20, 443, 443, 443, 443, 443, 452, 21, 443, 443, 443, 443, 443, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 443, 443, 448, 453, 444, 444, 448, 449, 443, 443, 449, 449, 449, 443, 443, 443, 450, 450, 451, 443, 68, 443, 443, 443, 443, 443, 452, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 443, 453, 443, 454, 444, 444, 448, 443, 449, 449, 443, 443, 443, 443, 443, 443, 443, 443, 443, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 453, 453, 455, 222, 225, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 453, 453, 456, 222, 225, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 457, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 458, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 0, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 } ; static yyconst short int yy_nxt[856] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, 22, 23, 24, 25, 10, 10, 10, 10, 10, 10, 4, 26, 27, 28, 29, 30, 31, 32, 33, 10, 34, 10, 35, 10, 36, 37, 38, 39, 40, 41, 10, 42, 43, 10, 10, 10, 44, 48, 54, 57, 60, 85, 62, 64, 64, 64, 64, 78, 79, 130, 61, 63, 55, 65, 80, 81, 86, 66, 82, 83, 58, 111, 94, 49, 67, 68, 112, 69, 69, 69, 70, 95, 87, 96, 88, 48, 71, 72, 73, 74, 75, 89, 90, 131, 97, 442, 71, 72, 73, 91, 98, 125, 92, 74, 126, 93, 443, 441, 99, 202, 100, 49, 127, 101, 75, 68, 103, 76, 76, 76, 76, 107, 104, 105, 203, 108, 71, 72, 73, 77, 443, 113, 158, 159, 109, 185, 71, 72, 73, 110, 118, 119, 120, 77, 114, 186, 115, 166, 167, 116, 180, 121, 122, 181, 123, 440, 124, 133, 163, 154, 154, 218, 47, 155, 155, 155, 155, 164, 182, 134, 134, 135, 192, 195, 183, 184, 210, 208, 196, 213, 439, 214, 233, 47, 209, 193, 47, 219, 147, 218, 47, 438, 228, 48, 211, 437, 233, 47, 212, 48, 47, 436, 47, 136, 56, 220, 220, 220, 435, 139, 48, 221, 221, 221, 138, 219, 140, 140, 141, 49, 138, 224, 224, 224, 434, 49, 433, 56, 56, 56, 56, 245, 246, 56, 226, 226, 49, 56, 227, 227, 227, 227, 257, 432, 56, 258, 431, 56, 430, 56, 142, 64, 64, 64, 64, 155, 155, 155, 155, 218, 143, 144, 145, 429, 428, 48, 427, 291, 291, 292, 143, 144, 145, 150, 150, 150, 150, 221, 221, 221, 138, 426, 151, 152, 153, 219, 425, 56, 56, 56, 424, 49, 151, 152, 153, 68, 423, 70, 70, 70, 70, 293, 227, 227, 227, 227, 71, 72, 73, 230, 230, 230, 230, 422, 421, 420, 71, 72, 73, 216, 229, 229, 419, 418, 230, 230, 230, 230, 417, 416, 415, 222, 222, 222, 222, 155, 155, 155, 155, 222, 222, 222, 222, 414, 231, 413, 232, 222, 222, 222, 222, 222, 222, 412, 231, 411, 232, 410, 227, 227, 227, 227, 408, 407, 406, 136, 57, 143, 405, 145, 404, 403, 402, 225, 225, 225, 225, 143, 401, 145, 400, 225, 225, 225, 225, 399, 398, 218, 397, 225, 225, 225, 225, 225, 225, 230, 230, 230, 230, 342, 342, 342, 396, 395, 151, 394, 153, 142, 216, 393, 392, 391, 390, 219, 151, 389, 153, 388, 387, 386, 294, 294, 294, 294, 385, 384, 382, 381, 294, 294, 294, 294, 380, 379, 378, 377, 294, 294, 294, 294, 294, 294, 57, 376, 375, 374, 373, 372, 371, 295, 295, 295, 295, 370, 369, 368, 367, 295, 295, 295, 295, 218, 366, 365, 364, 295, 295, 295, 295, 295, 295, 363, 362, 343, 343, 343, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 219, 345, 345, 345, 345, 350, 349, 348, 347, 345, 345, 345, 345, 293, 341, 340, 339, 345, 345, 345, 345, 345, 345, 346, 346, 346, 346, 338, 337, 336, 335, 346, 346, 346, 346, 218, 334, 333, 332, 346, 346, 346, 346, 346, 346, 331, 330, 343, 343, 343, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 219, 47, 47, 47, 47, 318, 317, 316, 315, 47, 47, 47, 47, 314, 313, 312, 311, 47, 47, 47, 47, 47, 47, 56, 56, 56, 56, 310, 309, 308, 307, 56, 56, 56, 56, 306, 305, 304, 303, 56, 56, 56, 56, 56, 56, 47, 302, 47, 47, 47, 47, 47, 47, 50, 50, 50, 50, 50, 50, 50, 50, 52, 52, 52, 52, 52, 56, 301, 56, 56, 56, 56, 56, 56, 132, 300, 132, 132, 132, 132, 132, 132, 137, 299, 137, 137, 137, 137, 137, 137, 146, 146, 146, 146, 146, 146, 146, 146, 148, 148, 148, 148, 148, 148, 148, 148, 156, 156, 217, 298, 217, 217, 217, 217, 217, 217, 217, 297, 217, 296, 217, 217, 344, 344, 290, 344, 383, 383, 409, 409, 217, 217, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 149, 147, 223, 57, 216, 215, 207, 206, 205, 204, 201, 200, 199, 198, 197, 194, 191, 190, 189, 188, 187, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 165, 162, 161, 160, 157, 149, 147, 138, 51, 45, 129, 128, 117, 106, 102, 84, 59, 53, 51, 46, 45, 443, 3, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 } ; static yyconst short int yy_chk[856] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 12, 13, 16, 27, 17, 18, 18, 18, 18, 23, 23, 44, 16, 17, 12, 19, 24, 24, 27, 19, 25, 25, 13, 37, 30, 8, 19, 20, 37, 20, 20, 20, 20, 30, 28, 31, 28, 47, 20, 20, 20, 20, 20, 28, 29, 44, 31, 441, 20, 20, 20, 29, 32, 41, 29, 20, 41, 29, 69, 440, 32, 121, 32, 47, 41, 32, 20, 21, 34, 21, 21, 21, 21, 36, 34, 34, 121, 36, 21, 21, 21, 21, 69, 38, 83, 83, 36, 106, 21, 21, 21, 36, 40, 40, 40, 21, 38, 106, 38, 90, 90, 38, 104, 40, 40, 104, 40, 435, 40, 49, 88, 72, 72, 133, 49, 72, 72, 72, 72, 88, 105, 49, 49, 49, 113, 115, 105, 105, 127, 126, 115, 128, 433, 128, 156, 49, 126, 113, 49, 133, 147, 217, 49, 429, 147, 134, 127, 428, 156, 49, 127, 135, 49, 424, 49, 49, 58, 134, 134, 134, 422, 58, 221, 135, 135, 135, 140, 217, 58, 58, 58, 134, 141, 140, 140, 140, 420, 135, 419, 141, 141, 141, 58, 170, 170, 58, 144, 144, 221, 58, 144, 144, 144, 144, 181, 418, 58, 181, 417, 58, 416, 58, 58, 64, 64, 64, 64, 154, 154, 154, 154, 343, 64, 64, 64, 415, 414, 220, 413, 219, 219, 219, 64, 64, 64, 68, 68, 68, 68, 220, 220, 220, 224, 411, 68, 68, 68, 343, 408, 224, 224, 224, 407, 220, 68, 68, 68, 70, 406, 70, 70, 70, 70, 219, 226, 226, 226, 226, 70, 70, 70, 229, 229, 229, 229, 405, 404, 402, 70, 70, 70, 136, 152, 152, 400, 399, 152, 152, 152, 152, 396, 395, 394, 136, 136, 136, 136, 155, 155, 155, 155, 136, 136, 136, 136, 393, 155, 392, 155, 136, 136, 136, 136, 136, 136, 387, 155, 386, 155, 384, 227, 227, 227, 227, 382, 381, 379, 136, 142, 227, 378, 227, 376, 373, 370, 142, 142, 142, 142, 227, 369, 227, 368, 142, 142, 142, 142, 367, 366, 291, 365, 142, 142, 142, 142, 142, 142, 230, 230, 230, 230, 291, 291, 291, 364, 362, 230, 361, 230, 142, 222, 358, 357, 356, 355, 291, 230, 354, 230, 352, 351, 350, 222, 222, 222, 222, 349, 347, 340, 339, 222, 222, 222, 222, 338, 337, 336, 335, 222, 222, 222, 222, 222, 222, 225, 333, 332, 331, 329, 328, 327, 225, 225, 225, 225, 326, 325, 324, 323, 225, 225, 225, 225, 292, 322, 321, 320, 225, 225, 225, 225, 225, 225, 319, 317, 292, 292, 292, 316, 315, 314, 313, 312, 311, 309, 307, 306, 305, 304, 292, 294, 294, 294, 294, 300, 298, 297, 296, 294, 294, 294, 294, 293, 290, 289, 286, 294, 294, 294, 294, 294, 294, 295, 295, 295, 295, 285, 283, 282, 281, 295, 295, 295, 295, 342, 280, 279, 278, 295, 295, 295, 295, 295, 295, 277, 276, 342, 342, 342, 275, 274, 273, 272, 271, 270, 269, 268, 267, 265, 264, 342, 345, 345, 345, 345, 262, 261, 260, 259, 345, 345, 345, 345, 258, 257, 256, 254, 345, 345, 345, 345, 345, 345, 346, 346, 346, 346, 253, 252, 251, 250, 346, 346, 346, 346, 248, 247, 246, 245, 346, 346, 346, 346, 346, 346, 444, 244, 444, 444, 444, 444, 444, 444, 445, 445, 445, 445, 445, 445, 445, 445, 446, 446, 446, 446, 446, 447, 242, 447, 447, 447, 447, 447, 447, 448, 239, 448, 448, 448, 448, 448, 448, 449, 238, 449, 449, 449, 449, 449, 449, 450, 450, 450, 450, 450, 450, 450, 450, 451, 451, 451, 451, 451, 451, 451, 451, 452, 452, 453, 237, 453, 453, 453, 453, 453, 453, 454, 236, 454, 235, 454, 454, 455, 455, 215, 455, 456, 456, 457, 457, 458, 458, 214, 213, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 187, 186, 185, 184, 183, 182, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 148, 146, 139, 137, 132, 129, 125, 124, 123, 122, 120, 119, 118, 117, 116, 114, 112, 110, 109, 108, 107, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 89, 87, 86, 85, 78, 66, 65, 56, 50, 45, 43, 42, 39, 35, 33, 26, 15, 11, 9, 7, 5, 3, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "lexer.ll" #define INITIAL 0 /* Lexical analyzer for Titanium */ /* Author: Paul N. Hilfinger */ /* Copyright (C) 1995, 1997, 2003, 2004 by the Regents of the University * of California. All rights reserved. */ #line 8 "lexer.ll" #include #include #include #include #include #include #include "AST.h" #include "errors.h" #include "lex-string.h" #include "parse.h" #include "tokens.h" #include "parser.h" /* Current position in the source file. You must maintain this. */ static SourcePosn srcPosn; static bool titaniumSource; extern CompileUnitNode_loadinfo_t current_CompileUnitNode_info; /* The undefined position. Used to as the position of nodes that */ /* have no meaningful position in the source. */ const SourcePosn NoSourcePosition = { NULL, 0 }; static inline void setPosn() { yylval.Terminal.posn = srcPosn; srcPosn.posn += yyleng; } static map filepos_map; static string curfile; string stripCWDprefix(string s) { while (s.find("./") == 0) s = s.erase(0,2); return s; } void parse(FILE *fp, string name, string tmpname, bool titaniumFile) { yyin = fp; filepos_map.clear(); srcPosn.file = new File(stripCWDprefix(name)); srcPosn.posn = 1; curfile = tmpname; titaniumSource = titaniumFile; yyparse(); } static void noteEmbeddedNewlines(); // Return titanium keyword if parsing titanium code, normal identifier otherwise static int tikw(int kw) { if (titaniumSource) return kw; // Java, handle as identifier yylval.Terminal.val = intern(yytext); return IDENTIFIER; } #define YY_NO_UNPUT 1 #line 792 "lex.ti_yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap YY_PROTO(( void )); #else extern int yywrap YY_PROTO(( void )); #endif #endif #ifndef YY_NO_UNPUT static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif #ifndef yytext_ptr static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen YY_PROTO(( yyconst char * )); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif #endif #if YY_STACK_USED static int yy_start_stack_ptr = 0; static int yy_start_stack_depth = 0; static int *yy_start_stack = 0; #ifndef YY_NO_PUSH_STATE static void yy_push_state YY_PROTO(( int new_state )); #endif #ifndef YY_NO_POP_STATE static void yy_pop_state YY_PROTO(( void )); #endif #ifndef YY_NO_TOP_STATE static int yy_top_state YY_PROTO(( void )); #endif #else #define YY_NO_PUSH_STATE 1 #define YY_NO_POP_STATE 1 #define YY_NO_TOP_STATE 1 #endif #ifdef YY_MALLOC_DECL YY_MALLOC_DECL #else #if __STDC__ #ifndef __cplusplus #include #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ } #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 88 "lexer.ll" /* Whitespace */ #line 959 "lex.ti_yy.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 444 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 798 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 92 "lexer.ll" { srcPosn.posn += yyleng; } YY_BREAK case 2: YY_RULE_SETUP #line 94 "lexer.ll" { srcPosn.file->defineLineEnd(srcPosn.posn); srcPosn.posn += 1; } YY_BREAK /* Comments (Section 1.4) */ /* Traditional and Doc comments */ case 3: YY_RULE_SETUP #line 101 "lexer.ll" { noteEmbeddedNewlines(); srcPosn.posn += yyleng; } YY_BREAK /* C++-style comment */ case 4: YY_RULE_SETUP #line 109 "lexer.ll" { srcPosn.posn += yyleng; srcPosn.file->defineLineEnd(srcPosn.posn-1); } YY_BREAK /* line directive from the preprocessor looks like: '#[line] [0-9]+ ("filename") [ignored junk]\n' pragma looks like: '#pragma TI arguments...\n' */ case 5: YY_RULE_SETUP #line 117 "lexer.ll" { char *p = yytext; assert(*p == '#'); p++; while (*p && isspace(*p)) p++; if (!strncmp(p,"pragma ",7)) { p += 6; while (*p && isspace(*p)) p++; if (toupper(p[0]) == 'T' && toupper(p[1]) == 'I' && isspace(toupper(p[2]))) { p += 2; while (*p && isspace(*p)) p++; if (!strncmp(p, "nobcheck", 8)) { current_CompileUnitNode_info.pragma.force_nobcheck = 1; YY_BREAK; } else if (!strncmp(p, "nosrcpos", 8)) { current_CompileUnitNode_info.pragma.no_srcpos = 1; YY_BREAK; } else { Error(srcPosn) << "unrecognized #pragma Ti " << p << endl; YY_BREAK; } } else { /* ignore other "#pragma"s, which are inserted by some preprocessors (e.g. gcc on darwin) */ YY_BREAK; } } while (*p && !isdigit(*p)) p += 1; int linenum = atoi(p); if (linenum <= 0) { cerr << "Unrecognized line directive:\n" << yytext << endl; exit(1); } while (*p && isdigit(*p)) p += 1; while (*p && *p != '\"') p += 1; if (*p != '\"') { /* xlc omits the filename if it hasn't changed */ while ((int) srcPosn.posnToLineNumber() < linenum) srcPosn.file->defineLineEnd(srcPosn.posn++); } else { p += 1; char *begin = p; while (*p != '\0' && *p != '\"') p += 1; if (*p != '\"') { cerr << "Unrecognized line directive:\n" << yytext << endl; exit(1); } char name[255]; strncpy(name, begin, p-begin); name[p-begin] = '\0'; string newname = stripCWDprefix(string(name)); filepos_map[curfile] = srcPosn; // store old file pos if (filepos_map.count(newname)) { // saw it before, restore srcPosn = filepos_map[newname]; } else { // new file srcPosn.file = new File(newname); srcPosn.posn = 1; } while ((int)srcPosn.posnToLineNumber() < linenum) srcPosn.file->defineLineEnd(srcPosn.posn++); curfile = newname; } } YY_BREAK /* Keywords (Section 1.5) */ case 6: YY_RULE_SETUP #line 190 "lexer.ll" { setPosn(); return ABSTRACT; } YY_BREAK case 7: YY_RULE_SETUP #line 191 "lexer.ll" { setPosn(); return ASSERT; } YY_BREAK case 8: YY_RULE_SETUP #line 192 "lexer.ll" { setPosn(); return BOOLEAN; } YY_BREAK case 9: YY_RULE_SETUP #line 193 "lexer.ll" { setPosn(); return BREAK; } YY_BREAK case 10: YY_RULE_SETUP #line 194 "lexer.ll" { setPosn(); return BYTE; } YY_BREAK case 11: YY_RULE_SETUP #line 195 "lexer.ll" { setPosn(); return CASE; } YY_BREAK case 12: YY_RULE_SETUP #line 196 "lexer.ll" { setPosn(); return CATCH; } YY_BREAK case 13: YY_RULE_SETUP #line 197 "lexer.ll" { setPosn(); return CHAR; } YY_BREAK case 14: YY_RULE_SETUP #line 198 "lexer.ll" { setPosn(); return CLASS; } YY_BREAK case 15: YY_RULE_SETUP #line 199 "lexer.ll" { setPosn(); return CONTINUE; } YY_BREAK case 16: YY_RULE_SETUP #line 200 "lexer.ll" { setPosn(); return DEFAULT; } YY_BREAK case 17: YY_RULE_SETUP #line 201 "lexer.ll" { setPosn(); return DO; } YY_BREAK case 18: YY_RULE_SETUP #line 202 "lexer.ll" { setPosn(); return DOUBLE; } YY_BREAK case 19: YY_RULE_SETUP #line 203 "lexer.ll" { setPosn(); return ELSE; } YY_BREAK case 20: YY_RULE_SETUP #line 204 "lexer.ll" { setPosn(); return EXTENDS; } YY_BREAK case 21: YY_RULE_SETUP #line 205 "lexer.ll" { setPosn(); return FINAL; } YY_BREAK case 22: YY_RULE_SETUP #line 206 "lexer.ll" { setPosn(); return FINALLY; } YY_BREAK case 23: YY_RULE_SETUP #line 207 "lexer.ll" { setPosn(); return FLOAT; } YY_BREAK case 24: YY_RULE_SETUP #line 208 "lexer.ll" { setPosn(); return FOR; } YY_BREAK case 25: YY_RULE_SETUP #line 209 "lexer.ll" { setPosn(); return IF; } YY_BREAK case 26: YY_RULE_SETUP #line 210 "lexer.ll" { setPosn(); return IMPLEMENTS; } YY_BREAK case 27: YY_RULE_SETUP #line 211 "lexer.ll" { setPosn(); return IMPORT; } YY_BREAK case 28: YY_RULE_SETUP #line 212 "lexer.ll" { setPosn(); return INSTANCEOF; } YY_BREAK case 29: YY_RULE_SETUP #line 213 "lexer.ll" { setPosn(); return INT; } YY_BREAK case 30: YY_RULE_SETUP #line 214 "lexer.ll" { setPosn(); return INTERFACE; } YY_BREAK case 31: YY_RULE_SETUP #line 215 "lexer.ll" { setPosn(); return LONG; } YY_BREAK case 32: YY_RULE_SETUP #line 216 "lexer.ll" { setPosn(); return NATIVE; } YY_BREAK case 33: YY_RULE_SETUP #line 217 "lexer.ll" { setPosn(); return NEW; } YY_BREAK case 34: YY_RULE_SETUP #line 218 "lexer.ll" { setPosn(); return NULL_VAL; } YY_BREAK case 35: YY_RULE_SETUP #line 219 "lexer.ll" { setPosn(); return _PACKAGE; } YY_BREAK case 36: YY_RULE_SETUP #line 220 "lexer.ll" { setPosn(); return PRIVATE; } YY_BREAK case 37: YY_RULE_SETUP #line 221 "lexer.ll" { setPosn(); return PROTECTED; } YY_BREAK case 38: YY_RULE_SETUP #line 222 "lexer.ll" { setPosn(); return PUBLIC; } YY_BREAK case 39: YY_RULE_SETUP #line 223 "lexer.ll" { setPosn(); return RETURN; } YY_BREAK case 40: YY_RULE_SETUP #line 224 "lexer.ll" { setPosn(); return SHORT; } YY_BREAK case 41: YY_RULE_SETUP #line 225 "lexer.ll" { setPosn(); return STATIC; } YY_BREAK case 42: YY_RULE_SETUP #line 226 "lexer.ll" { setPosn(); return STRICTFP; } YY_BREAK case 43: YY_RULE_SETUP #line 227 "lexer.ll" { setPosn(); return SUPER; } YY_BREAK case 44: YY_RULE_SETUP #line 228 "lexer.ll" { setPosn(); return SWITCH; } YY_BREAK case 45: YY_RULE_SETUP #line 229 "lexer.ll" { setPosn(); return SYNCHRONIZED; } YY_BREAK case 46: YY_RULE_SETUP #line 230 "lexer.ll" { setPosn(); return THIS; } YY_BREAK case 47: YY_RULE_SETUP #line 231 "lexer.ll" { setPosn(); return THROW; } YY_BREAK case 48: YY_RULE_SETUP #line 232 "lexer.ll" { setPosn(); return THROWS; } YY_BREAK case 49: YY_RULE_SETUP #line 233 "lexer.ll" { setPosn(); return TRANSIENT; } YY_BREAK case 50: YY_RULE_SETUP #line 234 "lexer.ll" { setPosn(); return TRY; } YY_BREAK case 51: YY_RULE_SETUP #line 235 "lexer.ll" { setPosn(); return VOID; } YY_BREAK case 52: YY_RULE_SETUP #line 236 "lexer.ll" { setPosn(); return VOLATILE; } YY_BREAK case 53: YY_RULE_SETUP #line 237 "lexer.ll" { setPosn(); return WHILE; } YY_BREAK /* Additional Titanium keywords */ case 54: YY_RULE_SETUP #line 240 "lexer.ll" { setPosn(); return tikw(FOREACH); } YY_BREAK case 55: YY_RULE_SETUP #line 241 "lexer.ll" { setPosn(); return tikw(SINGLE); } YY_BREAK case 56: YY_RULE_SETUP #line 242 "lexer.ll" { setPosn(); return tikw(SGLOBAL); } YY_BREAK case 57: YY_RULE_SETUP #line 243 "lexer.ll" { setPosn(); return tikw(PARTITION); } YY_BREAK case 58: YY_RULE_SETUP #line 244 "lexer.ll" { setPosn(); return tikw(OPERATOR); } YY_BREAK case 59: YY_RULE_SETUP #line 245 "lexer.ll" { setPosn(); return tikw(LOCAL); } YY_BREAK case 60: YY_RULE_SETUP #line 246 "lexer.ll" { setPosn(); return tikw(IMMUTABLE); } YY_BREAK case 61: YY_RULE_SETUP #line 247 "lexer.ll" { setPosn(); return tikw(INLINE); } YY_BREAK case 62: YY_RULE_SETUP #line 248 "lexer.ll" { setPosn(); return tikw(OVERLAP); } YY_BREAK case 63: YY_RULE_SETUP #line 249 "lexer.ll" { setPosn(); return tikw(BROADCAST); } YY_BREAK case 64: YY_RULE_SETUP #line 250 "lexer.ll" { setPosn(); return tikw(TEMPLATE); } YY_BREAK case 65: YY_RULE_SETUP #line 252 "lexer.ll" { setPosn(); return tikw(NONSHARED); } YY_BREAK case 66: YY_RULE_SETUP #line 253 "lexer.ll" { setPosn(); return tikw(POLYSHARED); } YY_BREAK /* Keywords that are reserved (illegal as identifiers), but not used. */ case 67: #line 258 "lexer.ll" case 68: YY_RULE_SETUP #line 258 "lexer.ll" { Error(srcPosn) << "reserved keyword " << yytext << " ignored" << endl; } YY_BREAK /* Boolean literals (Section 1.7.3) */ case 69: YY_RULE_SETUP #line 262 "lexer.ll" { setPosn(); return TRUE_LITERAL; } YY_BREAK case 70: YY_RULE_SETUP #line 263 "lexer.ll" { setPosn(); return FALSE_LITERAL; } YY_BREAK /* Identifiers (Section 1.6) */ case 71: YY_RULE_SETUP #line 268 "lexer.ll" { setPosn(); yylval.Terminal.val = intern (yytext); return IDENTIFIER; } YY_BREAK /* Integer literals (Section 1.7.1) */ case 72: YY_RULE_SETUP #line 277 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext); return INT_LITERAL; } YY_BREAK case 73: YY_RULE_SETUP #line 283 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext); return INT_LITERAL; } YY_BREAK case 74: YY_RULE_SETUP #line 289 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext); return INT_LITERAL; } YY_BREAK case 75: YY_RULE_SETUP #line 295 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext, yyleng-1); return LONG_LITERAL; } YY_BREAK case 76: YY_RULE_SETUP #line 301 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext, yyleng-1); return LONG_LITERAL; } YY_BREAK case 77: YY_RULE_SETUP #line 307 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext, yyleng-1); return LONG_LITERAL; } YY_BREAK /* Floating-Point literals (Section 1.7.2) */ /* Note: The 10/30/95 version allows, e.g., "1.0e". I'm going to assume */ /* is wrong. Is it? */ case 78: #line 320 "lexer.ll" case 79: #line 321 "lexer.ll" case 80: #line 322 "lexer.ll" case 81: YY_RULE_SETUP #line 322 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext); return DOUBLE_LITERAL; } YY_BREAK case 82: #line 329 "lexer.ll" case 83: #line 330 "lexer.ll" case 84: #line 331 "lexer.ll" case 85: YY_RULE_SETUP #line 331 "lexer.ll" { setPosn(); yylval.Terminal.val = new string (yytext); return FLOAT_LITERAL; } YY_BREAK /* Character literals (Section 1.7.4) */ case 86: YY_RULE_SETUP #line 339 "lexer.ll" { setPosn(); yylval.CharTerminal.val = convertCharacter(yytext+1, yyleng-2, srcPosn); return CHARACTER_LITERAL; } YY_BREAK case 87: YY_RULE_SETUP #line 345 "lexer.ll" { Error (srcPosn) << "invalid character literal" << endl; setPosn(); yylval.CharTerminal.val = '?'; return CHARACTER_LITERAL; } YY_BREAK /* String literals (Section 1.7.5) */ case 88: YY_RULE_SETUP #line 355 "lexer.ll" { setPosn(); yylval.StrTerminal.val = new string16( convertString(yytext+1, yyleng-2, srcPosn) ); return STRING_LITERAL; } YY_BREAK case 89: YY_RULE_SETUP #line 361 "lexer.ll" { Error (srcPosn) << "invalid string literal" << endl; setPosn(); yylval.StrTerminal.val = new string16; return STRING_LITERAL; } YY_BREAK /* Separators (Section 1.8) */ case 90: YY_RULE_SETUP #line 370 "lexer.ll" { setPosn(); return yytext[0]; } YY_BREAK /* Operators (Section 1.9) */ case 91: YY_RULE_SETUP #line 374 "lexer.ll" { setPosn(); return yytext[0]; } YY_BREAK case 92: YY_RULE_SETUP #line 376 "lexer.ll" { setPosn(); return CAND; } YY_BREAK case 93: YY_RULE_SETUP #line 377 "lexer.ll" { setPosn(); return COR; } YY_BREAK case 94: YY_RULE_SETUP #line 378 "lexer.ll" { setPosn(); return EQ; } YY_BREAK case 95: YY_RULE_SETUP #line 379 "lexer.ll" { setPosn(); return NE; } YY_BREAK case 96: YY_RULE_SETUP #line 380 "lexer.ll" { setPosn(); return LE; } YY_BREAK case 97: YY_RULE_SETUP #line 381 "lexer.ll" { setPosn(); return GE; } YY_BREAK case 98: YY_RULE_SETUP #line 382 "lexer.ll" { setPosn(); return LSHIFTL; } YY_BREAK case 99: YY_RULE_SETUP #line 383 "lexer.ll" { setPosn(); return ASHIFTR; } YY_BREAK case 100: YY_RULE_SETUP #line 384 "lexer.ll" { setPosn(); return LSHIFTR; } YY_BREAK case 101: YY_RULE_SETUP #line 385 "lexer.ll" { setPosn(); return PLUS_ASG; } YY_BREAK case 102: YY_RULE_SETUP #line 386 "lexer.ll" { setPosn(); return MINUS_ASG; } YY_BREAK case 103: YY_RULE_SETUP #line 387 "lexer.ll" { setPosn(); return MULT_ASG; } YY_BREAK case 104: YY_RULE_SETUP #line 388 "lexer.ll" { setPosn(); return DIV_ASG; } YY_BREAK case 105: YY_RULE_SETUP #line 389 "lexer.ll" { setPosn(); return REM_ASG; } YY_BREAK case 106: YY_RULE_SETUP #line 390 "lexer.ll" { setPosn(); return LSHIFTL_ASG; } YY_BREAK case 107: YY_RULE_SETUP #line 391 "lexer.ll" { setPosn(); return ASHIFTR_ASG; } YY_BREAK case 108: YY_RULE_SETUP #line 392 "lexer.ll" { setPosn(); return LSHIFTR_ASG; } YY_BREAK case 109: YY_RULE_SETUP #line 393 "lexer.ll" { setPosn(); return AND_ASG; } YY_BREAK case 110: YY_RULE_SETUP #line 394 "lexer.ll" { setPosn(); return XOR_ASG; } YY_BREAK case 111: YY_RULE_SETUP #line 395 "lexer.ll" { setPosn(); return OR_ASG; } YY_BREAK case 112: YY_RULE_SETUP #line 396 "lexer.ll" { setPosn(); return PLUSPLUS; } YY_BREAK case 113: YY_RULE_SETUP #line 397 "lexer.ll" { setPosn(); return MINUSMINUS; } YY_BREAK /* Titanium */ case 114: YY_RULE_SETUP #line 400 "lexer.ll" { setPosn(); return GUARDS; } YY_BREAK /* Errors */ case 115: YY_RULE_SETUP #line 404 "lexer.ll" { if (isgraph (yytext[0])) { Error (srcPosn) << "unrecognized character: `" << yytext[0] << "'" << endl; } else { char str[5]; sprintf(str, "%04x", yytext[0]); Error (srcPosn) << "unrecognized character: `" << str << "'" << endl; } setPosn(); } YY_BREAK case 116: YY_RULE_SETUP #line 417 "lexer.ll" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK #line 1762 "lex.ti_yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 444 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 444 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 443); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef _WIN32 #include #else #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 417 "lexer.ll" /* The lexer's current position (a kludge). */ SourcePosn lexerPosition() { return srcPosn; } static void noteEmbeddedNewlines() { char* p; p = strchr(yytext, '\n'); while (p != NULL) { srcPosn.file->defineLineEnd(srcPosn.posn + (p - yytext)); p = strchr(p+1, '\n'); } }