15796c8dcSSimon Schubert #line 2 "ada-lex.c" 25796c8dcSSimon Schubert /* A lexical scanner generated by flex */ 35796c8dcSSimon Schubert 45796c8dcSSimon Schubert /* Scanner skeleton version: 55796c8dcSSimon Schubert * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 65796c8dcSSimon Schubert */ 75796c8dcSSimon Schubert 85796c8dcSSimon Schubert #define FLEX_SCANNER 95796c8dcSSimon Schubert #define YY_FLEX_MAJOR_VERSION 2 105796c8dcSSimon Schubert #define YY_FLEX_MINOR_VERSION 5 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert #include <stdio.h> 135796c8dcSSimon Schubert #include <unistd.h> 145796c8dcSSimon Schubert 155796c8dcSSimon Schubert 165796c8dcSSimon Schubert /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 175796c8dcSSimon Schubert #ifdef c_plusplus 185796c8dcSSimon Schubert #ifndef __cplusplus 195796c8dcSSimon Schubert #define __cplusplus 205796c8dcSSimon Schubert #endif 215796c8dcSSimon Schubert #endif 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert 245796c8dcSSimon Schubert #ifdef __cplusplus 255796c8dcSSimon Schubert 265796c8dcSSimon Schubert #include <stdlib.h> 275796c8dcSSimon Schubert 285796c8dcSSimon Schubert /* Use prototypes in function declarations. */ 295796c8dcSSimon Schubert #define YY_USE_PROTOS 305796c8dcSSimon Schubert 315796c8dcSSimon Schubert /* The "const" storage-class-modifier is valid. */ 325796c8dcSSimon Schubert #define YY_USE_CONST 335796c8dcSSimon Schubert 345796c8dcSSimon Schubert #else /* ! __cplusplus */ 355796c8dcSSimon Schubert 365796c8dcSSimon Schubert #if __STDC__ 375796c8dcSSimon Schubert 385796c8dcSSimon Schubert #define YY_USE_PROTOS 395796c8dcSSimon Schubert #define YY_USE_CONST 405796c8dcSSimon Schubert 415796c8dcSSimon Schubert #endif /* __STDC__ */ 425796c8dcSSimon Schubert #endif /* ! __cplusplus */ 435796c8dcSSimon Schubert 445796c8dcSSimon Schubert #ifdef __TURBOC__ 455796c8dcSSimon Schubert #pragma warn -rch 465796c8dcSSimon Schubert #pragma warn -use 475796c8dcSSimon Schubert #include <io.h> 485796c8dcSSimon Schubert #include <stdlib.h> 495796c8dcSSimon Schubert #define YY_USE_CONST 505796c8dcSSimon Schubert #define YY_USE_PROTOS 515796c8dcSSimon Schubert #endif 525796c8dcSSimon Schubert 535796c8dcSSimon Schubert #ifdef YY_USE_CONST 545796c8dcSSimon Schubert #define yyconst const 555796c8dcSSimon Schubert #else 565796c8dcSSimon Schubert #define yyconst 575796c8dcSSimon Schubert #endif 585796c8dcSSimon Schubert 595796c8dcSSimon Schubert 605796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 615796c8dcSSimon Schubert #define YY_PROTO(proto) proto 625796c8dcSSimon Schubert #else 635796c8dcSSimon Schubert #define YY_PROTO(proto) () 645796c8dcSSimon Schubert #endif 655796c8dcSSimon Schubert 665796c8dcSSimon Schubert /* Returned upon end-of-file. */ 675796c8dcSSimon Schubert #define YY_NULL 0 685796c8dcSSimon Schubert 695796c8dcSSimon Schubert /* Promotes a possibly negative, possibly signed char to an unsigned 705796c8dcSSimon Schubert * integer for use as an array index. If the signed char is negative, 715796c8dcSSimon Schubert * we want to instead treat it as an 8-bit unsigned char, hence the 725796c8dcSSimon Schubert * double cast. 735796c8dcSSimon Schubert */ 745796c8dcSSimon Schubert #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 755796c8dcSSimon Schubert 765796c8dcSSimon Schubert /* Enter a start condition. This macro really ought to take a parameter, 775796c8dcSSimon Schubert * but we do it the disgusting crufty way forced on us by the ()-less 785796c8dcSSimon Schubert * definition of BEGIN. 795796c8dcSSimon Schubert */ 805796c8dcSSimon Schubert #define BEGIN yy_start = 1 + 2 * 815796c8dcSSimon Schubert 825796c8dcSSimon Schubert /* Translate the current start state into a value that can be later handed 835796c8dcSSimon Schubert * to BEGIN to return to the state. The YYSTATE alias is for lex 845796c8dcSSimon Schubert * compatibility. 855796c8dcSSimon Schubert */ 865796c8dcSSimon Schubert #define YY_START ((yy_start - 1) / 2) 875796c8dcSSimon Schubert #define YYSTATE YY_START 885796c8dcSSimon Schubert 895796c8dcSSimon Schubert /* Action number for EOF rule of a given start state. */ 905796c8dcSSimon Schubert #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 915796c8dcSSimon Schubert 925796c8dcSSimon Schubert /* Special action meaning "start processing a new file". */ 935796c8dcSSimon Schubert #define YY_NEW_FILE yyrestart( yyin ) 945796c8dcSSimon Schubert 955796c8dcSSimon Schubert #define YY_END_OF_BUFFER_CHAR 0 965796c8dcSSimon Schubert 975796c8dcSSimon Schubert /* Size of default input buffer. */ 985796c8dcSSimon Schubert #define YY_BUF_SIZE 16384 995796c8dcSSimon Schubert 1005796c8dcSSimon Schubert typedef struct yy_buffer_state *YY_BUFFER_STATE; 1015796c8dcSSimon Schubert 1025796c8dcSSimon Schubert extern int yyleng; 1035796c8dcSSimon Schubert extern FILE *yyin, *yyout; 1045796c8dcSSimon Schubert 1055796c8dcSSimon Schubert #define EOB_ACT_CONTINUE_SCAN 0 1065796c8dcSSimon Schubert #define EOB_ACT_END_OF_FILE 1 1075796c8dcSSimon Schubert #define EOB_ACT_LAST_MATCH 2 1085796c8dcSSimon Schubert 1095796c8dcSSimon Schubert /* The funky do-while in the following #define is used to turn the definition 1105796c8dcSSimon Schubert * int a single C statement (which needs a semi-colon terminator). This 1115796c8dcSSimon Schubert * avoids problems with code like: 1125796c8dcSSimon Schubert * 1135796c8dcSSimon Schubert * if ( condition_holds ) 1145796c8dcSSimon Schubert * yyless( 5 ); 1155796c8dcSSimon Schubert * else 1165796c8dcSSimon Schubert * do_something_else(); 1175796c8dcSSimon Schubert * 1185796c8dcSSimon Schubert * Prior to using the do-while the compiler would get upset at the 1195796c8dcSSimon Schubert * "else" because it interpreted the "if" statement as being all 1205796c8dcSSimon Schubert * done when it reached the ';' after the yyless() call. 1215796c8dcSSimon Schubert */ 1225796c8dcSSimon Schubert 1235796c8dcSSimon Schubert /* Return all but the first 'n' matched characters back to the input stream. */ 1245796c8dcSSimon Schubert 1255796c8dcSSimon Schubert #define yyless(n) \ 1265796c8dcSSimon Schubert do \ 1275796c8dcSSimon Schubert { \ 1285796c8dcSSimon Schubert /* Undo effects of setting up yytext. */ \ 1295796c8dcSSimon Schubert *yy_cp = yy_hold_char; \ 1305796c8dcSSimon Schubert YY_RESTORE_YY_MORE_OFFSET \ 1315796c8dcSSimon Schubert yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 1325796c8dcSSimon Schubert YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 1335796c8dcSSimon Schubert } \ 1345796c8dcSSimon Schubert while ( 0 ) 1355796c8dcSSimon Schubert 1365796c8dcSSimon Schubert #define unput(c) yyunput( c, yytext_ptr ) 1375796c8dcSSimon Schubert 1385796c8dcSSimon Schubert /* The following is because we cannot portably get our hands on size_t 1395796c8dcSSimon Schubert * (without autoconf's help, which isn't available because we want 1405796c8dcSSimon Schubert * flex-generated scanners to compile on their own). 1415796c8dcSSimon Schubert */ 1425796c8dcSSimon Schubert typedef unsigned int yy_size_t; 1435796c8dcSSimon Schubert 1445796c8dcSSimon Schubert 1455796c8dcSSimon Schubert struct yy_buffer_state 1465796c8dcSSimon Schubert { 1475796c8dcSSimon Schubert FILE *yy_input_file; 1485796c8dcSSimon Schubert 1495796c8dcSSimon Schubert char *yy_ch_buf; /* input buffer */ 1505796c8dcSSimon Schubert char *yy_buf_pos; /* current position in input buffer */ 1515796c8dcSSimon Schubert 1525796c8dcSSimon Schubert /* Size of input buffer in bytes, not including room for EOB 1535796c8dcSSimon Schubert * characters. 1545796c8dcSSimon Schubert */ 1555796c8dcSSimon Schubert yy_size_t yy_buf_size; 1565796c8dcSSimon Schubert 1575796c8dcSSimon Schubert /* Number of characters read into yy_ch_buf, not including EOB 1585796c8dcSSimon Schubert * characters. 1595796c8dcSSimon Schubert */ 1605796c8dcSSimon Schubert int yy_n_chars; 1615796c8dcSSimon Schubert 1625796c8dcSSimon Schubert /* Whether we "own" the buffer - i.e., we know we created it, 1635796c8dcSSimon Schubert * and can xrealloc() it to grow it, and should xfree() it to 1645796c8dcSSimon Schubert * delete it. 1655796c8dcSSimon Schubert */ 1665796c8dcSSimon Schubert int yy_is_our_buffer; 1675796c8dcSSimon Schubert 1685796c8dcSSimon Schubert /* Whether this is an "interactive" input source; if so, and 1695796c8dcSSimon Schubert * if we're using stdio for input, then we want to use getc() 1705796c8dcSSimon Schubert * instead of fread(), to make sure we stop fetching input after 1715796c8dcSSimon Schubert * each newline. 1725796c8dcSSimon Schubert */ 1735796c8dcSSimon Schubert int yy_is_interactive; 1745796c8dcSSimon Schubert 1755796c8dcSSimon Schubert /* Whether we're considered to be at the beginning of a line. 1765796c8dcSSimon Schubert * If so, '^' rules will be active on the next match, otherwise 1775796c8dcSSimon Schubert * not. 1785796c8dcSSimon Schubert */ 1795796c8dcSSimon Schubert int yy_at_bol; 1805796c8dcSSimon Schubert 1815796c8dcSSimon Schubert /* Whether to try to fill the input buffer when we reach the 1825796c8dcSSimon Schubert * end of it. 1835796c8dcSSimon Schubert */ 1845796c8dcSSimon Schubert int yy_fill_buffer; 1855796c8dcSSimon Schubert 1865796c8dcSSimon Schubert int yy_buffer_status; 1875796c8dcSSimon Schubert #define YY_BUFFER_NEW 0 1885796c8dcSSimon Schubert #define YY_BUFFER_NORMAL 1 1895796c8dcSSimon Schubert /* When an EOF's been seen but there's still some text to process 1905796c8dcSSimon Schubert * then we mark the buffer as YY_EOF_PENDING, to indicate that we 1915796c8dcSSimon Schubert * shouldn't try reading from the input source any more. We might 1925796c8dcSSimon Schubert * still have a bunch of tokens to match, though, because of 1935796c8dcSSimon Schubert * possible backing-up. 1945796c8dcSSimon Schubert * 1955796c8dcSSimon Schubert * When we actually see the EOF, we change the status to "new" 1965796c8dcSSimon Schubert * (via yyrestart()), so that the user can continue scanning by 1975796c8dcSSimon Schubert * just pointing yyin at a new input file. 1985796c8dcSSimon Schubert */ 1995796c8dcSSimon Schubert #define YY_BUFFER_EOF_PENDING 2 2005796c8dcSSimon Schubert }; 2015796c8dcSSimon Schubert 2025796c8dcSSimon Schubert static YY_BUFFER_STATE yy_current_buffer = 0; 2035796c8dcSSimon Schubert 2045796c8dcSSimon Schubert /* We provide macros for accessing buffer states in case in the 2055796c8dcSSimon Schubert * future we want to put the buffer states in a more general 2065796c8dcSSimon Schubert * "scanner state". 2075796c8dcSSimon Schubert */ 2085796c8dcSSimon Schubert #define YY_CURRENT_BUFFER yy_current_buffer 2095796c8dcSSimon Schubert 2105796c8dcSSimon Schubert 2115796c8dcSSimon Schubert /* yy_hold_char holds the character lost when yytext is formed. */ 2125796c8dcSSimon Schubert static char yy_hold_char; 2135796c8dcSSimon Schubert 2145796c8dcSSimon Schubert static int yy_n_chars; /* number of characters read into yy_ch_buf */ 2155796c8dcSSimon Schubert 2165796c8dcSSimon Schubert 2175796c8dcSSimon Schubert int yyleng; 2185796c8dcSSimon Schubert 2195796c8dcSSimon Schubert /* Points to current character in buffer. */ 2205796c8dcSSimon Schubert static char *yy_c_buf_p = (char *) 0; 2215796c8dcSSimon Schubert static int yy_init = 1; /* whether we need to initialize */ 2225796c8dcSSimon Schubert static int yy_start = 0; /* start state number */ 2235796c8dcSSimon Schubert 2245796c8dcSSimon Schubert /* Flag which is used to allow yywrap()'s to do buffer switches 2255796c8dcSSimon Schubert * instead of setting up a fresh yyin. A bit of a hack ... 2265796c8dcSSimon Schubert */ 2275796c8dcSSimon Schubert static int yy_did_buffer_switch_on_eof; 2285796c8dcSSimon Schubert 2295796c8dcSSimon Schubert void yyrestart YY_PROTO(( FILE *input_file )); 2305796c8dcSSimon Schubert 2315796c8dcSSimon Schubert void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 2325796c8dcSSimon Schubert void yy_load_buffer_state YY_PROTO(( void )); 2335796c8dcSSimon Schubert YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 2345796c8dcSSimon Schubert void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 2355796c8dcSSimon Schubert void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 2365796c8dcSSimon Schubert void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 2375796c8dcSSimon Schubert #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 2385796c8dcSSimon Schubert 2395796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 2405796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 2415796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 2425796c8dcSSimon Schubert 2435796c8dcSSimon Schubert static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 2445796c8dcSSimon Schubert static void *yyxrealloc YY_PROTO(( void *, yy_size_t )); 2455796c8dcSSimon Schubert static void yy_flex_free YY_PROTO(( void * )); 2465796c8dcSSimon Schubert 2475796c8dcSSimon Schubert #define yy_new_buffer yy_create_buffer 2485796c8dcSSimon Schubert 2495796c8dcSSimon Schubert #define yy_set_interactive(is_interactive) \ 2505796c8dcSSimon Schubert { \ 2515796c8dcSSimon Schubert if ( ! yy_current_buffer ) \ 2525796c8dcSSimon Schubert yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 2535796c8dcSSimon Schubert yy_current_buffer->yy_is_interactive = is_interactive; \ 2545796c8dcSSimon Schubert } 2555796c8dcSSimon Schubert 2565796c8dcSSimon Schubert #define yy_set_bol(at_bol) \ 2575796c8dcSSimon Schubert { \ 2585796c8dcSSimon Schubert if ( ! yy_current_buffer ) \ 2595796c8dcSSimon Schubert yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 2605796c8dcSSimon Schubert yy_current_buffer->yy_at_bol = at_bol; \ 2615796c8dcSSimon Schubert } 2625796c8dcSSimon Schubert 2635796c8dcSSimon Schubert #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 2645796c8dcSSimon Schubert 2655796c8dcSSimon Schubert typedef unsigned char YY_CHAR; 2665796c8dcSSimon Schubert FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 2675796c8dcSSimon Schubert typedef int yy_state_type; 2685796c8dcSSimon Schubert extern char *yytext; 2695796c8dcSSimon Schubert #define yytext_ptr yytext 2705796c8dcSSimon Schubert 2715796c8dcSSimon Schubert static yy_state_type yy_get_previous_state YY_PROTO(( void )); 2725796c8dcSSimon Schubert static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 2735796c8dcSSimon Schubert static int yy_get_next_buffer YY_PROTO(( void )); 2745796c8dcSSimon Schubert static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 2755796c8dcSSimon Schubert 2765796c8dcSSimon Schubert /* Done after the current pattern has been matched and before the 2775796c8dcSSimon Schubert * corresponding action - sets up yytext. 2785796c8dcSSimon Schubert */ 2795796c8dcSSimon Schubert #define YY_DO_BEFORE_ACTION \ 2805796c8dcSSimon Schubert yytext_ptr = yy_bp; \ 2815796c8dcSSimon Schubert yyleng = (int) (yy_cp - yy_bp); \ 2825796c8dcSSimon Schubert yy_hold_char = *yy_cp; \ 2835796c8dcSSimon Schubert *yy_cp = '\0'; \ 2845796c8dcSSimon Schubert yy_c_buf_p = yy_cp; 2855796c8dcSSimon Schubert 286*cf7f2e2dSJohn Marino #define YY_NUM_RULES 54 287*cf7f2e2dSJohn Marino #define YY_END_OF_BUFFER 55 288*cf7f2e2dSJohn Marino static yyconst short int yy_accept[196] = 2895796c8dcSSimon Schubert { 0, 290*cf7f2e2dSJohn Marino 0, 0, 0, 0, 55, 53, 1, 1, 15, 52, 291*cf7f2e2dSJohn Marino 42, 53, 44, 45, 42, 43, 42, 42, 42, 4, 292*cf7f2e2dSJohn Marino 4, 42, 42, 42, 42, 51, 48, 48, 48, 48, 293*cf7f2e2dSJohn Marino 48, 48, 48, 48, 48, 48, 48, 41, 0, 14, 294*cf7f2e2dSJohn Marino 0, 52, 0, 0, 0, 0, 0, 0, 0, 36, 295*cf7f2e2dSJohn Marino 2, 0, 35, 0, 47, 47, 38, 0, 0, 4, 296*cf7f2e2dSJohn Marino 0, 0, 50, 37, 39, 0, 34, 40, 0, 0, 297*cf7f2e2dSJohn Marino 48, 0, 48, 48, 48, 48, 48, 16, 21, 48, 298*cf7f2e2dSJohn Marino 48, 48, 48, 26, 48, 48, 48, 48, 48, 48, 299*cf7f2e2dSJohn Marino 0, 14, 0, 12, 12, 0, 33, 2, 0, 47, 3005796c8dcSSimon Schubert 301*cf7f2e2dSJohn Marino 47, 0, 9, 0, 3, 7, 0, 48, 0, 0, 302*cf7f2e2dSJohn Marino 0, 48, 18, 19, 48, 48, 22, 23, 24, 48, 303*cf7f2e2dSJohn Marino 48, 28, 48, 48, 48, 48, 30, 0, 0, 0, 304*cf7f2e2dSJohn Marino 0, 0, 0, 47, 46, 6, 0, 0, 9, 0, 305*cf7f2e2dSJohn Marino 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306*cf7f2e2dSJohn Marino 0, 0, 0, 48, 20, 48, 25, 48, 17, 29, 307*cf7f2e2dSJohn Marino 48, 31, 0, 49, 0, 0, 0, 0, 48, 0, 308*cf7f2e2dSJohn Marino 0, 0, 0, 0, 0, 0, 32, 48, 48, 0, 309*cf7f2e2dSJohn Marino 0, 5, 11, 0, 8, 27, 0, 5, 0, 8, 310*cf7f2e2dSJohn Marino 13, 0, 10, 10, 0 311*cf7f2e2dSJohn Marino 3125796c8dcSSimon Schubert } ; 3135796c8dcSSimon Schubert 3145796c8dcSSimon Schubert static yyconst int yy_ec[256] = 3155796c8dcSSimon Schubert { 0, 3165796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3175796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3185796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3195796c8dcSSimon Schubert 1, 4, 5, 6, 7, 8, 5, 9, 10, 11, 3205796c8dcSSimon Schubert 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 3215796c8dcSSimon Schubert 20, 20, 20, 20, 20, 20, 20, 21, 22, 23, 3225796c8dcSSimon Schubert 24, 25, 5, 26, 30, 31, 32, 33, 34, 35, 323*cf7f2e2dSJohn Marino 36, 37, 38, 36, 39, 40, 41, 42, 43, 36, 324*cf7f2e2dSJohn Marino 36, 44, 45, 46, 47, 36, 48, 49, 36, 36, 3255796c8dcSSimon Schubert 27, 5, 28, 5, 29, 5, 30, 31, 32, 33, 3265796c8dcSSimon Schubert 327*cf7f2e2dSJohn Marino 34, 35, 36, 37, 38, 36, 39, 40, 41, 42, 328*cf7f2e2dSJohn Marino 43, 36, 36, 44, 45, 46, 47, 36, 48, 49, 3295796c8dcSSimon Schubert 36, 36, 26, 22, 26, 5, 1, 1, 1, 1, 3305796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3315796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3325796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3335796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3345796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3355796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3365796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3375796c8dcSSimon Schubert 3385796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3395796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3405796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3415796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3425796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3435796c8dcSSimon Schubert 1, 1, 1, 1, 1 3445796c8dcSSimon Schubert } ; 3455796c8dcSSimon Schubert 346*cf7f2e2dSJohn Marino static yyconst int yy_meta[50] = 3475796c8dcSSimon Schubert { 0, 3485796c8dcSSimon Schubert 1, 2, 3, 4, 5, 6, 7, 8, 5, 9, 3495796c8dcSSimon Schubert 5, 5, 5, 5, 5, 5, 10, 5, 11, 11, 3505796c8dcSSimon Schubert 5, 5, 12, 13, 14, 5, 5, 5, 15, 16, 3515796c8dcSSimon Schubert 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 352*cf7f2e2dSJohn Marino 17, 17, 17, 17, 17, 17, 17, 17, 17 3535796c8dcSSimon Schubert } ; 3545796c8dcSSimon Schubert 355*cf7f2e2dSJohn Marino static yyconst short int yy_base[217] = 3565796c8dcSSimon Schubert { 0, 357*cf7f2e2dSJohn Marino 0, 0, 622, 615, 620, 759, 759, 759, 44, 0, 358*cf7f2e2dSJohn Marino 759, 71, 759, 759, 606, 759, 601, 119, 591, 118, 359*cf7f2e2dSJohn Marino 124, 30, 590, 588, 588, 759, 53, 152, 22, 97, 360*cf7f2e2dSJohn Marino 98, 103, 117, 119, 27, 140, 137, 194, 151, 759, 361*cf7f2e2dSJohn Marino 160, 0, 242, 601, 594, 593, 592, 120, 282, 759, 362*cf7f2e2dSJohn Marino 0, 330, 759, 0, 0, 560, 759, 0, 40, 329, 363*cf7f2e2dSJohn Marino 171, 0, 759, 759, 759, 574, 759, 759, 171, 245, 364*cf7f2e2dSJohn Marino 759, 336, 150, 219, 223, 226, 227, 162, 228, 262, 365*cf7f2e2dSJohn Marino 263, 310, 266, 265, 313, 268, 312, 330, 320, 334, 366*cf7f2e2dSJohn Marino 572, 569, 366, 377, 759, 380, 547, 0, 530, 0, 3675796c8dcSSimon Schubert 368*cf7f2e2dSJohn Marino 501, 169, 363, 46, 365, 0, 503, 386, 402, 417, 369*cf7f2e2dSJohn Marino 0, 417, 335, 344, 412, 387, 360, 386, 406, 413, 370*cf7f2e2dSJohn Marino 431, 407, 425, 408, 437, 438, 421, 518, 0, 472, 371*cf7f2e2dSJohn Marino 497, 475, 474, 759, 0, 456, 0, 246, 458, 284, 372*cf7f2e2dSJohn Marino 462, 451, 403, 464, 477, 478, 454, 408, 402, 392, 373*cf7f2e2dSJohn Marino 390, 364, 376, 509, 455, 483, 458, 485, 473, 489, 374*cf7f2e2dSJohn Marino 491, 492, 367, 759, 387, 516, 366, 48, 535, 326, 375*cf7f2e2dSJohn Marino 312, 270, 220, 219, 207, 164, 501, 509, 511, 144, 376*cf7f2e2dSJohn Marino 282, 527, 98, 117, 529, 519, 42, 540, 321, 543, 377*cf7f2e2dSJohn Marino 562, 403, 548, 551, 759, 580, 590, 606, 611, 627, 3785796c8dcSSimon Schubert 379*cf7f2e2dSJohn Marino 644, 647, 654, 487, 562, 661, 677, 689, 695, 706, 380*cf7f2e2dSJohn Marino 708, 724, 563, 565, 731, 742 3815796c8dcSSimon Schubert } ; 3825796c8dcSSimon Schubert 383*cf7f2e2dSJohn Marino static yyconst short int yy_def[217] = 3845796c8dcSSimon Schubert { 0, 385*cf7f2e2dSJohn Marino 195, 1, 1, 1, 195, 195, 195, 195, 196, 197, 386*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 198, 195, 195, 387*cf7f2e2dSJohn Marino 195, 195, 199, 195, 195, 195, 200, 200, 28, 28, 388*cf7f2e2dSJohn Marino 28, 28, 28, 28, 28, 28, 28, 195, 196, 195, 389*cf7f2e2dSJohn Marino 196, 197, 38, 38, 38, 43, 195, 43, 43, 195, 390*cf7f2e2dSJohn Marino 201, 198, 195, 202, 203, 203, 195, 204, 195, 195, 391*cf7f2e2dSJohn Marino 195, 205, 195, 195, 195, 206, 195, 195, 195, 195, 392*cf7f2e2dSJohn Marino 195, 207, 28, 28, 28, 28, 28, 28, 28, 28, 393*cf7f2e2dSJohn Marino 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 394*cf7f2e2dSJohn Marino 49, 208, 195, 195, 195, 43, 49, 201, 209, 203, 3955796c8dcSSimon Schubert 396*cf7f2e2dSJohn Marino 203, 210, 195, 195, 195, 205, 206, 195, 207, 195, 397*cf7f2e2dSJohn Marino 211, 212, 28, 28, 28, 28, 28, 28, 28, 28, 398*cf7f2e2dSJohn Marino 28, 28, 28, 28, 28, 28, 28, 195, 213, 195, 399*cf7f2e2dSJohn Marino 195, 43, 209, 195, 203, 195, 214, 210, 195, 195, 400*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 401*cf7f2e2dSJohn Marino 195, 195, 215, 212, 28, 28, 28, 28, 28, 28, 402*cf7f2e2dSJohn Marino 28, 28, 195, 195, 43, 195, 216, 195, 195, 195, 403*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 215, 28, 28, 28, 43, 404*cf7f2e2dSJohn Marino 195, 195, 195, 216, 195, 28, 43, 195, 195, 195, 405*cf7f2e2dSJohn Marino 195, 195, 195, 195, 0, 195, 195, 195, 195, 195, 4065796c8dcSSimon Schubert 407*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 408*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195 4095796c8dcSSimon Schubert } ; 4105796c8dcSSimon Schubert 411*cf7f2e2dSJohn Marino static yyconst short int yy_nxt[809] = 4125796c8dcSSimon Schubert { 0, 4135796c8dcSSimon Schubert 6, 7, 8, 7, 6, 9, 6, 10, 11, 12, 4145796c8dcSSimon Schubert 13, 14, 15, 11, 16, 17, 18, 19, 20, 21, 4155796c8dcSSimon Schubert 22, 11, 23, 24, 25, 26, 11, 11, 27, 28, 416*cf7f2e2dSJohn Marino 27, 27, 27, 29, 30, 27, 27, 31, 27, 27, 417*cf7f2e2dSJohn Marino 32, 33, 34, 35, 27, 36, 27, 27, 37, 40, 418*cf7f2e2dSJohn Marino 63, 191, 73, 64, 69, 69, 70, 73, 103, 103, 419*cf7f2e2dSJohn Marino 86, 76, 71, 73, 105, 105, 185, 185, 73, 72, 420*cf7f2e2dSJohn Marino 41, 43, 44, 44, 45, 46, 46, 46, 46, 46, 421*cf7f2e2dSJohn Marino 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 422*cf7f2e2dSJohn Marino 46, 46, 46, 46, 46, 46, 46, 48, 46, 46, 4235796c8dcSSimon Schubert 4245796c8dcSSimon Schubert 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 425*cf7f2e2dSJohn Marino 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 426*cf7f2e2dSJohn Marino 52, 52, 52, 183, 58, 96, 77, 73, 73, 94, 427*cf7f2e2dSJohn Marino 58, 189, 78, 73, 59, 53, 60, 60, 73, 79, 428*cf7f2e2dSJohn Marino 59, 54, 60, 60, 73, 80, 60, 73, 56, 73, 429*cf7f2e2dSJohn Marino 81, 61, 60, 69, 69, 70, 40, 61, 73, 82, 430*cf7f2e2dSJohn Marino 73, 71, 84, 83, 85, 92, 62, 73, 72, 87, 431*cf7f2e2dSJohn Marino 73, 187, 69, 69, 69, 136, 88, 41, 73, 90, 432*cf7f2e2dSJohn Marino 73, 73, 74, 89, 104, 137, 41, 72, 169, 105, 433*cf7f2e2dSJohn Marino 105, 73, 73, 75, 43, 44, 44, 44, 43, 43, 4345796c8dcSSimon Schubert 435*cf7f2e2dSJohn Marino 43, 43, 43, 73, 43, 43, 43, 43, 43, 43, 4365796c8dcSSimon Schubert 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 437*cf7f2e2dSJohn Marino 43, 43, 43, 91, 91, 91, 91, 91, 91, 91, 438*cf7f2e2dSJohn Marino 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 439*cf7f2e2dSJohn Marino 91, 91, 91, 43, 43, 43, 69, 69, 70, 73, 440*cf7f2e2dSJohn Marino 142, 93, 136, 73, 71, 114, 73, 73, 73, 142, 441*cf7f2e2dSJohn Marino 73, 72, 137, 113, 73, 142, 116, 73, 73, 73, 442*cf7f2e2dSJohn Marino 115, 43, 43, 43, 43, 43, 43, 43, 43, 43, 4435796c8dcSSimon Schubert 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 444*cf7f2e2dSJohn Marino 43, 94, 73, 73, 117, 73, 73, 168, 73, 168, 4455796c8dcSSimon Schubert 446*cf7f2e2dSJohn Marino 182, 182, 142, 73, 73, 120, 73, 73, 122, 73, 447*cf7f2e2dSJohn Marino 118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 448*cf7f2e2dSJohn Marino 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 449*cf7f2e2dSJohn Marino 97, 52, 52, 52, 192, 58, 192, 109, 109, 109, 450*cf7f2e2dSJohn Marino 73, 110, 73, 73, 142, 59, 195, 60, 60, 121, 451*cf7f2e2dSJohn Marino 73, 73, 54, 73, 73, 119, 123, 60, 111, 56, 452*cf7f2e2dSJohn Marino 73, 73, 61, 124, 73, 73, 126, 130, 130, 130, 453*cf7f2e2dSJohn Marino 142, 73, 183, 125, 73, 73, 73, 127, 130, 130, 454*cf7f2e2dSJohn Marino 130, 139, 139, 141, 141, 73, 131, 69, 69, 70, 455*cf7f2e2dSJohn Marino 73, 139, 180, 141, 39, 71, 140, 131, 132, 132, 4565796c8dcSSimon Schubert 457*cf7f2e2dSJohn Marino 169, 73, 72, 109, 109, 109, 175, 110, 169, 132, 458*cf7f2e2dSJohn Marino 132, 132, 132, 132, 132, 142, 73, 73, 69, 69, 459*cf7f2e2dSJohn Marino 70, 193, 193, 174, 111, 142, 71, 73, 73, 143, 460*cf7f2e2dSJohn Marino 142, 156, 142, 72, 144, 142, 73, 73, 73, 145, 461*cf7f2e2dSJohn Marino 142, 146, 73, 73, 173, 155, 147, 73, 73, 160, 462*cf7f2e2dSJohn Marino 172, 73, 157, 73, 73, 73, 169, 148, 149, 150, 463*cf7f2e2dSJohn Marino 151, 73, 73, 159, 158, 152, 73, 73, 73, 169, 464*cf7f2e2dSJohn Marino 161, 162, 73, 130, 130, 130, 139, 139, 73, 73, 465*cf7f2e2dSJohn Marino 141, 141, 169, 169, 170, 73, 139, 142, 73, 166, 466*cf7f2e2dSJohn Marino 141, 140, 131, 165, 165, 171, 73, 102, 134, 73, 4675796c8dcSSimon Schubert 468*cf7f2e2dSJohn Marino 142, 142, 102, 73, 165, 165, 165, 165, 165, 165, 469*cf7f2e2dSJohn Marino 69, 69, 70, 73, 73, 73, 177, 164, 71, 73, 470*cf7f2e2dSJohn Marino 179, 73, 73, 163, 73, 72, 73, 108, 178, 181, 471*cf7f2e2dSJohn Marino 73, 73, 73, 73, 182, 182, 69, 69, 70, 73, 472*cf7f2e2dSJohn Marino 135, 73, 73, 159, 71, 188, 188, 190, 190, 73, 473*cf7f2e2dSJohn Marino 73, 72, 73, 186, 134, 188, 93, 190, 188, 188, 474*cf7f2e2dSJohn Marino 73, 190, 190, 130, 130, 130, 194, 194, 188, 194, 475*cf7f2e2dSJohn Marino 194, 190, 106, 128, 128, 167, 194, 106, 128, 194, 476*cf7f2e2dSJohn Marino 167, 93, 131, 39, 39, 39, 39, 39, 39, 39, 477*cf7f2e2dSJohn Marino 39, 39, 39, 39, 39, 39, 39, 42, 108, 101, 4785796c8dcSSimon Schubert 479*cf7f2e2dSJohn Marino 42, 95, 94, 94, 42, 42, 42, 55, 55, 55, 480*cf7f2e2dSJohn Marino 93, 68, 67, 65, 57, 55, 51, 55, 50, 195, 481*cf7f2e2dSJohn Marino 55, 55, 55, 66, 38, 66, 66, 66, 73, 73, 482*cf7f2e2dSJohn Marino 73, 38, 195, 195, 195, 73, 73, 73, 195, 195, 483*cf7f2e2dSJohn Marino 195, 73, 73, 73, 98, 98, 195, 98, 98, 98, 484*cf7f2e2dSJohn Marino 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 485*cf7f2e2dSJohn Marino 98, 99, 99, 99, 100, 195, 195, 195, 100, 100, 486*cf7f2e2dSJohn Marino 100, 107, 195, 195, 107, 107, 107, 107, 112, 112, 487*cf7f2e2dSJohn Marino 112, 195, 112, 195, 195, 195, 195, 195, 112, 195, 488*cf7f2e2dSJohn Marino 195, 112, 112, 112, 129, 195, 195, 195, 195, 129, 4895796c8dcSSimon Schubert 490*cf7f2e2dSJohn Marino 195, 195, 195, 195, 129, 133, 195, 195, 133, 133, 491*cf7f2e2dSJohn Marino 133, 133, 138, 195, 195, 138, 138, 195, 195, 195, 492*cf7f2e2dSJohn Marino 138, 138, 153, 153, 153, 154, 154, 154, 195, 195, 493*cf7f2e2dSJohn Marino 195, 195, 154, 154, 154, 195, 195, 195, 154, 154, 494*cf7f2e2dSJohn Marino 154, 176, 195, 195, 176, 176, 176, 176, 184, 195, 495*cf7f2e2dSJohn Marino 195, 195, 184, 195, 195, 195, 184, 184, 5, 195, 496*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 497*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 498*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 499*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 500*cf7f2e2dSJohn Marino 501*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195 5025796c8dcSSimon Schubert } ; 5035796c8dcSSimon Schubert 504*cf7f2e2dSJohn Marino static yyconst short int yy_chk[809] = 5055796c8dcSSimon Schubert { 0, 5065796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5075796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5085796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5095796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 510*cf7f2e2dSJohn Marino 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 511*cf7f2e2dSJohn Marino 22, 187, 29, 22, 27, 27, 27, 35, 59, 59, 512*cf7f2e2dSJohn Marino 35, 29, 27, 29, 104, 104, 168, 168, 35, 27, 513*cf7f2e2dSJohn Marino 9, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5145796c8dcSSimon Schubert 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5155796c8dcSSimon Schubert 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5165796c8dcSSimon Schubert 5175796c8dcSSimon Schubert 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 518*cf7f2e2dSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 519*cf7f2e2dSJohn Marino 18, 18, 18, 184, 20, 48, 30, 30, 31, 48, 520*cf7f2e2dSJohn Marino 21, 183, 31, 32, 20, 18, 20, 20, 30, 31, 521*cf7f2e2dSJohn Marino 21, 18, 21, 21, 32, 32, 20, 33, 18, 34, 522*cf7f2e2dSJohn Marino 33, 20, 21, 28, 28, 28, 39, 21, 33, 33, 523*cf7f2e2dSJohn Marino 34, 28, 34, 33, 34, 41, 20, 37, 28, 36, 524*cf7f2e2dSJohn Marino 36, 180, 69, 69, 69, 102, 36, 39, 37, 37, 525*cf7f2e2dSJohn Marino 73, 36, 28, 36, 61, 102, 41, 69, 176, 61, 526*cf7f2e2dSJohn Marino 61, 73, 78, 28, 38, 38, 38, 38, 38, 38, 5275796c8dcSSimon Schubert 528*cf7f2e2dSJohn Marino 38, 38, 38, 78, 38, 38, 38, 38, 38, 38, 5295796c8dcSSimon Schubert 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 5305796c8dcSSimon Schubert 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 531*cf7f2e2dSJohn Marino 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 532*cf7f2e2dSJohn Marino 38, 38, 38, 43, 43, 43, 70, 70, 70, 74, 533*cf7f2e2dSJohn Marino 175, 43, 138, 75, 70, 75, 76, 77, 79, 174, 534*cf7f2e2dSJohn Marino 74, 70, 138, 74, 75, 173, 77, 76, 77, 79, 535*cf7f2e2dSJohn Marino 76, 43, 43, 43, 43, 43, 43, 43, 43, 43, 5365796c8dcSSimon Schubert 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 537*cf7f2e2dSJohn Marino 43, 49, 80, 81, 80, 84, 83, 140, 86, 140, 5385796c8dcSSimon Schubert 539*cf7f2e2dSJohn Marino 181, 181, 172, 80, 81, 83, 84, 83, 86, 86, 540*cf7f2e2dSJohn Marino 81, 49, 49, 49, 49, 49, 49, 49, 49, 49, 5415796c8dcSSimon Schubert 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 542*cf7f2e2dSJohn Marino 49, 52, 52, 52, 189, 60, 189, 72, 72, 72, 543*cf7f2e2dSJohn Marino 82, 72, 87, 85, 171, 60, 52, 60, 60, 85, 544*cf7f2e2dSJohn Marino 89, 82, 52, 87, 85, 82, 87, 60, 72, 52, 545*cf7f2e2dSJohn Marino 88, 89, 60, 88, 90, 113, 89, 93, 93, 93, 546*cf7f2e2dSJohn Marino 170, 88, 167, 88, 114, 90, 113, 90, 94, 94, 547*cf7f2e2dSJohn Marino 94, 103, 103, 105, 105, 114, 93, 108, 108, 108, 548*cf7f2e2dSJohn Marino 117, 103, 165, 105, 163, 108, 103, 94, 96, 96, 5495796c8dcSSimon Schubert 550*cf7f2e2dSJohn Marino 153, 117, 108, 109, 109, 109, 152, 109, 143, 96, 551*cf7f2e2dSJohn Marino 96, 96, 96, 96, 96, 143, 118, 116, 112, 112, 552*cf7f2e2dSJohn Marino 112, 192, 192, 151, 109, 110, 112, 118, 116, 110, 553*cf7f2e2dSJohn Marino 110, 116, 110, 112, 110, 150, 119, 122, 124, 110, 554*cf7f2e2dSJohn Marino 110, 110, 115, 120, 149, 115, 110, 119, 122, 124, 555*cf7f2e2dSJohn Marino 148, 127, 120, 115, 120, 123, 142, 110, 110, 110, 556*cf7f2e2dSJohn Marino 110, 121, 127, 123, 121, 110, 123, 125, 126, 144, 557*cf7f2e2dSJohn Marino 125, 126, 121, 130, 130, 130, 139, 139, 125, 126, 558*cf7f2e2dSJohn Marino 141, 141, 145, 146, 147, 155, 139, 144, 157, 136, 559*cf7f2e2dSJohn Marino 141, 139, 130, 132, 132, 147, 155, 204, 133, 157, 5605796c8dcSSimon Schubert 561*cf7f2e2dSJohn Marino 145, 146, 204, 159, 132, 132, 132, 132, 132, 132, 562*cf7f2e2dSJohn Marino 154, 154, 154, 156, 159, 158, 156, 131, 154, 160, 563*cf7f2e2dSJohn Marino 161, 161, 162, 128, 156, 154, 158, 107, 158, 166, 564*cf7f2e2dSJohn Marino 160, 177, 161, 162, 166, 166, 169, 169, 169, 178, 565*cf7f2e2dSJohn Marino 101, 179, 177, 179, 169, 182, 182, 185, 185, 186, 566*cf7f2e2dSJohn Marino 178, 169, 179, 178, 99, 182, 97, 185, 188, 188, 567*cf7f2e2dSJohn Marino 186, 190, 190, 191, 191, 191, 193, 193, 188, 194, 568*cf7f2e2dSJohn Marino 194, 190, 205, 213, 92, 214, 193, 205, 213, 194, 569*cf7f2e2dSJohn Marino 214, 91, 191, 196, 196, 196, 196, 196, 196, 196, 570*cf7f2e2dSJohn Marino 196, 196, 196, 196, 196, 196, 196, 197, 66, 56, 5715796c8dcSSimon Schubert 572*cf7f2e2dSJohn Marino 197, 47, 46, 45, 197, 197, 197, 198, 198, 198, 573*cf7f2e2dSJohn Marino 44, 25, 24, 23, 19, 198, 17, 198, 15, 5, 574*cf7f2e2dSJohn Marino 198, 198, 198, 199, 4, 199, 199, 199, 200, 200, 575*cf7f2e2dSJohn Marino 200, 3, 0, 0, 0, 200, 200, 200, 0, 0, 576*cf7f2e2dSJohn Marino 0, 200, 200, 200, 201, 201, 0, 201, 201, 201, 577*cf7f2e2dSJohn Marino 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 578*cf7f2e2dSJohn Marino 201, 202, 202, 202, 203, 0, 0, 0, 203, 203, 579*cf7f2e2dSJohn Marino 203, 206, 0, 0, 206, 206, 206, 206, 207, 207, 580*cf7f2e2dSJohn Marino 207, 0, 207, 0, 0, 0, 0, 0, 207, 0, 581*cf7f2e2dSJohn Marino 0, 207, 207, 207, 208, 0, 0, 0, 0, 208, 5825796c8dcSSimon Schubert 583*cf7f2e2dSJohn Marino 0, 0, 0, 0, 208, 209, 0, 0, 209, 209, 584*cf7f2e2dSJohn Marino 209, 209, 210, 0, 0, 210, 210, 0, 0, 0, 585*cf7f2e2dSJohn Marino 210, 210, 211, 211, 211, 212, 212, 212, 0, 0, 586*cf7f2e2dSJohn Marino 0, 0, 212, 212, 212, 0, 0, 0, 212, 212, 587*cf7f2e2dSJohn Marino 212, 215, 0, 0, 215, 215, 215, 215, 216, 0, 588*cf7f2e2dSJohn Marino 0, 0, 216, 0, 0, 0, 216, 216, 195, 195, 589*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 590*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 591*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 592*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 593*cf7f2e2dSJohn Marino 594*cf7f2e2dSJohn Marino 195, 195, 195, 195, 195, 195, 195, 195 5955796c8dcSSimon Schubert } ; 5965796c8dcSSimon Schubert 5975796c8dcSSimon Schubert static yy_state_type yy_last_accepting_state; 5985796c8dcSSimon Schubert static char *yy_last_accepting_cpos; 5995796c8dcSSimon Schubert 6005796c8dcSSimon Schubert /* The intent behind this definition is that it'll catch 6015796c8dcSSimon Schubert * any uses of REJECT which flex missed. 6025796c8dcSSimon Schubert */ 6035796c8dcSSimon Schubert #define REJECT reject_used_but_not_detected 6045796c8dcSSimon Schubert #define yymore() yymore_used_but_not_detected 6055796c8dcSSimon Schubert #define YY_MORE_ADJ 0 6065796c8dcSSimon Schubert #define YY_RESTORE_YY_MORE_OFFSET 6075796c8dcSSimon Schubert char *yytext; 6085796c8dcSSimon Schubert #line 1 "ada-lex.l" 6095796c8dcSSimon Schubert #define INITIAL 0 6105796c8dcSSimon Schubert /* FLEX lexer for Ada expressions, for GDB. 611*cf7f2e2dSJohn Marino Copyright (C) 1994, 1997, 1998, 2000, 2001, 2002, 2003, 2007, 2008, 2009, 612*cf7f2e2dSJohn Marino 2010 Free Software Foundation, Inc. 6135796c8dcSSimon Schubert 6145796c8dcSSimon Schubert This file is part of GDB. 6155796c8dcSSimon Schubert 6165796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 6175796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 6185796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 6195796c8dcSSimon Schubert (at your option) any later version. 6205796c8dcSSimon Schubert 6215796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 6225796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 6235796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 6245796c8dcSSimon Schubert GNU General Public License for more details. 6255796c8dcSSimon Schubert 6265796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 6275796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 6285796c8dcSSimon Schubert /*----------------------------------------------------------------------*/ 6295796c8dcSSimon Schubert /* The converted version of this file is to be included in ada-exp.y, */ 6305796c8dcSSimon Schubert /* the Ada parser for gdb. The function yylex obtains characters from */ 6315796c8dcSSimon Schubert /* the global pointer lexptr. It returns a syntactic category for */ 6325796c8dcSSimon Schubert /* each successive token and places a semantic value into yylval */ 6335796c8dcSSimon Schubert /* (ada-lval), defined by the parser. */ 6345796c8dcSSimon Schubert #line 44 "ada-lex.l" 6355796c8dcSSimon Schubert 6365796c8dcSSimon Schubert #define NUMERAL_WIDTH 256 6375796c8dcSSimon Schubert #define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1)) 6385796c8dcSSimon Schubert 6395796c8dcSSimon Schubert /* Temporary staging for numeric literals. */ 6405796c8dcSSimon Schubert static char numbuf[NUMERAL_WIDTH]; 6415796c8dcSSimon Schubert static void canonicalizeNumeral (char *s1, const char *); 6425796c8dcSSimon Schubert static struct stoken processString (const char*, int); 6435796c8dcSSimon Schubert static int processInt (const char *, const char *, const char *); 6445796c8dcSSimon Schubert static int processReal (const char *); 6455796c8dcSSimon Schubert static struct stoken processId (const char *, int); 6465796c8dcSSimon Schubert static int processAttribute (const char *); 6475796c8dcSSimon Schubert static int find_dot_all (const char *); 6485796c8dcSSimon Schubert 6495796c8dcSSimon Schubert #undef YY_DECL 6505796c8dcSSimon Schubert #define YY_DECL static int yylex ( void ) 6515796c8dcSSimon Schubert 652*cf7f2e2dSJohn Marino /* Flex generates a static function "input" which is not used. 653*cf7f2e2dSJohn Marino Defining YY_NO_INPUT comments it out. */ 654*cf7f2e2dSJohn Marino #define YY_NO_INPUT 655*cf7f2e2dSJohn Marino 6565796c8dcSSimon Schubert #undef YY_INPUT 6575796c8dcSSimon Schubert #define YY_INPUT(BUF, RESULT, MAX_SIZE) \ 6585796c8dcSSimon Schubert if ( *lexptr == '\000' ) \ 6595796c8dcSSimon Schubert (RESULT) = YY_NULL; \ 6605796c8dcSSimon Schubert else \ 6615796c8dcSSimon Schubert { \ 6625796c8dcSSimon Schubert *(BUF) = *lexptr; \ 6635796c8dcSSimon Schubert (RESULT) = 1; \ 6645796c8dcSSimon Schubert lexptr += 1; \ 6655796c8dcSSimon Schubert } 6665796c8dcSSimon Schubert 6675796c8dcSSimon Schubert static int find_dot_all (const char *); 6685796c8dcSSimon Schubert 6695796c8dcSSimon Schubert #define BEFORE_QUAL_QUOTE 1 6705796c8dcSSimon Schubert 671*cf7f2e2dSJohn Marino #line 672 "ada-lex.c" 6725796c8dcSSimon Schubert 6735796c8dcSSimon Schubert /* Macros after this point can all be overridden by user definitions in 6745796c8dcSSimon Schubert * section 1. 6755796c8dcSSimon Schubert */ 6765796c8dcSSimon Schubert 6775796c8dcSSimon Schubert #ifndef YY_SKIP_YYWRAP 6785796c8dcSSimon Schubert #ifdef __cplusplus 6795796c8dcSSimon Schubert extern "C" int yywrap YY_PROTO(( void )); 6805796c8dcSSimon Schubert #else 6815796c8dcSSimon Schubert extern int yywrap YY_PROTO(( void )); 6825796c8dcSSimon Schubert #endif 6835796c8dcSSimon Schubert #endif 6845796c8dcSSimon Schubert 6855796c8dcSSimon Schubert #ifndef YY_NO_UNPUT 6865796c8dcSSimon Schubert static void yyunput YY_PROTO(( int c, char *buf_ptr )); 6875796c8dcSSimon Schubert #endif 6885796c8dcSSimon Schubert 6895796c8dcSSimon Schubert #ifndef yytext_ptr 6905796c8dcSSimon Schubert static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 6915796c8dcSSimon Schubert #endif 6925796c8dcSSimon Schubert 6935796c8dcSSimon Schubert #ifdef YY_NEED_STRLEN 6945796c8dcSSimon Schubert static int yy_flex_strlen YY_PROTO(( yyconst char * )); 6955796c8dcSSimon Schubert #endif 6965796c8dcSSimon Schubert 6975796c8dcSSimon Schubert #ifndef YY_NO_INPUT 6985796c8dcSSimon Schubert #ifdef __cplusplus 6995796c8dcSSimon Schubert static int yyinput YY_PROTO(( void )); 7005796c8dcSSimon Schubert #else 7015796c8dcSSimon Schubert static int input YY_PROTO(( void )); 7025796c8dcSSimon Schubert #endif 7035796c8dcSSimon Schubert #endif 7045796c8dcSSimon Schubert 7055796c8dcSSimon Schubert #if YY_STACK_USED 7065796c8dcSSimon Schubert static int yy_start_stack_ptr = 0; 7075796c8dcSSimon Schubert static int yy_start_stack_depth = 0; 7085796c8dcSSimon Schubert static int *yy_start_stack = 0; 7095796c8dcSSimon Schubert #ifndef YY_NO_PUSH_STATE 7105796c8dcSSimon Schubert static void yy_push_state YY_PROTO(( int new_state )); 7115796c8dcSSimon Schubert #endif 7125796c8dcSSimon Schubert #ifndef YY_NO_POP_STATE 7135796c8dcSSimon Schubert static void yy_pop_state YY_PROTO(( void )); 7145796c8dcSSimon Schubert #endif 7155796c8dcSSimon Schubert #ifndef YY_NO_TOP_STATE 7165796c8dcSSimon Schubert static int yy_top_state YY_PROTO(( void )); 7175796c8dcSSimon Schubert #endif 7185796c8dcSSimon Schubert 7195796c8dcSSimon Schubert #else 7205796c8dcSSimon Schubert #define YY_NO_PUSH_STATE 1 7215796c8dcSSimon Schubert #define YY_NO_POP_STATE 1 7225796c8dcSSimon Schubert #define YY_NO_TOP_STATE 1 7235796c8dcSSimon Schubert #endif 7245796c8dcSSimon Schubert 7255796c8dcSSimon Schubert #ifdef YY_MALLOC_DECL 7265796c8dcSSimon Schubert YY_MALLOC_DECL 7275796c8dcSSimon Schubert #else 7285796c8dcSSimon Schubert #if __STDC__ 7295796c8dcSSimon Schubert #ifndef __cplusplus 7305796c8dcSSimon Schubert #include <stdlib.h> 7315796c8dcSSimon Schubert #endif 7325796c8dcSSimon Schubert #else 7335796c8dcSSimon Schubert /* Just try to get by without declaring the routines. This will fail 7345796c8dcSSimon Schubert * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 7355796c8dcSSimon Schubert * or sizeof(void*) != sizeof(int). 7365796c8dcSSimon Schubert */ 7375796c8dcSSimon Schubert #endif 7385796c8dcSSimon Schubert #endif 7395796c8dcSSimon Schubert 7405796c8dcSSimon Schubert /* Amount of stuff to slurp up with each read. */ 7415796c8dcSSimon Schubert #ifndef YY_READ_BUF_SIZE 7425796c8dcSSimon Schubert #define YY_READ_BUF_SIZE 8192 7435796c8dcSSimon Schubert #endif 7445796c8dcSSimon Schubert 7455796c8dcSSimon Schubert /* Copy whatever the last rule matched to the standard output. */ 7465796c8dcSSimon Schubert 7475796c8dcSSimon Schubert #ifndef ECHO 7485796c8dcSSimon Schubert /* This used to be an fputs(), but since the string might contain NUL's, 7495796c8dcSSimon Schubert * we now use fwrite(). 7505796c8dcSSimon Schubert */ 7515796c8dcSSimon Schubert #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 7525796c8dcSSimon Schubert #endif 7535796c8dcSSimon Schubert 7545796c8dcSSimon Schubert /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 7555796c8dcSSimon Schubert * is returned in "result". 7565796c8dcSSimon Schubert */ 7575796c8dcSSimon Schubert #ifndef YY_INPUT 7585796c8dcSSimon Schubert #define YY_INPUT(buf,result,max_size) \ 7595796c8dcSSimon Schubert if ( yy_current_buffer->yy_is_interactive ) \ 7605796c8dcSSimon Schubert { \ 7615796c8dcSSimon Schubert int c = '*', n; \ 7625796c8dcSSimon Schubert for ( n = 0; n < max_size && \ 7635796c8dcSSimon Schubert (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 7645796c8dcSSimon Schubert buf[n] = (char) c; \ 7655796c8dcSSimon Schubert if ( c == '\n' ) \ 7665796c8dcSSimon Schubert buf[n++] = (char) c; \ 7675796c8dcSSimon Schubert if ( c == EOF && ferror( yyin ) ) \ 7685796c8dcSSimon Schubert YY_FATAL_ERROR( "input in flex scanner failed" ); \ 7695796c8dcSSimon Schubert result = n; \ 7705796c8dcSSimon Schubert } \ 7715796c8dcSSimon Schubert else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 7725796c8dcSSimon Schubert && ferror( yyin ) ) \ 7735796c8dcSSimon Schubert YY_FATAL_ERROR( "input in flex scanner failed" ); 7745796c8dcSSimon Schubert #endif 7755796c8dcSSimon Schubert 7765796c8dcSSimon Schubert /* No semi-colon after return; correct usage is to write "yyterminate();" - 7775796c8dcSSimon Schubert * we don't want an extra ';' after the "return" because that will cause 7785796c8dcSSimon Schubert * some compilers to complain about unreachable statements. 7795796c8dcSSimon Schubert */ 7805796c8dcSSimon Schubert #ifndef yyterminate 7815796c8dcSSimon Schubert #define yyterminate() return YY_NULL 7825796c8dcSSimon Schubert #endif 7835796c8dcSSimon Schubert 7845796c8dcSSimon Schubert /* Number of entries by which start-condition stack grows. */ 7855796c8dcSSimon Schubert #ifndef YY_START_STACK_INCR 7865796c8dcSSimon Schubert #define YY_START_STACK_INCR 25 7875796c8dcSSimon Schubert #endif 7885796c8dcSSimon Schubert 7895796c8dcSSimon Schubert /* Report a fatal error. */ 7905796c8dcSSimon Schubert #ifndef YY_FATAL_ERROR 7915796c8dcSSimon Schubert #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 7925796c8dcSSimon Schubert #endif 7935796c8dcSSimon Schubert 7945796c8dcSSimon Schubert /* Default declaration of generated scanner - a define so the user can 7955796c8dcSSimon Schubert * easily add parameters. 7965796c8dcSSimon Schubert */ 7975796c8dcSSimon Schubert #ifndef YY_DECL 7985796c8dcSSimon Schubert #define YY_DECL int yylex YY_PROTO(( void )) 7995796c8dcSSimon Schubert #endif 8005796c8dcSSimon Schubert 8015796c8dcSSimon Schubert /* Code executed at the beginning of each rule, after yytext and yyleng 8025796c8dcSSimon Schubert * have been set up. 8035796c8dcSSimon Schubert */ 8045796c8dcSSimon Schubert #ifndef YY_USER_ACTION 8055796c8dcSSimon Schubert #define YY_USER_ACTION 8065796c8dcSSimon Schubert #endif 8075796c8dcSSimon Schubert 8085796c8dcSSimon Schubert /* Code executed at the end of each rule. */ 8095796c8dcSSimon Schubert #ifndef YY_BREAK 8105796c8dcSSimon Schubert #define YY_BREAK break; 8115796c8dcSSimon Schubert #endif 8125796c8dcSSimon Schubert 8135796c8dcSSimon Schubert #define YY_RULE_SETUP \ 8145796c8dcSSimon Schubert YY_USER_ACTION 8155796c8dcSSimon Schubert 8165796c8dcSSimon Schubert YY_DECL 8175796c8dcSSimon Schubert { 8185796c8dcSSimon Schubert register yy_state_type yy_current_state; 8195796c8dcSSimon Schubert register char *yy_cp = NULL, *yy_bp = NULL; 8205796c8dcSSimon Schubert register int yy_act; 8215796c8dcSSimon Schubert 822*cf7f2e2dSJohn Marino #line 84 "ada-lex.l" 8235796c8dcSSimon Schubert 8245796c8dcSSimon Schubert 825*cf7f2e2dSJohn Marino #line 826 "ada-lex.c" 8265796c8dcSSimon Schubert 8275796c8dcSSimon Schubert if ( yy_init ) 8285796c8dcSSimon Schubert { 8295796c8dcSSimon Schubert yy_init = 0; 8305796c8dcSSimon Schubert 8315796c8dcSSimon Schubert #ifdef YY_USER_INIT 8325796c8dcSSimon Schubert YY_USER_INIT; 8335796c8dcSSimon Schubert #endif 8345796c8dcSSimon Schubert 8355796c8dcSSimon Schubert if ( ! yy_start ) 8365796c8dcSSimon Schubert yy_start = 1; /* first start state */ 8375796c8dcSSimon Schubert 8385796c8dcSSimon Schubert if ( ! yyin ) 8395796c8dcSSimon Schubert yyin = stdin; 8405796c8dcSSimon Schubert 8415796c8dcSSimon Schubert if ( ! yyout ) 8425796c8dcSSimon Schubert yyout = stdout; 8435796c8dcSSimon Schubert 8445796c8dcSSimon Schubert if ( ! yy_current_buffer ) 8455796c8dcSSimon Schubert yy_current_buffer = 8465796c8dcSSimon Schubert yy_create_buffer( yyin, YY_BUF_SIZE ); 8475796c8dcSSimon Schubert 8485796c8dcSSimon Schubert yy_load_buffer_state(); 8495796c8dcSSimon Schubert } 8505796c8dcSSimon Schubert 8515796c8dcSSimon Schubert while ( 1 ) /* loops until end-of-file is reached */ 8525796c8dcSSimon Schubert { 8535796c8dcSSimon Schubert yy_cp = yy_c_buf_p; 8545796c8dcSSimon Schubert 8555796c8dcSSimon Schubert /* Support of yytext. */ 8565796c8dcSSimon Schubert *yy_cp = yy_hold_char; 8575796c8dcSSimon Schubert 8585796c8dcSSimon Schubert /* yy_bp points to the position in yy_ch_buf of the start of 8595796c8dcSSimon Schubert * the current run. 8605796c8dcSSimon Schubert */ 8615796c8dcSSimon Schubert yy_bp = yy_cp; 8625796c8dcSSimon Schubert 8635796c8dcSSimon Schubert yy_current_state = yy_start; 8645796c8dcSSimon Schubert yy_match: 8655796c8dcSSimon Schubert do 8665796c8dcSSimon Schubert { 8675796c8dcSSimon Schubert register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 8685796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 8695796c8dcSSimon Schubert { 8705796c8dcSSimon Schubert yy_last_accepting_state = yy_current_state; 8715796c8dcSSimon Schubert yy_last_accepting_cpos = yy_cp; 8725796c8dcSSimon Schubert } 8735796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 8745796c8dcSSimon Schubert { 8755796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 876*cf7f2e2dSJohn Marino if ( yy_current_state >= 196 ) 8775796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 8785796c8dcSSimon Schubert } 8795796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 8805796c8dcSSimon Schubert ++yy_cp; 8815796c8dcSSimon Schubert } 882*cf7f2e2dSJohn Marino while ( yy_base[yy_current_state] != 759 ); 8835796c8dcSSimon Schubert 8845796c8dcSSimon Schubert yy_find_action: 8855796c8dcSSimon Schubert yy_act = yy_accept[yy_current_state]; 8865796c8dcSSimon Schubert if ( yy_act == 0 ) 8875796c8dcSSimon Schubert { /* have to back up */ 8885796c8dcSSimon Schubert yy_cp = yy_last_accepting_cpos; 8895796c8dcSSimon Schubert yy_current_state = yy_last_accepting_state; 8905796c8dcSSimon Schubert yy_act = yy_accept[yy_current_state]; 8915796c8dcSSimon Schubert } 8925796c8dcSSimon Schubert 8935796c8dcSSimon Schubert YY_DO_BEFORE_ACTION; 8945796c8dcSSimon Schubert 8955796c8dcSSimon Schubert 8965796c8dcSSimon Schubert do_action: /* This label is used only to access EOF actions. */ 8975796c8dcSSimon Schubert 8985796c8dcSSimon Schubert 8995796c8dcSSimon Schubert switch ( yy_act ) 9005796c8dcSSimon Schubert { /* beginning of action switch */ 9015796c8dcSSimon Schubert case 0: /* must back up */ 9025796c8dcSSimon Schubert /* undo the effects of YY_DO_BEFORE_ACTION */ 9035796c8dcSSimon Schubert *yy_cp = yy_hold_char; 9045796c8dcSSimon Schubert yy_cp = yy_last_accepting_cpos; 9055796c8dcSSimon Schubert yy_current_state = yy_last_accepting_state; 9065796c8dcSSimon Schubert goto yy_find_action; 9075796c8dcSSimon Schubert 9085796c8dcSSimon Schubert case 1: 9095796c8dcSSimon Schubert YY_RULE_SETUP 910*cf7f2e2dSJohn Marino #line 86 "ada-lex.l" 9115796c8dcSSimon Schubert { } 9125796c8dcSSimon Schubert YY_BREAK 9135796c8dcSSimon Schubert case 2: 9145796c8dcSSimon Schubert YY_RULE_SETUP 915*cf7f2e2dSJohn Marino #line 88 "ada-lex.l" 9165796c8dcSSimon Schubert { yyterminate(); } 9175796c8dcSSimon Schubert YY_BREAK 9185796c8dcSSimon Schubert case 3: 9195796c8dcSSimon Schubert YY_RULE_SETUP 920*cf7f2e2dSJohn Marino #line 90 "ada-lex.l" 9215796c8dcSSimon Schubert { 9225796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9235796c8dcSSimon Schubert return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1); 9245796c8dcSSimon Schubert } 9255796c8dcSSimon Schubert YY_BREAK 9265796c8dcSSimon Schubert case 4: 9275796c8dcSSimon Schubert YY_RULE_SETUP 928*cf7f2e2dSJohn Marino #line 95 "ada-lex.l" 9295796c8dcSSimon Schubert { 9305796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9315796c8dcSSimon Schubert return processInt (NULL, numbuf, NULL); 9325796c8dcSSimon Schubert } 9335796c8dcSSimon Schubert YY_BREAK 9345796c8dcSSimon Schubert case 5: 9355796c8dcSSimon Schubert YY_RULE_SETUP 936*cf7f2e2dSJohn Marino #line 100 "ada-lex.l" 9375796c8dcSSimon Schubert { 9385796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9395796c8dcSSimon Schubert return processInt (numbuf, 9405796c8dcSSimon Schubert strchr (numbuf, '#') + 1, 9415796c8dcSSimon Schubert strrchr(numbuf, '#') + 1); 9425796c8dcSSimon Schubert } 9435796c8dcSSimon Schubert YY_BREAK 9445796c8dcSSimon Schubert case 6: 9455796c8dcSSimon Schubert YY_RULE_SETUP 946*cf7f2e2dSJohn Marino #line 107 "ada-lex.l" 9475796c8dcSSimon Schubert { 9485796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9495796c8dcSSimon Schubert return processInt (numbuf, strchr (numbuf, '#') + 1, NULL); 9505796c8dcSSimon Schubert } 9515796c8dcSSimon Schubert YY_BREAK 9525796c8dcSSimon Schubert case 7: 9535796c8dcSSimon Schubert YY_RULE_SETUP 954*cf7f2e2dSJohn Marino #line 112 "ada-lex.l" 9555796c8dcSSimon Schubert { 9565796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext+2); 9575796c8dcSSimon Schubert return processInt ("16#", numbuf, NULL); 9585796c8dcSSimon Schubert } 9595796c8dcSSimon Schubert YY_BREAK 9605796c8dcSSimon Schubert case 8: 9615796c8dcSSimon Schubert YY_RULE_SETUP 962*cf7f2e2dSJohn Marino #line 118 "ada-lex.l" 9635796c8dcSSimon Schubert { 9645796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9655796c8dcSSimon Schubert return processReal (numbuf); 9665796c8dcSSimon Schubert } 9675796c8dcSSimon Schubert YY_BREAK 9685796c8dcSSimon Schubert case 9: 9695796c8dcSSimon Schubert YY_RULE_SETUP 970*cf7f2e2dSJohn Marino #line 123 "ada-lex.l" 9715796c8dcSSimon Schubert { 9725796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 9735796c8dcSSimon Schubert return processReal (numbuf); 9745796c8dcSSimon Schubert } 9755796c8dcSSimon Schubert YY_BREAK 9765796c8dcSSimon Schubert case 10: 9775796c8dcSSimon Schubert YY_RULE_SETUP 978*cf7f2e2dSJohn Marino #line 128 "ada-lex.l" 9795796c8dcSSimon Schubert { 9805796c8dcSSimon Schubert error (_("Based real literals not implemented yet.")); 9815796c8dcSSimon Schubert } 9825796c8dcSSimon Schubert YY_BREAK 9835796c8dcSSimon Schubert case 11: 9845796c8dcSSimon Schubert YY_RULE_SETUP 985*cf7f2e2dSJohn Marino #line 132 "ada-lex.l" 9865796c8dcSSimon Schubert { 9875796c8dcSSimon Schubert error (_("Based real literals not implemented yet.")); 9885796c8dcSSimon Schubert } 9895796c8dcSSimon Schubert YY_BREAK 9905796c8dcSSimon Schubert case 12: 9915796c8dcSSimon Schubert YY_RULE_SETUP 992*cf7f2e2dSJohn Marino #line 136 "ada-lex.l" 9935796c8dcSSimon Schubert { 9945796c8dcSSimon Schubert yylval.typed_val.type = type_char (); 9955796c8dcSSimon Schubert yylval.typed_val.val = yytext[1]; 9965796c8dcSSimon Schubert return CHARLIT; 9975796c8dcSSimon Schubert } 9985796c8dcSSimon Schubert YY_BREAK 9995796c8dcSSimon Schubert case 13: 10005796c8dcSSimon Schubert YY_RULE_SETUP 1001*cf7f2e2dSJohn Marino #line 142 "ada-lex.l" 10025796c8dcSSimon Schubert { 10035796c8dcSSimon Schubert int v; 10045796c8dcSSimon Schubert yylval.typed_val.type = type_char (); 10055796c8dcSSimon Schubert sscanf (yytext+3, "%2x", &v); 10065796c8dcSSimon Schubert yylval.typed_val.val = v; 10075796c8dcSSimon Schubert return CHARLIT; 10085796c8dcSSimon Schubert } 10095796c8dcSSimon Schubert YY_BREAK 10105796c8dcSSimon Schubert case 14: 10115796c8dcSSimon Schubert YY_RULE_SETUP 1012*cf7f2e2dSJohn Marino #line 150 "ada-lex.l" 10135796c8dcSSimon Schubert { 10145796c8dcSSimon Schubert yylval.sval = processString (yytext+1, yyleng-2); 10155796c8dcSSimon Schubert return STRING; 10165796c8dcSSimon Schubert } 10175796c8dcSSimon Schubert YY_BREAK 10185796c8dcSSimon Schubert case 15: 10195796c8dcSSimon Schubert YY_RULE_SETUP 1020*cf7f2e2dSJohn Marino #line 155 "ada-lex.l" 10215796c8dcSSimon Schubert { 10225796c8dcSSimon Schubert error (_("ill-formed or non-terminated string literal")); 10235796c8dcSSimon Schubert } 10245796c8dcSSimon Schubert YY_BREAK 10255796c8dcSSimon Schubert case 16: 10265796c8dcSSimon Schubert YY_RULE_SETUP 1027*cf7f2e2dSJohn Marino #line 160 "ada-lex.l" 10285796c8dcSSimon Schubert { 10295796c8dcSSimon Schubert while (*lexptr != 'i' && *lexptr != 'I') 10305796c8dcSSimon Schubert lexptr -= 1; 10315796c8dcSSimon Schubert yyrestart(NULL); 10325796c8dcSSimon Schubert return 0; 10335796c8dcSSimon Schubert } 10345796c8dcSSimon Schubert YY_BREAK 10355796c8dcSSimon Schubert case 17: 10365796c8dcSSimon Schubert YY_RULE_SETUP 1037*cf7f2e2dSJohn Marino #line 167 "ada-lex.l" 1038*cf7f2e2dSJohn Marino { 1039*cf7f2e2dSJohn Marino /* This keyword signals the end of the expression and 1040*cf7f2e2dSJohn Marino will be processed separately. */ 1041*cf7f2e2dSJohn Marino while (*lexptr != 't' && *lexptr != 'T') 1042*cf7f2e2dSJohn Marino lexptr--; 1043*cf7f2e2dSJohn Marino yyrestart(NULL); 1044*cf7f2e2dSJohn Marino return 0; 1045*cf7f2e2dSJohn Marino } 10465796c8dcSSimon Schubert YY_BREAK 1047*cf7f2e2dSJohn Marino /* ADA KEYWORDS */ 10485796c8dcSSimon Schubert case 18: 10495796c8dcSSimon Schubert YY_RULE_SETUP 1050*cf7f2e2dSJohn Marino #line 178 "ada-lex.l" 1051*cf7f2e2dSJohn Marino { return ABS; } 10525796c8dcSSimon Schubert YY_BREAK 10535796c8dcSSimon Schubert case 19: 10545796c8dcSSimon Schubert YY_RULE_SETUP 1055*cf7f2e2dSJohn Marino #line 179 "ada-lex.l" 1056*cf7f2e2dSJohn Marino { return _AND_; } 10575796c8dcSSimon Schubert YY_BREAK 10585796c8dcSSimon Schubert case 20: 10595796c8dcSSimon Schubert YY_RULE_SETUP 1060*cf7f2e2dSJohn Marino #line 180 "ada-lex.l" 1061*cf7f2e2dSJohn Marino { return ELSE; } 10625796c8dcSSimon Schubert YY_BREAK 10635796c8dcSSimon Schubert case 21: 10645796c8dcSSimon Schubert YY_RULE_SETUP 1065*cf7f2e2dSJohn Marino #line 181 "ada-lex.l" 1066*cf7f2e2dSJohn Marino { return IN; } 10675796c8dcSSimon Schubert YY_BREAK 10685796c8dcSSimon Schubert case 22: 10695796c8dcSSimon Schubert YY_RULE_SETUP 1070*cf7f2e2dSJohn Marino #line 182 "ada-lex.l" 1071*cf7f2e2dSJohn Marino { return MOD; } 10725796c8dcSSimon Schubert YY_BREAK 10735796c8dcSSimon Schubert case 23: 10745796c8dcSSimon Schubert YY_RULE_SETUP 1075*cf7f2e2dSJohn Marino #line 183 "ada-lex.l" 1076*cf7f2e2dSJohn Marino { return NEW; } 10775796c8dcSSimon Schubert YY_BREAK 10785796c8dcSSimon Schubert case 24: 10795796c8dcSSimon Schubert YY_RULE_SETUP 1080*cf7f2e2dSJohn Marino #line 184 "ada-lex.l" 1081*cf7f2e2dSJohn Marino { return NOT; } 10825796c8dcSSimon Schubert YY_BREAK 10835796c8dcSSimon Schubert case 25: 10845796c8dcSSimon Schubert YY_RULE_SETUP 1085*cf7f2e2dSJohn Marino #line 185 "ada-lex.l" 1086*cf7f2e2dSJohn Marino { return NULL_PTR; } 10875796c8dcSSimon Schubert YY_BREAK 10885796c8dcSSimon Schubert case 26: 10895796c8dcSSimon Schubert YY_RULE_SETUP 1090*cf7f2e2dSJohn Marino #line 186 "ada-lex.l" 1091*cf7f2e2dSJohn Marino { return OR; } 10925796c8dcSSimon Schubert YY_BREAK 10935796c8dcSSimon Schubert case 27: 10945796c8dcSSimon Schubert YY_RULE_SETUP 1095*cf7f2e2dSJohn Marino #line 187 "ada-lex.l" 1096*cf7f2e2dSJohn Marino { return OTHERS; } 10975796c8dcSSimon Schubert YY_BREAK 10985796c8dcSSimon Schubert case 28: 10995796c8dcSSimon Schubert YY_RULE_SETUP 1100*cf7f2e2dSJohn Marino #line 188 "ada-lex.l" 1101*cf7f2e2dSJohn Marino { return REM; } 11025796c8dcSSimon Schubert YY_BREAK 11035796c8dcSSimon Schubert case 29: 11045796c8dcSSimon Schubert YY_RULE_SETUP 1105*cf7f2e2dSJohn Marino #line 189 "ada-lex.l" 1106*cf7f2e2dSJohn Marino { return THEN; } 1107*cf7f2e2dSJohn Marino YY_BREAK 1108*cf7f2e2dSJohn Marino case 30: 1109*cf7f2e2dSJohn Marino YY_RULE_SETUP 1110*cf7f2e2dSJohn Marino #line 190 "ada-lex.l" 11115796c8dcSSimon Schubert { return XOR; } 11125796c8dcSSimon Schubert YY_BREAK 11135796c8dcSSimon Schubert /* BOOLEAN "KEYWORDS" */ 11145796c8dcSSimon Schubert /* True and False are not keywords in Ada, but rather enumeration constants. 11155796c8dcSSimon Schubert However, the boolean type is no longer represented as an enum, so True 11165796c8dcSSimon Schubert and False are no longer defined in symbol tables. We compromise by 11175796c8dcSSimon Schubert making them keywords (when bare). */ 11185796c8dcSSimon Schubert case 31: 11195796c8dcSSimon Schubert YY_RULE_SETUP 1120*cf7f2e2dSJohn Marino #line 199 "ada-lex.l" 1121*cf7f2e2dSJohn Marino { return TRUEKEYWORD; } 1122*cf7f2e2dSJohn Marino YY_BREAK 1123*cf7f2e2dSJohn Marino case 32: 1124*cf7f2e2dSJohn Marino YY_RULE_SETUP 1125*cf7f2e2dSJohn Marino #line 200 "ada-lex.l" 11265796c8dcSSimon Schubert { return FALSEKEYWORD; } 11275796c8dcSSimon Schubert YY_BREAK 11285796c8dcSSimon Schubert /* ATTRIBUTES */ 1129*cf7f2e2dSJohn Marino case 33: 11305796c8dcSSimon Schubert YY_RULE_SETUP 1131*cf7f2e2dSJohn Marino #line 204 "ada-lex.l" 11325796c8dcSSimon Schubert { return processAttribute (yytext+1); } 11335796c8dcSSimon Schubert YY_BREAK 11345796c8dcSSimon Schubert /* PUNCTUATION */ 11355796c8dcSSimon Schubert case 34: 11365796c8dcSSimon Schubert YY_RULE_SETUP 1137*cf7f2e2dSJohn Marino #line 208 "ada-lex.l" 1138*cf7f2e2dSJohn Marino { return ARROW; } 11395796c8dcSSimon Schubert YY_BREAK 11405796c8dcSSimon Schubert case 35: 11415796c8dcSSimon Schubert YY_RULE_SETUP 1142*cf7f2e2dSJohn Marino #line 209 "ada-lex.l" 1143*cf7f2e2dSJohn Marino { return DOTDOT; } 11445796c8dcSSimon Schubert YY_BREAK 11455796c8dcSSimon Schubert case 36: 11465796c8dcSSimon Schubert YY_RULE_SETUP 1147*cf7f2e2dSJohn Marino #line 210 "ada-lex.l" 1148*cf7f2e2dSJohn Marino { return STARSTAR; } 11495796c8dcSSimon Schubert YY_BREAK 11505796c8dcSSimon Schubert case 37: 11515796c8dcSSimon Schubert YY_RULE_SETUP 1152*cf7f2e2dSJohn Marino #line 211 "ada-lex.l" 1153*cf7f2e2dSJohn Marino { return ASSIGN; } 11545796c8dcSSimon Schubert YY_BREAK 11555796c8dcSSimon Schubert case 38: 11565796c8dcSSimon Schubert YY_RULE_SETUP 1157*cf7f2e2dSJohn Marino #line 212 "ada-lex.l" 1158*cf7f2e2dSJohn Marino { return NOTEQUAL; } 11595796c8dcSSimon Schubert YY_BREAK 11605796c8dcSSimon Schubert case 39: 11615796c8dcSSimon Schubert YY_RULE_SETUP 1162*cf7f2e2dSJohn Marino #line 213 "ada-lex.l" 1163*cf7f2e2dSJohn Marino { return LEQ; } 11645796c8dcSSimon Schubert YY_BREAK 11655796c8dcSSimon Schubert case 40: 11665796c8dcSSimon Schubert YY_RULE_SETUP 1167*cf7f2e2dSJohn Marino #line 214 "ada-lex.l" 1168*cf7f2e2dSJohn Marino { return GEQ; } 11695796c8dcSSimon Schubert YY_BREAK 11705796c8dcSSimon Schubert case 41: 11715796c8dcSSimon Schubert YY_RULE_SETUP 1172*cf7f2e2dSJohn Marino #line 216 "ada-lex.l" 1173*cf7f2e2dSJohn Marino { BEGIN INITIAL; return '\''; } 11745796c8dcSSimon Schubert YY_BREAK 11755796c8dcSSimon Schubert case 42: 11765796c8dcSSimon Schubert YY_RULE_SETUP 1177*cf7f2e2dSJohn Marino #line 218 "ada-lex.l" 1178*cf7f2e2dSJohn Marino { return yytext[0]; } 1179*cf7f2e2dSJohn Marino YY_BREAK 1180*cf7f2e2dSJohn Marino case 43: 1181*cf7f2e2dSJohn Marino YY_RULE_SETUP 1182*cf7f2e2dSJohn Marino #line 220 "ada-lex.l" 11835796c8dcSSimon Schubert { if (paren_depth == 0 && comma_terminates) 11845796c8dcSSimon Schubert { 11855796c8dcSSimon Schubert lexptr -= 1; 11865796c8dcSSimon Schubert yyrestart(NULL); 11875796c8dcSSimon Schubert return 0; 11885796c8dcSSimon Schubert } 11895796c8dcSSimon Schubert else 11905796c8dcSSimon Schubert return ','; 11915796c8dcSSimon Schubert } 11925796c8dcSSimon Schubert YY_BREAK 11935796c8dcSSimon Schubert case 44: 11945796c8dcSSimon Schubert YY_RULE_SETUP 1195*cf7f2e2dSJohn Marino #line 230 "ada-lex.l" 1196*cf7f2e2dSJohn Marino { paren_depth += 1; return '('; } 1197*cf7f2e2dSJohn Marino YY_BREAK 1198*cf7f2e2dSJohn Marino case 45: 1199*cf7f2e2dSJohn Marino YY_RULE_SETUP 1200*cf7f2e2dSJohn Marino #line 231 "ada-lex.l" 12015796c8dcSSimon Schubert { if (paren_depth == 0) 12025796c8dcSSimon Schubert { 12035796c8dcSSimon Schubert lexptr -= 1; 12045796c8dcSSimon Schubert yyrestart(NULL); 12055796c8dcSSimon Schubert return 0; 12065796c8dcSSimon Schubert } 12075796c8dcSSimon Schubert else 12085796c8dcSSimon Schubert { 12095796c8dcSSimon Schubert paren_depth -= 1; 12105796c8dcSSimon Schubert return ')'; 12115796c8dcSSimon Schubert } 12125796c8dcSSimon Schubert } 12135796c8dcSSimon Schubert YY_BREAK 12145796c8dcSSimon Schubert case 46: 12155796c8dcSSimon Schubert YY_RULE_SETUP 1216*cf7f2e2dSJohn Marino #line 244 "ada-lex.l" 1217*cf7f2e2dSJohn Marino { return DOT_ALL; } 1218*cf7f2e2dSJohn Marino YY_BREAK 1219*cf7f2e2dSJohn Marino case 47: 1220*cf7f2e2dSJohn Marino YY_RULE_SETUP 1221*cf7f2e2dSJohn Marino #line 246 "ada-lex.l" 12225796c8dcSSimon Schubert { 12235796c8dcSSimon Schubert yylval.sval = processId (yytext+1, yyleng-1); 12245796c8dcSSimon Schubert return DOT_ID; 12255796c8dcSSimon Schubert } 12265796c8dcSSimon Schubert YY_BREAK 1227*cf7f2e2dSJohn Marino case 48: 12285796c8dcSSimon Schubert YY_RULE_SETUP 1229*cf7f2e2dSJohn Marino #line 251 "ada-lex.l" 12305796c8dcSSimon Schubert { 12315796c8dcSSimon Schubert int all_posn = find_dot_all (yytext); 12325796c8dcSSimon Schubert 12335796c8dcSSimon Schubert if (all_posn == -1 && yytext[yyleng-1] == '\'') 12345796c8dcSSimon Schubert { 12355796c8dcSSimon Schubert BEGIN BEFORE_QUAL_QUOTE; 12365796c8dcSSimon Schubert yyless (yyleng-1); 12375796c8dcSSimon Schubert } 12385796c8dcSSimon Schubert else if (all_posn >= 0) 12395796c8dcSSimon Schubert yyless (all_posn); 12405796c8dcSSimon Schubert yylval.sval = processId (yytext, yyleng); 12415796c8dcSSimon Schubert return NAME; 12425796c8dcSSimon Schubert } 12435796c8dcSSimon Schubert YY_BREAK 12445796c8dcSSimon Schubert /* GDB EXPRESSION CONSTRUCTS */ 1245*cf7f2e2dSJohn Marino case 49: 12465796c8dcSSimon Schubert YY_RULE_SETUP 1247*cf7f2e2dSJohn Marino #line 268 "ada-lex.l" 12485796c8dcSSimon Schubert { 12495796c8dcSSimon Schubert yyless (yyleng - 2); 12505796c8dcSSimon Schubert yylval.sval = processId (yytext, yyleng); 12515796c8dcSSimon Schubert return NAME; 12525796c8dcSSimon Schubert } 12535796c8dcSSimon Schubert YY_BREAK 12545796c8dcSSimon Schubert case 50: 12555796c8dcSSimon Schubert YY_RULE_SETUP 1256*cf7f2e2dSJohn Marino #line 274 "ada-lex.l" 1257*cf7f2e2dSJohn Marino { return COLONCOLON; } 1258*cf7f2e2dSJohn Marino YY_BREAK 1259*cf7f2e2dSJohn Marino case 51: 1260*cf7f2e2dSJohn Marino YY_RULE_SETUP 1261*cf7f2e2dSJohn Marino #line 276 "ada-lex.l" 12625796c8dcSSimon Schubert { return yytext[0]; } 12635796c8dcSSimon Schubert YY_BREAK 12645796c8dcSSimon Schubert /* REGISTERS AND GDB CONVENIENCE VARIABLES */ 1265*cf7f2e2dSJohn Marino case 52: 12665796c8dcSSimon Schubert YY_RULE_SETUP 1267*cf7f2e2dSJohn Marino #line 280 "ada-lex.l" 12685796c8dcSSimon Schubert { 12695796c8dcSSimon Schubert yylval.sval.ptr = yytext; 12705796c8dcSSimon Schubert yylval.sval.length = yyleng; 12715796c8dcSSimon Schubert return SPECIAL_VARIABLE; 12725796c8dcSSimon Schubert } 12735796c8dcSSimon Schubert YY_BREAK 12745796c8dcSSimon Schubert /* CATCH-ALL ERROR CASE */ 12755796c8dcSSimon Schubert case 53: 12765796c8dcSSimon Schubert YY_RULE_SETUP 1277*cf7f2e2dSJohn Marino #line 288 "ada-lex.l" 1278*cf7f2e2dSJohn Marino { error (_("Invalid character '%s' in expression."), yytext); } 1279*cf7f2e2dSJohn Marino YY_BREAK 1280*cf7f2e2dSJohn Marino case 54: 1281*cf7f2e2dSJohn Marino YY_RULE_SETUP 1282*cf7f2e2dSJohn Marino #line 289 "ada-lex.l" 12835796c8dcSSimon Schubert YY_FATAL_ERROR( "flex scanner jammed" ); 12845796c8dcSSimon Schubert YY_BREAK 1285*cf7f2e2dSJohn Marino #line 1286 "ada-lex.c" 12865796c8dcSSimon Schubert case YY_STATE_EOF(INITIAL): 12875796c8dcSSimon Schubert case YY_STATE_EOF(BEFORE_QUAL_QUOTE): 12885796c8dcSSimon Schubert yyterminate(); 12895796c8dcSSimon Schubert 12905796c8dcSSimon Schubert case YY_END_OF_BUFFER: 12915796c8dcSSimon Schubert { 12925796c8dcSSimon Schubert /* Amount of text matched not including the EOB char. */ 12935796c8dcSSimon Schubert int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 12945796c8dcSSimon Schubert 12955796c8dcSSimon Schubert /* Undo the effects of YY_DO_BEFORE_ACTION. */ 12965796c8dcSSimon Schubert *yy_cp = yy_hold_char; 12975796c8dcSSimon Schubert YY_RESTORE_YY_MORE_OFFSET 12985796c8dcSSimon Schubert 12995796c8dcSSimon Schubert if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 13005796c8dcSSimon Schubert { 13015796c8dcSSimon Schubert /* We're scanning a new file or input source. It's 13025796c8dcSSimon Schubert * possible that this happened because the user 13035796c8dcSSimon Schubert * just pointed yyin at a new source and called 13045796c8dcSSimon Schubert * yylex(). If so, then we have to assure 13055796c8dcSSimon Schubert * consistency between yy_current_buffer and our 13065796c8dcSSimon Schubert * globals. Here is the right place to do so, because 13075796c8dcSSimon Schubert * this is the first action (other than possibly a 13085796c8dcSSimon Schubert * back-up) that will match for the new input source. 13095796c8dcSSimon Schubert */ 13105796c8dcSSimon Schubert yy_n_chars = yy_current_buffer->yy_n_chars; 13115796c8dcSSimon Schubert yy_current_buffer->yy_input_file = yyin; 13125796c8dcSSimon Schubert yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 13135796c8dcSSimon Schubert } 13145796c8dcSSimon Schubert 13155796c8dcSSimon Schubert /* Note that here we test for yy_c_buf_p "<=" to the position 13165796c8dcSSimon Schubert * of the first EOB in the buffer, since yy_c_buf_p will 13175796c8dcSSimon Schubert * already have been incremented past the NUL character 13185796c8dcSSimon Schubert * (since all states make transitions on EOB to the 13195796c8dcSSimon Schubert * end-of-buffer state). Contrast this with the test 13205796c8dcSSimon Schubert * in input(). 13215796c8dcSSimon Schubert */ 13225796c8dcSSimon Schubert if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 13235796c8dcSSimon Schubert { /* This was really a NUL. */ 13245796c8dcSSimon Schubert yy_state_type yy_next_state; 13255796c8dcSSimon Schubert 13265796c8dcSSimon Schubert yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 13275796c8dcSSimon Schubert 13285796c8dcSSimon Schubert yy_current_state = yy_get_previous_state(); 13295796c8dcSSimon Schubert 13305796c8dcSSimon Schubert /* Okay, we're now positioned to make the NUL 13315796c8dcSSimon Schubert * transition. We couldn't have 13325796c8dcSSimon Schubert * yy_get_previous_state() go ahead and do it 13335796c8dcSSimon Schubert * for us because it doesn't know how to deal 13345796c8dcSSimon Schubert * with the possibility of jamming (and we don't 13355796c8dcSSimon Schubert * want to build jamming into it because then it 13365796c8dcSSimon Schubert * will run more slowly). 13375796c8dcSSimon Schubert */ 13385796c8dcSSimon Schubert 13395796c8dcSSimon Schubert yy_next_state = yy_try_NUL_trans( yy_current_state ); 13405796c8dcSSimon Schubert 13415796c8dcSSimon Schubert yy_bp = yytext_ptr + YY_MORE_ADJ; 13425796c8dcSSimon Schubert 13435796c8dcSSimon Schubert if ( yy_next_state ) 13445796c8dcSSimon Schubert { 13455796c8dcSSimon Schubert /* Consume the NUL. */ 13465796c8dcSSimon Schubert yy_cp = ++yy_c_buf_p; 13475796c8dcSSimon Schubert yy_current_state = yy_next_state; 13485796c8dcSSimon Schubert goto yy_match; 13495796c8dcSSimon Schubert } 13505796c8dcSSimon Schubert 13515796c8dcSSimon Schubert else 13525796c8dcSSimon Schubert { 13535796c8dcSSimon Schubert yy_cp = yy_c_buf_p; 13545796c8dcSSimon Schubert goto yy_find_action; 13555796c8dcSSimon Schubert } 13565796c8dcSSimon Schubert } 13575796c8dcSSimon Schubert 13585796c8dcSSimon Schubert else switch ( yy_get_next_buffer() ) 13595796c8dcSSimon Schubert { 13605796c8dcSSimon Schubert case EOB_ACT_END_OF_FILE: 13615796c8dcSSimon Schubert { 13625796c8dcSSimon Schubert yy_did_buffer_switch_on_eof = 0; 13635796c8dcSSimon Schubert 13645796c8dcSSimon Schubert if ( yywrap() ) 13655796c8dcSSimon Schubert { 13665796c8dcSSimon Schubert /* Note: because we've taken care in 13675796c8dcSSimon Schubert * yy_get_next_buffer() to have set up 13685796c8dcSSimon Schubert * yytext, we can now set up 13695796c8dcSSimon Schubert * yy_c_buf_p so that if some total 13705796c8dcSSimon Schubert * hoser (like flex itself) wants to 13715796c8dcSSimon Schubert * call the scanner after we return the 13725796c8dcSSimon Schubert * YY_NULL, it'll still work - another 13735796c8dcSSimon Schubert * YY_NULL will get returned. 13745796c8dcSSimon Schubert */ 13755796c8dcSSimon Schubert yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 13765796c8dcSSimon Schubert 13775796c8dcSSimon Schubert yy_act = YY_STATE_EOF(YY_START); 13785796c8dcSSimon Schubert goto do_action; 13795796c8dcSSimon Schubert } 13805796c8dcSSimon Schubert 13815796c8dcSSimon Schubert else 13825796c8dcSSimon Schubert { 13835796c8dcSSimon Schubert if ( ! yy_did_buffer_switch_on_eof ) 13845796c8dcSSimon Schubert YY_NEW_FILE; 13855796c8dcSSimon Schubert } 13865796c8dcSSimon Schubert break; 13875796c8dcSSimon Schubert } 13885796c8dcSSimon Schubert 13895796c8dcSSimon Schubert case EOB_ACT_CONTINUE_SCAN: 13905796c8dcSSimon Schubert yy_c_buf_p = 13915796c8dcSSimon Schubert yytext_ptr + yy_amount_of_matched_text; 13925796c8dcSSimon Schubert 13935796c8dcSSimon Schubert yy_current_state = yy_get_previous_state(); 13945796c8dcSSimon Schubert 13955796c8dcSSimon Schubert yy_cp = yy_c_buf_p; 13965796c8dcSSimon Schubert yy_bp = yytext_ptr + YY_MORE_ADJ; 13975796c8dcSSimon Schubert goto yy_match; 13985796c8dcSSimon Schubert 13995796c8dcSSimon Schubert case EOB_ACT_LAST_MATCH: 14005796c8dcSSimon Schubert yy_c_buf_p = 14015796c8dcSSimon Schubert &yy_current_buffer->yy_ch_buf[yy_n_chars]; 14025796c8dcSSimon Schubert 14035796c8dcSSimon Schubert yy_current_state = yy_get_previous_state(); 14045796c8dcSSimon Schubert 14055796c8dcSSimon Schubert yy_cp = yy_c_buf_p; 14065796c8dcSSimon Schubert yy_bp = yytext_ptr + YY_MORE_ADJ; 14075796c8dcSSimon Schubert goto yy_find_action; 14085796c8dcSSimon Schubert } 14095796c8dcSSimon Schubert break; 14105796c8dcSSimon Schubert } 14115796c8dcSSimon Schubert 14125796c8dcSSimon Schubert default: 14135796c8dcSSimon Schubert YY_FATAL_ERROR( 14145796c8dcSSimon Schubert "fatal flex scanner internal error--no action found" ); 14155796c8dcSSimon Schubert } /* end of action switch */ 14165796c8dcSSimon Schubert } /* end of scanning one token */ 14175796c8dcSSimon Schubert } /* end of yylex */ 14185796c8dcSSimon Schubert 14195796c8dcSSimon Schubert 14205796c8dcSSimon Schubert /* yy_get_next_buffer - try to read in a new buffer 14215796c8dcSSimon Schubert * 14225796c8dcSSimon Schubert * Returns a code representing an action: 14235796c8dcSSimon Schubert * EOB_ACT_LAST_MATCH - 14245796c8dcSSimon Schubert * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 14255796c8dcSSimon Schubert * EOB_ACT_END_OF_FILE - end of file 14265796c8dcSSimon Schubert */ 14275796c8dcSSimon Schubert 14285796c8dcSSimon Schubert static int yy_get_next_buffer() 14295796c8dcSSimon Schubert { 14305796c8dcSSimon Schubert register char *dest = yy_current_buffer->yy_ch_buf; 14315796c8dcSSimon Schubert register char *source = yytext_ptr; 14325796c8dcSSimon Schubert register int number_to_move, i; 14335796c8dcSSimon Schubert int ret_val; 14345796c8dcSSimon Schubert 14355796c8dcSSimon Schubert if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 14365796c8dcSSimon Schubert YY_FATAL_ERROR( 14375796c8dcSSimon Schubert "fatal flex scanner internal error--end of buffer missed" ); 14385796c8dcSSimon Schubert 14395796c8dcSSimon Schubert if ( yy_current_buffer->yy_fill_buffer == 0 ) 14405796c8dcSSimon Schubert { /* Don't try to fill the buffer, so this is an EOF. */ 14415796c8dcSSimon Schubert if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 14425796c8dcSSimon Schubert { 14435796c8dcSSimon Schubert /* We matched a single character, the EOB, so 14445796c8dcSSimon Schubert * treat this as a final EOF. 14455796c8dcSSimon Schubert */ 14465796c8dcSSimon Schubert return EOB_ACT_END_OF_FILE; 14475796c8dcSSimon Schubert } 14485796c8dcSSimon Schubert 14495796c8dcSSimon Schubert else 14505796c8dcSSimon Schubert { 14515796c8dcSSimon Schubert /* We matched some text prior to the EOB, first 14525796c8dcSSimon Schubert * process it. 14535796c8dcSSimon Schubert */ 14545796c8dcSSimon Schubert return EOB_ACT_LAST_MATCH; 14555796c8dcSSimon Schubert } 14565796c8dcSSimon Schubert } 14575796c8dcSSimon Schubert 14585796c8dcSSimon Schubert /* Try to read more data. */ 14595796c8dcSSimon Schubert 14605796c8dcSSimon Schubert /* First move last chars to start of buffer. */ 14615796c8dcSSimon Schubert number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 14625796c8dcSSimon Schubert 14635796c8dcSSimon Schubert for ( i = 0; i < number_to_move; ++i ) 14645796c8dcSSimon Schubert *(dest++) = *(source++); 14655796c8dcSSimon Schubert 14665796c8dcSSimon Schubert if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 14675796c8dcSSimon Schubert /* don't do the read, it's not guaranteed to return an EOF, 14685796c8dcSSimon Schubert * just force an EOF 14695796c8dcSSimon Schubert */ 14705796c8dcSSimon Schubert yy_current_buffer->yy_n_chars = yy_n_chars = 0; 14715796c8dcSSimon Schubert 14725796c8dcSSimon Schubert else 14735796c8dcSSimon Schubert { 14745796c8dcSSimon Schubert int num_to_read = 14755796c8dcSSimon Schubert yy_current_buffer->yy_buf_size - number_to_move - 1; 14765796c8dcSSimon Schubert 14775796c8dcSSimon Schubert while ( num_to_read <= 0 ) 14785796c8dcSSimon Schubert { /* Not enough room in the buffer - grow it. */ 14795796c8dcSSimon Schubert #ifdef YY_USES_REJECT 14805796c8dcSSimon Schubert YY_FATAL_ERROR( 14815796c8dcSSimon Schubert "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 14825796c8dcSSimon Schubert #else 14835796c8dcSSimon Schubert 14845796c8dcSSimon Schubert /* just a shorter name for the current buffer */ 14855796c8dcSSimon Schubert YY_BUFFER_STATE b = yy_current_buffer; 14865796c8dcSSimon Schubert 14875796c8dcSSimon Schubert int yy_c_buf_p_offset = 14885796c8dcSSimon Schubert (int) (yy_c_buf_p - b->yy_ch_buf); 14895796c8dcSSimon Schubert 14905796c8dcSSimon Schubert if ( b->yy_is_our_buffer ) 14915796c8dcSSimon Schubert { 14925796c8dcSSimon Schubert int new_size = b->yy_buf_size * 2; 14935796c8dcSSimon Schubert 14945796c8dcSSimon Schubert if ( new_size <= 0 ) 14955796c8dcSSimon Schubert b->yy_buf_size += b->yy_buf_size / 8; 14965796c8dcSSimon Schubert else 14975796c8dcSSimon Schubert b->yy_buf_size *= 2; 14985796c8dcSSimon Schubert 14995796c8dcSSimon Schubert b->yy_ch_buf = (char *) 15005796c8dcSSimon Schubert /* Include room in for 2 EOB chars. */ 15015796c8dcSSimon Schubert yyxrealloc( (void *) b->yy_ch_buf, 15025796c8dcSSimon Schubert b->yy_buf_size + 2 ); 15035796c8dcSSimon Schubert } 15045796c8dcSSimon Schubert else 15055796c8dcSSimon Schubert /* Can't grow it, we don't own it. */ 15065796c8dcSSimon Schubert b->yy_ch_buf = 0; 15075796c8dcSSimon Schubert 15085796c8dcSSimon Schubert if ( ! b->yy_ch_buf ) 15095796c8dcSSimon Schubert YY_FATAL_ERROR( 15105796c8dcSSimon Schubert "fatal error - scanner input buffer overflow" ); 15115796c8dcSSimon Schubert 15125796c8dcSSimon Schubert yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 15135796c8dcSSimon Schubert 15145796c8dcSSimon Schubert num_to_read = yy_current_buffer->yy_buf_size - 15155796c8dcSSimon Schubert number_to_move - 1; 15165796c8dcSSimon Schubert #endif 15175796c8dcSSimon Schubert } 15185796c8dcSSimon Schubert 15195796c8dcSSimon Schubert if ( num_to_read > YY_READ_BUF_SIZE ) 15205796c8dcSSimon Schubert num_to_read = YY_READ_BUF_SIZE; 15215796c8dcSSimon Schubert 15225796c8dcSSimon Schubert /* Read in more data. */ 15235796c8dcSSimon Schubert YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 15245796c8dcSSimon Schubert yy_n_chars, num_to_read ); 15255796c8dcSSimon Schubert 15265796c8dcSSimon Schubert yy_current_buffer->yy_n_chars = yy_n_chars; 15275796c8dcSSimon Schubert } 15285796c8dcSSimon Schubert 15295796c8dcSSimon Schubert if ( yy_n_chars == 0 ) 15305796c8dcSSimon Schubert { 15315796c8dcSSimon Schubert if ( number_to_move == YY_MORE_ADJ ) 15325796c8dcSSimon Schubert { 15335796c8dcSSimon Schubert ret_val = EOB_ACT_END_OF_FILE; 15345796c8dcSSimon Schubert yyrestart( yyin ); 15355796c8dcSSimon Schubert } 15365796c8dcSSimon Schubert 15375796c8dcSSimon Schubert else 15385796c8dcSSimon Schubert { 15395796c8dcSSimon Schubert ret_val = EOB_ACT_LAST_MATCH; 15405796c8dcSSimon Schubert yy_current_buffer->yy_buffer_status = 15415796c8dcSSimon Schubert YY_BUFFER_EOF_PENDING; 15425796c8dcSSimon Schubert } 15435796c8dcSSimon Schubert } 15445796c8dcSSimon Schubert 15455796c8dcSSimon Schubert else 15465796c8dcSSimon Schubert ret_val = EOB_ACT_CONTINUE_SCAN; 15475796c8dcSSimon Schubert 15485796c8dcSSimon Schubert yy_n_chars += number_to_move; 15495796c8dcSSimon Schubert yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 15505796c8dcSSimon Schubert yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 15515796c8dcSSimon Schubert 15525796c8dcSSimon Schubert yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 15535796c8dcSSimon Schubert 15545796c8dcSSimon Schubert return ret_val; 15555796c8dcSSimon Schubert } 15565796c8dcSSimon Schubert 15575796c8dcSSimon Schubert 15585796c8dcSSimon Schubert /* yy_get_previous_state - get the state just before the EOB char was reached */ 15595796c8dcSSimon Schubert 15605796c8dcSSimon Schubert static yy_state_type yy_get_previous_state() 15615796c8dcSSimon Schubert { 15625796c8dcSSimon Schubert register yy_state_type yy_current_state; 15635796c8dcSSimon Schubert register char *yy_cp; 15645796c8dcSSimon Schubert 15655796c8dcSSimon Schubert yy_current_state = yy_start; 15665796c8dcSSimon Schubert 15675796c8dcSSimon Schubert for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 15685796c8dcSSimon Schubert { 15695796c8dcSSimon Schubert register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 15705796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 15715796c8dcSSimon Schubert { 15725796c8dcSSimon Schubert yy_last_accepting_state = yy_current_state; 15735796c8dcSSimon Schubert yy_last_accepting_cpos = yy_cp; 15745796c8dcSSimon Schubert } 15755796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 15765796c8dcSSimon Schubert { 15775796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 1578*cf7f2e2dSJohn Marino if ( yy_current_state >= 196 ) 15795796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 15805796c8dcSSimon Schubert } 15815796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 15825796c8dcSSimon Schubert } 15835796c8dcSSimon Schubert 15845796c8dcSSimon Schubert return yy_current_state; 15855796c8dcSSimon Schubert } 15865796c8dcSSimon Schubert 15875796c8dcSSimon Schubert 15885796c8dcSSimon Schubert /* yy_try_NUL_trans - try to make a transition on the NUL character 15895796c8dcSSimon Schubert * 15905796c8dcSSimon Schubert * synopsis 15915796c8dcSSimon Schubert * next_state = yy_try_NUL_trans( current_state ); 15925796c8dcSSimon Schubert */ 15935796c8dcSSimon Schubert 15945796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 15955796c8dcSSimon Schubert static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 15965796c8dcSSimon Schubert #else 15975796c8dcSSimon Schubert static yy_state_type yy_try_NUL_trans( yy_current_state ) 15985796c8dcSSimon Schubert yy_state_type yy_current_state; 15995796c8dcSSimon Schubert #endif 16005796c8dcSSimon Schubert { 16015796c8dcSSimon Schubert register int yy_is_jam; 16025796c8dcSSimon Schubert register char *yy_cp = yy_c_buf_p; 16035796c8dcSSimon Schubert 16045796c8dcSSimon Schubert register YY_CHAR yy_c = 1; 16055796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 16065796c8dcSSimon Schubert { 16075796c8dcSSimon Schubert yy_last_accepting_state = yy_current_state; 16085796c8dcSSimon Schubert yy_last_accepting_cpos = yy_cp; 16095796c8dcSSimon Schubert } 16105796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 16115796c8dcSSimon Schubert { 16125796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 1613*cf7f2e2dSJohn Marino if ( yy_current_state >= 196 ) 16145796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 16155796c8dcSSimon Schubert } 16165796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1617*cf7f2e2dSJohn Marino yy_is_jam = (yy_current_state == 195); 16185796c8dcSSimon Schubert 16195796c8dcSSimon Schubert return yy_is_jam ? 0 : yy_current_state; 16205796c8dcSSimon Schubert } 16215796c8dcSSimon Schubert 16225796c8dcSSimon Schubert 16235796c8dcSSimon Schubert #ifndef YY_NO_UNPUT 16245796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 16255796c8dcSSimon Schubert static void yyunput( int c, register char *yy_bp ) 16265796c8dcSSimon Schubert #else 16275796c8dcSSimon Schubert static void yyunput( c, yy_bp ) 16285796c8dcSSimon Schubert int c; 16295796c8dcSSimon Schubert register char *yy_bp; 16305796c8dcSSimon Schubert #endif 16315796c8dcSSimon Schubert { 16325796c8dcSSimon Schubert register char *yy_cp = yy_c_buf_p; 16335796c8dcSSimon Schubert 16345796c8dcSSimon Schubert /* undo effects of setting up yytext */ 16355796c8dcSSimon Schubert *yy_cp = yy_hold_char; 16365796c8dcSSimon Schubert 16375796c8dcSSimon Schubert if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 16385796c8dcSSimon Schubert { /* need to shift things up to make room */ 16395796c8dcSSimon Schubert /* +2 for EOB chars. */ 16405796c8dcSSimon Schubert register int number_to_move = yy_n_chars + 2; 16415796c8dcSSimon Schubert register char *dest = &yy_current_buffer->yy_ch_buf[ 16425796c8dcSSimon Schubert yy_current_buffer->yy_buf_size + 2]; 16435796c8dcSSimon Schubert register char *source = 16445796c8dcSSimon Schubert &yy_current_buffer->yy_ch_buf[number_to_move]; 16455796c8dcSSimon Schubert 16465796c8dcSSimon Schubert while ( source > yy_current_buffer->yy_ch_buf ) 16475796c8dcSSimon Schubert *--dest = *--source; 16485796c8dcSSimon Schubert 16495796c8dcSSimon Schubert yy_cp += (int) (dest - source); 16505796c8dcSSimon Schubert yy_bp += (int) (dest - source); 16515796c8dcSSimon Schubert yy_current_buffer->yy_n_chars = 16525796c8dcSSimon Schubert yy_n_chars = yy_current_buffer->yy_buf_size; 16535796c8dcSSimon Schubert 16545796c8dcSSimon Schubert if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 16555796c8dcSSimon Schubert YY_FATAL_ERROR( "flex scanner push-back overflow" ); 16565796c8dcSSimon Schubert } 16575796c8dcSSimon Schubert 16585796c8dcSSimon Schubert *--yy_cp = (char) c; 16595796c8dcSSimon Schubert 16605796c8dcSSimon Schubert 16615796c8dcSSimon Schubert yytext_ptr = yy_bp; 16625796c8dcSSimon Schubert yy_hold_char = *yy_cp; 16635796c8dcSSimon Schubert yy_c_buf_p = yy_cp; 16645796c8dcSSimon Schubert } 16655796c8dcSSimon Schubert #endif /* ifndef YY_NO_UNPUT */ 16665796c8dcSSimon Schubert 16675796c8dcSSimon Schubert 16685796c8dcSSimon Schubert #ifndef YY_NO_INPUT 16695796c8dcSSimon Schubert #ifdef __cplusplus 16705796c8dcSSimon Schubert static int yyinput() 16715796c8dcSSimon Schubert #else 16725796c8dcSSimon Schubert static int input() 16735796c8dcSSimon Schubert #endif 16745796c8dcSSimon Schubert { 16755796c8dcSSimon Schubert int c; 16765796c8dcSSimon Schubert 16775796c8dcSSimon Schubert *yy_c_buf_p = yy_hold_char; 16785796c8dcSSimon Schubert 16795796c8dcSSimon Schubert if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 16805796c8dcSSimon Schubert { 16815796c8dcSSimon Schubert /* yy_c_buf_p now points to the character we want to return. 16825796c8dcSSimon Schubert * If this occurs *before* the EOB characters, then it's a 16835796c8dcSSimon Schubert * valid NUL; if not, then we've hit the end of the buffer. 16845796c8dcSSimon Schubert */ 16855796c8dcSSimon Schubert if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 16865796c8dcSSimon Schubert /* This was really a NUL. */ 16875796c8dcSSimon Schubert *yy_c_buf_p = '\0'; 16885796c8dcSSimon Schubert 16895796c8dcSSimon Schubert else 16905796c8dcSSimon Schubert { /* need more input */ 16915796c8dcSSimon Schubert int offset = yy_c_buf_p - yytext_ptr; 16925796c8dcSSimon Schubert ++yy_c_buf_p; 16935796c8dcSSimon Schubert 16945796c8dcSSimon Schubert switch ( yy_get_next_buffer() ) 16955796c8dcSSimon Schubert { 16965796c8dcSSimon Schubert case EOB_ACT_LAST_MATCH: 16975796c8dcSSimon Schubert /* This happens because yy_g_n_b() 16985796c8dcSSimon Schubert * sees that we've accumulated a 16995796c8dcSSimon Schubert * token and flags that we need to 17005796c8dcSSimon Schubert * try matching the token before 17015796c8dcSSimon Schubert * proceeding. But for input(), 17025796c8dcSSimon Schubert * there's no matching to consider. 17035796c8dcSSimon Schubert * So convert the EOB_ACT_LAST_MATCH 17045796c8dcSSimon Schubert * to EOB_ACT_END_OF_FILE. 17055796c8dcSSimon Schubert */ 17065796c8dcSSimon Schubert 17075796c8dcSSimon Schubert /* Reset buffer status. */ 17085796c8dcSSimon Schubert yyrestart( yyin ); 17095796c8dcSSimon Schubert 17105796c8dcSSimon Schubert /* fall through */ 17115796c8dcSSimon Schubert 17125796c8dcSSimon Schubert case EOB_ACT_END_OF_FILE: 17135796c8dcSSimon Schubert { 17145796c8dcSSimon Schubert if ( yywrap() ) 17155796c8dcSSimon Schubert return EOF; 17165796c8dcSSimon Schubert 17175796c8dcSSimon Schubert if ( ! yy_did_buffer_switch_on_eof ) 17185796c8dcSSimon Schubert YY_NEW_FILE; 17195796c8dcSSimon Schubert #ifdef __cplusplus 17205796c8dcSSimon Schubert return yyinput(); 17215796c8dcSSimon Schubert #else 17225796c8dcSSimon Schubert return input(); 17235796c8dcSSimon Schubert #endif 17245796c8dcSSimon Schubert } 17255796c8dcSSimon Schubert 17265796c8dcSSimon Schubert case EOB_ACT_CONTINUE_SCAN: 17275796c8dcSSimon Schubert yy_c_buf_p = yytext_ptr + offset; 17285796c8dcSSimon Schubert break; 17295796c8dcSSimon Schubert } 17305796c8dcSSimon Schubert } 17315796c8dcSSimon Schubert } 17325796c8dcSSimon Schubert 17335796c8dcSSimon Schubert c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 17345796c8dcSSimon Schubert *yy_c_buf_p = '\0'; /* preserve yytext */ 17355796c8dcSSimon Schubert yy_hold_char = *++yy_c_buf_p; 17365796c8dcSSimon Schubert 17375796c8dcSSimon Schubert 17385796c8dcSSimon Schubert return c; 17395796c8dcSSimon Schubert } 17405796c8dcSSimon Schubert #endif /* YY_NO_INPUT */ 17415796c8dcSSimon Schubert 17425796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 17435796c8dcSSimon Schubert void yyrestart( FILE *input_file ) 17445796c8dcSSimon Schubert #else 17455796c8dcSSimon Schubert void yyrestart( input_file ) 17465796c8dcSSimon Schubert FILE *input_file; 17475796c8dcSSimon Schubert #endif 17485796c8dcSSimon Schubert { 17495796c8dcSSimon Schubert if ( ! yy_current_buffer ) 17505796c8dcSSimon Schubert yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 17515796c8dcSSimon Schubert 17525796c8dcSSimon Schubert yy_init_buffer( yy_current_buffer, input_file ); 17535796c8dcSSimon Schubert yy_load_buffer_state(); 17545796c8dcSSimon Schubert } 17555796c8dcSSimon Schubert 17565796c8dcSSimon Schubert 17575796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 17585796c8dcSSimon Schubert void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 17595796c8dcSSimon Schubert #else 17605796c8dcSSimon Schubert void yy_switch_to_buffer( new_buffer ) 17615796c8dcSSimon Schubert YY_BUFFER_STATE new_buffer; 17625796c8dcSSimon Schubert #endif 17635796c8dcSSimon Schubert { 17645796c8dcSSimon Schubert if ( yy_current_buffer == new_buffer ) 17655796c8dcSSimon Schubert return; 17665796c8dcSSimon Schubert 17675796c8dcSSimon Schubert if ( yy_current_buffer ) 17685796c8dcSSimon Schubert { 17695796c8dcSSimon Schubert /* Flush out information for old buffer. */ 17705796c8dcSSimon Schubert *yy_c_buf_p = yy_hold_char; 17715796c8dcSSimon Schubert yy_current_buffer->yy_buf_pos = yy_c_buf_p; 17725796c8dcSSimon Schubert yy_current_buffer->yy_n_chars = yy_n_chars; 17735796c8dcSSimon Schubert } 17745796c8dcSSimon Schubert 17755796c8dcSSimon Schubert yy_current_buffer = new_buffer; 17765796c8dcSSimon Schubert yy_load_buffer_state(); 17775796c8dcSSimon Schubert 17785796c8dcSSimon Schubert /* We don't actually know whether we did this switch during 17795796c8dcSSimon Schubert * EOF (yywrap()) processing, but the only time this flag 17805796c8dcSSimon Schubert * is looked at is after yywrap() is called, so it's safe 17815796c8dcSSimon Schubert * to go ahead and always set it. 17825796c8dcSSimon Schubert */ 17835796c8dcSSimon Schubert yy_did_buffer_switch_on_eof = 1; 17845796c8dcSSimon Schubert } 17855796c8dcSSimon Schubert 17865796c8dcSSimon Schubert 17875796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 17885796c8dcSSimon Schubert void yy_load_buffer_state( void ) 17895796c8dcSSimon Schubert #else 17905796c8dcSSimon Schubert void yy_load_buffer_state() 17915796c8dcSSimon Schubert #endif 17925796c8dcSSimon Schubert { 17935796c8dcSSimon Schubert yy_n_chars = yy_current_buffer->yy_n_chars; 17945796c8dcSSimon Schubert yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 17955796c8dcSSimon Schubert yyin = yy_current_buffer->yy_input_file; 17965796c8dcSSimon Schubert yy_hold_char = *yy_c_buf_p; 17975796c8dcSSimon Schubert } 17985796c8dcSSimon Schubert 17995796c8dcSSimon Schubert 18005796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 18015796c8dcSSimon Schubert YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 18025796c8dcSSimon Schubert #else 18035796c8dcSSimon Schubert YY_BUFFER_STATE yy_create_buffer( file, size ) 18045796c8dcSSimon Schubert FILE *file; 18055796c8dcSSimon Schubert int size; 18065796c8dcSSimon Schubert #endif 18075796c8dcSSimon Schubert { 18085796c8dcSSimon Schubert YY_BUFFER_STATE b; 18095796c8dcSSimon Schubert 18105796c8dcSSimon Schubert b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 18115796c8dcSSimon Schubert if ( ! b ) 18125796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 18135796c8dcSSimon Schubert 18145796c8dcSSimon Schubert b->yy_buf_size = size; 18155796c8dcSSimon Schubert 18165796c8dcSSimon Schubert /* yy_ch_buf has to be 2 characters longer than the size given because 18175796c8dcSSimon Schubert * we need to put in 2 end-of-buffer characters. 18185796c8dcSSimon Schubert */ 18195796c8dcSSimon Schubert b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 18205796c8dcSSimon Schubert if ( ! b->yy_ch_buf ) 18215796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 18225796c8dcSSimon Schubert 18235796c8dcSSimon Schubert b->yy_is_our_buffer = 1; 18245796c8dcSSimon Schubert 18255796c8dcSSimon Schubert yy_init_buffer( b, file ); 18265796c8dcSSimon Schubert 18275796c8dcSSimon Schubert return b; 18285796c8dcSSimon Schubert } 18295796c8dcSSimon Schubert 18305796c8dcSSimon Schubert 18315796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 18325796c8dcSSimon Schubert void yy_delete_buffer( YY_BUFFER_STATE b ) 18335796c8dcSSimon Schubert #else 18345796c8dcSSimon Schubert void yy_delete_buffer( b ) 18355796c8dcSSimon Schubert YY_BUFFER_STATE b; 18365796c8dcSSimon Schubert #endif 18375796c8dcSSimon Schubert { 18385796c8dcSSimon Schubert if ( ! b ) 18395796c8dcSSimon Schubert return; 18405796c8dcSSimon Schubert 18415796c8dcSSimon Schubert if ( b == yy_current_buffer ) 18425796c8dcSSimon Schubert yy_current_buffer = (YY_BUFFER_STATE) 0; 18435796c8dcSSimon Schubert 18445796c8dcSSimon Schubert if ( b->yy_is_our_buffer ) 18455796c8dcSSimon Schubert yy_flex_free( (void *) b->yy_ch_buf ); 18465796c8dcSSimon Schubert 18475796c8dcSSimon Schubert yy_flex_free( (void *) b ); 18485796c8dcSSimon Schubert } 18495796c8dcSSimon Schubert 18505796c8dcSSimon Schubert 18515796c8dcSSimon Schubert 18525796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 18535796c8dcSSimon Schubert void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 18545796c8dcSSimon Schubert #else 18555796c8dcSSimon Schubert void yy_init_buffer( b, file ) 18565796c8dcSSimon Schubert YY_BUFFER_STATE b; 18575796c8dcSSimon Schubert FILE *file; 18585796c8dcSSimon Schubert #endif 18595796c8dcSSimon Schubert 18605796c8dcSSimon Schubert 18615796c8dcSSimon Schubert { 18625796c8dcSSimon Schubert yy_flush_buffer( b ); 18635796c8dcSSimon Schubert 18645796c8dcSSimon Schubert b->yy_input_file = file; 18655796c8dcSSimon Schubert b->yy_fill_buffer = 1; 18665796c8dcSSimon Schubert 18675796c8dcSSimon Schubert #if YY_ALWAYS_INTERACTIVE 18685796c8dcSSimon Schubert b->yy_is_interactive = 1; 18695796c8dcSSimon Schubert #else 18705796c8dcSSimon Schubert #if YY_NEVER_INTERACTIVE 18715796c8dcSSimon Schubert b->yy_is_interactive = 0; 18725796c8dcSSimon Schubert #else 18735796c8dcSSimon Schubert b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 18745796c8dcSSimon Schubert #endif 18755796c8dcSSimon Schubert #endif 18765796c8dcSSimon Schubert } 18775796c8dcSSimon Schubert 18785796c8dcSSimon Schubert 18795796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 18805796c8dcSSimon Schubert void yy_flush_buffer( YY_BUFFER_STATE b ) 18815796c8dcSSimon Schubert #else 18825796c8dcSSimon Schubert void yy_flush_buffer( b ) 18835796c8dcSSimon Schubert YY_BUFFER_STATE b; 18845796c8dcSSimon Schubert #endif 18855796c8dcSSimon Schubert 18865796c8dcSSimon Schubert { 18875796c8dcSSimon Schubert if ( ! b ) 18885796c8dcSSimon Schubert return; 18895796c8dcSSimon Schubert 18905796c8dcSSimon Schubert b->yy_n_chars = 0; 18915796c8dcSSimon Schubert 18925796c8dcSSimon Schubert /* We always need two end-of-buffer characters. The first causes 18935796c8dcSSimon Schubert * a transition to the end-of-buffer state. The second causes 18945796c8dcSSimon Schubert * a jam in that state. 18955796c8dcSSimon Schubert */ 18965796c8dcSSimon Schubert b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 18975796c8dcSSimon Schubert b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 18985796c8dcSSimon Schubert 18995796c8dcSSimon Schubert b->yy_buf_pos = &b->yy_ch_buf[0]; 19005796c8dcSSimon Schubert 19015796c8dcSSimon Schubert b->yy_at_bol = 1; 19025796c8dcSSimon Schubert b->yy_buffer_status = YY_BUFFER_NEW; 19035796c8dcSSimon Schubert 19045796c8dcSSimon Schubert if ( b == yy_current_buffer ) 19055796c8dcSSimon Schubert yy_load_buffer_state(); 19065796c8dcSSimon Schubert } 19075796c8dcSSimon Schubert 19085796c8dcSSimon Schubert 19095796c8dcSSimon Schubert #ifndef YY_NO_SCAN_BUFFER 19105796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 19115796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 19125796c8dcSSimon Schubert #else 19135796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_buffer( base, size ) 19145796c8dcSSimon Schubert char *base; 19155796c8dcSSimon Schubert yy_size_t size; 19165796c8dcSSimon Schubert #endif 19175796c8dcSSimon Schubert { 19185796c8dcSSimon Schubert YY_BUFFER_STATE b; 19195796c8dcSSimon Schubert 19205796c8dcSSimon Schubert if ( size < 2 || 19215796c8dcSSimon Schubert base[size-2] != YY_END_OF_BUFFER_CHAR || 19225796c8dcSSimon Schubert base[size-1] != YY_END_OF_BUFFER_CHAR ) 19235796c8dcSSimon Schubert /* They forgot to leave room for the EOB's. */ 19245796c8dcSSimon Schubert return 0; 19255796c8dcSSimon Schubert 19265796c8dcSSimon Schubert b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 19275796c8dcSSimon Schubert if ( ! b ) 19285796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 19295796c8dcSSimon Schubert 19305796c8dcSSimon Schubert b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 19315796c8dcSSimon Schubert b->yy_buf_pos = b->yy_ch_buf = base; 19325796c8dcSSimon Schubert b->yy_is_our_buffer = 0; 19335796c8dcSSimon Schubert b->yy_input_file = 0; 19345796c8dcSSimon Schubert b->yy_n_chars = b->yy_buf_size; 19355796c8dcSSimon Schubert b->yy_is_interactive = 0; 19365796c8dcSSimon Schubert b->yy_at_bol = 1; 19375796c8dcSSimon Schubert b->yy_fill_buffer = 0; 19385796c8dcSSimon Schubert b->yy_buffer_status = YY_BUFFER_NEW; 19395796c8dcSSimon Schubert 19405796c8dcSSimon Schubert yy_switch_to_buffer( b ); 19415796c8dcSSimon Schubert 19425796c8dcSSimon Schubert return b; 19435796c8dcSSimon Schubert } 19445796c8dcSSimon Schubert #endif 19455796c8dcSSimon Schubert 19465796c8dcSSimon Schubert 19475796c8dcSSimon Schubert #ifndef YY_NO_SCAN_STRING 19485796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 19495796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 19505796c8dcSSimon Schubert #else 19515796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_string( yy_str ) 19525796c8dcSSimon Schubert yyconst char *yy_str; 19535796c8dcSSimon Schubert #endif 19545796c8dcSSimon Schubert { 19555796c8dcSSimon Schubert int len; 19565796c8dcSSimon Schubert for ( len = 0; yy_str[len]; ++len ) 19575796c8dcSSimon Schubert ; 19585796c8dcSSimon Schubert 19595796c8dcSSimon Schubert return yy_scan_bytes( yy_str, len ); 19605796c8dcSSimon Schubert } 19615796c8dcSSimon Schubert #endif 19625796c8dcSSimon Schubert 19635796c8dcSSimon Schubert 19645796c8dcSSimon Schubert #ifndef YY_NO_SCAN_BYTES 19655796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 19665796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 19675796c8dcSSimon Schubert #else 19685796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 19695796c8dcSSimon Schubert yyconst char *bytes; 19705796c8dcSSimon Schubert int len; 19715796c8dcSSimon Schubert #endif 19725796c8dcSSimon Schubert { 19735796c8dcSSimon Schubert YY_BUFFER_STATE b; 19745796c8dcSSimon Schubert char *buf; 19755796c8dcSSimon Schubert yy_size_t n; 19765796c8dcSSimon Schubert int i; 19775796c8dcSSimon Schubert 19785796c8dcSSimon Schubert /* Get memory for full buffer, including space for trailing EOB's. */ 19795796c8dcSSimon Schubert n = len + 2; 19805796c8dcSSimon Schubert buf = (char *) yy_flex_alloc( n ); 19815796c8dcSSimon Schubert if ( ! buf ) 19825796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 19835796c8dcSSimon Schubert 19845796c8dcSSimon Schubert for ( i = 0; i < len; ++i ) 19855796c8dcSSimon Schubert buf[i] = bytes[i]; 19865796c8dcSSimon Schubert 19875796c8dcSSimon Schubert buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 19885796c8dcSSimon Schubert 19895796c8dcSSimon Schubert b = yy_scan_buffer( buf, n ); 19905796c8dcSSimon Schubert if ( ! b ) 19915796c8dcSSimon Schubert YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 19925796c8dcSSimon Schubert 19935796c8dcSSimon Schubert /* It's okay to grow etc. this buffer, and we should throw it 19945796c8dcSSimon Schubert * away when we're done. 19955796c8dcSSimon Schubert */ 19965796c8dcSSimon Schubert b->yy_is_our_buffer = 1; 19975796c8dcSSimon Schubert 19985796c8dcSSimon Schubert return b; 19995796c8dcSSimon Schubert } 20005796c8dcSSimon Schubert #endif 20015796c8dcSSimon Schubert 20025796c8dcSSimon Schubert 20035796c8dcSSimon Schubert #ifndef YY_NO_PUSH_STATE 20045796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 20055796c8dcSSimon Schubert static void yy_push_state( int new_state ) 20065796c8dcSSimon Schubert #else 20075796c8dcSSimon Schubert static void yy_push_state( new_state ) 20085796c8dcSSimon Schubert int new_state; 20095796c8dcSSimon Schubert #endif 20105796c8dcSSimon Schubert { 20115796c8dcSSimon Schubert if ( yy_start_stack_ptr >= yy_start_stack_depth ) 20125796c8dcSSimon Schubert { 20135796c8dcSSimon Schubert yy_size_t new_size; 20145796c8dcSSimon Schubert 20155796c8dcSSimon Schubert yy_start_stack_depth += YY_START_STACK_INCR; 20165796c8dcSSimon Schubert new_size = yy_start_stack_depth * sizeof( int ); 20175796c8dcSSimon Schubert 20185796c8dcSSimon Schubert if ( ! yy_start_stack ) 20195796c8dcSSimon Schubert yy_start_stack = (int *) yy_flex_alloc( new_size ); 20205796c8dcSSimon Schubert 20215796c8dcSSimon Schubert else 20225796c8dcSSimon Schubert yy_start_stack = (int *) yyxrealloc( 20235796c8dcSSimon Schubert (void *) yy_start_stack, new_size ); 20245796c8dcSSimon Schubert 20255796c8dcSSimon Schubert if ( ! yy_start_stack ) 20265796c8dcSSimon Schubert YY_FATAL_ERROR( 20275796c8dcSSimon Schubert "out of memory expanding start-condition stack" ); 20285796c8dcSSimon Schubert } 20295796c8dcSSimon Schubert 20305796c8dcSSimon Schubert yy_start_stack[yy_start_stack_ptr++] = YY_START; 20315796c8dcSSimon Schubert 20325796c8dcSSimon Schubert BEGIN(new_state); 20335796c8dcSSimon Schubert } 20345796c8dcSSimon Schubert #endif 20355796c8dcSSimon Schubert 20365796c8dcSSimon Schubert 20375796c8dcSSimon Schubert #ifndef YY_NO_POP_STATE 20385796c8dcSSimon Schubert static void yy_pop_state() 20395796c8dcSSimon Schubert { 20405796c8dcSSimon Schubert if ( --yy_start_stack_ptr < 0 ) 20415796c8dcSSimon Schubert YY_FATAL_ERROR( "start-condition stack underflow" ); 20425796c8dcSSimon Schubert 20435796c8dcSSimon Schubert BEGIN(yy_start_stack[yy_start_stack_ptr]); 20445796c8dcSSimon Schubert } 20455796c8dcSSimon Schubert #endif 20465796c8dcSSimon Schubert 20475796c8dcSSimon Schubert 20485796c8dcSSimon Schubert #ifndef YY_NO_TOP_STATE 20495796c8dcSSimon Schubert static int yy_top_state() 20505796c8dcSSimon Schubert { 20515796c8dcSSimon Schubert return yy_start_stack[yy_start_stack_ptr - 1]; 20525796c8dcSSimon Schubert } 20535796c8dcSSimon Schubert #endif 20545796c8dcSSimon Schubert 20555796c8dcSSimon Schubert #ifndef YY_EXIT_FAILURE 20565796c8dcSSimon Schubert #define YY_EXIT_FAILURE 2 20575796c8dcSSimon Schubert #endif 20585796c8dcSSimon Schubert 20595796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 20605796c8dcSSimon Schubert static void yy_fatal_error( yyconst char msg[] ) 20615796c8dcSSimon Schubert #else 20625796c8dcSSimon Schubert static void yy_fatal_error( msg ) 20635796c8dcSSimon Schubert char msg[]; 20645796c8dcSSimon Schubert #endif 20655796c8dcSSimon Schubert { 20665796c8dcSSimon Schubert (void) fprintf( stderr, "%s\n", msg ); 20675796c8dcSSimon Schubert exit( YY_EXIT_FAILURE ); 20685796c8dcSSimon Schubert } 20695796c8dcSSimon Schubert 20705796c8dcSSimon Schubert 20715796c8dcSSimon Schubert 20725796c8dcSSimon Schubert /* Redefine yyless() so it works in section 3 code. */ 20735796c8dcSSimon Schubert 20745796c8dcSSimon Schubert #undef yyless 20755796c8dcSSimon Schubert #define yyless(n) \ 20765796c8dcSSimon Schubert do \ 20775796c8dcSSimon Schubert { \ 20785796c8dcSSimon Schubert /* Undo effects of setting up yytext. */ \ 20795796c8dcSSimon Schubert yytext[yyleng] = yy_hold_char; \ 20805796c8dcSSimon Schubert yy_c_buf_p = yytext + n; \ 20815796c8dcSSimon Schubert yy_hold_char = *yy_c_buf_p; \ 20825796c8dcSSimon Schubert *yy_c_buf_p = '\0'; \ 20835796c8dcSSimon Schubert yyleng = n; \ 20845796c8dcSSimon Schubert } \ 20855796c8dcSSimon Schubert while ( 0 ) 20865796c8dcSSimon Schubert 20875796c8dcSSimon Schubert 20885796c8dcSSimon Schubert /* Internal utility routines. */ 20895796c8dcSSimon Schubert 20905796c8dcSSimon Schubert #ifndef yytext_ptr 20915796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 20925796c8dcSSimon Schubert static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 20935796c8dcSSimon Schubert #else 20945796c8dcSSimon Schubert static void yy_flex_strncpy( s1, s2, n ) 20955796c8dcSSimon Schubert char *s1; 20965796c8dcSSimon Schubert yyconst char *s2; 20975796c8dcSSimon Schubert int n; 20985796c8dcSSimon Schubert #endif 20995796c8dcSSimon Schubert { 21005796c8dcSSimon Schubert register int i; 21015796c8dcSSimon Schubert for ( i = 0; i < n; ++i ) 21025796c8dcSSimon Schubert s1[i] = s2[i]; 21035796c8dcSSimon Schubert } 21045796c8dcSSimon Schubert #endif 21055796c8dcSSimon Schubert 21065796c8dcSSimon Schubert #ifdef YY_NEED_STRLEN 21075796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 21085796c8dcSSimon Schubert static int yy_flex_strlen( yyconst char *s ) 21095796c8dcSSimon Schubert #else 21105796c8dcSSimon Schubert static int yy_flex_strlen( s ) 21115796c8dcSSimon Schubert yyconst char *s; 21125796c8dcSSimon Schubert #endif 21135796c8dcSSimon Schubert { 21145796c8dcSSimon Schubert register int n; 21155796c8dcSSimon Schubert for ( n = 0; s[n]; ++n ) 21165796c8dcSSimon Schubert ; 21175796c8dcSSimon Schubert 21185796c8dcSSimon Schubert return n; 21195796c8dcSSimon Schubert } 21205796c8dcSSimon Schubert #endif 21215796c8dcSSimon Schubert 21225796c8dcSSimon Schubert 21235796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 21245796c8dcSSimon Schubert static void *yy_flex_alloc( yy_size_t size ) 21255796c8dcSSimon Schubert #else 21265796c8dcSSimon Schubert static void *yy_flex_alloc( size ) 21275796c8dcSSimon Schubert yy_size_t size; 21285796c8dcSSimon Schubert #endif 21295796c8dcSSimon Schubert { 21305796c8dcSSimon Schubert return (void *) xmalloc( size ); 21315796c8dcSSimon Schubert } 21325796c8dcSSimon Schubert 21335796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 21345796c8dcSSimon Schubert static void *yyxrealloc( void *ptr, yy_size_t size ) 21355796c8dcSSimon Schubert #else 21365796c8dcSSimon Schubert static void *yyxrealloc( ptr, size ) 21375796c8dcSSimon Schubert void *ptr; 21385796c8dcSSimon Schubert yy_size_t size; 21395796c8dcSSimon Schubert #endif 21405796c8dcSSimon Schubert { 21415796c8dcSSimon Schubert /* The cast to (char *) in the following accommodates both 21425796c8dcSSimon Schubert * implementations that use char* generic pointers, and those 21435796c8dcSSimon Schubert * that use void* generic pointers. It works with the latter 21445796c8dcSSimon Schubert * because both ANSI C and C++ allow castless assignment from 21455796c8dcSSimon Schubert * any pointer type to void*, and deal with argument conversions 21465796c8dcSSimon Schubert * as though doing an assignment. 21475796c8dcSSimon Schubert */ 21485796c8dcSSimon Schubert return (void *) xrealloc( (char *) ptr, size ); 21495796c8dcSSimon Schubert } 21505796c8dcSSimon Schubert 21515796c8dcSSimon Schubert #ifdef YY_USE_PROTOS 21525796c8dcSSimon Schubert static void yy_flex_free( void *ptr ) 21535796c8dcSSimon Schubert #else 21545796c8dcSSimon Schubert static void yy_flex_free( ptr ) 21555796c8dcSSimon Schubert void *ptr; 21565796c8dcSSimon Schubert #endif 21575796c8dcSSimon Schubert { 21585796c8dcSSimon Schubert xfree( ptr ); 21595796c8dcSSimon Schubert } 21605796c8dcSSimon Schubert 21615796c8dcSSimon Schubert #if YY_MAIN 21625796c8dcSSimon Schubert int main() 21635796c8dcSSimon Schubert { 21645796c8dcSSimon Schubert yylex(); 21655796c8dcSSimon Schubert return 0; 21665796c8dcSSimon Schubert } 21675796c8dcSSimon Schubert #endif 2168*cf7f2e2dSJohn Marino #line 289 "ada-lex.l" 21695796c8dcSSimon Schubert 21705796c8dcSSimon Schubert 21715796c8dcSSimon Schubert #include <ctype.h> 21725796c8dcSSimon Schubert #include "gdb_string.h" 21735796c8dcSSimon Schubert 21745796c8dcSSimon Schubert /* Initialize the lexer for processing new expression. */ 21755796c8dcSSimon Schubert 21765796c8dcSSimon Schubert void 21775796c8dcSSimon Schubert lexer_init (FILE *inp) 21785796c8dcSSimon Schubert { 21795796c8dcSSimon Schubert BEGIN INITIAL; 21805796c8dcSSimon Schubert yyrestart (inp); 21815796c8dcSSimon Schubert } 21825796c8dcSSimon Schubert 21835796c8dcSSimon Schubert 21845796c8dcSSimon Schubert /* Copy S2 to S1, removing all underscores, and downcasing all letters. */ 21855796c8dcSSimon Schubert 21865796c8dcSSimon Schubert static void 21875796c8dcSSimon Schubert canonicalizeNumeral (char *s1, const char *s2) 21885796c8dcSSimon Schubert { 21895796c8dcSSimon Schubert for (; *s2 != '\000'; s2 += 1) 21905796c8dcSSimon Schubert { 21915796c8dcSSimon Schubert if (*s2 != '_') 21925796c8dcSSimon Schubert { 21935796c8dcSSimon Schubert *s1 = tolower(*s2); 21945796c8dcSSimon Schubert s1 += 1; 21955796c8dcSSimon Schubert } 21965796c8dcSSimon Schubert } 21975796c8dcSSimon Schubert s1[0] = '\000'; 21985796c8dcSSimon Schubert } 21995796c8dcSSimon Schubert 22005796c8dcSSimon Schubert /* Interprets the prefix of NUM that consists of digits of the given BASE 22015796c8dcSSimon Schubert as an integer of that BASE, with the string EXP as an exponent. 22025796c8dcSSimon Schubert Puts value in yylval, and returns INT, if the string is valid. Causes 22035796c8dcSSimon Schubert an error if the number is improperly formated. BASE, if NULL, defaults 22045796c8dcSSimon Schubert to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. 22055796c8dcSSimon Schubert */ 22065796c8dcSSimon Schubert 22075796c8dcSSimon Schubert static int 22085796c8dcSSimon Schubert processInt (const char *base0, const char *num0, const char *exp0) 22095796c8dcSSimon Schubert { 22105796c8dcSSimon Schubert ULONGEST result; 22115796c8dcSSimon Schubert long exp; 22125796c8dcSSimon Schubert int base; 22135796c8dcSSimon Schubert 22145796c8dcSSimon Schubert char *trailer; 22155796c8dcSSimon Schubert 22165796c8dcSSimon Schubert if (base0 == NULL) 22175796c8dcSSimon Schubert base = 10; 22185796c8dcSSimon Schubert else 22195796c8dcSSimon Schubert { 22205796c8dcSSimon Schubert base = strtol (base0, (char **) NULL, 10); 22215796c8dcSSimon Schubert if (base < 2 || base > 16) 22225796c8dcSSimon Schubert error (_("Invalid base: %d."), base); 22235796c8dcSSimon Schubert } 22245796c8dcSSimon Schubert 22255796c8dcSSimon Schubert if (exp0 == NULL) 22265796c8dcSSimon Schubert exp = 0; 22275796c8dcSSimon Schubert else 22285796c8dcSSimon Schubert exp = strtol(exp0, (char **) NULL, 10); 22295796c8dcSSimon Schubert 22305796c8dcSSimon Schubert errno = 0; 22315796c8dcSSimon Schubert result = strtoulst (num0, (const char **) &trailer, base); 22325796c8dcSSimon Schubert if (errno == ERANGE) 22335796c8dcSSimon Schubert error (_("Integer literal out of range")); 22345796c8dcSSimon Schubert if (isxdigit(*trailer)) 22355796c8dcSSimon Schubert error (_("Invalid digit `%c' in based literal"), *trailer); 22365796c8dcSSimon Schubert 22375796c8dcSSimon Schubert while (exp > 0) 22385796c8dcSSimon Schubert { 22395796c8dcSSimon Schubert if (result > (ULONG_MAX / base)) 22405796c8dcSSimon Schubert error (_("Integer literal out of range")); 22415796c8dcSSimon Schubert result *= base; 22425796c8dcSSimon Schubert exp -= 1; 22435796c8dcSSimon Schubert } 22445796c8dcSSimon Schubert 22455796c8dcSSimon Schubert if ((result >> (gdbarch_int_bit (parse_gdbarch)-1)) == 0) 22465796c8dcSSimon Schubert yylval.typed_val.type = type_int (); 22475796c8dcSSimon Schubert else if ((result >> (gdbarch_long_bit (parse_gdbarch)-1)) == 0) 22485796c8dcSSimon Schubert yylval.typed_val.type = type_long (); 22495796c8dcSSimon Schubert else if (((result >> (gdbarch_long_bit (parse_gdbarch)-1)) >> 1) == 0) 22505796c8dcSSimon Schubert { 22515796c8dcSSimon Schubert /* We have a number representable as an unsigned integer quantity. 22525796c8dcSSimon Schubert For consistency with the C treatment, we will treat it as an 22535796c8dcSSimon Schubert anonymous modular (unsigned) quantity. Alas, the types are such 22545796c8dcSSimon Schubert that we need to store .val as a signed quantity. Sorry 22555796c8dcSSimon Schubert for the mess, but C doesn't officially guarantee that a simple 22565796c8dcSSimon Schubert assignment does the trick (no, it doesn't; read the reference manual). 22575796c8dcSSimon Schubert */ 22585796c8dcSSimon Schubert yylval.typed_val.type 22595796c8dcSSimon Schubert = builtin_type (parse_gdbarch)->builtin_unsigned_long; 22605796c8dcSSimon Schubert if (result & LONGEST_SIGN) 22615796c8dcSSimon Schubert yylval.typed_val.val = 22625796c8dcSSimon Schubert (LONGEST) (result & ~LONGEST_SIGN) 22635796c8dcSSimon Schubert - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1); 22645796c8dcSSimon Schubert else 22655796c8dcSSimon Schubert yylval.typed_val.val = (LONGEST) result; 22665796c8dcSSimon Schubert return INT; 22675796c8dcSSimon Schubert } 22685796c8dcSSimon Schubert else 22695796c8dcSSimon Schubert yylval.typed_val.type = type_long_long (); 22705796c8dcSSimon Schubert 22715796c8dcSSimon Schubert yylval.typed_val.val = (LONGEST) result; 22725796c8dcSSimon Schubert return INT; 22735796c8dcSSimon Schubert } 22745796c8dcSSimon Schubert 22755796c8dcSSimon Schubert static int 22765796c8dcSSimon Schubert processReal (const char *num0) 22775796c8dcSSimon Schubert { 22785796c8dcSSimon Schubert sscanf (num0, "%" DOUBLEST_SCAN_FORMAT, &yylval.typed_val_float.dval); 22795796c8dcSSimon Schubert 22805796c8dcSSimon Schubert yylval.typed_val_float.type = type_float (); 22815796c8dcSSimon Schubert if (sizeof(DOUBLEST) >= gdbarch_double_bit (parse_gdbarch) 22825796c8dcSSimon Schubert / TARGET_CHAR_BIT) 22835796c8dcSSimon Schubert yylval.typed_val_float.type = type_double (); 22845796c8dcSSimon Schubert if (sizeof(DOUBLEST) >= gdbarch_long_double_bit (parse_gdbarch) 22855796c8dcSSimon Schubert / TARGET_CHAR_BIT) 22865796c8dcSSimon Schubert yylval.typed_val_float.type = type_long_double (); 22875796c8dcSSimon Schubert 22885796c8dcSSimon Schubert return FLOAT; 22895796c8dcSSimon Schubert } 22905796c8dcSSimon Schubert 22915796c8dcSSimon Schubert 22925796c8dcSSimon Schubert /* Store a canonicalized version of NAME0[0..LEN-1] in yylval.ssym. The 22935796c8dcSSimon Schubert resulting string is valid until the next call to ada_parse. It differs 22945796c8dcSSimon Schubert from NAME0 in that: 22955796c8dcSSimon Schubert + Characters between '...' or <...> are transfered verbatim to 22965796c8dcSSimon Schubert yylval.ssym. 22975796c8dcSSimon Schubert + <, >, and trailing "'" characters in quoted sequences are removed 22985796c8dcSSimon Schubert (a leading quote is preserved to indicate that the name is not to be 22995796c8dcSSimon Schubert GNAT-encoded). 23005796c8dcSSimon Schubert + Unquoted whitespace is removed. 23015796c8dcSSimon Schubert + Unquoted alphabetic characters are mapped to lower case. 23025796c8dcSSimon Schubert Result is returned as a struct stoken, but for convenience, the string 23035796c8dcSSimon Schubert is also null-terminated. Result string valid until the next call of 23045796c8dcSSimon Schubert ada_parse. 23055796c8dcSSimon Schubert */ 23065796c8dcSSimon Schubert static struct stoken 23075796c8dcSSimon Schubert processId (const char *name0, int len) 23085796c8dcSSimon Schubert { 23095796c8dcSSimon Schubert char *name = obstack_alloc (&temp_parse_space, len + 11); 23105796c8dcSSimon Schubert int i0, i; 23115796c8dcSSimon Schubert struct stoken result; 23125796c8dcSSimon Schubert 23135796c8dcSSimon Schubert while (len > 0 && isspace (name0[len-1])) 23145796c8dcSSimon Schubert len -= 1; 23155796c8dcSSimon Schubert i = i0 = 0; 23165796c8dcSSimon Schubert while (i0 < len) 23175796c8dcSSimon Schubert { 23185796c8dcSSimon Schubert if (isalnum (name0[i0])) 23195796c8dcSSimon Schubert { 23205796c8dcSSimon Schubert name[i] = tolower (name0[i0]); 23215796c8dcSSimon Schubert i += 1; i0 += 1; 23225796c8dcSSimon Schubert } 23235796c8dcSSimon Schubert else switch (name0[i0]) 23245796c8dcSSimon Schubert { 23255796c8dcSSimon Schubert default: 23265796c8dcSSimon Schubert name[i] = name0[i0]; 23275796c8dcSSimon Schubert i += 1; i0 += 1; 23285796c8dcSSimon Schubert break; 23295796c8dcSSimon Schubert case ' ': case '\t': 23305796c8dcSSimon Schubert i0 += 1; 23315796c8dcSSimon Schubert break; 23325796c8dcSSimon Schubert case '\'': 23335796c8dcSSimon Schubert do 23345796c8dcSSimon Schubert { 23355796c8dcSSimon Schubert name[i] = name0[i0]; 23365796c8dcSSimon Schubert i += 1; i0 += 1; 23375796c8dcSSimon Schubert } 23385796c8dcSSimon Schubert while (i0 < len && name0[i0] != '\''); 23395796c8dcSSimon Schubert i0 += 1; 23405796c8dcSSimon Schubert break; 23415796c8dcSSimon Schubert case '<': 23425796c8dcSSimon Schubert i0 += 1; 23435796c8dcSSimon Schubert while (i0 < len && name0[i0] != '>') 23445796c8dcSSimon Schubert { 23455796c8dcSSimon Schubert name[i] = name0[i0]; 23465796c8dcSSimon Schubert i += 1; i0 += 1; 23475796c8dcSSimon Schubert } 23485796c8dcSSimon Schubert i0 += 1; 23495796c8dcSSimon Schubert break; 23505796c8dcSSimon Schubert } 23515796c8dcSSimon Schubert } 23525796c8dcSSimon Schubert name[i] = '\000'; 23535796c8dcSSimon Schubert 23545796c8dcSSimon Schubert result.ptr = name; 23555796c8dcSSimon Schubert result.length = i; 23565796c8dcSSimon Schubert return result; 23575796c8dcSSimon Schubert } 23585796c8dcSSimon Schubert 23595796c8dcSSimon Schubert /* Return TEXT[0..LEN-1], a string literal without surrounding quotes, 23605796c8dcSSimon Schubert with special hex character notations replaced with characters. 23615796c8dcSSimon Schubert Result valid until the next call to ada_parse. */ 23625796c8dcSSimon Schubert 23635796c8dcSSimon Schubert static struct stoken 23645796c8dcSSimon Schubert processString (const char *text, int len) 23655796c8dcSSimon Schubert { 23665796c8dcSSimon Schubert const char *p; 23675796c8dcSSimon Schubert char *q; 23685796c8dcSSimon Schubert const char *lim = text + len; 23695796c8dcSSimon Schubert struct stoken result; 23705796c8dcSSimon Schubert 23715796c8dcSSimon Schubert q = result.ptr = obstack_alloc (&temp_parse_space, len); 23725796c8dcSSimon Schubert p = text; 23735796c8dcSSimon Schubert while (p < lim) 23745796c8dcSSimon Schubert { 23755796c8dcSSimon Schubert if (p[0] == '[' && p[1] == '"' && p+2 < lim) 23765796c8dcSSimon Schubert { 23775796c8dcSSimon Schubert if (p[2] == '"') /* "...["""]... */ 23785796c8dcSSimon Schubert { 23795796c8dcSSimon Schubert *q = '"'; 23805796c8dcSSimon Schubert p += 4; 23815796c8dcSSimon Schubert } 23825796c8dcSSimon Schubert else 23835796c8dcSSimon Schubert { 23845796c8dcSSimon Schubert int chr; 23855796c8dcSSimon Schubert sscanf (p+2, "%2x", &chr); 23865796c8dcSSimon Schubert *q = (char) chr; 23875796c8dcSSimon Schubert p += 5; 23885796c8dcSSimon Schubert } 23895796c8dcSSimon Schubert } 23905796c8dcSSimon Schubert else 23915796c8dcSSimon Schubert *q = *p; 23925796c8dcSSimon Schubert q += 1; 23935796c8dcSSimon Schubert p += 1; 23945796c8dcSSimon Schubert } 23955796c8dcSSimon Schubert result.length = q - result.ptr; 23965796c8dcSSimon Schubert return result; 23975796c8dcSSimon Schubert } 23985796c8dcSSimon Schubert 23995796c8dcSSimon Schubert /* Returns the position within STR of the '.' in a 24005796c8dcSSimon Schubert '.{WHITE}*all' component of a dotted name, or -1 if there is none. 24015796c8dcSSimon Schubert Note: we actually don't need this routine, since 'all' can never be an 24025796c8dcSSimon Schubert Ada identifier. Thus, looking up foo.all or foo.all.x as a name 24035796c8dcSSimon Schubert must fail, and will eventually be interpreted as (foo).all or 24045796c8dcSSimon Schubert (foo).all.x. However, this does avoid an extraneous lookup. */ 24055796c8dcSSimon Schubert 24065796c8dcSSimon Schubert static int 24075796c8dcSSimon Schubert find_dot_all (const char *str) 24085796c8dcSSimon Schubert { 24095796c8dcSSimon Schubert int i; 24105796c8dcSSimon Schubert for (i = 0; str[i] != '\000'; i += 1) 24115796c8dcSSimon Schubert { 24125796c8dcSSimon Schubert if (str[i] == '.') 24135796c8dcSSimon Schubert { 24145796c8dcSSimon Schubert int i0 = i; 24155796c8dcSSimon Schubert do 24165796c8dcSSimon Schubert i += 1; 24175796c8dcSSimon Schubert while (isspace (str[i])); 24185796c8dcSSimon Schubert if (strncmp (str+i, "all", 3) == 0 24195796c8dcSSimon Schubert && ! isalnum (str[i+3]) && str[i+3] != '_') 24205796c8dcSSimon Schubert return i0; 24215796c8dcSSimon Schubert } 24225796c8dcSSimon Schubert } 24235796c8dcSSimon Schubert return -1; 24245796c8dcSSimon Schubert } 24255796c8dcSSimon Schubert 24265796c8dcSSimon Schubert /* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring 24275796c8dcSSimon Schubert case. */ 24285796c8dcSSimon Schubert 24295796c8dcSSimon Schubert static int 24305796c8dcSSimon Schubert subseqMatch (const char *subseq, const char *str) 24315796c8dcSSimon Schubert { 24325796c8dcSSimon Schubert if (subseq[0] == '\0') 24335796c8dcSSimon Schubert return 1; 24345796c8dcSSimon Schubert else if (str[0] == '\0') 24355796c8dcSSimon Schubert return 0; 24365796c8dcSSimon Schubert else if (tolower (subseq[0]) == tolower (str[0])) 24375796c8dcSSimon Schubert return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1); 24385796c8dcSSimon Schubert else 24395796c8dcSSimon Schubert return subseqMatch (subseq, str+1); 24405796c8dcSSimon Schubert } 24415796c8dcSSimon Schubert 24425796c8dcSSimon Schubert 24435796c8dcSSimon Schubert static struct { const char *name; int code; } 24445796c8dcSSimon Schubert attributes[] = { 24455796c8dcSSimon Schubert { "address", TICK_ADDRESS }, 24465796c8dcSSimon Schubert { "unchecked_access", TICK_ACCESS }, 24475796c8dcSSimon Schubert { "unrestricted_access", TICK_ACCESS }, 24485796c8dcSSimon Schubert { "access", TICK_ACCESS }, 24495796c8dcSSimon Schubert { "first", TICK_FIRST }, 24505796c8dcSSimon Schubert { "last", TICK_LAST }, 24515796c8dcSSimon Schubert { "length", TICK_LENGTH }, 24525796c8dcSSimon Schubert { "max", TICK_MAX }, 24535796c8dcSSimon Schubert { "min", TICK_MIN }, 24545796c8dcSSimon Schubert { "modulus", TICK_MODULUS }, 24555796c8dcSSimon Schubert { "pos", TICK_POS }, 24565796c8dcSSimon Schubert { "range", TICK_RANGE }, 24575796c8dcSSimon Schubert { "size", TICK_SIZE }, 24585796c8dcSSimon Schubert { "tag", TICK_TAG }, 24595796c8dcSSimon Schubert { "val", TICK_VAL }, 24605796c8dcSSimon Schubert { NULL, -1 } 24615796c8dcSSimon Schubert }; 24625796c8dcSSimon Schubert 24635796c8dcSSimon Schubert /* Return the syntactic code corresponding to the attribute name or 24645796c8dcSSimon Schubert abbreviation STR. */ 24655796c8dcSSimon Schubert 24665796c8dcSSimon Schubert static int 24675796c8dcSSimon Schubert processAttribute (const char *str) 24685796c8dcSSimon Schubert { 24695796c8dcSSimon Schubert int i, k; 24705796c8dcSSimon Schubert 24715796c8dcSSimon Schubert for (i = 0; attributes[i].code != -1; i += 1) 24725796c8dcSSimon Schubert if (strcasecmp (str, attributes[i].name) == 0) 24735796c8dcSSimon Schubert return attributes[i].code; 24745796c8dcSSimon Schubert 24755796c8dcSSimon Schubert for (i = 0, k = -1; attributes[i].code != -1; i += 1) 24765796c8dcSSimon Schubert if (subseqMatch (str, attributes[i].name)) 24775796c8dcSSimon Schubert { 24785796c8dcSSimon Schubert if (k == -1) 24795796c8dcSSimon Schubert k = i; 24805796c8dcSSimon Schubert else 24815796c8dcSSimon Schubert error (_("ambiguous attribute name: `%s'"), str); 24825796c8dcSSimon Schubert } 24835796c8dcSSimon Schubert if (k == -1) 24845796c8dcSSimon Schubert error (_("unrecognized attribute: `%s'"), str); 24855796c8dcSSimon Schubert 24865796c8dcSSimon Schubert return attributes[k].code; 24875796c8dcSSimon Schubert } 24885796c8dcSSimon Schubert 24895796c8dcSSimon Schubert int 24905796c8dcSSimon Schubert yywrap(void) 24915796c8dcSSimon Schubert { 24925796c8dcSSimon Schubert return 1; 24935796c8dcSSimon Schubert } 24945796c8dcSSimon Schubert 24955796c8dcSSimon Schubert /* Dummy definition to suppress warnings about unused static definitions. */ 24965796c8dcSSimon Schubert typedef void (*dummy_function) (); 24975796c8dcSSimon Schubert dummy_function ada_flex_use[] = 24985796c8dcSSimon Schubert { 24995796c8dcSSimon Schubert (dummy_function) yyunput 25005796c8dcSSimon Schubert }; 2501