15796c8dcSSimon Schubert #line 2 "ada-lex.c" 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino #line 4 "ada-lex.c" 4*ef5ccd6cSJohn Marino 5*ef5ccd6cSJohn Marino #define YY_INT_ALIGNED short int 6*ef5ccd6cSJohn Marino 7*ef5ccd6cSJohn Marino /* A lexical scanner generated by flex */ 85796c8dcSSimon Schubert 95796c8dcSSimon Schubert #define FLEX_SCANNER 105796c8dcSSimon Schubert #define YY_FLEX_MAJOR_VERSION 2 115796c8dcSSimon Schubert #define YY_FLEX_MINOR_VERSION 5 12*ef5ccd6cSJohn Marino #define YY_FLEX_SUBMINOR_VERSION 35 13*ef5ccd6cSJohn Marino #if YY_FLEX_SUBMINOR_VERSION > 0 14*ef5ccd6cSJohn Marino #define FLEX_BETA 15*ef5ccd6cSJohn Marino #endif 165796c8dcSSimon Schubert 17*ef5ccd6cSJohn Marino /* First, we deal with platform-specific or compiler-specific issues. */ 18*ef5ccd6cSJohn Marino 19*ef5ccd6cSJohn Marino /* begin standard C headers. */ 205796c8dcSSimon Schubert #include <stdio.h> 21*ef5ccd6cSJohn Marino #include <string.h> 22*ef5ccd6cSJohn Marino #include <errno.h> 235796c8dcSSimon Schubert #include <stdlib.h> 245796c8dcSSimon Schubert 25*ef5ccd6cSJohn Marino /* end standard C headers. */ 26*ef5ccd6cSJohn Marino 27*ef5ccd6cSJohn Marino /* flex integer type definitions */ 28*ef5ccd6cSJohn Marino 29*ef5ccd6cSJohn Marino #ifndef FLEXINT_H 30*ef5ccd6cSJohn Marino #define FLEXINT_H 31*ef5ccd6cSJohn Marino 32*ef5ccd6cSJohn Marino /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 33*ef5ccd6cSJohn Marino 34*ef5ccd6cSJohn Marino #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 35*ef5ccd6cSJohn Marino 36*ef5ccd6cSJohn Marino /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 37*ef5ccd6cSJohn Marino * if you want the limit (max/min) macros for int types. 38*ef5ccd6cSJohn Marino */ 39*ef5ccd6cSJohn Marino #ifndef __STDC_LIMIT_MACROS 40*ef5ccd6cSJohn Marino #define __STDC_LIMIT_MACROS 1 41*ef5ccd6cSJohn Marino #endif 42*ef5ccd6cSJohn Marino 43*ef5ccd6cSJohn Marino #include <inttypes.h> 44*ef5ccd6cSJohn Marino typedef int8_t flex_int8_t; 45*ef5ccd6cSJohn Marino typedef uint8_t flex_uint8_t; 46*ef5ccd6cSJohn Marino typedef int16_t flex_int16_t; 47*ef5ccd6cSJohn Marino typedef uint16_t flex_uint16_t; 48*ef5ccd6cSJohn Marino typedef int32_t flex_int32_t; 49*ef5ccd6cSJohn Marino typedef uint32_t flex_uint32_t; 50*ef5ccd6cSJohn Marino #else 51*ef5ccd6cSJohn Marino typedef signed char flex_int8_t; 52*ef5ccd6cSJohn Marino typedef short int flex_int16_t; 53*ef5ccd6cSJohn Marino typedef int flex_int32_t; 54*ef5ccd6cSJohn Marino typedef unsigned char flex_uint8_t; 55*ef5ccd6cSJohn Marino typedef unsigned short int flex_uint16_t; 56*ef5ccd6cSJohn Marino typedef unsigned int flex_uint32_t; 57*ef5ccd6cSJohn Marino #endif /* ! C99 */ 58*ef5ccd6cSJohn Marino 59*ef5ccd6cSJohn Marino /* Limits of integral types. */ 60*ef5ccd6cSJohn Marino #ifndef INT8_MIN 61*ef5ccd6cSJohn Marino #define INT8_MIN (-128) 62*ef5ccd6cSJohn Marino #endif 63*ef5ccd6cSJohn Marino #ifndef INT16_MIN 64*ef5ccd6cSJohn Marino #define INT16_MIN (-32767-1) 65*ef5ccd6cSJohn Marino #endif 66*ef5ccd6cSJohn Marino #ifndef INT32_MIN 67*ef5ccd6cSJohn Marino #define INT32_MIN (-2147483647-1) 68*ef5ccd6cSJohn Marino #endif 69*ef5ccd6cSJohn Marino #ifndef INT8_MAX 70*ef5ccd6cSJohn Marino #define INT8_MAX (127) 71*ef5ccd6cSJohn Marino #endif 72*ef5ccd6cSJohn Marino #ifndef INT16_MAX 73*ef5ccd6cSJohn Marino #define INT16_MAX (32767) 74*ef5ccd6cSJohn Marino #endif 75*ef5ccd6cSJohn Marino #ifndef INT32_MAX 76*ef5ccd6cSJohn Marino #define INT32_MAX (2147483647) 77*ef5ccd6cSJohn Marino #endif 78*ef5ccd6cSJohn Marino #ifndef UINT8_MAX 79*ef5ccd6cSJohn Marino #define UINT8_MAX (255U) 80*ef5ccd6cSJohn Marino #endif 81*ef5ccd6cSJohn Marino #ifndef UINT16_MAX 82*ef5ccd6cSJohn Marino #define UINT16_MAX (65535U) 83*ef5ccd6cSJohn Marino #endif 84*ef5ccd6cSJohn Marino #ifndef UINT32_MAX 85*ef5ccd6cSJohn Marino #define UINT32_MAX (4294967295U) 86*ef5ccd6cSJohn Marino #endif 87*ef5ccd6cSJohn Marino 88*ef5ccd6cSJohn Marino #endif /* ! FLEXINT_H */ 89*ef5ccd6cSJohn Marino 90*ef5ccd6cSJohn Marino #ifdef __cplusplus 915796c8dcSSimon Schubert 925796c8dcSSimon Schubert /* The "const" storage-class-modifier is valid. */ 935796c8dcSSimon Schubert #define YY_USE_CONST 945796c8dcSSimon Schubert 955796c8dcSSimon Schubert #else /* ! __cplusplus */ 965796c8dcSSimon Schubert 97*ef5ccd6cSJohn Marino /* C99 requires __STDC__ to be defined as 1. */ 98*ef5ccd6cSJohn Marino #if defined (__STDC__) 995796c8dcSSimon Schubert 1005796c8dcSSimon Schubert #define YY_USE_CONST 1015796c8dcSSimon Schubert 102*ef5ccd6cSJohn Marino #endif /* defined (__STDC__) */ 1035796c8dcSSimon Schubert #endif /* ! __cplusplus */ 1045796c8dcSSimon Schubert 1055796c8dcSSimon Schubert #ifdef YY_USE_CONST 1065796c8dcSSimon Schubert #define yyconst const 1075796c8dcSSimon Schubert #else 1085796c8dcSSimon Schubert #define yyconst 1095796c8dcSSimon Schubert #endif 1105796c8dcSSimon Schubert 1115796c8dcSSimon Schubert /* Returned upon end-of-file. */ 1125796c8dcSSimon Schubert #define YY_NULL 0 1135796c8dcSSimon Schubert 1145796c8dcSSimon Schubert /* Promotes a possibly negative, possibly signed char to an unsigned 1155796c8dcSSimon Schubert * integer for use as an array index. If the signed char is negative, 1165796c8dcSSimon Schubert * we want to instead treat it as an 8-bit unsigned char, hence the 1175796c8dcSSimon Schubert * double cast. 1185796c8dcSSimon Schubert */ 1195796c8dcSSimon Schubert #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 1205796c8dcSSimon Schubert 1215796c8dcSSimon Schubert /* Enter a start condition. This macro really ought to take a parameter, 1225796c8dcSSimon Schubert * but we do it the disgusting crufty way forced on us by the ()-less 1235796c8dcSSimon Schubert * definition of BEGIN. 1245796c8dcSSimon Schubert */ 125*ef5ccd6cSJohn Marino #define BEGIN (yy_start) = 1 + 2 * 1265796c8dcSSimon Schubert 1275796c8dcSSimon Schubert /* Translate the current start state into a value that can be later handed 1285796c8dcSSimon Schubert * to BEGIN to return to the state. The YYSTATE alias is for lex 1295796c8dcSSimon Schubert * compatibility. 1305796c8dcSSimon Schubert */ 131*ef5ccd6cSJohn Marino #define YY_START (((yy_start) - 1) / 2) 1325796c8dcSSimon Schubert #define YYSTATE YY_START 1335796c8dcSSimon Schubert 1345796c8dcSSimon Schubert /* Action number for EOF rule of a given start state. */ 1355796c8dcSSimon Schubert #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 1365796c8dcSSimon Schubert 1375796c8dcSSimon Schubert /* Special action meaning "start processing a new file". */ 1385796c8dcSSimon Schubert #define YY_NEW_FILE yyrestart(yyin ) 1395796c8dcSSimon Schubert 1405796c8dcSSimon Schubert #define YY_END_OF_BUFFER_CHAR 0 1415796c8dcSSimon Schubert 1425796c8dcSSimon Schubert /* Size of default input buffer. */ 143*ef5ccd6cSJohn Marino #ifndef YY_BUF_SIZE 1445796c8dcSSimon Schubert #define YY_BUF_SIZE 16384 145*ef5ccd6cSJohn Marino #endif 1465796c8dcSSimon Schubert 147*ef5ccd6cSJohn Marino /* The state buf must be large enough to hold one state per character in the main buffer. 148*ef5ccd6cSJohn Marino */ 149*ef5ccd6cSJohn Marino #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 150*ef5ccd6cSJohn Marino 151*ef5ccd6cSJohn Marino #ifndef YY_TYPEDEF_YY_BUFFER_STATE 152*ef5ccd6cSJohn Marino #define YY_TYPEDEF_YY_BUFFER_STATE 1535796c8dcSSimon Schubert typedef struct yy_buffer_state *YY_BUFFER_STATE; 154*ef5ccd6cSJohn Marino #endif 1555796c8dcSSimon Schubert 1565796c8dcSSimon Schubert extern int yyleng; 157*ef5ccd6cSJohn Marino 1585796c8dcSSimon Schubert extern FILE *yyin, *yyout; 1595796c8dcSSimon Schubert 1605796c8dcSSimon Schubert #define EOB_ACT_CONTINUE_SCAN 0 1615796c8dcSSimon Schubert #define EOB_ACT_END_OF_FILE 1 1625796c8dcSSimon Schubert #define EOB_ACT_LAST_MATCH 2 1635796c8dcSSimon Schubert 164*ef5ccd6cSJohn Marino #define YY_LESS_LINENO(n) 1655796c8dcSSimon Schubert 166*ef5ccd6cSJohn Marino /* Return all but the first "n" matched characters back to the input stream. */ 1675796c8dcSSimon Schubert #define yyless(n) \ 1685796c8dcSSimon Schubert do \ 1695796c8dcSSimon Schubert { \ 1705796c8dcSSimon Schubert /* Undo effects of setting up yytext. */ \ 171*ef5ccd6cSJohn Marino int yyless_macro_arg = (n); \ 172*ef5ccd6cSJohn Marino YY_LESS_LINENO(yyless_macro_arg);\ 173*ef5ccd6cSJohn Marino *yy_cp = (yy_hold_char); \ 1745796c8dcSSimon Schubert YY_RESTORE_YY_MORE_OFFSET \ 175*ef5ccd6cSJohn Marino (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 1765796c8dcSSimon Schubert YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 1775796c8dcSSimon Schubert } \ 1785796c8dcSSimon Schubert while ( 0 ) 1795796c8dcSSimon Schubert 180*ef5ccd6cSJohn Marino #define unput(c) yyunput( c, (yytext_ptr) ) 1815796c8dcSSimon Schubert 182*ef5ccd6cSJohn Marino #ifndef YY_TYPEDEF_YY_SIZE_T 183*ef5ccd6cSJohn Marino #define YY_TYPEDEF_YY_SIZE_T 184*ef5ccd6cSJohn Marino typedef size_t yy_size_t; 185*ef5ccd6cSJohn Marino #endif 1865796c8dcSSimon Schubert 187*ef5ccd6cSJohn Marino #ifndef YY_STRUCT_YY_BUFFER_STATE 188*ef5ccd6cSJohn Marino #define YY_STRUCT_YY_BUFFER_STATE 1895796c8dcSSimon Schubert struct yy_buffer_state 1905796c8dcSSimon Schubert { 1915796c8dcSSimon Schubert FILE *yy_input_file; 1925796c8dcSSimon Schubert 1935796c8dcSSimon Schubert char *yy_ch_buf; /* input buffer */ 1945796c8dcSSimon Schubert char *yy_buf_pos; /* current position in input buffer */ 1955796c8dcSSimon Schubert 1965796c8dcSSimon Schubert /* Size of input buffer in bytes, not including room for EOB 1975796c8dcSSimon Schubert * characters. 1985796c8dcSSimon Schubert */ 1995796c8dcSSimon Schubert yy_size_t yy_buf_size; 2005796c8dcSSimon Schubert 2015796c8dcSSimon Schubert /* Number of characters read into yy_ch_buf, not including EOB 2025796c8dcSSimon Schubert * characters. 2035796c8dcSSimon Schubert */ 2045796c8dcSSimon Schubert int yy_n_chars; 2055796c8dcSSimon Schubert 2065796c8dcSSimon Schubert /* Whether we "own" the buffer - i.e., we know we created it, 2075796c8dcSSimon Schubert * and can xrealloc() it to grow it, and should xfree() it to 2085796c8dcSSimon Schubert * delete it. 2095796c8dcSSimon Schubert */ 2105796c8dcSSimon Schubert int yy_is_our_buffer; 2115796c8dcSSimon Schubert 2125796c8dcSSimon Schubert /* Whether this is an "interactive" input source; if so, and 2135796c8dcSSimon Schubert * if we're using stdio for input, then we want to use getc() 2145796c8dcSSimon Schubert * instead of fread(), to make sure we stop fetching input after 2155796c8dcSSimon Schubert * each newline. 2165796c8dcSSimon Schubert */ 2175796c8dcSSimon Schubert int yy_is_interactive; 2185796c8dcSSimon Schubert 2195796c8dcSSimon Schubert /* Whether we're considered to be at the beginning of a line. 2205796c8dcSSimon Schubert * If so, '^' rules will be active on the next match, otherwise 2215796c8dcSSimon Schubert * not. 2225796c8dcSSimon Schubert */ 2235796c8dcSSimon Schubert int yy_at_bol; 2245796c8dcSSimon Schubert 225*ef5ccd6cSJohn Marino int yy_bs_lineno; /**< The line count. */ 226*ef5ccd6cSJohn Marino int yy_bs_column; /**< The column count. */ 227*ef5ccd6cSJohn Marino 2285796c8dcSSimon Schubert /* Whether to try to fill the input buffer when we reach the 2295796c8dcSSimon Schubert * end of it. 2305796c8dcSSimon Schubert */ 2315796c8dcSSimon Schubert int yy_fill_buffer; 2325796c8dcSSimon Schubert 2335796c8dcSSimon Schubert int yy_buffer_status; 234*ef5ccd6cSJohn Marino 2355796c8dcSSimon Schubert #define YY_BUFFER_NEW 0 2365796c8dcSSimon Schubert #define YY_BUFFER_NORMAL 1 2375796c8dcSSimon Schubert /* When an EOF's been seen but there's still some text to process 2385796c8dcSSimon Schubert * then we mark the buffer as YY_EOF_PENDING, to indicate that we 2395796c8dcSSimon Schubert * shouldn't try reading from the input source any more. We might 2405796c8dcSSimon Schubert * still have a bunch of tokens to match, though, because of 2415796c8dcSSimon Schubert * possible backing-up. 2425796c8dcSSimon Schubert * 2435796c8dcSSimon Schubert * When we actually see the EOF, we change the status to "new" 2445796c8dcSSimon Schubert * (via yyrestart()), so that the user can continue scanning by 2455796c8dcSSimon Schubert * just pointing yyin at a new input file. 2465796c8dcSSimon Schubert */ 2475796c8dcSSimon Schubert #define YY_BUFFER_EOF_PENDING 2 2485796c8dcSSimon Schubert 249*ef5ccd6cSJohn Marino }; 250*ef5ccd6cSJohn Marino #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 251*ef5ccd6cSJohn Marino 252*ef5ccd6cSJohn Marino /* Stack of input buffers. */ 253*ef5ccd6cSJohn Marino static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 254*ef5ccd6cSJohn Marino static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 255*ef5ccd6cSJohn Marino static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 2565796c8dcSSimon Schubert 2575796c8dcSSimon Schubert /* We provide macros for accessing buffer states in case in the 2585796c8dcSSimon Schubert * future we want to put the buffer states in a more general 2595796c8dcSSimon Schubert * "scanner state". 260*ef5ccd6cSJohn Marino * 261*ef5ccd6cSJohn Marino * Returns the top of the stack, or NULL. 2625796c8dcSSimon Schubert */ 263*ef5ccd6cSJohn Marino #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 264*ef5ccd6cSJohn Marino ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 265*ef5ccd6cSJohn Marino : NULL) 2665796c8dcSSimon Schubert 267*ef5ccd6cSJohn Marino /* Same as previous macro, but useful when we know that the buffer stack is not 268*ef5ccd6cSJohn Marino * NULL or when we need an lvalue. For internal use only. 269*ef5ccd6cSJohn Marino */ 270*ef5ccd6cSJohn Marino #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 2715796c8dcSSimon Schubert 2725796c8dcSSimon Schubert /* yy_hold_char holds the character lost when yytext is formed. */ 2735796c8dcSSimon Schubert static char yy_hold_char; 2745796c8dcSSimon Schubert static int yy_n_chars; /* number of characters read into yy_ch_buf */ 2755796c8dcSSimon Schubert int yyleng; 2765796c8dcSSimon Schubert 2775796c8dcSSimon Schubert /* Points to current character in buffer. */ 2785796c8dcSSimon Schubert static char *yy_c_buf_p = (char *) 0; 279*ef5ccd6cSJohn Marino static int yy_init = 0; /* whether we need to initialize */ 2805796c8dcSSimon Schubert static int yy_start = 0; /* start state number */ 2815796c8dcSSimon Schubert 2825796c8dcSSimon Schubert /* Flag which is used to allow yywrap()'s to do buffer switches 2835796c8dcSSimon Schubert * instead of setting up a fresh yyin. A bit of a hack ... 2845796c8dcSSimon Schubert */ 2855796c8dcSSimon Schubert static int yy_did_buffer_switch_on_eof; 2865796c8dcSSimon Schubert 287*ef5ccd6cSJohn Marino void yyrestart (FILE *input_file ); 288*ef5ccd6cSJohn Marino void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 289*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 290*ef5ccd6cSJohn Marino void yy_delete_buffer (YY_BUFFER_STATE b ); 291*ef5ccd6cSJohn Marino void yy_flush_buffer (YY_BUFFER_STATE b ); 292*ef5ccd6cSJohn Marino void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 293*ef5ccd6cSJohn Marino void yypop_buffer_state (void ); 2945796c8dcSSimon Schubert 295*ef5ccd6cSJohn Marino static void yyensure_buffer_stack (void ); 296*ef5ccd6cSJohn Marino static void yy_load_buffer_state (void ); 297*ef5ccd6cSJohn Marino static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 2985796c8dcSSimon Schubert 299*ef5ccd6cSJohn Marino #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 3005796c8dcSSimon Schubert 301*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 302*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 303*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 304*ef5ccd6cSJohn Marino 305*ef5ccd6cSJohn Marino void *yyalloc (yy_size_t ); 306*ef5ccd6cSJohn Marino void *yyxrealloc (void *,yy_size_t ); 307*ef5ccd6cSJohn Marino void yyfree (void * ); 3085796c8dcSSimon Schubert 3095796c8dcSSimon Schubert #define yy_new_buffer yy_create_buffer 3105796c8dcSSimon Schubert 3115796c8dcSSimon Schubert #define yy_set_interactive(is_interactive) \ 3125796c8dcSSimon Schubert { \ 313*ef5ccd6cSJohn Marino if ( ! YY_CURRENT_BUFFER ){ \ 314*ef5ccd6cSJohn Marino yyensure_buffer_stack (); \ 315*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = \ 316*ef5ccd6cSJohn Marino yy_create_buffer(yyin,YY_BUF_SIZE ); \ 317*ef5ccd6cSJohn Marino } \ 318*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 3195796c8dcSSimon Schubert } 3205796c8dcSSimon Schubert 3215796c8dcSSimon Schubert #define yy_set_bol(at_bol) \ 3225796c8dcSSimon Schubert { \ 323*ef5ccd6cSJohn Marino if ( ! YY_CURRENT_BUFFER ){\ 324*ef5ccd6cSJohn Marino yyensure_buffer_stack (); \ 325*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = \ 326*ef5ccd6cSJohn Marino yy_create_buffer(yyin,YY_BUF_SIZE ); \ 327*ef5ccd6cSJohn Marino } \ 328*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 3295796c8dcSSimon Schubert } 3305796c8dcSSimon Schubert 331*ef5ccd6cSJohn Marino #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 332*ef5ccd6cSJohn Marino 333*ef5ccd6cSJohn Marino /* Begin user sect3 */ 3345796c8dcSSimon Schubert 3355796c8dcSSimon Schubert typedef unsigned char YY_CHAR; 336*ef5ccd6cSJohn Marino 3375796c8dcSSimon Schubert FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 338*ef5ccd6cSJohn Marino 3395796c8dcSSimon Schubert typedef int yy_state_type; 340*ef5ccd6cSJohn Marino 341*ef5ccd6cSJohn Marino extern int yylineno; 342*ef5ccd6cSJohn Marino 343*ef5ccd6cSJohn Marino int yylineno = 1; 344*ef5ccd6cSJohn Marino 3455796c8dcSSimon Schubert extern char *yytext; 3465796c8dcSSimon Schubert #define yytext_ptr yytext 3475796c8dcSSimon Schubert 348*ef5ccd6cSJohn Marino static yy_state_type yy_get_previous_state (void ); 349*ef5ccd6cSJohn Marino static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 350*ef5ccd6cSJohn Marino static int yy_get_next_buffer (void ); 351*ef5ccd6cSJohn Marino static void yy_fatal_error (yyconst char msg[] ); 3525796c8dcSSimon Schubert 3535796c8dcSSimon Schubert /* Done after the current pattern has been matched and before the 3545796c8dcSSimon Schubert * corresponding action - sets up yytext. 3555796c8dcSSimon Schubert */ 3565796c8dcSSimon Schubert #define YY_DO_BEFORE_ACTION \ 357*ef5ccd6cSJohn Marino (yytext_ptr) = yy_bp; \ 358*ef5ccd6cSJohn Marino yyleng = (size_t) (yy_cp - yy_bp); \ 359*ef5ccd6cSJohn Marino (yy_hold_char) = *yy_cp; \ 3605796c8dcSSimon Schubert *yy_cp = '\0'; \ 361*ef5ccd6cSJohn Marino (yy_c_buf_p) = yy_cp; 3625796c8dcSSimon Schubert 363*ef5ccd6cSJohn Marino #define YY_NUM_RULES 55 364*ef5ccd6cSJohn Marino #define YY_END_OF_BUFFER 56 365*ef5ccd6cSJohn Marino /* This struct is not used in this scanner, 366*ef5ccd6cSJohn Marino but its presence is necessary. */ 367*ef5ccd6cSJohn Marino struct yy_trans_info 368*ef5ccd6cSJohn Marino { 369*ef5ccd6cSJohn Marino flex_int32_t yy_verify; 370*ef5ccd6cSJohn Marino flex_int32_t yy_nxt; 371*ef5ccd6cSJohn Marino }; 372*ef5ccd6cSJohn Marino static yyconst flex_int16_t yy_accept[207] = 3735796c8dcSSimon Schubert { 0, 374*ef5ccd6cSJohn Marino 0, 0, 0, 0, 56, 54, 1, 1, 15, 53, 375*ef5ccd6cSJohn Marino 43, 54, 45, 46, 43, 44, 43, 43, 43, 4, 376*ef5ccd6cSJohn Marino 4, 43, 43, 43, 43, 52, 49, 49, 49, 49, 377*ef5ccd6cSJohn Marino 49, 49, 49, 49, 49, 49, 49, 42, 0, 14, 378*ef5ccd6cSJohn Marino 0, 53, 0, 0, 0, 0, 0, 0, 0, 37, 379*ef5ccd6cSJohn Marino 2, 0, 36, 0, 48, 48, 39, 0, 0, 4, 380*ef5ccd6cSJohn Marino 0, 0, 51, 38, 40, 0, 35, 41, 0, 0, 381*ef5ccd6cSJohn Marino 49, 0, 49, 49, 49, 49, 49, 16, 22, 49, 382*ef5ccd6cSJohn Marino 49, 49, 49, 27, 49, 49, 49, 49, 49, 49, 383*ef5ccd6cSJohn Marino 0, 14, 0, 12, 12, 34, 0, 2, 0, 48, 3845796c8dcSSimon Schubert 385*ef5ccd6cSJohn Marino 48, 0, 9, 0, 3, 7, 0, 49, 0, 0, 386*ef5ccd6cSJohn Marino 0, 49, 19, 20, 49, 49, 23, 24, 25, 49, 387*ef5ccd6cSJohn Marino 49, 29, 49, 49, 49, 49, 31, 0, 0, 0, 388*ef5ccd6cSJohn Marino 0, 0, 0, 48, 47, 6, 0, 0, 9, 0, 389cf7f2e2dSJohn Marino 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 390*ef5ccd6cSJohn Marino 0, 0, 0, 49, 21, 49, 26, 49, 17, 30, 391*ef5ccd6cSJohn Marino 49, 32, 0, 50, 0, 0, 0, 0, 49, 0, 392*ef5ccd6cSJohn Marino 0, 0, 0, 0, 0, 0, 0, 33, 49, 49, 393*ef5ccd6cSJohn Marino 0, 0, 5, 11, 0, 8, 0, 0, 0, 0, 394*ef5ccd6cSJohn Marino 0, 0, 28, 49, 0, 5, 0, 8, 0, 0, 395cf7f2e2dSJohn Marino 396*ef5ccd6cSJohn Marino 13, 0, 18, 10, 10, 0 3975796c8dcSSimon Schubert } ; 3985796c8dcSSimon Schubert 399*ef5ccd6cSJohn Marino static yyconst flex_int32_t yy_ec[256] = 4005796c8dcSSimon Schubert { 0, 4015796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4025796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4035796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4045796c8dcSSimon Schubert 1, 4, 5, 6, 7, 8, 5, 9, 10, 11, 4055796c8dcSSimon Schubert 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 4065796c8dcSSimon Schubert 20, 20, 20, 20, 20, 20, 20, 21, 22, 23, 407*ef5ccd6cSJohn Marino 24, 25, 5, 26, 27, 28, 29, 30, 31, 32, 408*ef5ccd6cSJohn Marino 33, 34, 35, 33, 36, 37, 38, 39, 40, 33, 409*ef5ccd6cSJohn Marino 33, 41, 42, 43, 44, 33, 45, 46, 33, 33, 410*ef5ccd6cSJohn Marino 47, 5, 48, 5, 49, 5, 50, 51, 29, 52, 4115796c8dcSSimon Schubert 412*ef5ccd6cSJohn Marino 53, 54, 33, 55, 56, 33, 57, 58, 59, 60, 413*ef5ccd6cSJohn Marino 61, 33, 33, 62, 63, 64, 65, 33, 66, 67, 414*ef5ccd6cSJohn Marino 33, 33, 26, 22, 26, 5, 1, 1, 1, 1, 4155796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4165796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4175796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4185796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4195796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4205796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4215796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4225796c8dcSSimon Schubert 4235796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4245796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4255796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4265796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4275796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4285796c8dcSSimon Schubert 1, 1, 1, 1, 1 4295796c8dcSSimon Schubert } ; 4305796c8dcSSimon Schubert 431*ef5ccd6cSJohn Marino static yyconst flex_int32_t yy_meta[68] = 4325796c8dcSSimon Schubert { 0, 4335796c8dcSSimon Schubert 1, 2, 3, 4, 5, 6, 7, 8, 5, 9, 4345796c8dcSSimon Schubert 5, 5, 5, 5, 5, 5, 10, 5, 11, 11, 435*ef5ccd6cSJohn Marino 5, 5, 12, 13, 14, 5, 15, 15, 15, 15, 436*ef5ccd6cSJohn Marino 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 437*ef5ccd6cSJohn Marino 16, 16, 16, 16, 16, 16, 5, 5, 17, 15, 438*ef5ccd6cSJohn Marino 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 439*ef5ccd6cSJohn Marino 16, 16, 16, 16, 16, 16, 16 4405796c8dcSSimon Schubert } ; 4415796c8dcSSimon Schubert 442*ef5ccd6cSJohn Marino static yyconst flex_int16_t yy_base[229] = 4435796c8dcSSimon Schubert { 0, 444*ef5ccd6cSJohn Marino 0, 0, 649, 638, 646, 1252, 1252, 1252, 62, 0, 445*ef5ccd6cSJohn Marino 1252, 109, 1252, 1252, 623, 1252, 619, 175, 606, 174, 446*ef5ccd6cSJohn Marino 180, 48, 604, 592, 590, 1252, 204, 71, 214, 186, 447*ef5ccd6cSJohn Marino 235, 244, 304, 256, 39, 368, 40, 430, 179, 1252, 448*ef5ccd6cSJohn Marino 195, 0, 602, 595, 592, 585, 574, 497, 72, 1252, 449*ef5ccd6cSJohn Marino 0, 273, 1252, 0, 39, 0, 1252, 0, 66, 262, 450*ef5ccd6cSJohn Marino 75, 0, 1252, 1252, 1252, 557, 1252, 1252, 284, 300, 451*ef5ccd6cSJohn Marino 1252, 322, 329, 349, 358, 377, 339, 396, 412, 563, 452*ef5ccd6cSJohn Marino 566, 575, 584, 587, 569, 596, 623, 616, 576, 617, 453*ef5ccd6cSJohn Marino 571, 568, 334, 380, 1252, 562, 677, 0, 403, 0, 4545796c8dcSSimon Schubert 455*ef5ccd6cSJohn Marino 40, 89, 642, 71, 163, 0, 401, 672, 401, 723, 456*ef5ccd6cSJohn Marino 0, 708, 741, 750, 637, 776, 785, 794, 797, 806, 457*ef5ccd6cSJohn Marino 775, 827, 831, 843, 818, 819, 883, 415, 0, 712, 458*ef5ccd6cSJohn Marino 399, 885, 352, 1252, 0, 191, 0, 202, 772, 170, 459*ef5ccd6cSJohn Marino 243, 334, 222, 244, 247, 259, 766, 47, 209, 216, 460*ef5ccd6cSJohn Marino 203, 251, 302, 892, 916, 890, 942, 715, 946, 958, 461*ef5ccd6cSJohn Marino 930, 974, 274, 1252, 93, 344, 278, 310, 979, 256, 462*ef5ccd6cSJohn Marino 264, 337, 270, 274, 352, 355, 215, 984, 995, 1000, 463*ef5ccd6cSJohn Marino 299, 354, 589, 355, 223, 603, 209, 204, 198, 189, 464*ef5ccd6cSJohn Marino 174, 101, 1004, 1016, 92, 634, 411, 644, 872, 1021, 4655796c8dcSSimon Schubert 466*ef5ccd6cSJohn Marino 717, 373, 1252, 793, 832, 1252, 1055, 1065, 1081, 1086, 467*ef5ccd6cSJohn Marino 1102, 1119, 1136, 1139, 1146, 339, 560, 1153, 1169, 1181, 468*ef5ccd6cSJohn Marino 1186, 1197, 1200, 1216, 634, 645, 1223, 1234 4695796c8dcSSimon Schubert } ; 4705796c8dcSSimon Schubert 471*ef5ccd6cSJohn Marino static yyconst flex_int16_t yy_def[229] = 4725796c8dcSSimon Schubert { 0, 473*ef5ccd6cSJohn Marino 206, 1, 1, 1, 206, 206, 206, 206, 207, 208, 474*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 209, 206, 206, 475*ef5ccd6cSJohn Marino 206, 206, 210, 206, 206, 206, 211, 211, 211, 211, 476*ef5ccd6cSJohn Marino 211, 211, 211, 211, 33, 211, 33, 206, 207, 206, 477*ef5ccd6cSJohn Marino 207, 208, 212, 38, 38, 212, 206, 206, 212, 206, 478*ef5ccd6cSJohn Marino 213, 209, 206, 214, 215, 215, 206, 216, 206, 206, 479*ef5ccd6cSJohn Marino 206, 217, 206, 206, 206, 218, 206, 206, 206, 206, 480*ef5ccd6cSJohn Marino 206, 219, 211, 211, 211, 211, 211, 211, 211, 211, 481*ef5ccd6cSJohn Marino 211, 211, 211, 211, 36, 211, 211, 36, 33, 36, 482*ef5ccd6cSJohn Marino 48, 220, 206, 206, 206, 48, 212, 213, 221, 215, 4835796c8dcSSimon Schubert 484*ef5ccd6cSJohn Marino 215, 222, 206, 206, 206, 217, 218, 206, 219, 206, 485*ef5ccd6cSJohn Marino 223, 224, 211, 211, 33, 211, 211, 211, 211, 211, 486*ef5ccd6cSJohn Marino 33, 211, 211, 211, 33, 33, 211, 206, 225, 206, 487*ef5ccd6cSJohn Marino 206, 97, 221, 206, 215, 206, 226, 222, 206, 206, 488*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 489*ef5ccd6cSJohn Marino 206, 206, 227, 224, 211, 33, 211, 36, 211, 211, 490*ef5ccd6cSJohn Marino 36, 211, 206, 206, 212, 206, 228, 206, 206, 206, 491*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 227, 211, 211, 211, 492*ef5ccd6cSJohn Marino 212, 206, 206, 206, 228, 206, 206, 206, 206, 206, 493*ef5ccd6cSJohn Marino 206, 206, 211, 211, 212, 206, 206, 206, 206, 206, 4945796c8dcSSimon Schubert 495*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 0, 206, 206, 206, 206, 496*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 497*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206 4985796c8dcSSimon Schubert } ; 4995796c8dcSSimon Schubert 500*ef5ccd6cSJohn Marino static yyconst flex_int16_t yy_nxt[1320] = 5015796c8dcSSimon Schubert { 0, 5025796c8dcSSimon Schubert 6, 7, 8, 7, 6, 9, 6, 10, 11, 12, 5035796c8dcSSimon Schubert 13, 14, 15, 11, 16, 17, 18, 19, 20, 21, 504*ef5ccd6cSJohn Marino 22, 11, 23, 24, 25, 26, 27, 28, 28, 28, 505*ef5ccd6cSJohn Marino 29, 30, 28, 28, 31, 28, 28, 32, 33, 34, 506*ef5ccd6cSJohn Marino 35, 28, 36, 28, 28, 37, 11, 11, 28, 27, 507*ef5ccd6cSJohn Marino 28, 28, 29, 30, 28, 31, 28, 28, 32, 33, 508*ef5ccd6cSJohn Marino 34, 35, 28, 36, 28, 28, 37, 40, 63, 86, 509*ef5ccd6cSJohn Marino 73, 64, 69, 69, 70, 101, 135, 97, 73, 90, 510*ef5ccd6cSJohn Marino 71, 94, 73, 73, 103, 103, 172, 72, 104, 105, 511*ef5ccd6cSJohn Marino 105, 86, 73, 105, 105, 136, 101, 135, 181, 73, 5125796c8dcSSimon Schubert 513*ef5ccd6cSJohn Marino 90, 201, 93, 73, 73, 137, 169, 172, 41, 43, 514*ef5ccd6cSJohn Marino 44, 44, 45, 46, 46, 46, 46, 46, 47, 46, 515*ef5ccd6cSJohn Marino 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 516*ef5ccd6cSJohn Marino 46, 46, 46, 46, 46, 48, 48, 48, 48, 48, 517*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 518*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 49, 46, 46, 48, 48, 519*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 520*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 52, 52, 52, 169, 521*ef5ccd6cSJohn Marino 58, 141, 141, 168, 40, 168, 58, 69, 69, 70, 522*ef5ccd6cSJohn Marino 59, 53, 60, 60, 169, 71, 59, 54, 60, 60, 5235796c8dcSSimon Schubert 524*ef5ccd6cSJohn Marino 92, 55, 72, 169, 61, 69, 69, 70, 136, 169, 525*ef5ccd6cSJohn Marino 61, 141, 77, 71, 169, 69, 69, 70, 137, 62, 526*ef5ccd6cSJohn Marino 72, 166, 60, 71, 55, 41, 61, 169, 60, 184, 527*ef5ccd6cSJohn Marino 72, 74, 61, 175, 142, 77, 69, 69, 70, 169, 528*ef5ccd6cSJohn Marino 62, 41, 75, 166, 71, 69, 69, 70, 173, 169, 529*ef5ccd6cSJohn Marino 76, 72, 169, 71, 74, 175, 174, 69, 69, 70, 530*ef5ccd6cSJohn Marino 72, 141, 141, 75, 169, 71, 78, 142, 58, 173, 531*ef5ccd6cSJohn Marino 142, 76, 72, 79, 52, 52, 52, 174, 59, 169, 532*ef5ccd6cSJohn Marino 60, 60, 142, 80, 184, 69, 69, 69, 78, 206, 533*ef5ccd6cSJohn Marino 176, 141, 61, 188, 79, 54, 84, 187, 85, 55, 534*ef5ccd6cSJohn Marino 535*ef5ccd6cSJohn Marino 72, 69, 69, 70, 80, 69, 69, 70, 93, 71, 536*ef5ccd6cSJohn Marino 60, 176, 190, 71, 61, 188, 72, 84, 187, 85, 537*ef5ccd6cSJohn Marino 72, 39, 55, 109, 109, 109, 169, 110, 186, 186, 538*ef5ccd6cSJohn Marino 69, 69, 70, 190, 81, 130, 130, 130, 71, 169, 539*ef5ccd6cSJohn Marino 69, 69, 70, 82, 111, 72, 195, 83, 71, 102, 540*ef5ccd6cSJohn Marino 69, 69, 70, 102, 131, 72, 81, 182, 71, 69, 541*ef5ccd6cSJohn Marino 69, 70, 183, 183, 82, 72, 189, 71, 83, 69, 542*ef5ccd6cSJohn Marino 69, 70, 183, 183, 72, 116, 134, 71, 69, 69, 543*ef5ccd6cSJohn Marino 70, 130, 130, 130, 72, 197, 71, 114, 189, 191, 544*ef5ccd6cSJohn Marino 113, 204, 204, 72, 87, 192, 116, 69, 69, 70, 545*ef5ccd6cSJohn Marino 546*ef5ccd6cSJohn Marino 131, 88, 109, 109, 109, 71, 110, 197, 89, 114, 547*ef5ccd6cSJohn Marino 191, 113, 72, 69, 69, 70, 192, 87, 115, 164, 548*ef5ccd6cSJohn Marino 163, 71, 88, 111, 202, 108, 202, 134, 72, 89, 549*ef5ccd6cSJohn Marino 43, 44, 44, 44, 43, 43, 43, 43, 43, 115, 5505796c8dcSSimon Schubert 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 551*ef5ccd6cSJohn Marino 43, 43, 43, 43, 43, 43, 91, 91, 91, 91, 552cf7f2e2dSJohn Marino 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 553*ef5ccd6cSJohn Marino 91, 91, 91, 91, 91, 91, 43, 43, 43, 91, 554*ef5ccd6cSJohn Marino 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 555*ef5ccd6cSJohn Marino 91, 91, 91, 91, 91, 91, 91, 43, 43, 43, 556*ef5ccd6cSJohn Marino 557*ef5ccd6cSJohn Marino 43, 43, 43, 43, 43, 43, 94, 43, 43, 43, 5585796c8dcSSimon Schubert 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 559*ef5ccd6cSJohn Marino 43, 43, 43, 96, 96, 96, 96, 96, 96, 96, 560*ef5ccd6cSJohn Marino 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 561*ef5ccd6cSJohn Marino 96, 96, 96, 43, 43, 43, 96, 96, 96, 96, 562*ef5ccd6cSJohn Marino 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 563*ef5ccd6cSJohn Marino 96, 96, 96, 96, 69, 69, 70, 69, 69, 70, 564*ef5ccd6cSJohn Marino 106, 93, 71, 128, 106, 71, 69, 69, 70, 72, 565*ef5ccd6cSJohn Marino 93, 108, 72, 95, 71, 69, 69, 70, 69, 69, 566*ef5ccd6cSJohn Marino 70, 72, 117, 71, 94, 73, 71, 69, 69, 70, 5675796c8dcSSimon Schubert 568*ef5ccd6cSJohn Marino 72, 94, 121, 72, 93, 71, 73, 196, 196, 73, 569*ef5ccd6cSJohn Marino 118, 93, 72, 68, 117, 73, 67, 119, 73, 126, 570*ef5ccd6cSJohn Marino 120, 198, 198, 121, 69, 69, 70, 65, 73, 57, 571*ef5ccd6cSJohn Marino 73, 118, 71, 122, 51, 50, 73, 196, 119, 72, 572*ef5ccd6cSJohn Marino 126, 120, 73, 73, 128, 206, 124, 38, 128, 73, 573*ef5ccd6cSJohn Marino 73, 198, 196, 196, 122, 167, 125, 127, 38, 167, 574*ef5ccd6cSJohn Marino 139, 139, 198, 198, 123, 73, 73, 155, 124, 206, 575*ef5ccd6cSJohn Marino 73, 73, 140, 69, 69, 70, 73, 125, 127, 206, 576*ef5ccd6cSJohn Marino 73, 71, 196, 206, 206, 123, 93, 206, 72, 155, 577*ef5ccd6cSJohn Marino 139, 206, 198, 206, 140, 132, 132, 73, 206, 206, 5785796c8dcSSimon Schubert 579*ef5ccd6cSJohn Marino 206, 73, 206, 132, 132, 132, 132, 132, 132, 69, 580*ef5ccd6cSJohn Marino 69, 70, 206, 130, 130, 130, 206, 71, 130, 130, 581*ef5ccd6cSJohn Marino 130, 206, 206, 206, 72, 206, 132, 132, 132, 132, 582*ef5ccd6cSJohn Marino 132, 142, 131, 206, 206, 143, 142, 131, 142, 206, 583*ef5ccd6cSJohn Marino 144, 73, 69, 69, 70, 145, 142, 146, 73, 147, 584*ef5ccd6cSJohn Marino 71, 69, 69, 70, 206, 179, 206, 72, 206, 71, 585*ef5ccd6cSJohn Marino 148, 149, 150, 151, 73, 206, 72, 206, 152, 73, 586*ef5ccd6cSJohn Marino 206, 206, 147, 206, 206, 206, 179, 69, 69, 70, 587*ef5ccd6cSJohn Marino 206, 148, 149, 150, 151, 71, 69, 69, 70, 152, 588*ef5ccd6cSJohn Marino 139, 139, 72, 170, 71, 69, 69, 70, 69, 69, 5895796c8dcSSimon Schubert 590*ef5ccd6cSJohn Marino 70, 72, 140, 71, 171, 158, 71, 69, 69, 70, 591*ef5ccd6cSJohn Marino 72, 205, 205, 72, 73, 71, 170, 156, 73, 206, 592*ef5ccd6cSJohn Marino 139, 206, 72, 206, 140, 171, 206, 158, 69, 69, 593*ef5ccd6cSJohn Marino 70, 206, 69, 69, 70, 73, 71, 206, 156, 73, 594*ef5ccd6cSJohn Marino 71, 205, 157, 72, 69, 69, 70, 72, 161, 162, 595*ef5ccd6cSJohn Marino 205, 205, 71, 206, 206, 206, 206, 73, 73, 72, 596*ef5ccd6cSJohn Marino 206, 73, 73, 157, 206, 206, 159, 206, 206, 206, 597*ef5ccd6cSJohn Marino 161, 162, 206, 199, 199, 199, 206, 206, 73, 73, 598*ef5ccd6cSJohn Marino 205, 160, 73, 73, 69, 69, 70, 159, 72, 206, 599*ef5ccd6cSJohn Marino 203, 203, 71, 69, 69, 70, 206, 206, 206, 72, 6005796c8dcSSimon Schubert 601*ef5ccd6cSJohn Marino 206, 71, 160, 165, 165, 206, 206, 206, 72, 206, 602*ef5ccd6cSJohn Marino 206, 165, 165, 165, 165, 165, 165, 69, 69, 70, 603*ef5ccd6cSJohn Marino 178, 206, 206, 206, 206, 71, 206, 206, 206, 73, 604*ef5ccd6cSJohn Marino 206, 206, 72, 73, 165, 165, 165, 165, 165, 206, 605*ef5ccd6cSJohn Marino 206, 206, 178, 69, 69, 70, 206, 69, 69, 70, 606*ef5ccd6cSJohn Marino 73, 71, 206, 206, 73, 71, 180, 206, 72, 69, 607*ef5ccd6cSJohn Marino 69, 70, 72, 73, 206, 206, 206, 71, 206, 206, 608*ef5ccd6cSJohn Marino 73, 206, 206, 206, 72, 69, 69, 70, 206, 180, 609*ef5ccd6cSJohn Marino 69, 69, 70, 71, 73, 69, 69, 70, 71, 206, 610*ef5ccd6cSJohn Marino 72, 73, 206, 71, 206, 72, 69, 69, 70, 206, 611*ef5ccd6cSJohn Marino 612*ef5ccd6cSJohn Marino 72, 69, 69, 70, 71, 69, 69, 70, 206, 71, 613*ef5ccd6cSJohn Marino 206, 72, 206, 71, 206, 206, 72, 199, 199, 200, 614*ef5ccd6cSJohn Marino 72, 206, 199, 199, 200, 71, 206, 206, 206, 194, 615*ef5ccd6cSJohn Marino 71, 206, 72, 206, 206, 206, 193, 72, 206, 203, 616*ef5ccd6cSJohn Marino 203, 206, 206, 206, 206, 206, 206, 206, 206, 206, 617*ef5ccd6cSJohn Marino 206, 194, 206, 206, 206, 206, 206, 193, 39, 39, 618*ef5ccd6cSJohn Marino 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 619*ef5ccd6cSJohn Marino 39, 39, 42, 206, 206, 42, 206, 206, 206, 42, 620*ef5ccd6cSJohn Marino 42, 42, 56, 56, 56, 206, 206, 206, 206, 206, 621*ef5ccd6cSJohn Marino 56, 206, 56, 206, 206, 56, 56, 56, 66, 206, 622*ef5ccd6cSJohn Marino 623*ef5ccd6cSJohn Marino 66, 66, 66, 73, 73, 73, 206, 206, 206, 206, 624*ef5ccd6cSJohn Marino 73, 73, 73, 206, 206, 206, 73, 73, 73, 43, 625*ef5ccd6cSJohn Marino 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 626*ef5ccd6cSJohn Marino 43, 43, 43, 43, 43, 43, 98, 98, 206, 98, 627cf7f2e2dSJohn Marino 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 628*ef5ccd6cSJohn Marino 98, 98, 98, 99, 99, 99, 100, 206, 206, 206, 629*ef5ccd6cSJohn Marino 100, 100, 100, 107, 206, 206, 107, 107, 107, 107, 630*ef5ccd6cSJohn Marino 112, 112, 112, 206, 112, 206, 206, 206, 206, 206, 631*ef5ccd6cSJohn Marino 112, 206, 206, 112, 112, 112, 129, 206, 206, 206, 632*ef5ccd6cSJohn Marino 206, 129, 206, 206, 206, 129, 133, 206, 206, 133, 6335796c8dcSSimon Schubert 634*ef5ccd6cSJohn Marino 133, 133, 133, 138, 206, 206, 138, 138, 206, 206, 635*ef5ccd6cSJohn Marino 206, 138, 206, 138, 153, 153, 153, 154, 154, 154, 636*ef5ccd6cSJohn Marino 206, 206, 206, 206, 154, 154, 154, 206, 206, 206, 637*ef5ccd6cSJohn Marino 154, 154, 154, 177, 206, 206, 177, 177, 177, 177, 638*ef5ccd6cSJohn Marino 185, 206, 206, 206, 185, 206, 206, 206, 185, 206, 639*ef5ccd6cSJohn Marino 185, 5, 206, 206, 206, 206, 206, 206, 206, 206, 640*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 641*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 642*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 643*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 644cf7f2e2dSJohn Marino 645*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 646*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206 6475796c8dcSSimon Schubert } ; 6485796c8dcSSimon Schubert 649*ef5ccd6cSJohn Marino static yyconst flex_int16_t yy_chk[1320] = 6505796c8dcSSimon Schubert { 0, 6515796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6525796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6535796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6545796c8dcSSimon Schubert 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 655*ef5ccd6cSJohn Marino 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 656*ef5ccd6cSJohn Marino 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 657*ef5ccd6cSJohn Marino 1, 1, 1, 1, 1, 1, 1, 9, 22, 35, 658*ef5ccd6cSJohn Marino 37, 22, 28, 28, 28, 55, 101, 49, 35, 37, 659*ef5ccd6cSJohn Marino 28, 49, 35, 37, 59, 59, 148, 28, 61, 104, 660*ef5ccd6cSJohn Marino 104, 35, 37, 61, 61, 102, 55, 101, 165, 35, 6615796c8dcSSimon Schubert 662*ef5ccd6cSJohn Marino 37, 195, 165, 35, 37, 102, 192, 148, 9, 12, 6635796c8dcSSimon Schubert 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 664cf7f2e2dSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 665*ef5ccd6cSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 666*ef5ccd6cSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 667*ef5ccd6cSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 668*ef5ccd6cSJohn Marino 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 669*ef5ccd6cSJohn Marino 12, 12, 12, 12, 12, 12, 18, 18, 18, 191, 670*ef5ccd6cSJohn Marino 20, 105, 105, 140, 39, 140, 21, 30, 30, 30, 671*ef5ccd6cSJohn Marino 20, 18, 20, 20, 190, 30, 21, 18, 21, 21, 6725796c8dcSSimon Schubert 673*ef5ccd6cSJohn Marino 41, 18, 30, 189, 20, 27, 27, 27, 138, 188, 674*ef5ccd6cSJohn Marino 21, 105, 30, 27, 187, 29, 29, 29, 138, 20, 675*ef5ccd6cSJohn Marino 27, 136, 20, 29, 18, 39, 20, 143, 21, 185, 676*ef5ccd6cSJohn Marino 29, 27, 21, 151, 143, 30, 31, 31, 31, 177, 677*ef5ccd6cSJohn Marino 20, 41, 27, 136, 31, 32, 32, 32, 149, 144, 678*ef5ccd6cSJohn Marino 29, 31, 145, 32, 27, 151, 150, 34, 34, 34, 679*ef5ccd6cSJohn Marino 32, 141, 141, 27, 146, 34, 31, 144, 60, 149, 680*ef5ccd6cSJohn Marino 145, 29, 34, 31, 52, 52, 52, 150, 60, 174, 681*ef5ccd6cSJohn Marino 60, 60, 146, 32, 167, 69, 69, 69, 31, 52, 682*ef5ccd6cSJohn Marino 152, 141, 60, 171, 31, 52, 34, 170, 34, 52, 683*ef5ccd6cSJohn Marino 684*ef5ccd6cSJohn Marino 69, 70, 70, 70, 32, 33, 33, 33, 181, 70, 685*ef5ccd6cSJohn Marino 60, 152, 173, 33, 60, 171, 70, 34, 170, 34, 686*ef5ccd6cSJohn Marino 33, 163, 52, 72, 72, 72, 153, 72, 168, 168, 687*ef5ccd6cSJohn Marino 73, 73, 73, 173, 33, 93, 93, 93, 73, 142, 688*ef5ccd6cSJohn Marino 77, 77, 77, 33, 72, 73, 181, 33, 77, 216, 689*ef5ccd6cSJohn Marino 74, 74, 74, 216, 93, 77, 33, 166, 74, 75, 690*ef5ccd6cSJohn Marino 75, 75, 166, 166, 33, 74, 172, 75, 33, 36, 691*ef5ccd6cSJohn Marino 36, 36, 182, 182, 75, 77, 133, 36, 76, 76, 692*ef5ccd6cSJohn Marino 76, 94, 94, 94, 36, 184, 76, 75, 172, 175, 693*ef5ccd6cSJohn Marino 74, 202, 202, 76, 36, 176, 77, 78, 78, 78, 694*ef5ccd6cSJohn Marino 695*ef5ccd6cSJohn Marino 94, 36, 109, 109, 109, 78, 109, 184, 36, 75, 696*ef5ccd6cSJohn Marino 175, 74, 78, 79, 79, 79, 176, 36, 76, 131, 697*ef5ccd6cSJohn Marino 128, 79, 36, 109, 197, 107, 197, 99, 79, 36, 698*ef5ccd6cSJohn Marino 38, 38, 38, 38, 38, 38, 38, 38, 38, 76, 6995796c8dcSSimon Schubert 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 7005796c8dcSSimon Schubert 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 701cf7f2e2dSJohn Marino 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 702*ef5ccd6cSJohn Marino 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 703*ef5ccd6cSJohn Marino 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 704*ef5ccd6cSJohn Marino 38, 38, 38, 38, 38, 38, 38, 48, 48, 48, 7055796c8dcSSimon Schubert 706*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 707*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 708*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 709*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 710*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 711*ef5ccd6cSJohn Marino 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 712*ef5ccd6cSJohn Marino 48, 48, 48, 48, 80, 80, 80, 81, 81, 81, 713*ef5ccd6cSJohn Marino 217, 96, 80, 92, 217, 81, 82, 82, 82, 80, 714*ef5ccd6cSJohn Marino 91, 66, 81, 47, 82, 83, 83, 83, 84, 84, 715*ef5ccd6cSJohn Marino 84, 82, 80, 83, 46, 85, 84, 86, 86, 86, 7165796c8dcSSimon Schubert 717*ef5ccd6cSJohn Marino 83, 45, 85, 84, 44, 86, 89, 183, 183, 85, 718*ef5ccd6cSJohn Marino 81, 43, 86, 25, 80, 89, 24, 82, 85, 89, 719*ef5ccd6cSJohn Marino 83, 186, 186, 85, 87, 87, 87, 23, 89, 19, 720*ef5ccd6cSJohn Marino 85, 81, 87, 86, 17, 15, 89, 183, 82, 87, 721*ef5ccd6cSJohn Marino 89, 83, 88, 90, 225, 5, 88, 4, 225, 88, 722*ef5ccd6cSJohn Marino 90, 186, 196, 196, 86, 226, 88, 90, 3, 226, 723*ef5ccd6cSJohn Marino 103, 103, 198, 198, 87, 88, 90, 115, 88, 0, 724*ef5ccd6cSJohn Marino 88, 90, 103, 108, 108, 108, 115, 88, 90, 0, 725*ef5ccd6cSJohn Marino 115, 108, 196, 0, 0, 87, 97, 0, 108, 115, 726*ef5ccd6cSJohn Marino 103, 0, 198, 0, 103, 97, 97, 115, 0, 0, 7275796c8dcSSimon Schubert 728*ef5ccd6cSJohn Marino 0, 115, 0, 97, 97, 97, 97, 97, 97, 112, 729*ef5ccd6cSJohn Marino 112, 112, 0, 130, 130, 130, 0, 112, 201, 201, 730*ef5ccd6cSJohn Marino 201, 0, 0, 0, 112, 0, 97, 97, 97, 97, 731*ef5ccd6cSJohn Marino 97, 110, 130, 0, 0, 110, 110, 201, 110, 0, 732*ef5ccd6cSJohn Marino 110, 158, 113, 113, 113, 110, 110, 110, 158, 110, 733*ef5ccd6cSJohn Marino 113, 114, 114, 114, 0, 158, 0, 113, 0, 114, 734*ef5ccd6cSJohn Marino 110, 110, 110, 110, 158, 0, 114, 0, 110, 158, 735*ef5ccd6cSJohn Marino 0, 0, 110, 0, 0, 0, 158, 116, 116, 116, 736*ef5ccd6cSJohn Marino 0, 110, 110, 110, 110, 116, 117, 117, 117, 110, 737*ef5ccd6cSJohn Marino 139, 139, 116, 147, 117, 118, 118, 118, 119, 119, 7385796c8dcSSimon Schubert 739*ef5ccd6cSJohn Marino 119, 117, 139, 118, 147, 121, 119, 120, 120, 120, 740*ef5ccd6cSJohn Marino 118, 204, 204, 119, 121, 120, 147, 116, 121, 0, 741*ef5ccd6cSJohn Marino 139, 0, 120, 0, 139, 147, 0, 121, 122, 122, 742*ef5ccd6cSJohn Marino 122, 0, 123, 123, 123, 121, 122, 0, 116, 121, 743*ef5ccd6cSJohn Marino 123, 204, 120, 122, 124, 124, 124, 123, 125, 126, 744*ef5ccd6cSJohn Marino 205, 205, 124, 0, 0, 0, 0, 125, 126, 124, 745*ef5ccd6cSJohn Marino 0, 125, 126, 120, 0, 0, 123, 0, 0, 0, 746*ef5ccd6cSJohn Marino 125, 126, 0, 199, 199, 199, 0, 0, 125, 126, 747*ef5ccd6cSJohn Marino 205, 124, 125, 126, 127, 127, 127, 123, 199, 0, 748*ef5ccd6cSJohn Marino 199, 199, 127, 154, 154, 154, 0, 0, 0, 127, 7495796c8dcSSimon Schubert 750*ef5ccd6cSJohn Marino 0, 154, 124, 132, 132, 0, 0, 0, 154, 0, 751*ef5ccd6cSJohn Marino 0, 132, 132, 132, 132, 132, 132, 155, 155, 155, 752*ef5ccd6cSJohn Marino 156, 0, 0, 0, 0, 155, 0, 0, 0, 156, 753*ef5ccd6cSJohn Marino 0, 0, 155, 156, 132, 132, 132, 132, 132, 0, 754*ef5ccd6cSJohn Marino 0, 0, 156, 157, 157, 157, 0, 159, 159, 159, 755*ef5ccd6cSJohn Marino 156, 157, 0, 0, 156, 159, 161, 0, 157, 160, 756*ef5ccd6cSJohn Marino 160, 160, 159, 161, 0, 0, 0, 160, 0, 0, 757*ef5ccd6cSJohn Marino 161, 0, 0, 0, 160, 162, 162, 162, 0, 161, 758*ef5ccd6cSJohn Marino 169, 169, 169, 162, 161, 178, 178, 178, 169, 0, 759*ef5ccd6cSJohn Marino 162, 161, 0, 178, 0, 169, 179, 179, 179, 0, 760cf7f2e2dSJohn Marino 761*ef5ccd6cSJohn Marino 178, 180, 180, 180, 179, 193, 193, 193, 0, 180, 762*ef5ccd6cSJohn Marino 0, 179, 0, 193, 0, 0, 180, 194, 194, 194, 763*ef5ccd6cSJohn Marino 193, 0, 200, 200, 200, 194, 0, 0, 0, 180, 764*ef5ccd6cSJohn Marino 200, 0, 194, 0, 0, 0, 179, 200, 0, 200, 765*ef5ccd6cSJohn Marino 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 766*ef5ccd6cSJohn Marino 0, 180, 0, 0, 0, 0, 0, 179, 207, 207, 767*ef5ccd6cSJohn Marino 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 768*ef5ccd6cSJohn Marino 207, 207, 208, 0, 0, 208, 0, 0, 0, 208, 769*ef5ccd6cSJohn Marino 208, 208, 209, 209, 209, 0, 0, 0, 0, 0, 770*ef5ccd6cSJohn Marino 209, 0, 209, 0, 0, 209, 209, 209, 210, 0, 771*ef5ccd6cSJohn Marino 772*ef5ccd6cSJohn Marino 210, 210, 210, 211, 211, 211, 0, 0, 0, 0, 773*ef5ccd6cSJohn Marino 211, 211, 211, 0, 0, 0, 211, 211, 211, 212, 774*ef5ccd6cSJohn Marino 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 775*ef5ccd6cSJohn Marino 212, 212, 212, 212, 212, 212, 213, 213, 0, 213, 776*ef5ccd6cSJohn Marino 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, 777*ef5ccd6cSJohn Marino 213, 213, 213, 214, 214, 214, 215, 0, 0, 0, 778*ef5ccd6cSJohn Marino 215, 215, 215, 218, 0, 0, 218, 218, 218, 218, 779*ef5ccd6cSJohn Marino 219, 219, 219, 0, 219, 0, 0, 0, 0, 0, 780*ef5ccd6cSJohn Marino 219, 0, 0, 219, 219, 219, 220, 0, 0, 0, 781*ef5ccd6cSJohn Marino 0, 220, 0, 0, 0, 220, 221, 0, 0, 221, 782*ef5ccd6cSJohn Marino 783*ef5ccd6cSJohn Marino 221, 221, 221, 222, 0, 0, 222, 222, 0, 0, 784*ef5ccd6cSJohn Marino 0, 222, 0, 222, 223, 223, 223, 224, 224, 224, 785*ef5ccd6cSJohn Marino 0, 0, 0, 0, 224, 224, 224, 0, 0, 0, 786*ef5ccd6cSJohn Marino 224, 224, 224, 227, 0, 0, 227, 227, 227, 227, 787*ef5ccd6cSJohn Marino 228, 0, 0, 0, 228, 0, 0, 0, 228, 0, 788*ef5ccd6cSJohn Marino 228, 206, 206, 206, 206, 206, 206, 206, 206, 206, 789*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 790*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 791*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 792*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 793*ef5ccd6cSJohn Marino 794*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 795*ef5ccd6cSJohn Marino 206, 206, 206, 206, 206, 206, 206, 206, 206 7965796c8dcSSimon Schubert } ; 7975796c8dcSSimon Schubert 7985796c8dcSSimon Schubert static yy_state_type yy_last_accepting_state; 7995796c8dcSSimon Schubert static char *yy_last_accepting_cpos; 8005796c8dcSSimon Schubert 801*ef5ccd6cSJohn Marino extern int yy_flex_debug; 802*ef5ccd6cSJohn Marino int yy_flex_debug = 0; 803*ef5ccd6cSJohn Marino 8045796c8dcSSimon Schubert /* The intent behind this definition is that it'll catch 8055796c8dcSSimon Schubert * any uses of REJECT which flex missed. 8065796c8dcSSimon Schubert */ 8075796c8dcSSimon Schubert #define REJECT reject_used_but_not_detected 8085796c8dcSSimon Schubert #define yymore() yymore_used_but_not_detected 8095796c8dcSSimon Schubert #define YY_MORE_ADJ 0 8105796c8dcSSimon Schubert #define YY_RESTORE_YY_MORE_OFFSET 8115796c8dcSSimon Schubert char *yytext; 8125796c8dcSSimon Schubert #line 1 "ada-lex.l" 8135796c8dcSSimon Schubert /* FLEX lexer for Ada expressions, for GDB. 814*ef5ccd6cSJohn Marino Copyright (C) 1994-2013 Free Software Foundation, Inc. 8155796c8dcSSimon Schubert 8165796c8dcSSimon Schubert This file is part of GDB. 8175796c8dcSSimon Schubert 8185796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 8195796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 8205796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 8215796c8dcSSimon Schubert (at your option) any later version. 8225796c8dcSSimon Schubert 8235796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 8245796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 8255796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 8265796c8dcSSimon Schubert GNU General Public License for more details. 8275796c8dcSSimon Schubert 8285796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 8295796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 8305796c8dcSSimon Schubert /*----------------------------------------------------------------------*/ 8315796c8dcSSimon Schubert /* The converted version of this file is to be included in ada-exp.y, */ 8325796c8dcSSimon Schubert /* the Ada parser for gdb. The function yylex obtains characters from */ 8335796c8dcSSimon Schubert /* the global pointer lexptr. It returns a syntactic category for */ 8345796c8dcSSimon Schubert /* each successive token and places a semantic value into yylval */ 8355796c8dcSSimon Schubert /* (ada-lval), defined by the parser. */ 836*ef5ccd6cSJohn Marino #line 43 "ada-lex.l" 8375796c8dcSSimon Schubert 8385796c8dcSSimon Schubert #define NUMERAL_WIDTH 256 8395796c8dcSSimon Schubert #define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1)) 8405796c8dcSSimon Schubert 8415796c8dcSSimon Schubert /* Temporary staging for numeric literals. */ 8425796c8dcSSimon Schubert static char numbuf[NUMERAL_WIDTH]; 8435796c8dcSSimon Schubert static void canonicalizeNumeral (char *s1, const char *); 8445796c8dcSSimon Schubert static struct stoken processString (const char*, int); 8455796c8dcSSimon Schubert static int processInt (const char *, const char *, const char *); 8465796c8dcSSimon Schubert static int processReal (const char *); 8475796c8dcSSimon Schubert static struct stoken processId (const char *, int); 8485796c8dcSSimon Schubert static int processAttribute (const char *); 8495796c8dcSSimon Schubert static int find_dot_all (const char *); 850*ef5ccd6cSJohn Marino static void rewind_to_char (int); 8515796c8dcSSimon Schubert 8525796c8dcSSimon Schubert #undef YY_DECL 8535796c8dcSSimon Schubert #define YY_DECL static int yylex ( void ) 8545796c8dcSSimon Schubert 855cf7f2e2dSJohn Marino /* Flex generates a static function "input" which is not used. 856cf7f2e2dSJohn Marino Defining YY_NO_INPUT comments it out. */ 857cf7f2e2dSJohn Marino #define YY_NO_INPUT 858cf7f2e2dSJohn Marino 8595796c8dcSSimon Schubert #undef YY_INPUT 8605796c8dcSSimon Schubert #define YY_INPUT(BUF, RESULT, MAX_SIZE) \ 8615796c8dcSSimon Schubert if ( *lexptr == '\000' ) \ 8625796c8dcSSimon Schubert (RESULT) = YY_NULL; \ 8635796c8dcSSimon Schubert else \ 8645796c8dcSSimon Schubert { \ 8655796c8dcSSimon Schubert *(BUF) = *lexptr; \ 8665796c8dcSSimon Schubert (RESULT) = 1; \ 8675796c8dcSSimon Schubert lexptr += 1; \ 8685796c8dcSSimon Schubert } 8695796c8dcSSimon Schubert 8705796c8dcSSimon Schubert static int find_dot_all (const char *); 8715796c8dcSSimon Schubert 872*ef5ccd6cSJohn Marino 873*ef5ccd6cSJohn Marino #line 874 "ada-lex.c" 874*ef5ccd6cSJohn Marino 875*ef5ccd6cSJohn Marino #define INITIAL 0 8765796c8dcSSimon Schubert #define BEFORE_QUAL_QUOTE 1 8775796c8dcSSimon Schubert 878*ef5ccd6cSJohn Marino #ifndef YY_NO_UNISTD_H 879*ef5ccd6cSJohn Marino /* Special case for "unistd.h", since it is non-ANSI. We include it way 880*ef5ccd6cSJohn Marino * down here because we want the user's section 1 to have been scanned first. 881*ef5ccd6cSJohn Marino * The user has a chance to override it with an option. 882*ef5ccd6cSJohn Marino */ 883*ef5ccd6cSJohn Marino #include <unistd.h> 884*ef5ccd6cSJohn Marino #endif 885*ef5ccd6cSJohn Marino 886*ef5ccd6cSJohn Marino #ifndef YY_EXTRA_TYPE 887*ef5ccd6cSJohn Marino #define YY_EXTRA_TYPE void * 888*ef5ccd6cSJohn Marino #endif 889*ef5ccd6cSJohn Marino 890*ef5ccd6cSJohn Marino static int yy_init_globals (void ); 891*ef5ccd6cSJohn Marino 892*ef5ccd6cSJohn Marino /* Accessor methods to globals. 893*ef5ccd6cSJohn Marino These are made visible to non-reentrant scanners for convenience. */ 894*ef5ccd6cSJohn Marino 895*ef5ccd6cSJohn Marino int yylex_destroy (void ); 896*ef5ccd6cSJohn Marino 897*ef5ccd6cSJohn Marino int yyget_debug (void ); 898*ef5ccd6cSJohn Marino 899*ef5ccd6cSJohn Marino void yyset_debug (int debug_flag ); 900*ef5ccd6cSJohn Marino 901*ef5ccd6cSJohn Marino YY_EXTRA_TYPE yyget_extra (void ); 902*ef5ccd6cSJohn Marino 903*ef5ccd6cSJohn Marino void yyset_extra (YY_EXTRA_TYPE user_defined ); 904*ef5ccd6cSJohn Marino 905*ef5ccd6cSJohn Marino FILE *yyget_in (void ); 906*ef5ccd6cSJohn Marino 907*ef5ccd6cSJohn Marino void yyset_in (FILE * in_str ); 908*ef5ccd6cSJohn Marino 909*ef5ccd6cSJohn Marino FILE *yyget_out (void ); 910*ef5ccd6cSJohn Marino 911*ef5ccd6cSJohn Marino void yyset_out (FILE * out_str ); 912*ef5ccd6cSJohn Marino 913*ef5ccd6cSJohn Marino int yyget_leng (void ); 914*ef5ccd6cSJohn Marino 915*ef5ccd6cSJohn Marino char *yyget_text (void ); 916*ef5ccd6cSJohn Marino 917*ef5ccd6cSJohn Marino int yyget_lineno (void ); 918*ef5ccd6cSJohn Marino 919*ef5ccd6cSJohn Marino void yyset_lineno (int line_number ); 9205796c8dcSSimon Schubert 9215796c8dcSSimon Schubert /* Macros after this point can all be overridden by user definitions in 9225796c8dcSSimon Schubert * section 1. 9235796c8dcSSimon Schubert */ 9245796c8dcSSimon Schubert 9255796c8dcSSimon Schubert #ifndef YY_SKIP_YYWRAP 9265796c8dcSSimon Schubert #ifdef __cplusplus 927*ef5ccd6cSJohn Marino extern "C" int yywrap (void ); 9285796c8dcSSimon Schubert #else 929*ef5ccd6cSJohn Marino extern int yywrap (void ); 9305796c8dcSSimon Schubert #endif 9315796c8dcSSimon Schubert #endif 9325796c8dcSSimon Schubert 933*ef5ccd6cSJohn Marino static void yyunput (int c,char *buf_ptr ); 9345796c8dcSSimon Schubert 9355796c8dcSSimon Schubert #ifndef yytext_ptr 936*ef5ccd6cSJohn Marino static void yy_flex_strncpy (char *,yyconst char *,int ); 9375796c8dcSSimon Schubert #endif 9385796c8dcSSimon Schubert 9395796c8dcSSimon Schubert #ifdef YY_NEED_STRLEN 940*ef5ccd6cSJohn Marino static int yy_flex_strlen (yyconst char * ); 9415796c8dcSSimon Schubert #endif 9425796c8dcSSimon Schubert 9435796c8dcSSimon Schubert #ifndef YY_NO_INPUT 944*ef5ccd6cSJohn Marino 9455796c8dcSSimon Schubert #ifdef __cplusplus 946*ef5ccd6cSJohn Marino static int yyinput (void ); 9475796c8dcSSimon Schubert #else 948*ef5ccd6cSJohn Marino static int input (void ); 9495796c8dcSSimon Schubert #endif 9505796c8dcSSimon Schubert 9515796c8dcSSimon Schubert #endif 9525796c8dcSSimon Schubert 9535796c8dcSSimon Schubert /* Amount of stuff to slurp up with each read. */ 9545796c8dcSSimon Schubert #ifndef YY_READ_BUF_SIZE 9555796c8dcSSimon Schubert #define YY_READ_BUF_SIZE 8192 9565796c8dcSSimon Schubert #endif 9575796c8dcSSimon Schubert 9585796c8dcSSimon Schubert /* Copy whatever the last rule matched to the standard output. */ 9595796c8dcSSimon Schubert #ifndef ECHO 9605796c8dcSSimon Schubert /* This used to be an fputs(), but since the string might contain NUL's, 9615796c8dcSSimon Schubert * we now use fwrite(). 9625796c8dcSSimon Schubert */ 963*ef5ccd6cSJohn Marino #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 9645796c8dcSSimon Schubert #endif 9655796c8dcSSimon Schubert 9665796c8dcSSimon Schubert /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 9675796c8dcSSimon Schubert * is returned in "result". 9685796c8dcSSimon Schubert */ 9695796c8dcSSimon Schubert #ifndef YY_INPUT 9705796c8dcSSimon Schubert #define YY_INPUT(buf,result,max_size) \ 971*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 9725796c8dcSSimon Schubert { \ 973*ef5ccd6cSJohn Marino int c = '*'; \ 974*ef5ccd6cSJohn Marino unsigned n; \ 9755796c8dcSSimon Schubert for ( n = 0; n < max_size && \ 9765796c8dcSSimon Schubert (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 9775796c8dcSSimon Schubert buf[n] = (char) c; \ 9785796c8dcSSimon Schubert if ( c == '\n' ) \ 9795796c8dcSSimon Schubert buf[n++] = (char) c; \ 9805796c8dcSSimon Schubert if ( c == EOF && ferror( yyin ) ) \ 9815796c8dcSSimon Schubert YY_FATAL_ERROR( "input in flex scanner failed" ); \ 9825796c8dcSSimon Schubert result = n; \ 9835796c8dcSSimon Schubert } \ 984*ef5ccd6cSJohn Marino else \ 985*ef5ccd6cSJohn Marino { \ 986*ef5ccd6cSJohn Marino errno=0; \ 987*ef5ccd6cSJohn Marino while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 988*ef5ccd6cSJohn Marino { \ 989*ef5ccd6cSJohn Marino if( errno != EINTR) \ 990*ef5ccd6cSJohn Marino { \ 991*ef5ccd6cSJohn Marino YY_FATAL_ERROR( "input in flex scanner failed" ); \ 992*ef5ccd6cSJohn Marino break; \ 993*ef5ccd6cSJohn Marino } \ 994*ef5ccd6cSJohn Marino errno=0; \ 995*ef5ccd6cSJohn Marino clearerr(yyin); \ 996*ef5ccd6cSJohn Marino } \ 997*ef5ccd6cSJohn Marino }\ 998*ef5ccd6cSJohn Marino \ 999*ef5ccd6cSJohn Marino 10005796c8dcSSimon Schubert #endif 10015796c8dcSSimon Schubert 10025796c8dcSSimon Schubert /* No semi-colon after return; correct usage is to write "yyterminate();" - 10035796c8dcSSimon Schubert * we don't want an extra ';' after the "return" because that will cause 10045796c8dcSSimon Schubert * some compilers to complain about unreachable statements. 10055796c8dcSSimon Schubert */ 10065796c8dcSSimon Schubert #ifndef yyterminate 10075796c8dcSSimon Schubert #define yyterminate() return YY_NULL 10085796c8dcSSimon Schubert #endif 10095796c8dcSSimon Schubert 10105796c8dcSSimon Schubert /* Number of entries by which start-condition stack grows. */ 10115796c8dcSSimon Schubert #ifndef YY_START_STACK_INCR 10125796c8dcSSimon Schubert #define YY_START_STACK_INCR 25 10135796c8dcSSimon Schubert #endif 10145796c8dcSSimon Schubert 10155796c8dcSSimon Schubert /* Report a fatal error. */ 10165796c8dcSSimon Schubert #ifndef YY_FATAL_ERROR 10175796c8dcSSimon Schubert #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 10185796c8dcSSimon Schubert #endif 10195796c8dcSSimon Schubert 1020*ef5ccd6cSJohn Marino /* end tables serialization structures and prototypes */ 1021*ef5ccd6cSJohn Marino 10225796c8dcSSimon Schubert /* Default declaration of generated scanner - a define so the user can 10235796c8dcSSimon Schubert * easily add parameters. 10245796c8dcSSimon Schubert */ 10255796c8dcSSimon Schubert #ifndef YY_DECL 1026*ef5ccd6cSJohn Marino #define YY_DECL_IS_OURS 1 1027*ef5ccd6cSJohn Marino 1028*ef5ccd6cSJohn Marino extern int yylex (void); 1029*ef5ccd6cSJohn Marino 1030*ef5ccd6cSJohn Marino #define YY_DECL int yylex (void) 1031*ef5ccd6cSJohn Marino #endif /* !YY_DECL */ 10325796c8dcSSimon Schubert 10335796c8dcSSimon Schubert /* Code executed at the beginning of each rule, after yytext and yyleng 10345796c8dcSSimon Schubert * have been set up. 10355796c8dcSSimon Schubert */ 10365796c8dcSSimon Schubert #ifndef YY_USER_ACTION 10375796c8dcSSimon Schubert #define YY_USER_ACTION 10385796c8dcSSimon Schubert #endif 10395796c8dcSSimon Schubert 10405796c8dcSSimon Schubert /* Code executed at the end of each rule. */ 10415796c8dcSSimon Schubert #ifndef YY_BREAK 10425796c8dcSSimon Schubert #define YY_BREAK break; 10435796c8dcSSimon Schubert #endif 10445796c8dcSSimon Schubert 10455796c8dcSSimon Schubert #define YY_RULE_SETUP \ 10465796c8dcSSimon Schubert YY_USER_ACTION 10475796c8dcSSimon Schubert 1048*ef5ccd6cSJohn Marino /** The main scanner function which does all the work. 1049*ef5ccd6cSJohn Marino */ 10505796c8dcSSimon Schubert YY_DECL 10515796c8dcSSimon Schubert { 10525796c8dcSSimon Schubert register yy_state_type yy_current_state; 1053*ef5ccd6cSJohn Marino register char *yy_cp, *yy_bp; 10545796c8dcSSimon Schubert register int yy_act; 10555796c8dcSSimon Schubert 1056cf7f2e2dSJohn Marino #line 84 "ada-lex.l" 10575796c8dcSSimon Schubert 10585796c8dcSSimon Schubert 1059*ef5ccd6cSJohn Marino #line 1060 "ada-lex.c" 10605796c8dcSSimon Schubert 1061*ef5ccd6cSJohn Marino if ( !(yy_init) ) 10625796c8dcSSimon Schubert { 1063*ef5ccd6cSJohn Marino (yy_init) = 1; 10645796c8dcSSimon Schubert 10655796c8dcSSimon Schubert #ifdef YY_USER_INIT 10665796c8dcSSimon Schubert YY_USER_INIT; 10675796c8dcSSimon Schubert #endif 10685796c8dcSSimon Schubert 1069*ef5ccd6cSJohn Marino if ( ! (yy_start) ) 1070*ef5ccd6cSJohn Marino (yy_start) = 1; /* first start state */ 10715796c8dcSSimon Schubert 10725796c8dcSSimon Schubert if ( ! yyin ) 10735796c8dcSSimon Schubert yyin = stdin; 10745796c8dcSSimon Schubert 10755796c8dcSSimon Schubert if ( ! yyout ) 10765796c8dcSSimon Schubert yyout = stdout; 10775796c8dcSSimon Schubert 1078*ef5ccd6cSJohn Marino if ( ! YY_CURRENT_BUFFER ) { 1079*ef5ccd6cSJohn Marino yyensure_buffer_stack (); 1080*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = 10815796c8dcSSimon Schubert yy_create_buffer(yyin,YY_BUF_SIZE ); 1082*ef5ccd6cSJohn Marino } 10835796c8dcSSimon Schubert 10845796c8dcSSimon Schubert yy_load_buffer_state( ); 10855796c8dcSSimon Schubert } 10865796c8dcSSimon Schubert 10875796c8dcSSimon Schubert while ( 1 ) /* loops until end-of-file is reached */ 10885796c8dcSSimon Schubert { 1089*ef5ccd6cSJohn Marino yy_cp = (yy_c_buf_p); 10905796c8dcSSimon Schubert 10915796c8dcSSimon Schubert /* Support of yytext. */ 1092*ef5ccd6cSJohn Marino *yy_cp = (yy_hold_char); 10935796c8dcSSimon Schubert 10945796c8dcSSimon Schubert /* yy_bp points to the position in yy_ch_buf of the start of 10955796c8dcSSimon Schubert * the current run. 10965796c8dcSSimon Schubert */ 10975796c8dcSSimon Schubert yy_bp = yy_cp; 10985796c8dcSSimon Schubert 1099*ef5ccd6cSJohn Marino yy_current_state = (yy_start); 11005796c8dcSSimon Schubert yy_match: 11015796c8dcSSimon Schubert do 11025796c8dcSSimon Schubert { 11035796c8dcSSimon Schubert register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 11045796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 11055796c8dcSSimon Schubert { 1106*ef5ccd6cSJohn Marino (yy_last_accepting_state) = yy_current_state; 1107*ef5ccd6cSJohn Marino (yy_last_accepting_cpos) = yy_cp; 11085796c8dcSSimon Schubert } 11095796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 11105796c8dcSSimon Schubert { 11115796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 1112*ef5ccd6cSJohn Marino if ( yy_current_state >= 207 ) 11135796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 11145796c8dcSSimon Schubert } 11155796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 11165796c8dcSSimon Schubert ++yy_cp; 11175796c8dcSSimon Schubert } 1118*ef5ccd6cSJohn Marino while ( yy_base[yy_current_state] != 1252 ); 11195796c8dcSSimon Schubert 11205796c8dcSSimon Schubert yy_find_action: 11215796c8dcSSimon Schubert yy_act = yy_accept[yy_current_state]; 11225796c8dcSSimon Schubert if ( yy_act == 0 ) 11235796c8dcSSimon Schubert { /* have to back up */ 1124*ef5ccd6cSJohn Marino yy_cp = (yy_last_accepting_cpos); 1125*ef5ccd6cSJohn Marino yy_current_state = (yy_last_accepting_state); 11265796c8dcSSimon Schubert yy_act = yy_accept[yy_current_state]; 11275796c8dcSSimon Schubert } 11285796c8dcSSimon Schubert 11295796c8dcSSimon Schubert YY_DO_BEFORE_ACTION; 11305796c8dcSSimon Schubert 11315796c8dcSSimon Schubert do_action: /* This label is used only to access EOF actions. */ 11325796c8dcSSimon Schubert 11335796c8dcSSimon Schubert switch ( yy_act ) 11345796c8dcSSimon Schubert { /* beginning of action switch */ 11355796c8dcSSimon Schubert case 0: /* must back up */ 11365796c8dcSSimon Schubert /* undo the effects of YY_DO_BEFORE_ACTION */ 1137*ef5ccd6cSJohn Marino *yy_cp = (yy_hold_char); 1138*ef5ccd6cSJohn Marino yy_cp = (yy_last_accepting_cpos); 1139*ef5ccd6cSJohn Marino yy_current_state = (yy_last_accepting_state); 11405796c8dcSSimon Schubert goto yy_find_action; 11415796c8dcSSimon Schubert 11425796c8dcSSimon Schubert case 1: 1143*ef5ccd6cSJohn Marino /* rule 1 can match eol */ 11445796c8dcSSimon Schubert YY_RULE_SETUP 1145cf7f2e2dSJohn Marino #line 86 "ada-lex.l" 11465796c8dcSSimon Schubert { } 11475796c8dcSSimon Schubert YY_BREAK 11485796c8dcSSimon Schubert case 2: 11495796c8dcSSimon Schubert YY_RULE_SETUP 1150cf7f2e2dSJohn Marino #line 88 "ada-lex.l" 11515796c8dcSSimon Schubert { yyterminate(); } 11525796c8dcSSimon Schubert YY_BREAK 11535796c8dcSSimon Schubert case 3: 11545796c8dcSSimon Schubert YY_RULE_SETUP 1155cf7f2e2dSJohn Marino #line 90 "ada-lex.l" 11565796c8dcSSimon Schubert { 11575796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 11585796c8dcSSimon Schubert return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1); 11595796c8dcSSimon Schubert } 11605796c8dcSSimon Schubert YY_BREAK 11615796c8dcSSimon Schubert case 4: 11625796c8dcSSimon Schubert YY_RULE_SETUP 1163cf7f2e2dSJohn Marino #line 95 "ada-lex.l" 11645796c8dcSSimon Schubert { 11655796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 11665796c8dcSSimon Schubert return processInt (NULL, numbuf, NULL); 11675796c8dcSSimon Schubert } 11685796c8dcSSimon Schubert YY_BREAK 11695796c8dcSSimon Schubert case 5: 11705796c8dcSSimon Schubert YY_RULE_SETUP 1171cf7f2e2dSJohn Marino #line 100 "ada-lex.l" 11725796c8dcSSimon Schubert { 11735796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 11745796c8dcSSimon Schubert return processInt (numbuf, 11755796c8dcSSimon Schubert strchr (numbuf, '#') + 1, 11765796c8dcSSimon Schubert strrchr(numbuf, '#') + 1); 11775796c8dcSSimon Schubert } 11785796c8dcSSimon Schubert YY_BREAK 11795796c8dcSSimon Schubert case 6: 11805796c8dcSSimon Schubert YY_RULE_SETUP 1181cf7f2e2dSJohn Marino #line 107 "ada-lex.l" 11825796c8dcSSimon Schubert { 11835796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 11845796c8dcSSimon Schubert return processInt (numbuf, strchr (numbuf, '#') + 1, NULL); 11855796c8dcSSimon Schubert } 11865796c8dcSSimon Schubert YY_BREAK 11875796c8dcSSimon Schubert case 7: 11885796c8dcSSimon Schubert YY_RULE_SETUP 1189cf7f2e2dSJohn Marino #line 112 "ada-lex.l" 11905796c8dcSSimon Schubert { 11915796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext+2); 11925796c8dcSSimon Schubert return processInt ("16#", numbuf, NULL); 11935796c8dcSSimon Schubert } 11945796c8dcSSimon Schubert YY_BREAK 11955796c8dcSSimon Schubert case 8: 11965796c8dcSSimon Schubert YY_RULE_SETUP 1197cf7f2e2dSJohn Marino #line 118 "ada-lex.l" 11985796c8dcSSimon Schubert { 11995796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 12005796c8dcSSimon Schubert return processReal (numbuf); 12015796c8dcSSimon Schubert } 12025796c8dcSSimon Schubert YY_BREAK 12035796c8dcSSimon Schubert case 9: 12045796c8dcSSimon Schubert YY_RULE_SETUP 1205cf7f2e2dSJohn Marino #line 123 "ada-lex.l" 12065796c8dcSSimon Schubert { 12075796c8dcSSimon Schubert canonicalizeNumeral (numbuf, yytext); 12085796c8dcSSimon Schubert return processReal (numbuf); 12095796c8dcSSimon Schubert } 12105796c8dcSSimon Schubert YY_BREAK 12115796c8dcSSimon Schubert case 10: 12125796c8dcSSimon Schubert YY_RULE_SETUP 1213cf7f2e2dSJohn Marino #line 128 "ada-lex.l" 12145796c8dcSSimon Schubert { 12155796c8dcSSimon Schubert error (_("Based real literals not implemented yet.")); 12165796c8dcSSimon Schubert } 12175796c8dcSSimon Schubert YY_BREAK 12185796c8dcSSimon Schubert case 11: 12195796c8dcSSimon Schubert YY_RULE_SETUP 1220cf7f2e2dSJohn Marino #line 132 "ada-lex.l" 12215796c8dcSSimon Schubert { 12225796c8dcSSimon Schubert error (_("Based real literals not implemented yet.")); 12235796c8dcSSimon Schubert } 12245796c8dcSSimon Schubert YY_BREAK 12255796c8dcSSimon Schubert case 12: 12265796c8dcSSimon Schubert YY_RULE_SETUP 1227cf7f2e2dSJohn Marino #line 136 "ada-lex.l" 12285796c8dcSSimon Schubert { 12295796c8dcSSimon Schubert yylval.typed_val.type = type_char (); 12305796c8dcSSimon Schubert yylval.typed_val.val = yytext[1]; 12315796c8dcSSimon Schubert return CHARLIT; 12325796c8dcSSimon Schubert } 12335796c8dcSSimon Schubert YY_BREAK 12345796c8dcSSimon Schubert case 13: 12355796c8dcSSimon Schubert YY_RULE_SETUP 1236cf7f2e2dSJohn Marino #line 142 "ada-lex.l" 12375796c8dcSSimon Schubert { 12385796c8dcSSimon Schubert int v; 12395796c8dcSSimon Schubert yylval.typed_val.type = type_char (); 12405796c8dcSSimon Schubert sscanf (yytext+3, "%2x", &v); 12415796c8dcSSimon Schubert yylval.typed_val.val = v; 12425796c8dcSSimon Schubert return CHARLIT; 12435796c8dcSSimon Schubert } 12445796c8dcSSimon Schubert YY_BREAK 12455796c8dcSSimon Schubert case 14: 12465796c8dcSSimon Schubert YY_RULE_SETUP 1247cf7f2e2dSJohn Marino #line 150 "ada-lex.l" 12485796c8dcSSimon Schubert { 12495796c8dcSSimon Schubert yylval.sval = processString (yytext+1, yyleng-2); 12505796c8dcSSimon Schubert return STRING; 12515796c8dcSSimon Schubert } 12525796c8dcSSimon Schubert YY_BREAK 12535796c8dcSSimon Schubert case 15: 12545796c8dcSSimon Schubert YY_RULE_SETUP 1255cf7f2e2dSJohn Marino #line 155 "ada-lex.l" 12565796c8dcSSimon Schubert { 12575796c8dcSSimon Schubert error (_("ill-formed or non-terminated string literal")); 12585796c8dcSSimon Schubert } 12595796c8dcSSimon Schubert YY_BREAK 12605796c8dcSSimon Schubert case 16: 12615796c8dcSSimon Schubert YY_RULE_SETUP 1262cf7f2e2dSJohn Marino #line 160 "ada-lex.l" 12635796c8dcSSimon Schubert { 1264*ef5ccd6cSJohn Marino rewind_to_char ('i'); 12655796c8dcSSimon Schubert return 0; 12665796c8dcSSimon Schubert } 12675796c8dcSSimon Schubert YY_BREAK 12685796c8dcSSimon Schubert case 17: 12695796c8dcSSimon Schubert YY_RULE_SETUP 1270*ef5ccd6cSJohn Marino #line 165 "ada-lex.l" 1271*ef5ccd6cSJohn Marino { 1272*ef5ccd6cSJohn Marino rewind_to_char ('t'); 1273*ef5ccd6cSJohn Marino return 0; 1274*ef5ccd6cSJohn Marino } 1275*ef5ccd6cSJohn Marino YY_BREAK 1276*ef5ccd6cSJohn Marino case 18: 1277*ef5ccd6cSJohn Marino /* rule 18 can match eol */ 1278*ef5ccd6cSJohn Marino YY_RULE_SETUP 1279*ef5ccd6cSJohn Marino #line 170 "ada-lex.l" 1280cf7f2e2dSJohn Marino { 1281cf7f2e2dSJohn Marino /* This keyword signals the end of the expression and 1282cf7f2e2dSJohn Marino will be processed separately. */ 1283*ef5ccd6cSJohn Marino rewind_to_char ('t'); 1284cf7f2e2dSJohn Marino return 0; 1285cf7f2e2dSJohn Marino } 12865796c8dcSSimon Schubert YY_BREAK 1287cf7f2e2dSJohn Marino /* ADA KEYWORDS */ 12885796c8dcSSimon Schubert case 19: 12895796c8dcSSimon Schubert YY_RULE_SETUP 1290cf7f2e2dSJohn Marino #line 179 "ada-lex.l" 1291*ef5ccd6cSJohn Marino { return ABS; } 12925796c8dcSSimon Schubert YY_BREAK 12935796c8dcSSimon Schubert case 20: 12945796c8dcSSimon Schubert YY_RULE_SETUP 1295cf7f2e2dSJohn Marino #line 180 "ada-lex.l" 1296*ef5ccd6cSJohn Marino { return _AND_; } 12975796c8dcSSimon Schubert YY_BREAK 12985796c8dcSSimon Schubert case 21: 12995796c8dcSSimon Schubert YY_RULE_SETUP 1300cf7f2e2dSJohn Marino #line 181 "ada-lex.l" 1301*ef5ccd6cSJohn Marino { return ELSE; } 13025796c8dcSSimon Schubert YY_BREAK 13035796c8dcSSimon Schubert case 22: 13045796c8dcSSimon Schubert YY_RULE_SETUP 1305cf7f2e2dSJohn Marino #line 182 "ada-lex.l" 1306*ef5ccd6cSJohn Marino { return IN; } 13075796c8dcSSimon Schubert YY_BREAK 13085796c8dcSSimon Schubert case 23: 13095796c8dcSSimon Schubert YY_RULE_SETUP 1310cf7f2e2dSJohn Marino #line 183 "ada-lex.l" 1311*ef5ccd6cSJohn Marino { return MOD; } 13125796c8dcSSimon Schubert YY_BREAK 13135796c8dcSSimon Schubert case 24: 13145796c8dcSSimon Schubert YY_RULE_SETUP 1315cf7f2e2dSJohn Marino #line 184 "ada-lex.l" 1316*ef5ccd6cSJohn Marino { return NEW; } 13175796c8dcSSimon Schubert YY_BREAK 13185796c8dcSSimon Schubert case 25: 13195796c8dcSSimon Schubert YY_RULE_SETUP 1320cf7f2e2dSJohn Marino #line 185 "ada-lex.l" 1321*ef5ccd6cSJohn Marino { return NOT; } 13225796c8dcSSimon Schubert YY_BREAK 13235796c8dcSSimon Schubert case 26: 13245796c8dcSSimon Schubert YY_RULE_SETUP 1325cf7f2e2dSJohn Marino #line 186 "ada-lex.l" 1326*ef5ccd6cSJohn Marino { return NULL_PTR; } 13275796c8dcSSimon Schubert YY_BREAK 13285796c8dcSSimon Schubert case 27: 13295796c8dcSSimon Schubert YY_RULE_SETUP 1330cf7f2e2dSJohn Marino #line 187 "ada-lex.l" 1331*ef5ccd6cSJohn Marino { return OR; } 13325796c8dcSSimon Schubert YY_BREAK 13335796c8dcSSimon Schubert case 28: 13345796c8dcSSimon Schubert YY_RULE_SETUP 1335cf7f2e2dSJohn Marino #line 188 "ada-lex.l" 1336*ef5ccd6cSJohn Marino { return OTHERS; } 13375796c8dcSSimon Schubert YY_BREAK 13385796c8dcSSimon Schubert case 29: 13395796c8dcSSimon Schubert YY_RULE_SETUP 1340cf7f2e2dSJohn Marino #line 189 "ada-lex.l" 1341*ef5ccd6cSJohn Marino { return REM; } 1342cf7f2e2dSJohn Marino YY_BREAK 1343cf7f2e2dSJohn Marino case 30: 1344cf7f2e2dSJohn Marino YY_RULE_SETUP 1345cf7f2e2dSJohn Marino #line 190 "ada-lex.l" 1346*ef5ccd6cSJohn Marino { return THEN; } 1347*ef5ccd6cSJohn Marino YY_BREAK 1348*ef5ccd6cSJohn Marino case 31: 1349*ef5ccd6cSJohn Marino YY_RULE_SETUP 1350*ef5ccd6cSJohn Marino #line 191 "ada-lex.l" 13515796c8dcSSimon Schubert { return XOR; } 13525796c8dcSSimon Schubert YY_BREAK 13535796c8dcSSimon Schubert /* BOOLEAN "KEYWORDS" */ 13545796c8dcSSimon Schubert /* True and False are not keywords in Ada, but rather enumeration constants. 13555796c8dcSSimon Schubert However, the boolean type is no longer represented as an enum, so True 13565796c8dcSSimon Schubert and False are no longer defined in symbol tables. We compromise by 13575796c8dcSSimon Schubert making them keywords (when bare). */ 1358cf7f2e2dSJohn Marino case 32: 1359cf7f2e2dSJohn Marino YY_RULE_SETUP 1360cf7f2e2dSJohn Marino #line 200 "ada-lex.l" 1361*ef5ccd6cSJohn Marino { return TRUEKEYWORD; } 1362*ef5ccd6cSJohn Marino YY_BREAK 1363*ef5ccd6cSJohn Marino case 33: 1364*ef5ccd6cSJohn Marino YY_RULE_SETUP 1365*ef5ccd6cSJohn Marino #line 201 "ada-lex.l" 13665796c8dcSSimon Schubert { return FALSEKEYWORD; } 13675796c8dcSSimon Schubert YY_BREAK 13685796c8dcSSimon Schubert /* ATTRIBUTES */ 1369*ef5ccd6cSJohn Marino case 34: 1370*ef5ccd6cSJohn Marino /* rule 34 can match eol */ 13715796c8dcSSimon Schubert YY_RULE_SETUP 1372*ef5ccd6cSJohn Marino #line 205 "ada-lex.l" 13735796c8dcSSimon Schubert { return processAttribute (yytext+1); } 13745796c8dcSSimon Schubert YY_BREAK 13755796c8dcSSimon Schubert /* PUNCTUATION */ 13765796c8dcSSimon Schubert case 35: 13775796c8dcSSimon Schubert YY_RULE_SETUP 1378cf7f2e2dSJohn Marino #line 209 "ada-lex.l" 1379*ef5ccd6cSJohn Marino { return ARROW; } 13805796c8dcSSimon Schubert YY_BREAK 13815796c8dcSSimon Schubert case 36: 13825796c8dcSSimon Schubert YY_RULE_SETUP 1383cf7f2e2dSJohn Marino #line 210 "ada-lex.l" 1384*ef5ccd6cSJohn Marino { return DOTDOT; } 13855796c8dcSSimon Schubert YY_BREAK 13865796c8dcSSimon Schubert case 37: 13875796c8dcSSimon Schubert YY_RULE_SETUP 1388cf7f2e2dSJohn Marino #line 211 "ada-lex.l" 1389*ef5ccd6cSJohn Marino { return STARSTAR; } 13905796c8dcSSimon Schubert YY_BREAK 13915796c8dcSSimon Schubert case 38: 13925796c8dcSSimon Schubert YY_RULE_SETUP 1393cf7f2e2dSJohn Marino #line 212 "ada-lex.l" 1394*ef5ccd6cSJohn Marino { return ASSIGN; } 13955796c8dcSSimon Schubert YY_BREAK 13965796c8dcSSimon Schubert case 39: 13975796c8dcSSimon Schubert YY_RULE_SETUP 1398cf7f2e2dSJohn Marino #line 213 "ada-lex.l" 1399*ef5ccd6cSJohn Marino { return NOTEQUAL; } 14005796c8dcSSimon Schubert YY_BREAK 14015796c8dcSSimon Schubert case 40: 14025796c8dcSSimon Schubert YY_RULE_SETUP 1403cf7f2e2dSJohn Marino #line 214 "ada-lex.l" 1404*ef5ccd6cSJohn Marino { return LEQ; } 14055796c8dcSSimon Schubert YY_BREAK 14065796c8dcSSimon Schubert case 41: 14075796c8dcSSimon Schubert YY_RULE_SETUP 1408*ef5ccd6cSJohn Marino #line 215 "ada-lex.l" 1409*ef5ccd6cSJohn Marino { return GEQ; } 14105796c8dcSSimon Schubert YY_BREAK 14115796c8dcSSimon Schubert case 42: 14125796c8dcSSimon Schubert YY_RULE_SETUP 1413*ef5ccd6cSJohn Marino #line 217 "ada-lex.l" 1414*ef5ccd6cSJohn Marino { BEGIN INITIAL; return '\''; } 1415cf7f2e2dSJohn Marino YY_BREAK 1416cf7f2e2dSJohn Marino case 43: 1417cf7f2e2dSJohn Marino YY_RULE_SETUP 1418*ef5ccd6cSJohn Marino #line 219 "ada-lex.l" 1419*ef5ccd6cSJohn Marino { return yytext[0]; } 1420*ef5ccd6cSJohn Marino YY_BREAK 1421*ef5ccd6cSJohn Marino case 44: 1422*ef5ccd6cSJohn Marino YY_RULE_SETUP 1423*ef5ccd6cSJohn Marino #line 221 "ada-lex.l" 14245796c8dcSSimon Schubert { if (paren_depth == 0 && comma_terminates) 14255796c8dcSSimon Schubert { 1426*ef5ccd6cSJohn Marino rewind_to_char (','); 14275796c8dcSSimon Schubert return 0; 14285796c8dcSSimon Schubert } 14295796c8dcSSimon Schubert else 14305796c8dcSSimon Schubert return ','; 14315796c8dcSSimon Schubert } 14325796c8dcSSimon Schubert YY_BREAK 1433*ef5ccd6cSJohn Marino case 45: 14345796c8dcSSimon Schubert YY_RULE_SETUP 1435cf7f2e2dSJohn Marino #line 230 "ada-lex.l" 1436cf7f2e2dSJohn Marino { paren_depth += 1; return '('; } 1437cf7f2e2dSJohn Marino YY_BREAK 1438*ef5ccd6cSJohn Marino case 46: 1439cf7f2e2dSJohn Marino YY_RULE_SETUP 1440cf7f2e2dSJohn Marino #line 231 "ada-lex.l" 14415796c8dcSSimon Schubert { if (paren_depth == 0) 14425796c8dcSSimon Schubert { 1443*ef5ccd6cSJohn Marino rewind_to_char (')'); 14445796c8dcSSimon Schubert return 0; 14455796c8dcSSimon Schubert } 14465796c8dcSSimon Schubert else 14475796c8dcSSimon Schubert { 14485796c8dcSSimon Schubert paren_depth -= 1; 14495796c8dcSSimon Schubert return ')'; 14505796c8dcSSimon Schubert } 14515796c8dcSSimon Schubert } 14525796c8dcSSimon Schubert YY_BREAK 1453*ef5ccd6cSJohn Marino case 47: 1454*ef5ccd6cSJohn Marino /* rule 47 can match eol */ 14555796c8dcSSimon Schubert YY_RULE_SETUP 1456*ef5ccd6cSJohn Marino #line 243 "ada-lex.l" 1457cf7f2e2dSJohn Marino { return DOT_ALL; } 1458cf7f2e2dSJohn Marino YY_BREAK 1459*ef5ccd6cSJohn Marino case 48: 1460*ef5ccd6cSJohn Marino /* rule 48 can match eol */ 1461cf7f2e2dSJohn Marino YY_RULE_SETUP 1462*ef5ccd6cSJohn Marino #line 245 "ada-lex.l" 14635796c8dcSSimon Schubert { 14645796c8dcSSimon Schubert yylval.sval = processId (yytext+1, yyleng-1); 14655796c8dcSSimon Schubert return DOT_ID; 14665796c8dcSSimon Schubert } 14675796c8dcSSimon Schubert YY_BREAK 1468*ef5ccd6cSJohn Marino case 49: 1469*ef5ccd6cSJohn Marino /* rule 49 can match eol */ 14705796c8dcSSimon Schubert YY_RULE_SETUP 1471*ef5ccd6cSJohn Marino #line 250 "ada-lex.l" 14725796c8dcSSimon Schubert { 14735796c8dcSSimon Schubert int all_posn = find_dot_all (yytext); 14745796c8dcSSimon Schubert 14755796c8dcSSimon Schubert if (all_posn == -1 && yytext[yyleng-1] == '\'') 14765796c8dcSSimon Schubert { 14775796c8dcSSimon Schubert BEGIN BEFORE_QUAL_QUOTE; 14785796c8dcSSimon Schubert yyless (yyleng-1); 14795796c8dcSSimon Schubert } 14805796c8dcSSimon Schubert else if (all_posn >= 0) 14815796c8dcSSimon Schubert yyless (all_posn); 14825796c8dcSSimon Schubert yylval.sval = processId (yytext, yyleng); 14835796c8dcSSimon Schubert return NAME; 14845796c8dcSSimon Schubert } 14855796c8dcSSimon Schubert YY_BREAK 14865796c8dcSSimon Schubert /* GDB EXPRESSION CONSTRUCTS */ 1487*ef5ccd6cSJohn Marino case 50: 1488*ef5ccd6cSJohn Marino /* rule 50 can match eol */ 14895796c8dcSSimon Schubert YY_RULE_SETUP 1490*ef5ccd6cSJohn Marino #line 267 "ada-lex.l" 14915796c8dcSSimon Schubert { 14925796c8dcSSimon Schubert yyless (yyleng - 2); 14935796c8dcSSimon Schubert yylval.sval = processId (yytext, yyleng); 14945796c8dcSSimon Schubert return NAME; 14955796c8dcSSimon Schubert } 14965796c8dcSSimon Schubert YY_BREAK 1497cf7f2e2dSJohn Marino case 51: 1498cf7f2e2dSJohn Marino YY_RULE_SETUP 1499*ef5ccd6cSJohn Marino #line 273 "ada-lex.l" 1500*ef5ccd6cSJohn Marino { return COLONCOLON; } 1501*ef5ccd6cSJohn Marino YY_BREAK 1502*ef5ccd6cSJohn Marino case 52: 1503*ef5ccd6cSJohn Marino YY_RULE_SETUP 1504*ef5ccd6cSJohn Marino #line 275 "ada-lex.l" 15055796c8dcSSimon Schubert { return yytext[0]; } 15065796c8dcSSimon Schubert YY_BREAK 15075796c8dcSSimon Schubert /* REGISTERS AND GDB CONVENIENCE VARIABLES */ 1508*ef5ccd6cSJohn Marino case 53: 15095796c8dcSSimon Schubert YY_RULE_SETUP 1510*ef5ccd6cSJohn Marino #line 279 "ada-lex.l" 15115796c8dcSSimon Schubert { 15125796c8dcSSimon Schubert yylval.sval.ptr = yytext; 15135796c8dcSSimon Schubert yylval.sval.length = yyleng; 15145796c8dcSSimon Schubert return SPECIAL_VARIABLE; 15155796c8dcSSimon Schubert } 15165796c8dcSSimon Schubert YY_BREAK 15175796c8dcSSimon Schubert /* CATCH-ALL ERROR CASE */ 1518cf7f2e2dSJohn Marino case 54: 1519cf7f2e2dSJohn Marino YY_RULE_SETUP 1520*ef5ccd6cSJohn Marino #line 287 "ada-lex.l" 1521*ef5ccd6cSJohn Marino { error (_("Invalid character '%s' in expression."), yytext); } 1522*ef5ccd6cSJohn Marino YY_BREAK 1523*ef5ccd6cSJohn Marino case 55: 1524*ef5ccd6cSJohn Marino YY_RULE_SETUP 1525*ef5ccd6cSJohn Marino #line 288 "ada-lex.l" 15265796c8dcSSimon Schubert YY_FATAL_ERROR( "flex scanner jammed" ); 15275796c8dcSSimon Schubert YY_BREAK 1528*ef5ccd6cSJohn Marino #line 1529 "ada-lex.c" 15295796c8dcSSimon Schubert case YY_STATE_EOF(INITIAL): 15305796c8dcSSimon Schubert case YY_STATE_EOF(BEFORE_QUAL_QUOTE): 15315796c8dcSSimon Schubert yyterminate(); 15325796c8dcSSimon Schubert 15335796c8dcSSimon Schubert case YY_END_OF_BUFFER: 15345796c8dcSSimon Schubert { 15355796c8dcSSimon Schubert /* Amount of text matched not including the EOB char. */ 1536*ef5ccd6cSJohn Marino int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 15375796c8dcSSimon Schubert 15385796c8dcSSimon Schubert /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1539*ef5ccd6cSJohn Marino *yy_cp = (yy_hold_char); 15405796c8dcSSimon Schubert YY_RESTORE_YY_MORE_OFFSET 15415796c8dcSSimon Schubert 1542*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 15435796c8dcSSimon Schubert { 15445796c8dcSSimon Schubert /* We're scanning a new file or input source. It's 15455796c8dcSSimon Schubert * possible that this happened because the user 15465796c8dcSSimon Schubert * just pointed yyin at a new source and called 15475796c8dcSSimon Schubert * yylex(). If so, then we have to assure 1548*ef5ccd6cSJohn Marino * consistency between YY_CURRENT_BUFFER and our 15495796c8dcSSimon Schubert * globals. Here is the right place to do so, because 15505796c8dcSSimon Schubert * this is the first action (other than possibly a 15515796c8dcSSimon Schubert * back-up) that will match for the new input source. 15525796c8dcSSimon Schubert */ 1553*ef5ccd6cSJohn Marino (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1554*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 1555*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 15565796c8dcSSimon Schubert } 15575796c8dcSSimon Schubert 15585796c8dcSSimon Schubert /* Note that here we test for yy_c_buf_p "<=" to the position 15595796c8dcSSimon Schubert * of the first EOB in the buffer, since yy_c_buf_p will 15605796c8dcSSimon Schubert * already have been incremented past the NUL character 15615796c8dcSSimon Schubert * (since all states make transitions on EOB to the 15625796c8dcSSimon Schubert * end-of-buffer state). Contrast this with the test 15635796c8dcSSimon Schubert * in input(). 15645796c8dcSSimon Schubert */ 1565*ef5ccd6cSJohn Marino if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 15665796c8dcSSimon Schubert { /* This was really a NUL. */ 15675796c8dcSSimon Schubert yy_state_type yy_next_state; 15685796c8dcSSimon Schubert 1569*ef5ccd6cSJohn Marino (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 15705796c8dcSSimon Schubert 15715796c8dcSSimon Schubert yy_current_state = yy_get_previous_state( ); 15725796c8dcSSimon Schubert 15735796c8dcSSimon Schubert /* Okay, we're now positioned to make the NUL 15745796c8dcSSimon Schubert * transition. We couldn't have 15755796c8dcSSimon Schubert * yy_get_previous_state() go ahead and do it 15765796c8dcSSimon Schubert * for us because it doesn't know how to deal 15775796c8dcSSimon Schubert * with the possibility of jamming (and we don't 15785796c8dcSSimon Schubert * want to build jamming into it because then it 15795796c8dcSSimon Schubert * will run more slowly). 15805796c8dcSSimon Schubert */ 15815796c8dcSSimon Schubert 15825796c8dcSSimon Schubert yy_next_state = yy_try_NUL_trans( yy_current_state ); 15835796c8dcSSimon Schubert 1584*ef5ccd6cSJohn Marino yy_bp = (yytext_ptr) + YY_MORE_ADJ; 15855796c8dcSSimon Schubert 15865796c8dcSSimon Schubert if ( yy_next_state ) 15875796c8dcSSimon Schubert { 15885796c8dcSSimon Schubert /* Consume the NUL. */ 1589*ef5ccd6cSJohn Marino yy_cp = ++(yy_c_buf_p); 15905796c8dcSSimon Schubert yy_current_state = yy_next_state; 15915796c8dcSSimon Schubert goto yy_match; 15925796c8dcSSimon Schubert } 15935796c8dcSSimon Schubert 15945796c8dcSSimon Schubert else 15955796c8dcSSimon Schubert { 1596*ef5ccd6cSJohn Marino yy_cp = (yy_c_buf_p); 15975796c8dcSSimon Schubert goto yy_find_action; 15985796c8dcSSimon Schubert } 15995796c8dcSSimon Schubert } 16005796c8dcSSimon Schubert 16015796c8dcSSimon Schubert else switch ( yy_get_next_buffer( ) ) 16025796c8dcSSimon Schubert { 16035796c8dcSSimon Schubert case EOB_ACT_END_OF_FILE: 16045796c8dcSSimon Schubert { 1605*ef5ccd6cSJohn Marino (yy_did_buffer_switch_on_eof) = 0; 16065796c8dcSSimon Schubert 16075796c8dcSSimon Schubert if ( yywrap( ) ) 16085796c8dcSSimon Schubert { 16095796c8dcSSimon Schubert /* Note: because we've taken care in 16105796c8dcSSimon Schubert * yy_get_next_buffer() to have set up 16115796c8dcSSimon Schubert * yytext, we can now set up 16125796c8dcSSimon Schubert * yy_c_buf_p so that if some total 16135796c8dcSSimon Schubert * hoser (like flex itself) wants to 16145796c8dcSSimon Schubert * call the scanner after we return the 16155796c8dcSSimon Schubert * YY_NULL, it'll still work - another 16165796c8dcSSimon Schubert * YY_NULL will get returned. 16175796c8dcSSimon Schubert */ 1618*ef5ccd6cSJohn Marino (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 16195796c8dcSSimon Schubert 16205796c8dcSSimon Schubert yy_act = YY_STATE_EOF(YY_START); 16215796c8dcSSimon Schubert goto do_action; 16225796c8dcSSimon Schubert } 16235796c8dcSSimon Schubert 16245796c8dcSSimon Schubert else 16255796c8dcSSimon Schubert { 1626*ef5ccd6cSJohn Marino if ( ! (yy_did_buffer_switch_on_eof) ) 16275796c8dcSSimon Schubert YY_NEW_FILE; 16285796c8dcSSimon Schubert } 16295796c8dcSSimon Schubert break; 16305796c8dcSSimon Schubert } 16315796c8dcSSimon Schubert 16325796c8dcSSimon Schubert case EOB_ACT_CONTINUE_SCAN: 1633*ef5ccd6cSJohn Marino (yy_c_buf_p) = 1634*ef5ccd6cSJohn Marino (yytext_ptr) + yy_amount_of_matched_text; 16355796c8dcSSimon Schubert 16365796c8dcSSimon Schubert yy_current_state = yy_get_previous_state( ); 16375796c8dcSSimon Schubert 1638*ef5ccd6cSJohn Marino yy_cp = (yy_c_buf_p); 1639*ef5ccd6cSJohn Marino yy_bp = (yytext_ptr) + YY_MORE_ADJ; 16405796c8dcSSimon Schubert goto yy_match; 16415796c8dcSSimon Schubert 16425796c8dcSSimon Schubert case EOB_ACT_LAST_MATCH: 1643*ef5ccd6cSJohn Marino (yy_c_buf_p) = 1644*ef5ccd6cSJohn Marino &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 16455796c8dcSSimon Schubert 16465796c8dcSSimon Schubert yy_current_state = yy_get_previous_state( ); 16475796c8dcSSimon Schubert 1648*ef5ccd6cSJohn Marino yy_cp = (yy_c_buf_p); 1649*ef5ccd6cSJohn Marino yy_bp = (yytext_ptr) + YY_MORE_ADJ; 16505796c8dcSSimon Schubert goto yy_find_action; 16515796c8dcSSimon Schubert } 16525796c8dcSSimon Schubert break; 16535796c8dcSSimon Schubert } 16545796c8dcSSimon Schubert 16555796c8dcSSimon Schubert default: 16565796c8dcSSimon Schubert YY_FATAL_ERROR( 16575796c8dcSSimon Schubert "fatal flex scanner internal error--no action found" ); 16585796c8dcSSimon Schubert } /* end of action switch */ 16595796c8dcSSimon Schubert } /* end of scanning one token */ 16605796c8dcSSimon Schubert } /* end of yylex */ 16615796c8dcSSimon Schubert 16625796c8dcSSimon Schubert /* yy_get_next_buffer - try to read in a new buffer 16635796c8dcSSimon Schubert * 16645796c8dcSSimon Schubert * Returns a code representing an action: 16655796c8dcSSimon Schubert * EOB_ACT_LAST_MATCH - 16665796c8dcSSimon Schubert * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 16675796c8dcSSimon Schubert * EOB_ACT_END_OF_FILE - end of file 16685796c8dcSSimon Schubert */ 1669*ef5ccd6cSJohn Marino static int yy_get_next_buffer (void) 16705796c8dcSSimon Schubert { 1671*ef5ccd6cSJohn Marino register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1672*ef5ccd6cSJohn Marino register char *source = (yytext_ptr); 16735796c8dcSSimon Schubert register int number_to_move, i; 16745796c8dcSSimon Schubert int ret_val; 16755796c8dcSSimon Schubert 1676*ef5ccd6cSJohn Marino if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 16775796c8dcSSimon Schubert YY_FATAL_ERROR( 16785796c8dcSSimon Schubert "fatal flex scanner internal error--end of buffer missed" ); 16795796c8dcSSimon Schubert 1680*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 16815796c8dcSSimon Schubert { /* Don't try to fill the buffer, so this is an EOF. */ 1682*ef5ccd6cSJohn Marino if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 16835796c8dcSSimon Schubert { 16845796c8dcSSimon Schubert /* We matched a single character, the EOB, so 16855796c8dcSSimon Schubert * treat this as a final EOF. 16865796c8dcSSimon Schubert */ 16875796c8dcSSimon Schubert return EOB_ACT_END_OF_FILE; 16885796c8dcSSimon Schubert } 16895796c8dcSSimon Schubert 16905796c8dcSSimon Schubert else 16915796c8dcSSimon Schubert { 16925796c8dcSSimon Schubert /* We matched some text prior to the EOB, first 16935796c8dcSSimon Schubert * process it. 16945796c8dcSSimon Schubert */ 16955796c8dcSSimon Schubert return EOB_ACT_LAST_MATCH; 16965796c8dcSSimon Schubert } 16975796c8dcSSimon Schubert } 16985796c8dcSSimon Schubert 16995796c8dcSSimon Schubert /* Try to read more data. */ 17005796c8dcSSimon Schubert 17015796c8dcSSimon Schubert /* First move last chars to start of buffer. */ 1702*ef5ccd6cSJohn Marino number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 17035796c8dcSSimon Schubert 17045796c8dcSSimon Schubert for ( i = 0; i < number_to_move; ++i ) 17055796c8dcSSimon Schubert *(dest++) = *(source++); 17065796c8dcSSimon Schubert 1707*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 17085796c8dcSSimon Schubert /* don't do the read, it's not guaranteed to return an EOF, 17095796c8dcSSimon Schubert * just force an EOF 17105796c8dcSSimon Schubert */ 1711*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 17125796c8dcSSimon Schubert 17135796c8dcSSimon Schubert else 17145796c8dcSSimon Schubert { 17155796c8dcSSimon Schubert int num_to_read = 1716*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 17175796c8dcSSimon Schubert 17185796c8dcSSimon Schubert while ( num_to_read <= 0 ) 17195796c8dcSSimon Schubert { /* Not enough room in the buffer - grow it. */ 17205796c8dcSSimon Schubert 17215796c8dcSSimon Schubert /* just a shorter name for the current buffer */ 1722*ef5ccd6cSJohn Marino YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 17235796c8dcSSimon Schubert 17245796c8dcSSimon Schubert int yy_c_buf_p_offset = 1725*ef5ccd6cSJohn Marino (int) ((yy_c_buf_p) - b->yy_ch_buf); 17265796c8dcSSimon Schubert 17275796c8dcSSimon Schubert if ( b->yy_is_our_buffer ) 17285796c8dcSSimon Schubert { 17295796c8dcSSimon Schubert int new_size = b->yy_buf_size * 2; 17305796c8dcSSimon Schubert 17315796c8dcSSimon Schubert if ( new_size <= 0 ) 17325796c8dcSSimon Schubert b->yy_buf_size += b->yy_buf_size / 8; 17335796c8dcSSimon Schubert else 17345796c8dcSSimon Schubert b->yy_buf_size *= 2; 17355796c8dcSSimon Schubert 17365796c8dcSSimon Schubert b->yy_ch_buf = (char *) 17375796c8dcSSimon Schubert /* Include room in for 2 EOB chars. */ 1738*ef5ccd6cSJohn Marino yyxrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 17395796c8dcSSimon Schubert } 17405796c8dcSSimon Schubert else 17415796c8dcSSimon Schubert /* Can't grow it, we don't own it. */ 17425796c8dcSSimon Schubert b->yy_ch_buf = 0; 17435796c8dcSSimon Schubert 17445796c8dcSSimon Schubert if ( ! b->yy_ch_buf ) 17455796c8dcSSimon Schubert YY_FATAL_ERROR( 17465796c8dcSSimon Schubert "fatal error - scanner input buffer overflow" ); 17475796c8dcSSimon Schubert 1748*ef5ccd6cSJohn Marino (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 17495796c8dcSSimon Schubert 1750*ef5ccd6cSJohn Marino num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 17515796c8dcSSimon Schubert number_to_move - 1; 1752*ef5ccd6cSJohn Marino 17535796c8dcSSimon Schubert } 17545796c8dcSSimon Schubert 17555796c8dcSSimon Schubert if ( num_to_read > YY_READ_BUF_SIZE ) 17565796c8dcSSimon Schubert num_to_read = YY_READ_BUF_SIZE; 17575796c8dcSSimon Schubert 17585796c8dcSSimon Schubert /* Read in more data. */ 1759*ef5ccd6cSJohn Marino YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1760*ef5ccd6cSJohn Marino (yy_n_chars), (size_t) num_to_read ); 17615796c8dcSSimon Schubert 1762*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 17635796c8dcSSimon Schubert } 17645796c8dcSSimon Schubert 1765*ef5ccd6cSJohn Marino if ( (yy_n_chars) == 0 ) 17665796c8dcSSimon Schubert { 17675796c8dcSSimon Schubert if ( number_to_move == YY_MORE_ADJ ) 17685796c8dcSSimon Schubert { 17695796c8dcSSimon Schubert ret_val = EOB_ACT_END_OF_FILE; 17705796c8dcSSimon Schubert yyrestart(yyin ); 17715796c8dcSSimon Schubert } 17725796c8dcSSimon Schubert 17735796c8dcSSimon Schubert else 17745796c8dcSSimon Schubert { 17755796c8dcSSimon Schubert ret_val = EOB_ACT_LAST_MATCH; 1776*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 17775796c8dcSSimon Schubert YY_BUFFER_EOF_PENDING; 17785796c8dcSSimon Schubert } 17795796c8dcSSimon Schubert } 17805796c8dcSSimon Schubert 17815796c8dcSSimon Schubert else 17825796c8dcSSimon Schubert ret_val = EOB_ACT_CONTINUE_SCAN; 17835796c8dcSSimon Schubert 1784*ef5ccd6cSJohn Marino if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1785*ef5ccd6cSJohn Marino /* Extend the array by 50%, plus the number we really need. */ 1786*ef5ccd6cSJohn Marino yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1787*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyxrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 1788*ef5ccd6cSJohn Marino if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1789*ef5ccd6cSJohn Marino YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1790*ef5ccd6cSJohn Marino } 17915796c8dcSSimon Schubert 1792*ef5ccd6cSJohn Marino (yy_n_chars) += number_to_move; 1793*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1794*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1795*ef5ccd6cSJohn Marino 1796*ef5ccd6cSJohn Marino (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 17975796c8dcSSimon Schubert 17985796c8dcSSimon Schubert return ret_val; 17995796c8dcSSimon Schubert } 18005796c8dcSSimon Schubert 18015796c8dcSSimon Schubert /* yy_get_previous_state - get the state just before the EOB char was reached */ 18025796c8dcSSimon Schubert 1803*ef5ccd6cSJohn Marino static yy_state_type yy_get_previous_state (void) 18045796c8dcSSimon Schubert { 18055796c8dcSSimon Schubert register yy_state_type yy_current_state; 18065796c8dcSSimon Schubert register char *yy_cp; 18075796c8dcSSimon Schubert 1808*ef5ccd6cSJohn Marino yy_current_state = (yy_start); 18095796c8dcSSimon Schubert 1810*ef5ccd6cSJohn Marino for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 18115796c8dcSSimon Schubert { 18125796c8dcSSimon Schubert register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 18135796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 18145796c8dcSSimon Schubert { 1815*ef5ccd6cSJohn Marino (yy_last_accepting_state) = yy_current_state; 1816*ef5ccd6cSJohn Marino (yy_last_accepting_cpos) = yy_cp; 18175796c8dcSSimon Schubert } 18185796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 18195796c8dcSSimon Schubert { 18205796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 1821*ef5ccd6cSJohn Marino if ( yy_current_state >= 207 ) 18225796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 18235796c8dcSSimon Schubert } 18245796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 18255796c8dcSSimon Schubert } 18265796c8dcSSimon Schubert 18275796c8dcSSimon Schubert return yy_current_state; 18285796c8dcSSimon Schubert } 18295796c8dcSSimon Schubert 18305796c8dcSSimon Schubert /* yy_try_NUL_trans - try to make a transition on the NUL character 18315796c8dcSSimon Schubert * 18325796c8dcSSimon Schubert * synopsis 18335796c8dcSSimon Schubert * next_state = yy_try_NUL_trans( current_state ); 18345796c8dcSSimon Schubert */ 18355796c8dcSSimon Schubert static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 18365796c8dcSSimon Schubert { 18375796c8dcSSimon Schubert register int yy_is_jam; 1838*ef5ccd6cSJohn Marino register char *yy_cp = (yy_c_buf_p); 18395796c8dcSSimon Schubert 18405796c8dcSSimon Schubert register YY_CHAR yy_c = 1; 18415796c8dcSSimon Schubert if ( yy_accept[yy_current_state] ) 18425796c8dcSSimon Schubert { 1843*ef5ccd6cSJohn Marino (yy_last_accepting_state) = yy_current_state; 1844*ef5ccd6cSJohn Marino (yy_last_accepting_cpos) = yy_cp; 18455796c8dcSSimon Schubert } 18465796c8dcSSimon Schubert while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 18475796c8dcSSimon Schubert { 18485796c8dcSSimon Schubert yy_current_state = (int) yy_def[yy_current_state]; 1849*ef5ccd6cSJohn Marino if ( yy_current_state >= 207 ) 18505796c8dcSSimon Schubert yy_c = yy_meta[(unsigned int) yy_c]; 18515796c8dcSSimon Schubert } 18525796c8dcSSimon Schubert yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1853*ef5ccd6cSJohn Marino yy_is_jam = (yy_current_state == 206); 18545796c8dcSSimon Schubert 18555796c8dcSSimon Schubert return yy_is_jam ? 0 : yy_current_state; 18565796c8dcSSimon Schubert } 18575796c8dcSSimon Schubert 18585796c8dcSSimon Schubert static void yyunput (int c, register char * yy_bp ) 18595796c8dcSSimon Schubert { 1860*ef5ccd6cSJohn Marino register char *yy_cp; 1861*ef5ccd6cSJohn Marino 1862*ef5ccd6cSJohn Marino yy_cp = (yy_c_buf_p); 18635796c8dcSSimon Schubert 18645796c8dcSSimon Schubert /* undo effects of setting up yytext */ 1865*ef5ccd6cSJohn Marino *yy_cp = (yy_hold_char); 18665796c8dcSSimon Schubert 1867*ef5ccd6cSJohn Marino if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 18685796c8dcSSimon Schubert { /* need to shift things up to make room */ 18695796c8dcSSimon Schubert /* +2 for EOB chars. */ 1870*ef5ccd6cSJohn Marino register int number_to_move = (yy_n_chars) + 2; 1871*ef5ccd6cSJohn Marino register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 1872*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 18735796c8dcSSimon Schubert register char *source = 1874*ef5ccd6cSJohn Marino &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 18755796c8dcSSimon Schubert 1876*ef5ccd6cSJohn Marino while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 18775796c8dcSSimon Schubert *--dest = *--source; 18785796c8dcSSimon Schubert 18795796c8dcSSimon Schubert yy_cp += (int) (dest - source); 18805796c8dcSSimon Schubert yy_bp += (int) (dest - source); 1881*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 1882*ef5ccd6cSJohn Marino (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 18835796c8dcSSimon Schubert 1884*ef5ccd6cSJohn Marino if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 18855796c8dcSSimon Schubert YY_FATAL_ERROR( "flex scanner push-back overflow" ); 18865796c8dcSSimon Schubert } 18875796c8dcSSimon Schubert 18885796c8dcSSimon Schubert *--yy_cp = (char) c; 18895796c8dcSSimon Schubert 1890*ef5ccd6cSJohn Marino (yytext_ptr) = yy_bp; 1891*ef5ccd6cSJohn Marino (yy_hold_char) = *yy_cp; 1892*ef5ccd6cSJohn Marino (yy_c_buf_p) = yy_cp; 18935796c8dcSSimon Schubert } 18945796c8dcSSimon Schubert 18955796c8dcSSimon Schubert #ifndef YY_NO_INPUT 18965796c8dcSSimon Schubert #ifdef __cplusplus 1897*ef5ccd6cSJohn Marino static int yyinput (void) 18985796c8dcSSimon Schubert #else 1899*ef5ccd6cSJohn Marino static int input (void) 19005796c8dcSSimon Schubert #endif 1901*ef5ccd6cSJohn Marino 19025796c8dcSSimon Schubert { 19035796c8dcSSimon Schubert int c; 19045796c8dcSSimon Schubert 1905*ef5ccd6cSJohn Marino *(yy_c_buf_p) = (yy_hold_char); 19065796c8dcSSimon Schubert 1907*ef5ccd6cSJohn Marino if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 19085796c8dcSSimon Schubert { 19095796c8dcSSimon Schubert /* yy_c_buf_p now points to the character we want to return. 19105796c8dcSSimon Schubert * If this occurs *before* the EOB characters, then it's a 19115796c8dcSSimon Schubert * valid NUL; if not, then we've hit the end of the buffer. 19125796c8dcSSimon Schubert */ 1913*ef5ccd6cSJohn Marino if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 19145796c8dcSSimon Schubert /* This was really a NUL. */ 1915*ef5ccd6cSJohn Marino *(yy_c_buf_p) = '\0'; 19165796c8dcSSimon Schubert 19175796c8dcSSimon Schubert else 19185796c8dcSSimon Schubert { /* need more input */ 1919*ef5ccd6cSJohn Marino int offset = (yy_c_buf_p) - (yytext_ptr); 1920*ef5ccd6cSJohn Marino ++(yy_c_buf_p); 19215796c8dcSSimon Schubert 19225796c8dcSSimon Schubert switch ( yy_get_next_buffer( ) ) 19235796c8dcSSimon Schubert { 19245796c8dcSSimon Schubert case EOB_ACT_LAST_MATCH: 19255796c8dcSSimon Schubert /* This happens because yy_g_n_b() 19265796c8dcSSimon Schubert * sees that we've accumulated a 19275796c8dcSSimon Schubert * token and flags that we need to 19285796c8dcSSimon Schubert * try matching the token before 19295796c8dcSSimon Schubert * proceeding. But for input(), 19305796c8dcSSimon Schubert * there's no matching to consider. 19315796c8dcSSimon Schubert * So convert the EOB_ACT_LAST_MATCH 19325796c8dcSSimon Schubert * to EOB_ACT_END_OF_FILE. 19335796c8dcSSimon Schubert */ 19345796c8dcSSimon Schubert 19355796c8dcSSimon Schubert /* Reset buffer status. */ 19365796c8dcSSimon Schubert yyrestart(yyin ); 19375796c8dcSSimon Schubert 1938*ef5ccd6cSJohn Marino /*FALLTHROUGH*/ 19395796c8dcSSimon Schubert 19405796c8dcSSimon Schubert case EOB_ACT_END_OF_FILE: 19415796c8dcSSimon Schubert { 19425796c8dcSSimon Schubert if ( yywrap( ) ) 19435796c8dcSSimon Schubert return EOF; 19445796c8dcSSimon Schubert 1945*ef5ccd6cSJohn Marino if ( ! (yy_did_buffer_switch_on_eof) ) 19465796c8dcSSimon Schubert YY_NEW_FILE; 19475796c8dcSSimon Schubert #ifdef __cplusplus 19485796c8dcSSimon Schubert return yyinput(); 19495796c8dcSSimon Schubert #else 19505796c8dcSSimon Schubert return input(); 19515796c8dcSSimon Schubert #endif 19525796c8dcSSimon Schubert } 19535796c8dcSSimon Schubert 19545796c8dcSSimon Schubert case EOB_ACT_CONTINUE_SCAN: 1955*ef5ccd6cSJohn Marino (yy_c_buf_p) = (yytext_ptr) + offset; 19565796c8dcSSimon Schubert break; 19575796c8dcSSimon Schubert } 19585796c8dcSSimon Schubert } 19595796c8dcSSimon Schubert } 19605796c8dcSSimon Schubert 1961*ef5ccd6cSJohn Marino c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1962*ef5ccd6cSJohn Marino *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1963*ef5ccd6cSJohn Marino (yy_hold_char) = *++(yy_c_buf_p); 19645796c8dcSSimon Schubert 19655796c8dcSSimon Schubert return c; 19665796c8dcSSimon Schubert } 1967*ef5ccd6cSJohn Marino #endif /* ifndef YY_NO_INPUT */ 19685796c8dcSSimon Schubert 1969*ef5ccd6cSJohn Marino /** Immediately switch to a different input stream. 1970*ef5ccd6cSJohn Marino * @param input_file A readable stream. 1971*ef5ccd6cSJohn Marino * 1972*ef5ccd6cSJohn Marino * @note This function does not reset the start condition to @c INITIAL . 1973*ef5ccd6cSJohn Marino */ 19745796c8dcSSimon Schubert void yyrestart (FILE * input_file ) 19755796c8dcSSimon Schubert { 19765796c8dcSSimon Schubert 1977*ef5ccd6cSJohn Marino if ( ! YY_CURRENT_BUFFER ){ 1978*ef5ccd6cSJohn Marino yyensure_buffer_stack (); 1979*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = 1980*ef5ccd6cSJohn Marino yy_create_buffer(yyin,YY_BUF_SIZE ); 1981*ef5ccd6cSJohn Marino } 1982*ef5ccd6cSJohn Marino 1983*ef5ccd6cSJohn Marino yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 19845796c8dcSSimon Schubert yy_load_buffer_state( ); 19855796c8dcSSimon Schubert } 19865796c8dcSSimon Schubert 1987*ef5ccd6cSJohn Marino /** Switch to a different input buffer. 1988*ef5ccd6cSJohn Marino * @param new_buffer The new input buffer. 1989*ef5ccd6cSJohn Marino * 1990*ef5ccd6cSJohn Marino */ 19915796c8dcSSimon Schubert void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 19925796c8dcSSimon Schubert { 1993*ef5ccd6cSJohn Marino 1994*ef5ccd6cSJohn Marino /* TODO. We should be able to replace this entire function body 1995*ef5ccd6cSJohn Marino * with 1996*ef5ccd6cSJohn Marino * yypop_buffer_state(); 1997*ef5ccd6cSJohn Marino * yypush_buffer_state(new_buffer); 1998*ef5ccd6cSJohn Marino */ 1999*ef5ccd6cSJohn Marino yyensure_buffer_stack (); 2000*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER == new_buffer ) 20015796c8dcSSimon Schubert return; 20025796c8dcSSimon Schubert 2003*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER ) 20045796c8dcSSimon Schubert { 20055796c8dcSSimon Schubert /* Flush out information for old buffer. */ 2006*ef5ccd6cSJohn Marino *(yy_c_buf_p) = (yy_hold_char); 2007*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 2008*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 20095796c8dcSSimon Schubert } 20105796c8dcSSimon Schubert 2011*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = new_buffer; 20125796c8dcSSimon Schubert yy_load_buffer_state( ); 20135796c8dcSSimon Schubert 20145796c8dcSSimon Schubert /* We don't actually know whether we did this switch during 20155796c8dcSSimon Schubert * EOF (yywrap()) processing, but the only time this flag 20165796c8dcSSimon Schubert * is looked at is after yywrap() is called, so it's safe 20175796c8dcSSimon Schubert * to go ahead and always set it. 20185796c8dcSSimon Schubert */ 2019*ef5ccd6cSJohn Marino (yy_did_buffer_switch_on_eof) = 1; 20205796c8dcSSimon Schubert } 20215796c8dcSSimon Schubert 2022*ef5ccd6cSJohn Marino static void yy_load_buffer_state (void) 20235796c8dcSSimon Schubert { 2024*ef5ccd6cSJohn Marino (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 2025*ef5ccd6cSJohn Marino (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 2026*ef5ccd6cSJohn Marino yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 2027*ef5ccd6cSJohn Marino (yy_hold_char) = *(yy_c_buf_p); 20285796c8dcSSimon Schubert } 20295796c8dcSSimon Schubert 2030*ef5ccd6cSJohn Marino /** Allocate and initialize an input buffer state. 2031*ef5ccd6cSJohn Marino * @param file A readable stream. 2032*ef5ccd6cSJohn Marino * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 2033*ef5ccd6cSJohn Marino * 2034*ef5ccd6cSJohn Marino * @return the allocated buffer state. 2035*ef5ccd6cSJohn Marino */ 20365796c8dcSSimon Schubert YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 20375796c8dcSSimon Schubert { 20385796c8dcSSimon Schubert YY_BUFFER_STATE b; 20395796c8dcSSimon Schubert 2040*ef5ccd6cSJohn Marino b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 20415796c8dcSSimon Schubert if ( ! b ) 20425796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 20435796c8dcSSimon Schubert 20445796c8dcSSimon Schubert b->yy_buf_size = size; 20455796c8dcSSimon Schubert 20465796c8dcSSimon Schubert /* yy_ch_buf has to be 2 characters longer than the size given because 20475796c8dcSSimon Schubert * we need to put in 2 end-of-buffer characters. 20485796c8dcSSimon Schubert */ 2049*ef5ccd6cSJohn Marino b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 20505796c8dcSSimon Schubert if ( ! b->yy_ch_buf ) 20515796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 20525796c8dcSSimon Schubert 20535796c8dcSSimon Schubert b->yy_is_our_buffer = 1; 20545796c8dcSSimon Schubert 20555796c8dcSSimon Schubert yy_init_buffer(b,file ); 20565796c8dcSSimon Schubert 20575796c8dcSSimon Schubert return b; 20585796c8dcSSimon Schubert } 20595796c8dcSSimon Schubert 2060*ef5ccd6cSJohn Marino /** Destroy the buffer. 2061*ef5ccd6cSJohn Marino * @param b a buffer created with yy_create_buffer() 2062*ef5ccd6cSJohn Marino * 2063*ef5ccd6cSJohn Marino */ 20645796c8dcSSimon Schubert void yy_delete_buffer (YY_BUFFER_STATE b ) 20655796c8dcSSimon Schubert { 2066*ef5ccd6cSJohn Marino 20675796c8dcSSimon Schubert if ( ! b ) 20685796c8dcSSimon Schubert return; 20695796c8dcSSimon Schubert 2070*ef5ccd6cSJohn Marino if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 2071*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 20725796c8dcSSimon Schubert 20735796c8dcSSimon Schubert if ( b->yy_is_our_buffer ) 2074*ef5ccd6cSJohn Marino yyfree((void *) b->yy_ch_buf ); 20755796c8dcSSimon Schubert 2076*ef5ccd6cSJohn Marino yyfree((void *) b ); 20775796c8dcSSimon Schubert } 20785796c8dcSSimon Schubert 2079*ef5ccd6cSJohn Marino #ifndef __cplusplus 2080*ef5ccd6cSJohn Marino extern int isatty (int ); 2081*ef5ccd6cSJohn Marino #endif /* __cplusplus */ 20825796c8dcSSimon Schubert 2083*ef5ccd6cSJohn Marino /* Initializes or reinitializes a buffer. 2084*ef5ccd6cSJohn Marino * This function is sometimes called more than once on the same buffer, 2085*ef5ccd6cSJohn Marino * such as during a yyrestart() or at EOF. 2086*ef5ccd6cSJohn Marino */ 2087*ef5ccd6cSJohn Marino static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 20885796c8dcSSimon Schubert 20895796c8dcSSimon Schubert { 2090*ef5ccd6cSJohn Marino int oerrno = errno; 2091*ef5ccd6cSJohn Marino 20925796c8dcSSimon Schubert yy_flush_buffer(b ); 20935796c8dcSSimon Schubert 20945796c8dcSSimon Schubert b->yy_input_file = file; 20955796c8dcSSimon Schubert b->yy_fill_buffer = 1; 20965796c8dcSSimon Schubert 2097*ef5ccd6cSJohn Marino /* If b is the current buffer, then yy_init_buffer was _probably_ 2098*ef5ccd6cSJohn Marino * called from yyrestart() or through yy_get_next_buffer. 2099*ef5ccd6cSJohn Marino * In that case, we don't want to reset the lineno or column. 2100*ef5ccd6cSJohn Marino */ 2101*ef5ccd6cSJohn Marino if (b != YY_CURRENT_BUFFER){ 2102*ef5ccd6cSJohn Marino b->yy_bs_lineno = 1; 2103*ef5ccd6cSJohn Marino b->yy_bs_column = 0; 21045796c8dcSSimon Schubert } 21055796c8dcSSimon Schubert 2106*ef5ccd6cSJohn Marino b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 21075796c8dcSSimon Schubert 2108*ef5ccd6cSJohn Marino errno = oerrno; 2109*ef5ccd6cSJohn Marino } 2110*ef5ccd6cSJohn Marino 2111*ef5ccd6cSJohn Marino /** Discard all buffered characters. On the next scan, YY_INPUT will be called. 2112*ef5ccd6cSJohn Marino * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 2113*ef5ccd6cSJohn Marino * 2114*ef5ccd6cSJohn Marino */ 21155796c8dcSSimon Schubert void yy_flush_buffer (YY_BUFFER_STATE b ) 21165796c8dcSSimon Schubert { 21175796c8dcSSimon Schubert if ( ! b ) 21185796c8dcSSimon Schubert return; 21195796c8dcSSimon Schubert 21205796c8dcSSimon Schubert b->yy_n_chars = 0; 21215796c8dcSSimon Schubert 21225796c8dcSSimon Schubert /* We always need two end-of-buffer characters. The first causes 21235796c8dcSSimon Schubert * a transition to the end-of-buffer state. The second causes 21245796c8dcSSimon Schubert * a jam in that state. 21255796c8dcSSimon Schubert */ 21265796c8dcSSimon Schubert b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 21275796c8dcSSimon Schubert b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 21285796c8dcSSimon Schubert 21295796c8dcSSimon Schubert b->yy_buf_pos = &b->yy_ch_buf[0]; 21305796c8dcSSimon Schubert 21315796c8dcSSimon Schubert b->yy_at_bol = 1; 21325796c8dcSSimon Schubert b->yy_buffer_status = YY_BUFFER_NEW; 21335796c8dcSSimon Schubert 2134*ef5ccd6cSJohn Marino if ( b == YY_CURRENT_BUFFER ) 21355796c8dcSSimon Schubert yy_load_buffer_state( ); 21365796c8dcSSimon Schubert } 21375796c8dcSSimon Schubert 2138*ef5ccd6cSJohn Marino /** Pushes the new state onto the stack. The new state becomes 2139*ef5ccd6cSJohn Marino * the current state. This function will allocate the stack 2140*ef5ccd6cSJohn Marino * if necessary. 2141*ef5ccd6cSJohn Marino * @param new_buffer The new state. 2142*ef5ccd6cSJohn Marino * 2143*ef5ccd6cSJohn Marino */ 2144*ef5ccd6cSJohn Marino void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 2145*ef5ccd6cSJohn Marino { 2146*ef5ccd6cSJohn Marino if (new_buffer == NULL) 2147*ef5ccd6cSJohn Marino return; 21485796c8dcSSimon Schubert 2149*ef5ccd6cSJohn Marino yyensure_buffer_stack(); 2150*ef5ccd6cSJohn Marino 2151*ef5ccd6cSJohn Marino /* This block is copied from yy_switch_to_buffer. */ 2152*ef5ccd6cSJohn Marino if ( YY_CURRENT_BUFFER ) 2153*ef5ccd6cSJohn Marino { 2154*ef5ccd6cSJohn Marino /* Flush out information for old buffer. */ 2155*ef5ccd6cSJohn Marino *(yy_c_buf_p) = (yy_hold_char); 2156*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 2157*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 2158*ef5ccd6cSJohn Marino } 2159*ef5ccd6cSJohn Marino 2160*ef5ccd6cSJohn Marino /* Only push if top exists. Otherwise, replace top. */ 2161*ef5ccd6cSJohn Marino if (YY_CURRENT_BUFFER) 2162*ef5ccd6cSJohn Marino (yy_buffer_stack_top)++; 2163*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = new_buffer; 2164*ef5ccd6cSJohn Marino 2165*ef5ccd6cSJohn Marino /* copied from yy_switch_to_buffer. */ 2166*ef5ccd6cSJohn Marino yy_load_buffer_state( ); 2167*ef5ccd6cSJohn Marino (yy_did_buffer_switch_on_eof) = 1; 2168*ef5ccd6cSJohn Marino } 2169*ef5ccd6cSJohn Marino 2170*ef5ccd6cSJohn Marino /** Removes and deletes the top of the stack, if present. 2171*ef5ccd6cSJohn Marino * The next element becomes the new top. 2172*ef5ccd6cSJohn Marino * 2173*ef5ccd6cSJohn Marino */ 2174*ef5ccd6cSJohn Marino void yypop_buffer_state (void) 2175*ef5ccd6cSJohn Marino { 2176*ef5ccd6cSJohn Marino if (!YY_CURRENT_BUFFER) 2177*ef5ccd6cSJohn Marino return; 2178*ef5ccd6cSJohn Marino 2179*ef5ccd6cSJohn Marino yy_delete_buffer(YY_CURRENT_BUFFER ); 2180*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = NULL; 2181*ef5ccd6cSJohn Marino if ((yy_buffer_stack_top) > 0) 2182*ef5ccd6cSJohn Marino --(yy_buffer_stack_top); 2183*ef5ccd6cSJohn Marino 2184*ef5ccd6cSJohn Marino if (YY_CURRENT_BUFFER) { 2185*ef5ccd6cSJohn Marino yy_load_buffer_state( ); 2186*ef5ccd6cSJohn Marino (yy_did_buffer_switch_on_eof) = 1; 2187*ef5ccd6cSJohn Marino } 2188*ef5ccd6cSJohn Marino } 2189*ef5ccd6cSJohn Marino 2190*ef5ccd6cSJohn Marino /* Allocates the stack if it does not exist. 2191*ef5ccd6cSJohn Marino * Guarantees space for at least one push. 2192*ef5ccd6cSJohn Marino */ 2193*ef5ccd6cSJohn Marino static void yyensure_buffer_stack (void) 2194*ef5ccd6cSJohn Marino { 2195*ef5ccd6cSJohn Marino int num_to_alloc; 2196*ef5ccd6cSJohn Marino 2197*ef5ccd6cSJohn Marino if (!(yy_buffer_stack)) { 2198*ef5ccd6cSJohn Marino 2199*ef5ccd6cSJohn Marino /* First allocation is just for 2 elements, since we don't know if this 2200*ef5ccd6cSJohn Marino * scanner will even need a stack. We use 2 instead of 1 to avoid an 2201*ef5ccd6cSJohn Marino * immediate xrealloc on the next call. 2202*ef5ccd6cSJohn Marino */ 2203*ef5ccd6cSJohn Marino num_to_alloc = 1; 2204*ef5ccd6cSJohn Marino (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 2205*ef5ccd6cSJohn Marino (num_to_alloc * sizeof(struct yy_buffer_state*) 2206*ef5ccd6cSJohn Marino ); 2207*ef5ccd6cSJohn Marino if ( ! (yy_buffer_stack) ) 2208*ef5ccd6cSJohn Marino YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 2209*ef5ccd6cSJohn Marino 2210*ef5ccd6cSJohn Marino memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 2211*ef5ccd6cSJohn Marino 2212*ef5ccd6cSJohn Marino (yy_buffer_stack_max) = num_to_alloc; 2213*ef5ccd6cSJohn Marino (yy_buffer_stack_top) = 0; 2214*ef5ccd6cSJohn Marino return; 2215*ef5ccd6cSJohn Marino } 2216*ef5ccd6cSJohn Marino 2217*ef5ccd6cSJohn Marino if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 2218*ef5ccd6cSJohn Marino 2219*ef5ccd6cSJohn Marino /* Increase the buffer to prepare for a possible push. */ 2220*ef5ccd6cSJohn Marino int grow_size = 8 /* arbitrary grow size */; 2221*ef5ccd6cSJohn Marino 2222*ef5ccd6cSJohn Marino num_to_alloc = (yy_buffer_stack_max) + grow_size; 2223*ef5ccd6cSJohn Marino (yy_buffer_stack) = (struct yy_buffer_state**)yyxrealloc 2224*ef5ccd6cSJohn Marino ((yy_buffer_stack), 2225*ef5ccd6cSJohn Marino num_to_alloc * sizeof(struct yy_buffer_state*) 2226*ef5ccd6cSJohn Marino ); 2227*ef5ccd6cSJohn Marino if ( ! (yy_buffer_stack) ) 2228*ef5ccd6cSJohn Marino YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 2229*ef5ccd6cSJohn Marino 2230*ef5ccd6cSJohn Marino /* zero only the new slots.*/ 2231*ef5ccd6cSJohn Marino memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 2232*ef5ccd6cSJohn Marino (yy_buffer_stack_max) = num_to_alloc; 2233*ef5ccd6cSJohn Marino } 2234*ef5ccd6cSJohn Marino } 2235*ef5ccd6cSJohn Marino 2236*ef5ccd6cSJohn Marino /** Setup the input buffer state to scan directly from a user-specified character buffer. 2237*ef5ccd6cSJohn Marino * @param base the character buffer 2238*ef5ccd6cSJohn Marino * @param size the size in bytes of the character buffer 2239*ef5ccd6cSJohn Marino * 2240*ef5ccd6cSJohn Marino * @return the newly allocated buffer state object. 2241*ef5ccd6cSJohn Marino */ 22425796c8dcSSimon Schubert YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 22435796c8dcSSimon Schubert { 22445796c8dcSSimon Schubert YY_BUFFER_STATE b; 22455796c8dcSSimon Schubert 22465796c8dcSSimon Schubert if ( size < 2 || 22475796c8dcSSimon Schubert base[size-2] != YY_END_OF_BUFFER_CHAR || 22485796c8dcSSimon Schubert base[size-1] != YY_END_OF_BUFFER_CHAR ) 22495796c8dcSSimon Schubert /* They forgot to leave room for the EOB's. */ 22505796c8dcSSimon Schubert return 0; 22515796c8dcSSimon Schubert 2252*ef5ccd6cSJohn Marino b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 22535796c8dcSSimon Schubert if ( ! b ) 22545796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 22555796c8dcSSimon Schubert 22565796c8dcSSimon Schubert b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 22575796c8dcSSimon Schubert b->yy_buf_pos = b->yy_ch_buf = base; 22585796c8dcSSimon Schubert b->yy_is_our_buffer = 0; 22595796c8dcSSimon Schubert b->yy_input_file = 0; 22605796c8dcSSimon Schubert b->yy_n_chars = b->yy_buf_size; 22615796c8dcSSimon Schubert b->yy_is_interactive = 0; 22625796c8dcSSimon Schubert b->yy_at_bol = 1; 22635796c8dcSSimon Schubert b->yy_fill_buffer = 0; 22645796c8dcSSimon Schubert b->yy_buffer_status = YY_BUFFER_NEW; 22655796c8dcSSimon Schubert 22665796c8dcSSimon Schubert yy_switch_to_buffer(b ); 22675796c8dcSSimon Schubert 22685796c8dcSSimon Schubert return b; 22695796c8dcSSimon Schubert } 22705796c8dcSSimon Schubert 2271*ef5ccd6cSJohn Marino /** Setup the input buffer state to scan a string. The next call to yylex() will 2272*ef5ccd6cSJohn Marino * scan from a @e copy of @a str. 2273*ef5ccd6cSJohn Marino * @param yystr a NUL-terminated string to scan 2274*ef5ccd6cSJohn Marino * 2275*ef5ccd6cSJohn Marino * @return the newly allocated buffer state object. 2276*ef5ccd6cSJohn Marino * @note If you want to scan bytes that may contain NUL values, then use 2277*ef5ccd6cSJohn Marino * yy_scan_bytes() instead. 2278*ef5ccd6cSJohn Marino */ 2279*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 22805796c8dcSSimon Schubert { 22815796c8dcSSimon Schubert 2282*ef5ccd6cSJohn Marino return yy_scan_bytes(yystr,strlen(yystr) ); 22835796c8dcSSimon Schubert } 22845796c8dcSSimon Schubert 2285*ef5ccd6cSJohn Marino /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 2286*ef5ccd6cSJohn Marino * scan from a @e copy of @a bytes. 2287*ef5ccd6cSJohn Marino * @param bytes the byte buffer to scan 2288*ef5ccd6cSJohn Marino * @param len the number of bytes in the buffer pointed to by @a bytes. 2289*ef5ccd6cSJohn Marino * 2290*ef5ccd6cSJohn Marino * @return the newly allocated buffer state object. 2291*ef5ccd6cSJohn Marino */ 2292*ef5ccd6cSJohn Marino YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 22935796c8dcSSimon Schubert { 22945796c8dcSSimon Schubert YY_BUFFER_STATE b; 22955796c8dcSSimon Schubert char *buf; 22965796c8dcSSimon Schubert yy_size_t n; 22975796c8dcSSimon Schubert int i; 22985796c8dcSSimon Schubert 22995796c8dcSSimon Schubert /* Get memory for full buffer, including space for trailing EOB's. */ 2300*ef5ccd6cSJohn Marino n = _yybytes_len + 2; 2301*ef5ccd6cSJohn Marino buf = (char *) yyalloc(n ); 23025796c8dcSSimon Schubert if ( ! buf ) 23035796c8dcSSimon Schubert YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 23045796c8dcSSimon Schubert 2305*ef5ccd6cSJohn Marino for ( i = 0; i < _yybytes_len; ++i ) 2306*ef5ccd6cSJohn Marino buf[i] = yybytes[i]; 23075796c8dcSSimon Schubert 2308*ef5ccd6cSJohn Marino buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 23095796c8dcSSimon Schubert 23105796c8dcSSimon Schubert b = yy_scan_buffer(buf,n ); 23115796c8dcSSimon Schubert if ( ! b ) 23125796c8dcSSimon Schubert YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 23135796c8dcSSimon Schubert 23145796c8dcSSimon Schubert /* It's okay to grow etc. this buffer, and we should throw it 23155796c8dcSSimon Schubert * away when we're done. 23165796c8dcSSimon Schubert */ 23175796c8dcSSimon Schubert b->yy_is_our_buffer = 1; 23185796c8dcSSimon Schubert 23195796c8dcSSimon Schubert return b; 23205796c8dcSSimon Schubert } 23215796c8dcSSimon Schubert 23225796c8dcSSimon Schubert #ifndef YY_EXIT_FAILURE 23235796c8dcSSimon Schubert #define YY_EXIT_FAILURE 2 23245796c8dcSSimon Schubert #endif 23255796c8dcSSimon Schubert 2326*ef5ccd6cSJohn Marino static void yy_fatal_error (yyconst char* msg ) 23275796c8dcSSimon Schubert { 23285796c8dcSSimon Schubert (void) fprintf( stderr, "%s\n", msg ); 23295796c8dcSSimon Schubert exit( YY_EXIT_FAILURE ); 23305796c8dcSSimon Schubert } 23315796c8dcSSimon Schubert 23325796c8dcSSimon Schubert /* Redefine yyless() so it works in section 3 code. */ 23335796c8dcSSimon Schubert 23345796c8dcSSimon Schubert #undef yyless 23355796c8dcSSimon Schubert #define yyless(n) \ 23365796c8dcSSimon Schubert do \ 23375796c8dcSSimon Schubert { \ 23385796c8dcSSimon Schubert /* Undo effects of setting up yytext. */ \ 2339*ef5ccd6cSJohn Marino int yyless_macro_arg = (n); \ 2340*ef5ccd6cSJohn Marino YY_LESS_LINENO(yyless_macro_arg);\ 2341*ef5ccd6cSJohn Marino yytext[yyleng] = (yy_hold_char); \ 2342*ef5ccd6cSJohn Marino (yy_c_buf_p) = yytext + yyless_macro_arg; \ 2343*ef5ccd6cSJohn Marino (yy_hold_char) = *(yy_c_buf_p); \ 2344*ef5ccd6cSJohn Marino *(yy_c_buf_p) = '\0'; \ 2345*ef5ccd6cSJohn Marino yyleng = yyless_macro_arg; \ 23465796c8dcSSimon Schubert } \ 23475796c8dcSSimon Schubert while ( 0 ) 23485796c8dcSSimon Schubert 2349*ef5ccd6cSJohn Marino /* Accessor methods (get/set functions) to struct members. */ 23505796c8dcSSimon Schubert 2351*ef5ccd6cSJohn Marino /** Get the current line number. 2352*ef5ccd6cSJohn Marino * 2353*ef5ccd6cSJohn Marino */ 2354*ef5ccd6cSJohn Marino int yyget_lineno (void) 2355*ef5ccd6cSJohn Marino { 2356*ef5ccd6cSJohn Marino 2357*ef5ccd6cSJohn Marino return yylineno; 2358*ef5ccd6cSJohn Marino } 2359*ef5ccd6cSJohn Marino 2360*ef5ccd6cSJohn Marino /** Get the input stream. 2361*ef5ccd6cSJohn Marino * 2362*ef5ccd6cSJohn Marino */ 2363*ef5ccd6cSJohn Marino FILE *yyget_in (void) 2364*ef5ccd6cSJohn Marino { 2365*ef5ccd6cSJohn Marino return yyin; 2366*ef5ccd6cSJohn Marino } 2367*ef5ccd6cSJohn Marino 2368*ef5ccd6cSJohn Marino /** Get the output stream. 2369*ef5ccd6cSJohn Marino * 2370*ef5ccd6cSJohn Marino */ 2371*ef5ccd6cSJohn Marino FILE *yyget_out (void) 2372*ef5ccd6cSJohn Marino { 2373*ef5ccd6cSJohn Marino return yyout; 2374*ef5ccd6cSJohn Marino } 2375*ef5ccd6cSJohn Marino 2376*ef5ccd6cSJohn Marino /** Get the length of the current token. 2377*ef5ccd6cSJohn Marino * 2378*ef5ccd6cSJohn Marino */ 2379*ef5ccd6cSJohn Marino int yyget_leng (void) 2380*ef5ccd6cSJohn Marino { 2381*ef5ccd6cSJohn Marino return yyleng; 2382*ef5ccd6cSJohn Marino } 2383*ef5ccd6cSJohn Marino 2384*ef5ccd6cSJohn Marino /** Get the current token. 2385*ef5ccd6cSJohn Marino * 2386*ef5ccd6cSJohn Marino */ 2387*ef5ccd6cSJohn Marino 2388*ef5ccd6cSJohn Marino char *yyget_text (void) 2389*ef5ccd6cSJohn Marino { 2390*ef5ccd6cSJohn Marino return yytext; 2391*ef5ccd6cSJohn Marino } 2392*ef5ccd6cSJohn Marino 2393*ef5ccd6cSJohn Marino /** Set the current line number. 2394*ef5ccd6cSJohn Marino * @param line_number 2395*ef5ccd6cSJohn Marino * 2396*ef5ccd6cSJohn Marino */ 2397*ef5ccd6cSJohn Marino void yyset_lineno (int line_number ) 2398*ef5ccd6cSJohn Marino { 2399*ef5ccd6cSJohn Marino 2400*ef5ccd6cSJohn Marino yylineno = line_number; 2401*ef5ccd6cSJohn Marino } 2402*ef5ccd6cSJohn Marino 2403*ef5ccd6cSJohn Marino /** Set the input stream. This does not discard the current 2404*ef5ccd6cSJohn Marino * input buffer. 2405*ef5ccd6cSJohn Marino * @param in_str A readable stream. 2406*ef5ccd6cSJohn Marino * 2407*ef5ccd6cSJohn Marino * @see yy_switch_to_buffer 2408*ef5ccd6cSJohn Marino */ 2409*ef5ccd6cSJohn Marino void yyset_in (FILE * in_str ) 2410*ef5ccd6cSJohn Marino { 2411*ef5ccd6cSJohn Marino yyin = in_str ; 2412*ef5ccd6cSJohn Marino } 2413*ef5ccd6cSJohn Marino 2414*ef5ccd6cSJohn Marino void yyset_out (FILE * out_str ) 2415*ef5ccd6cSJohn Marino { 2416*ef5ccd6cSJohn Marino yyout = out_str ; 2417*ef5ccd6cSJohn Marino } 2418*ef5ccd6cSJohn Marino 2419*ef5ccd6cSJohn Marino int yyget_debug (void) 2420*ef5ccd6cSJohn Marino { 2421*ef5ccd6cSJohn Marino return yy_flex_debug; 2422*ef5ccd6cSJohn Marino } 2423*ef5ccd6cSJohn Marino 2424*ef5ccd6cSJohn Marino void yyset_debug (int bdebug ) 2425*ef5ccd6cSJohn Marino { 2426*ef5ccd6cSJohn Marino yy_flex_debug = bdebug ; 2427*ef5ccd6cSJohn Marino } 2428*ef5ccd6cSJohn Marino 2429*ef5ccd6cSJohn Marino static int yy_init_globals (void) 2430*ef5ccd6cSJohn Marino { 2431*ef5ccd6cSJohn Marino /* Initialization is the same as for the non-reentrant scanner. 2432*ef5ccd6cSJohn Marino * This function is called from yylex_destroy(), so don't allocate here. 2433*ef5ccd6cSJohn Marino */ 2434*ef5ccd6cSJohn Marino 2435*ef5ccd6cSJohn Marino (yy_buffer_stack) = 0; 2436*ef5ccd6cSJohn Marino (yy_buffer_stack_top) = 0; 2437*ef5ccd6cSJohn Marino (yy_buffer_stack_max) = 0; 2438*ef5ccd6cSJohn Marino (yy_c_buf_p) = (char *) 0; 2439*ef5ccd6cSJohn Marino (yy_init) = 0; 2440*ef5ccd6cSJohn Marino (yy_start) = 0; 2441*ef5ccd6cSJohn Marino 2442*ef5ccd6cSJohn Marino /* Defined in main.c */ 2443*ef5ccd6cSJohn Marino #ifdef YY_STDINIT 2444*ef5ccd6cSJohn Marino yyin = stdin; 2445*ef5ccd6cSJohn Marino yyout = stdout; 2446*ef5ccd6cSJohn Marino #else 2447*ef5ccd6cSJohn Marino yyin = (FILE *) 0; 2448*ef5ccd6cSJohn Marino yyout = (FILE *) 0; 2449*ef5ccd6cSJohn Marino #endif 2450*ef5ccd6cSJohn Marino 2451*ef5ccd6cSJohn Marino /* For future reference: Set errno on error, since we are called by 2452*ef5ccd6cSJohn Marino * yylex_init() 2453*ef5ccd6cSJohn Marino */ 2454*ef5ccd6cSJohn Marino return 0; 2455*ef5ccd6cSJohn Marino } 2456*ef5ccd6cSJohn Marino 2457*ef5ccd6cSJohn Marino /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 2458*ef5ccd6cSJohn Marino int yylex_destroy (void) 2459*ef5ccd6cSJohn Marino { 2460*ef5ccd6cSJohn Marino 2461*ef5ccd6cSJohn Marino /* Pop the buffer stack, destroying each element. */ 2462*ef5ccd6cSJohn Marino while(YY_CURRENT_BUFFER){ 2463*ef5ccd6cSJohn Marino yy_delete_buffer(YY_CURRENT_BUFFER ); 2464*ef5ccd6cSJohn Marino YY_CURRENT_BUFFER_LVALUE = NULL; 2465*ef5ccd6cSJohn Marino yypop_buffer_state(); 2466*ef5ccd6cSJohn Marino } 2467*ef5ccd6cSJohn Marino 2468*ef5ccd6cSJohn Marino /* Destroy the stack itself. */ 2469*ef5ccd6cSJohn Marino yyfree((yy_buffer_stack) ); 2470*ef5ccd6cSJohn Marino (yy_buffer_stack) = NULL; 2471*ef5ccd6cSJohn Marino 2472*ef5ccd6cSJohn Marino /* Reset the globals. This is important in a non-reentrant scanner so the next time 2473*ef5ccd6cSJohn Marino * yylex() is called, initialization will occur. */ 2474*ef5ccd6cSJohn Marino yy_init_globals( ); 2475*ef5ccd6cSJohn Marino 2476*ef5ccd6cSJohn Marino return 0; 2477*ef5ccd6cSJohn Marino } 2478*ef5ccd6cSJohn Marino 2479*ef5ccd6cSJohn Marino /* 2480*ef5ccd6cSJohn Marino * Internal utility routines. 2481*ef5ccd6cSJohn Marino */ 24825796c8dcSSimon Schubert 24835796c8dcSSimon Schubert #ifndef yytext_ptr 24845796c8dcSSimon Schubert static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 24855796c8dcSSimon Schubert { 24865796c8dcSSimon Schubert register int i; 24875796c8dcSSimon Schubert for ( i = 0; i < n; ++i ) 24885796c8dcSSimon Schubert s1[i] = s2[i]; 24895796c8dcSSimon Schubert } 24905796c8dcSSimon Schubert #endif 24915796c8dcSSimon Schubert 24925796c8dcSSimon Schubert #ifdef YY_NEED_STRLEN 24935796c8dcSSimon Schubert static int yy_flex_strlen (yyconst char * s ) 24945796c8dcSSimon Schubert { 24955796c8dcSSimon Schubert register int n; 24965796c8dcSSimon Schubert for ( n = 0; s[n]; ++n ) 24975796c8dcSSimon Schubert ; 24985796c8dcSSimon Schubert 24995796c8dcSSimon Schubert return n; 25005796c8dcSSimon Schubert } 25015796c8dcSSimon Schubert #endif 25025796c8dcSSimon Schubert 2503*ef5ccd6cSJohn Marino void *yyalloc (yy_size_t size ) 25045796c8dcSSimon Schubert { 25055796c8dcSSimon Schubert return (void *) xmalloc( size ); 25065796c8dcSSimon Schubert } 25075796c8dcSSimon Schubert 2508*ef5ccd6cSJohn Marino void *yyxrealloc (void * ptr, yy_size_t size ) 25095796c8dcSSimon Schubert { 25105796c8dcSSimon Schubert /* The cast to (char *) in the following accommodates both 25115796c8dcSSimon Schubert * implementations that use char* generic pointers, and those 25125796c8dcSSimon Schubert * that use void* generic pointers. It works with the latter 25135796c8dcSSimon Schubert * because both ANSI C and C++ allow castless assignment from 25145796c8dcSSimon Schubert * any pointer type to void*, and deal with argument conversions 25155796c8dcSSimon Schubert * as though doing an assignment. 25165796c8dcSSimon Schubert */ 25175796c8dcSSimon Schubert return (void *) xrealloc( (char *) ptr, size ); 25185796c8dcSSimon Schubert } 25195796c8dcSSimon Schubert 2520*ef5ccd6cSJohn Marino void yyfree (void * ptr ) 25215796c8dcSSimon Schubert { 2522*ef5ccd6cSJohn Marino xfree( (char *) ptr ); /* see yyxrealloc() for (char *) cast */ 25235796c8dcSSimon Schubert } 25245796c8dcSSimon Schubert 2525*ef5ccd6cSJohn Marino #define YYTABLES_NAME "yytables" 2526*ef5ccd6cSJohn Marino 2527*ef5ccd6cSJohn Marino #line 288 "ada-lex.l" 2528*ef5ccd6cSJohn Marino 25295796c8dcSSimon Schubert 25305796c8dcSSimon Schubert 25315796c8dcSSimon Schubert #include <ctype.h> 25325796c8dcSSimon Schubert #include "gdb_string.h" 25335796c8dcSSimon Schubert 25345796c8dcSSimon Schubert /* Initialize the lexer for processing new expression. */ 25355796c8dcSSimon Schubert 2536*ef5ccd6cSJohn Marino static void 25375796c8dcSSimon Schubert lexer_init (FILE *inp) 25385796c8dcSSimon Schubert { 25395796c8dcSSimon Schubert BEGIN INITIAL; 25405796c8dcSSimon Schubert yyrestart (inp); 25415796c8dcSSimon Schubert } 25425796c8dcSSimon Schubert 25435796c8dcSSimon Schubert 25445796c8dcSSimon Schubert /* Copy S2 to S1, removing all underscores, and downcasing all letters. */ 25455796c8dcSSimon Schubert 25465796c8dcSSimon Schubert static void 25475796c8dcSSimon Schubert canonicalizeNumeral (char *s1, const char *s2) 25485796c8dcSSimon Schubert { 25495796c8dcSSimon Schubert for (; *s2 != '\000'; s2 += 1) 25505796c8dcSSimon Schubert { 25515796c8dcSSimon Schubert if (*s2 != '_') 25525796c8dcSSimon Schubert { 25535796c8dcSSimon Schubert *s1 = tolower(*s2); 25545796c8dcSSimon Schubert s1 += 1; 25555796c8dcSSimon Schubert } 25565796c8dcSSimon Schubert } 25575796c8dcSSimon Schubert s1[0] = '\000'; 25585796c8dcSSimon Schubert } 25595796c8dcSSimon Schubert 25605796c8dcSSimon Schubert /* Interprets the prefix of NUM that consists of digits of the given BASE 25615796c8dcSSimon Schubert as an integer of that BASE, with the string EXP as an exponent. 25625796c8dcSSimon Schubert Puts value in yylval, and returns INT, if the string is valid. Causes 25635796c8dcSSimon Schubert an error if the number is improperly formated. BASE, if NULL, defaults 25645796c8dcSSimon Schubert to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. 25655796c8dcSSimon Schubert */ 25665796c8dcSSimon Schubert 25675796c8dcSSimon Schubert static int 25685796c8dcSSimon Schubert processInt (const char *base0, const char *num0, const char *exp0) 25695796c8dcSSimon Schubert { 25705796c8dcSSimon Schubert ULONGEST result; 25715796c8dcSSimon Schubert long exp; 25725796c8dcSSimon Schubert int base; 25735796c8dcSSimon Schubert 25745796c8dcSSimon Schubert char *trailer; 25755796c8dcSSimon Schubert 25765796c8dcSSimon Schubert if (base0 == NULL) 25775796c8dcSSimon Schubert base = 10; 25785796c8dcSSimon Schubert else 25795796c8dcSSimon Schubert { 25805796c8dcSSimon Schubert base = strtol (base0, (char **) NULL, 10); 25815796c8dcSSimon Schubert if (base < 2 || base > 16) 25825796c8dcSSimon Schubert error (_("Invalid base: %d."), base); 25835796c8dcSSimon Schubert } 25845796c8dcSSimon Schubert 25855796c8dcSSimon Schubert if (exp0 == NULL) 25865796c8dcSSimon Schubert exp = 0; 25875796c8dcSSimon Schubert else 25885796c8dcSSimon Schubert exp = strtol(exp0, (char **) NULL, 10); 25895796c8dcSSimon Schubert 25905796c8dcSSimon Schubert errno = 0; 25915796c8dcSSimon Schubert result = strtoulst (num0, (const char **) &trailer, base); 25925796c8dcSSimon Schubert if (errno == ERANGE) 25935796c8dcSSimon Schubert error (_("Integer literal out of range")); 25945796c8dcSSimon Schubert if (isxdigit(*trailer)) 25955796c8dcSSimon Schubert error (_("Invalid digit `%c' in based literal"), *trailer); 25965796c8dcSSimon Schubert 25975796c8dcSSimon Schubert while (exp > 0) 25985796c8dcSSimon Schubert { 25995796c8dcSSimon Schubert if (result > (ULONG_MAX / base)) 26005796c8dcSSimon Schubert error (_("Integer literal out of range")); 26015796c8dcSSimon Schubert result *= base; 26025796c8dcSSimon Schubert exp -= 1; 26035796c8dcSSimon Schubert } 26045796c8dcSSimon Schubert 26055796c8dcSSimon Schubert if ((result >> (gdbarch_int_bit (parse_gdbarch)-1)) == 0) 26065796c8dcSSimon Schubert yylval.typed_val.type = type_int (); 26075796c8dcSSimon Schubert else if ((result >> (gdbarch_long_bit (parse_gdbarch)-1)) == 0) 26085796c8dcSSimon Schubert yylval.typed_val.type = type_long (); 26095796c8dcSSimon Schubert else if (((result >> (gdbarch_long_bit (parse_gdbarch)-1)) >> 1) == 0) 26105796c8dcSSimon Schubert { 26115796c8dcSSimon Schubert /* We have a number representable as an unsigned integer quantity. 26125796c8dcSSimon Schubert For consistency with the C treatment, we will treat it as an 26135796c8dcSSimon Schubert anonymous modular (unsigned) quantity. Alas, the types are such 26145796c8dcSSimon Schubert that we need to store .val as a signed quantity. Sorry 26155796c8dcSSimon Schubert for the mess, but C doesn't officially guarantee that a simple 26165796c8dcSSimon Schubert assignment does the trick (no, it doesn't; read the reference manual). 26175796c8dcSSimon Schubert */ 26185796c8dcSSimon Schubert yylval.typed_val.type 26195796c8dcSSimon Schubert = builtin_type (parse_gdbarch)->builtin_unsigned_long; 26205796c8dcSSimon Schubert if (result & LONGEST_SIGN) 26215796c8dcSSimon Schubert yylval.typed_val.val = 26225796c8dcSSimon Schubert (LONGEST) (result & ~LONGEST_SIGN) 26235796c8dcSSimon Schubert - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1); 26245796c8dcSSimon Schubert else 26255796c8dcSSimon Schubert yylval.typed_val.val = (LONGEST) result; 26265796c8dcSSimon Schubert return INT; 26275796c8dcSSimon Schubert } 26285796c8dcSSimon Schubert else 26295796c8dcSSimon Schubert yylval.typed_val.type = type_long_long (); 26305796c8dcSSimon Schubert 26315796c8dcSSimon Schubert yylval.typed_val.val = (LONGEST) result; 26325796c8dcSSimon Schubert return INT; 26335796c8dcSSimon Schubert } 26345796c8dcSSimon Schubert 26355796c8dcSSimon Schubert static int 26365796c8dcSSimon Schubert processReal (const char *num0) 26375796c8dcSSimon Schubert { 26385796c8dcSSimon Schubert sscanf (num0, "%" DOUBLEST_SCAN_FORMAT, &yylval.typed_val_float.dval); 26395796c8dcSSimon Schubert 26405796c8dcSSimon Schubert yylval.typed_val_float.type = type_float (); 26415796c8dcSSimon Schubert if (sizeof(DOUBLEST) >= gdbarch_double_bit (parse_gdbarch) 26425796c8dcSSimon Schubert / TARGET_CHAR_BIT) 26435796c8dcSSimon Schubert yylval.typed_val_float.type = type_double (); 26445796c8dcSSimon Schubert if (sizeof(DOUBLEST) >= gdbarch_long_double_bit (parse_gdbarch) 26455796c8dcSSimon Schubert / TARGET_CHAR_BIT) 26465796c8dcSSimon Schubert yylval.typed_val_float.type = type_long_double (); 26475796c8dcSSimon Schubert 26485796c8dcSSimon Schubert return FLOAT; 26495796c8dcSSimon Schubert } 26505796c8dcSSimon Schubert 26515796c8dcSSimon Schubert 26525796c8dcSSimon Schubert /* Store a canonicalized version of NAME0[0..LEN-1] in yylval.ssym. The 2653*ef5ccd6cSJohn Marino resulting string is valid until the next call to ada_parse. If 2654*ef5ccd6cSJohn Marino NAME0 contains the substring "___", it is assumed to be already 2655*ef5ccd6cSJohn Marino encoded and the resulting name is equal to it. Otherwise, it differs 26565796c8dcSSimon Schubert from NAME0 in that: 26575796c8dcSSimon Schubert + Characters between '...' or <...> are transfered verbatim to 26585796c8dcSSimon Schubert yylval.ssym. 26595796c8dcSSimon Schubert + <, >, and trailing "'" characters in quoted sequences are removed 26605796c8dcSSimon Schubert (a leading quote is preserved to indicate that the name is not to be 26615796c8dcSSimon Schubert GNAT-encoded). 26625796c8dcSSimon Schubert + Unquoted whitespace is removed. 26635796c8dcSSimon Schubert + Unquoted alphabetic characters are mapped to lower case. 26645796c8dcSSimon Schubert Result is returned as a struct stoken, but for convenience, the string 26655796c8dcSSimon Schubert is also null-terminated. Result string valid until the next call of 26665796c8dcSSimon Schubert ada_parse. 26675796c8dcSSimon Schubert */ 26685796c8dcSSimon Schubert static struct stoken 26695796c8dcSSimon Schubert processId (const char *name0, int len) 26705796c8dcSSimon Schubert { 26715796c8dcSSimon Schubert char *name = obstack_alloc (&temp_parse_space, len + 11); 26725796c8dcSSimon Schubert int i0, i; 26735796c8dcSSimon Schubert struct stoken result; 26745796c8dcSSimon Schubert 2675*ef5ccd6cSJohn Marino result.ptr = name; 26765796c8dcSSimon Schubert while (len > 0 && isspace (name0[len-1])) 26775796c8dcSSimon Schubert len -= 1; 2678*ef5ccd6cSJohn Marino 2679*ef5ccd6cSJohn Marino if (strstr (name0, "___") != NULL) 2680*ef5ccd6cSJohn Marino { 2681*ef5ccd6cSJohn Marino strncpy (name, name0, len); 2682*ef5ccd6cSJohn Marino name[len] = '\000'; 2683*ef5ccd6cSJohn Marino result.length = len; 2684*ef5ccd6cSJohn Marino return result; 2685*ef5ccd6cSJohn Marino } 2686*ef5ccd6cSJohn Marino 26875796c8dcSSimon Schubert i = i0 = 0; 26885796c8dcSSimon Schubert while (i0 < len) 26895796c8dcSSimon Schubert { 26905796c8dcSSimon Schubert if (isalnum (name0[i0])) 26915796c8dcSSimon Schubert { 26925796c8dcSSimon Schubert name[i] = tolower (name0[i0]); 26935796c8dcSSimon Schubert i += 1; i0 += 1; 26945796c8dcSSimon Schubert } 26955796c8dcSSimon Schubert else switch (name0[i0]) 26965796c8dcSSimon Schubert { 26975796c8dcSSimon Schubert default: 26985796c8dcSSimon Schubert name[i] = name0[i0]; 26995796c8dcSSimon Schubert i += 1; i0 += 1; 27005796c8dcSSimon Schubert break; 27015796c8dcSSimon Schubert case ' ': case '\t': 27025796c8dcSSimon Schubert i0 += 1; 27035796c8dcSSimon Schubert break; 27045796c8dcSSimon Schubert case '\'': 27055796c8dcSSimon Schubert do 27065796c8dcSSimon Schubert { 27075796c8dcSSimon Schubert name[i] = name0[i0]; 27085796c8dcSSimon Schubert i += 1; i0 += 1; 27095796c8dcSSimon Schubert } 27105796c8dcSSimon Schubert while (i0 < len && name0[i0] != '\''); 27115796c8dcSSimon Schubert i0 += 1; 27125796c8dcSSimon Schubert break; 27135796c8dcSSimon Schubert case '<': 27145796c8dcSSimon Schubert i0 += 1; 27155796c8dcSSimon Schubert while (i0 < len && name0[i0] != '>') 27165796c8dcSSimon Schubert { 27175796c8dcSSimon Schubert name[i] = name0[i0]; 27185796c8dcSSimon Schubert i += 1; i0 += 1; 27195796c8dcSSimon Schubert } 27205796c8dcSSimon Schubert i0 += 1; 27215796c8dcSSimon Schubert break; 27225796c8dcSSimon Schubert } 27235796c8dcSSimon Schubert } 27245796c8dcSSimon Schubert name[i] = '\000'; 27255796c8dcSSimon Schubert 27265796c8dcSSimon Schubert result.length = i; 27275796c8dcSSimon Schubert return result; 27285796c8dcSSimon Schubert } 27295796c8dcSSimon Schubert 27305796c8dcSSimon Schubert /* Return TEXT[0..LEN-1], a string literal without surrounding quotes, 27315796c8dcSSimon Schubert with special hex character notations replaced with characters. 27325796c8dcSSimon Schubert Result valid until the next call to ada_parse. */ 27335796c8dcSSimon Schubert 27345796c8dcSSimon Schubert static struct stoken 27355796c8dcSSimon Schubert processString (const char *text, int len) 27365796c8dcSSimon Schubert { 27375796c8dcSSimon Schubert const char *p; 27385796c8dcSSimon Schubert char *q; 27395796c8dcSSimon Schubert const char *lim = text + len; 27405796c8dcSSimon Schubert struct stoken result; 27415796c8dcSSimon Schubert 27425796c8dcSSimon Schubert q = result.ptr = obstack_alloc (&temp_parse_space, len); 27435796c8dcSSimon Schubert p = text; 27445796c8dcSSimon Schubert while (p < lim) 27455796c8dcSSimon Schubert { 27465796c8dcSSimon Schubert if (p[0] == '[' && p[1] == '"' && p+2 < lim) 27475796c8dcSSimon Schubert { 27485796c8dcSSimon Schubert if (p[2] == '"') /* "...["""]... */ 27495796c8dcSSimon Schubert { 27505796c8dcSSimon Schubert *q = '"'; 27515796c8dcSSimon Schubert p += 4; 27525796c8dcSSimon Schubert } 27535796c8dcSSimon Schubert else 27545796c8dcSSimon Schubert { 27555796c8dcSSimon Schubert int chr; 27565796c8dcSSimon Schubert sscanf (p+2, "%2x", &chr); 27575796c8dcSSimon Schubert *q = (char) chr; 27585796c8dcSSimon Schubert p += 5; 27595796c8dcSSimon Schubert } 27605796c8dcSSimon Schubert } 27615796c8dcSSimon Schubert else 27625796c8dcSSimon Schubert *q = *p; 27635796c8dcSSimon Schubert q += 1; 27645796c8dcSSimon Schubert p += 1; 27655796c8dcSSimon Schubert } 27665796c8dcSSimon Schubert result.length = q - result.ptr; 27675796c8dcSSimon Schubert return result; 27685796c8dcSSimon Schubert } 27695796c8dcSSimon Schubert 27705796c8dcSSimon Schubert /* Returns the position within STR of the '.' in a 27715796c8dcSSimon Schubert '.{WHITE}*all' component of a dotted name, or -1 if there is none. 27725796c8dcSSimon Schubert Note: we actually don't need this routine, since 'all' can never be an 27735796c8dcSSimon Schubert Ada identifier. Thus, looking up foo.all or foo.all.x as a name 27745796c8dcSSimon Schubert must fail, and will eventually be interpreted as (foo).all or 27755796c8dcSSimon Schubert (foo).all.x. However, this does avoid an extraneous lookup. */ 27765796c8dcSSimon Schubert 27775796c8dcSSimon Schubert static int 27785796c8dcSSimon Schubert find_dot_all (const char *str) 27795796c8dcSSimon Schubert { 27805796c8dcSSimon Schubert int i; 27815796c8dcSSimon Schubert for (i = 0; str[i] != '\000'; i += 1) 27825796c8dcSSimon Schubert { 27835796c8dcSSimon Schubert if (str[i] == '.') 27845796c8dcSSimon Schubert { 27855796c8dcSSimon Schubert int i0 = i; 27865796c8dcSSimon Schubert do 27875796c8dcSSimon Schubert i += 1; 27885796c8dcSSimon Schubert while (isspace (str[i])); 27895796c8dcSSimon Schubert if (strncmp (str+i, "all", 3) == 0 27905796c8dcSSimon Schubert && ! isalnum (str[i+3]) && str[i+3] != '_') 27915796c8dcSSimon Schubert return i0; 27925796c8dcSSimon Schubert } 27935796c8dcSSimon Schubert } 27945796c8dcSSimon Schubert return -1; 27955796c8dcSSimon Schubert } 27965796c8dcSSimon Schubert 27975796c8dcSSimon Schubert /* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring 27985796c8dcSSimon Schubert case. */ 27995796c8dcSSimon Schubert 28005796c8dcSSimon Schubert static int 28015796c8dcSSimon Schubert subseqMatch (const char *subseq, const char *str) 28025796c8dcSSimon Schubert { 28035796c8dcSSimon Schubert if (subseq[0] == '\0') 28045796c8dcSSimon Schubert return 1; 28055796c8dcSSimon Schubert else if (str[0] == '\0') 28065796c8dcSSimon Schubert return 0; 28075796c8dcSSimon Schubert else if (tolower (subseq[0]) == tolower (str[0])) 28085796c8dcSSimon Schubert return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1); 28095796c8dcSSimon Schubert else 28105796c8dcSSimon Schubert return subseqMatch (subseq, str+1); 28115796c8dcSSimon Schubert } 28125796c8dcSSimon Schubert 28135796c8dcSSimon Schubert 28145796c8dcSSimon Schubert static struct { const char *name; int code; } 28155796c8dcSSimon Schubert attributes[] = { 28165796c8dcSSimon Schubert { "address", TICK_ADDRESS }, 28175796c8dcSSimon Schubert { "unchecked_access", TICK_ACCESS }, 28185796c8dcSSimon Schubert { "unrestricted_access", TICK_ACCESS }, 28195796c8dcSSimon Schubert { "access", TICK_ACCESS }, 28205796c8dcSSimon Schubert { "first", TICK_FIRST }, 28215796c8dcSSimon Schubert { "last", TICK_LAST }, 28225796c8dcSSimon Schubert { "length", TICK_LENGTH }, 28235796c8dcSSimon Schubert { "max", TICK_MAX }, 28245796c8dcSSimon Schubert { "min", TICK_MIN }, 28255796c8dcSSimon Schubert { "modulus", TICK_MODULUS }, 28265796c8dcSSimon Schubert { "pos", TICK_POS }, 28275796c8dcSSimon Schubert { "range", TICK_RANGE }, 28285796c8dcSSimon Schubert { "size", TICK_SIZE }, 28295796c8dcSSimon Schubert { "tag", TICK_TAG }, 28305796c8dcSSimon Schubert { "val", TICK_VAL }, 28315796c8dcSSimon Schubert { NULL, -1 } 28325796c8dcSSimon Schubert }; 28335796c8dcSSimon Schubert 28345796c8dcSSimon Schubert /* Return the syntactic code corresponding to the attribute name or 28355796c8dcSSimon Schubert abbreviation STR. */ 28365796c8dcSSimon Schubert 28375796c8dcSSimon Schubert static int 28385796c8dcSSimon Schubert processAttribute (const char *str) 28395796c8dcSSimon Schubert { 28405796c8dcSSimon Schubert int i, k; 28415796c8dcSSimon Schubert 28425796c8dcSSimon Schubert for (i = 0; attributes[i].code != -1; i += 1) 28435796c8dcSSimon Schubert if (strcasecmp (str, attributes[i].name) == 0) 28445796c8dcSSimon Schubert return attributes[i].code; 28455796c8dcSSimon Schubert 28465796c8dcSSimon Schubert for (i = 0, k = -1; attributes[i].code != -1; i += 1) 28475796c8dcSSimon Schubert if (subseqMatch (str, attributes[i].name)) 28485796c8dcSSimon Schubert { 28495796c8dcSSimon Schubert if (k == -1) 28505796c8dcSSimon Schubert k = i; 28515796c8dcSSimon Schubert else 28525796c8dcSSimon Schubert error (_("ambiguous attribute name: `%s'"), str); 28535796c8dcSSimon Schubert } 28545796c8dcSSimon Schubert if (k == -1) 28555796c8dcSSimon Schubert error (_("unrecognized attribute: `%s'"), str); 28565796c8dcSSimon Schubert 28575796c8dcSSimon Schubert return attributes[k].code; 28585796c8dcSSimon Schubert } 28595796c8dcSSimon Schubert 2860*ef5ccd6cSJohn Marino /* Back up lexptr by yyleng and then to the rightmost occurrence of 2861*ef5ccd6cSJohn Marino character CH, case-folded (there must be one). WARNING: since 2862*ef5ccd6cSJohn Marino lexptr points to the next input character that Flex has not yet 2863*ef5ccd6cSJohn Marino transferred to its internal buffer, the use of this function 2864*ef5ccd6cSJohn Marino depends on the assumption that Flex calls YY_INPUT only when it is 2865*ef5ccd6cSJohn Marino logically necessary to do so (thus, there is no reading ahead 2866*ef5ccd6cSJohn Marino farther than needed to identify the next token.) */ 2867*ef5ccd6cSJohn Marino 2868*ef5ccd6cSJohn Marino static void 2869*ef5ccd6cSJohn Marino rewind_to_char (int ch) 2870*ef5ccd6cSJohn Marino { 2871*ef5ccd6cSJohn Marino lexptr -= yyleng; 2872*ef5ccd6cSJohn Marino while (toupper (*lexptr) != toupper (ch)) 2873*ef5ccd6cSJohn Marino lexptr -= 1; 2874*ef5ccd6cSJohn Marino yyrestart (NULL); 2875*ef5ccd6cSJohn Marino } 2876*ef5ccd6cSJohn Marino 28775796c8dcSSimon Schubert int 28785796c8dcSSimon Schubert yywrap(void) 28795796c8dcSSimon Schubert { 28805796c8dcSSimon Schubert return 1; 28815796c8dcSSimon Schubert } 28825796c8dcSSimon Schubert 28835796c8dcSSimon Schubert /* Dummy definition to suppress warnings about unused static definitions. */ 28845796c8dcSSimon Schubert typedef void (*dummy_function) (); 28855796c8dcSSimon Schubert dummy_function ada_flex_use[] = 28865796c8dcSSimon Schubert { 28875796c8dcSSimon Schubert (dummy_function) yyunput 28885796c8dcSSimon Schubert }; 2889*ef5ccd6cSJohn Marino 2890