X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/4c9cb9b99991c36920bd17e366e2128d1b22eb6e..4d534c82fb65897999ade6867534ab952a9bc019:/src/lexer.c diff --git a/src/lexer.c b/src/lexer.c index 1e4dccb..1baa95b 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1,32 +1,85 @@ -/* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - */ +#line 3 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ #include +#include +#include +#include +/* end standard C headers. */ -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) #endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) #endif +#endif /* ! FLEXINT_H */ #ifdef __cplusplus -#include -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST @@ -34,34 +87,17 @@ #if __STDC__ -#define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -76,71 +112,71 @@ * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN yy_start = 1 + 2 * +#define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START ((yy_start - 1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) +#define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif extern int yyleng; + extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) +#define unput(c) yyunput( c, (yytext_ptr) ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ -typedef unsigned int yy_size_t; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -177,12 +213,16 @@ struct yy_buffer_state */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; + #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -196,23 +236,33 @@ struct yy_buffer_state * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -static YY_BUFFER_STATE yy_current_buffer = 0; +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". + * + * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER yy_current_buffer +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - int yyleng; /* Points to current character in buffer. */ @@ -225,142 +275,247 @@ static int yy_start = 0; /* start state number */ */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) +/* Begin user sect3 */ -#define YY_USES_REJECT typedef unsigned char YY_CHAR; + FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + extern char *yytext; #define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; + (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 58 -#define YY_END_OF_BUFFER 59 -static yyconst short int yy_acclist[269] = +#define YY_NUM_RULES 120 +#define YY_END_OF_BUFFER 121 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_acclist[651] = { 0, - 59, 57, 58, 56, 57, 58, 1, 56, 58, 57, - 58, 57, 58, 57, 58, 11, 57, 58, 1, 12, - 58, 11, 57, 58, 27, 57, 58, 1, 28, 58, - 21, 27, 57, 58, 27, 57, 58, 27, 57, 58, - 27, 57, 58, 25, 27, 57, 58, 26, 27, 57, - 58, 27, 57, 58, 24, 57, 58, 1, 58, 23, - 24, 57, 58, 24, 57, 58, 57, 58, 57, 58, - 52, 57, 58, 52, 57, 58, 53, 57, 58, 57, - 58, 57, 58, 50, 57, 58, 50, 57, 58, 52, - 57, 58, 52, 57, 58, 52, 57, 58, 52, 57, - - 58, 52, 57, 58, 52, 57, 58, 52, 57, 58, - 52, 57, 58, 52, 57, 58, 52, 57, 58, 52, - 57, 58, 52, 57, 58, 54, 57, 58, 55, 57, - 58, 6, 14, 10, 7, 20, 15, 22, 8, 52, - 51, 52, 50, 9, 50, 50, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 2, 13, 16, 18, 3, 4, 51, - 52, 50, 5, 50, 50, 52, 52, 52, 52, 52, - 39, 52, 52, 52, 52, 52, 52, 52, 52, 52, - 52, 52, 52, 52, 17, 19, 30, 52, 52, 42, - - 52, 52, 34, 52, 52, 37, 52, 52, 52, 52, - 52, 52, 52, 52, 52, 52, 52, 31, 52, 29, - 52, 52, 40, 52, 52, 52, 52, 52, 38, 52, - 52, 52, 52, 33, 52, 52, 52, 52, 41, 52, - 52, 52, 52, 43, 52, 47, 52, 35, 52, 32, - 52, 52, 52, 52, 49, 52, 52, 44, 52, 52, - 46, 52, 45, 52, 48, 52, 36, 52 + 121, 117, 120, 116, 117, 120, 1, 118, 120, 117, + 118, 120, 117, 120, 117, 120, 117, 120, 105, 117, + 120, 105, 117, 120, 117, 120, 109, 117, 120, 109, + 117, 120, 109, 117, 120, 109, 117, 120, 116, 117, + 120, 117, 120, 117, 120, 109, 117, 120, 109, 117, + 120, 29, 117, 120, 1, 30, 118, 120, 29, 117, + 118, 120, 29, 117, 120, 29, 117, 120, 29, 117, + 120, 53, 117, 120, 1, 54, 118, 120, 53, 117, + 118, 120, 45, 53, 117, 120, 53, 117, 120, 53, + 117, 120, 53, 117, 120, 51, 53, 117, 120, 52, + + 53, 117, 120, 53, 117, 120, 53, 117, 120, 49, + 117, 120, 1, 50, 118, 120, 49, 117, 118, 120, + 48, 49, 117, 120, 49, 117, 120, 49, 117, 120, + 62, 117, 120, 117, 120, 109, 117, 120, 109, 117, + 120, 109, 117, 120, 113, 117, 120, 65, 117, 120, + 1, 66, 118, 120, 65, 117, 118, 120, 64, 65, + 117, 120, 65, 117, 120, 65, 117, 120, 117, 120, + 117, 120, 117, 120, 117, 120, 109, 117, 120, 109, + 117, 120, 109, 117, 120, 109, 117, 120, 109, 117, + 120, 109, 117, 120, 109, 117, 120, 109, 117, 120, + + 109, 117, 120, 109, 117, 120, 109, 117, 120, 109, + 117, 120, 114, 117, 120, 115, 117, 120, 102, 117, + 120, 46, 117, 120, 103, 117, 120, 104, 117, 120, + 117, 120, 109, 117, 120, 109, 117, 120, 109, 117, + 120, 109, 117, 120, 109, 117, 120, 109, 117, 120, + 109, 117, 120, 109, 117, 120, 109, 117, 120, 109, + 117, 120, 109, 117, 120, 109, 117, 120, 10, 117, + 120, 10, 117, 118, 120, 10, 117, 120, 10, 117, + 120, 10, 117, 120, 10, 117, 120, 15, 117, 120, + 15, 117, 118, 120, 15, 117, 120, 15, 117, 120, + + 15, 117, 120, 15, 117, 120, 18, 117, 120, 18, + 117, 118, 120, 18, 117, 120, 18, 117, 120, 105, + 23, 105, 105, 108, 109, 109, 109, 109, 109, 36, + 109, 109, 28, 24, 44, 37, 47, 25, 109, 109, + 109, 63, 26, 112, 111, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 27, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 9, 7, 14, 13, + 11, 12, 14, 17, 16, 110, 110, 105, 3, 105, + 105, 108, 106, 107, 109, 109, 109, 109, 31, 35, + + 109, 109, 42, 38, 40, 19, 20, 109, 109, 109, + 80, 21, 109, 109, 109, 109, 109, 109, 109, 75, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 22, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 12, 108, 106, 107, + 109, 57, 109, 109, 109, 32, 33, 34, 109, 109, + 43, 39, 41, 109, 61, 109, 60, 109, 6, 109, + 78, 109, 109, 109, 109, 70, 109, 109, 73, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 67, 109, 109, 109, 109, 70, 109, 109, 109, + + 109, 90, 109, 109, 109, 109, 96, 109, 8, 108, + 55, 109, 56, 109, 58, 109, 109, 109, 109, 60, + 109, 79, 109, 109, 76, 109, 109, 109, 109, 109, + 109, 74, 109, 109, 109, 109, 69, 109, 109, 109, + 91, 109, 109, 109, 109, 95, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 77, 109, 109, 109, 109, + 109, 81, 109, 87, 109, 71, 109, 68, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 4, + 109, 109, 109, 109, 109, 82, 109, 109, 109, 109, + 86, 109, 109, 109, 109, 109, 92, 109, 93, 109, + + 109, 109, 109, 109, 85, 109, 109, 88, 109, 89, + 109, 109, 72, 109, 109, 109, 109, 109, 109, 109, + 84, 109, 83, 109, 109, 109, 98, 109, 109, 109, + 109, 4, 2, 100, 109, 109, 97, 109, 109, 99, + 109, 119, 5, 109, 101, 109, 109, 94, 109, 59 } ; -static yyconst short int yy_accept[200] = +static yyconst flex_int16_t yy_accept[552] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 4, 7, 10, 12, 14, 16, - 19, 22, 25, 28, 31, 35, 38, 41, 44, 48, - 52, 55, 58, 60, 64, 67, 69, 71, 74, 77, - 80, 82, 84, 87, 90, 93, 96, 99, 102, 105, - 108, 111, 114, 117, 120, 123, 126, 129, 132, 133, - 133, 133, 133, 134, 135, 135, 135, 135, 136, 136, - 137, 138, 139, 140, 140, 140, 141, 142, 143, 144, - 145, 145, 145, 146, 146, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - - 161, 162, 163, 164, 164, 165, 165, 166, 166, 166, - 167, 168, 168, 169, 169, 170, 170, 171, 172, 173, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 195, 196, 197, 199, 200, 202, 203, 205, - 206, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 220, 221, 222, 223, 225, 226, 227, 228, - 229, 231, 232, 233, 234, 236, 237, 238, 239, 241, - 242, 243, 244, 246, 248, 250, 252, 253, 254, 255, - 257, 258, 260, 261, 263, 265, 267, 269, 269 - + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 4, 7, 10, 13, + 15, 17, 19, 22, 25, 27, 30, 33, 36, 39, + 42, 44, 46, 49, 52, 55, 59, 63, 66, 69, + 72, 75, 79, 83, 87, 90, 93, 96, 100, 104, + 107, 110, 113, 117, 121, 125, 128, 131, 134, 136, + 139, 142, 145, 148, 151, 155, 159, 163, 166, 169, + 171, 173, 175, 177, 180, 183, 186, 189, 192, 195, + 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, + + 228, 231, 233, 236, 239, 242, 245, 248, 251, 254, + 257, 260, 263, 266, 269, 272, 276, 279, 282, 285, + 288, 291, 295, 298, 301, 304, 307, 310, 314, 317, + 320, 320, 320, 321, 322, 322, 322, 323, 323, 323, + 324, 325, 326, 326, 327, 328, 329, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 331, 332, 333, 334, + 334, 334, 334, 334, 334, 335, 335, 336, 336, 336, + 337, 338, 339, 339, 340, 341, 342, 343, 343, 344, + 344, 345, 345, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, + + 362, 363, 364, 365, 365, 366, 367, 368, 369, 370, + 371, 372, 373, 374, 375, 376, 377, 378, 378, 378, + 378, 379, 379, 380, 380, 380, 381, 382, 382, 384, + 385, 386, 387, 387, 388, 389, 389, 390, 391, 392, + 393, 393, 394, 395, 396, 397, 398, 399, 399, 399, + 399, 399, 399, 400, 400, 400, 401, 401, 401, 402, + 403, 403, 404, 404, 404, 404, 405, 406, 406, 407, + 407, 407, 408, 409, 410, 411, 412, 412, 412, 413, + 413, 413, 414, 415, 416, 417, 418, 419, 420, 422, + 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, + + 433, 434, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 447, 448, 448, 449, + 450, 450, 451, 451, 452, 454, 455, 456, 456, 456, + 456, 456, 457, 457, 458, 459, 459, 460, 461, 461, + 462, 463, 464, 464, 465, 467, 469, 469, 470, 471, + 473, 474, 475, 476, 478, 479, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 492, 494, 495, + 496, 497, 499, 500, 501, 502, 504, 505, 506, 507, + 509, 509, 510, 510, 510, 511, 513, 515, 517, 517, + 517, 517, 517, 517, 517, 518, 519, 519, 519, 520, + + 522, 524, 525, 527, 528, 529, 530, 531, 532, 534, + 535, 536, 537, 539, 540, 541, 543, 544, 545, 546, + 548, 549, 550, 551, 552, 552, 552, 552, 552, 552, + 552, 553, 554, 554, 554, 555, 556, 558, 559, 560, + 561, 562, 564, 566, 568, 570, 571, 572, 573, 574, + 575, 576, 577, 578, 579, 580, 580, 580, 581, 581, + 581, 582, 583, 583, 583, 584, 585, 586, 588, 589, + 590, 591, 593, 594, 595, 596, 597, 599, 601, 602, + 603, 603, 603, 603, 603, 603, 604, 605, 605, 605, + 607, 608, 610, 612, 613, 615, 616, 617, 618, 619, + + 620, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 621, 623, 625, 626, 627, 629, 630, 631, 632, + 632, 633, 633, 633, 633, 633, 634, 634, 636, 637, + 639, 640, 642, 642, 642, 643, 643, 643, 644, 645, + 647, 647, 647, 648, 648, 648, 650, 650, 650, 651, + 651 } ; -static yyconst int yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 4, 1, 1, 5, 1, 6, 1, - 1, 7, 1, 1, 1, 8, 9, 10, 11, 11, - 11, 11, 11, 11, 11, 12, 12, 13, 1, 1, - 1, 1, 1, 1, 14, 14, 14, 14, 14, 14, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 1, 16, 1, 1, 15, 1, 17, 18, 19, 20, - - 21, 22, 23, 24, 25, 15, 15, 26, 27, 28, - 29, 30, 15, 31, 32, 33, 34, 35, 15, 36, - 15, 15, 37, 1, 38, 1, 1, 1, 1, 1, + 1, 6, 1, 7, 8, 1, 9, 1, 10, 11, + 12, 13, 1, 1, 1, 14, 15, 16, 17, 18, + 18, 18, 18, 18, 18, 19, 19, 20, 1, 21, + 1, 22, 1, 1, 23, 23, 23, 23, 24, 23, + 25, 25, 26, 25, 25, 25, 25, 25, 25, 25, + 25, 27, 28, 25, 25, 25, 25, 25, 25, 25, + 29, 30, 31, 1, 32, 1, 33, 34, 35, 36, + + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 25, 58, 1, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -377,198 +532,483 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[39] = +static yyconst flex_int32_t yy_meta[60] = { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 4, 5, 6, 1, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 1, 1 + 1, 2, 3, 4, 4, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 5, 5, 5, 5, 6, + 1, 1, 7, 7, 8, 8, 8, 8, 1, 1, + 9, 8, 7, 7, 7, 7, 7, 7, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 1, 1 } ; -static yyconst short int yy_base[214] = +static yyconst flex_int16_t yy_base[585] = { 0, - 0, 2, 3, 5, 19, 55, 10, 13, 93, 0, - 124, 0, 434, 435, 435, 435, 11, 407, 0, 435, - 435, 423, 435, 435, 435, 11, 23, 0, 435, 435, - 393, 435, 435, 435, 0, 24, 0, 417, 21, 435, - 28, 34, 34, 43, 34, 49, 37, 50, 54, 55, - 56, 129, 134, 127, 59, 61, 435, 435, 435, 426, - 411, 390, 435, 435, 38, 420, 419, 435, 421, 435, - 435, 435, 435, 420, 409, 408, 407, 126, 159, 435, - 416, 162, 167, 172, 0, 177, 66, 64, 2, 163, - 173, 168, 135, 177, 178, 179, 182, 180, 183, 181, - - 190, 192, 194, 415, 435, 385, 435, 410, 409, 435, - 435, 411, 435, 410, 435, 399, 398, 197, 206, 407, - 435, 215, 0, 195, 200, 215, 207, 71, 395, 198, - 201, 217, 222, 223, 224, 225, 226, 227, 229, 228, - 230, 332, 435, 435, 345, 231, 318, 233, 317, 232, - 316, 238, 239, 249, 250, 234, 251, 258, 260, 261, - 263, 315, 435, 265, 266, 314, 267, 268, 269, 270, - 313, 272, 279, 277, 312, 278, 287, 281, 311, 282, - 288, 290, 308, 307, 306, 304, 294, 292, 299, 154, - 301, 153, 303, 125, 124, 78, 69, 435, 332, 338, - - 344, 350, 356, 362, 364, 368, 374, 380, 386, 390, - 394, 400, 404 + 0, 58, 58, 65, 69, 126, 80, 85, 74, 87, + 93, 113, 172, 1318, 131, 136, 225, 1317, 100, 147, + 135, 159, 175, 190, 1324, 1327, 1327, 1327, 1327, 1293, + 225, 62, 231, 237, 0, 1302, 42, 150, 60, 232, + 63, 164, 156, 77, 1327, 1327, 1327, 1306, 173, 1292, + 1327, 1327, 1327, 1327, 245, 104, 0, 1327, 1327, 279, + 1260, 1327, 1327, 1327, 1327, 0, 262, 1327, 144, 110, + 161, 143, 1327, 1327, 1327, 1327, 1327, 0, 282, 275, + 214, 279, 283, 171, 285, 263, 182, 138, 219, 266, + 179, 287, 295, 270, 292, 1327, 1327, 1327, 1327, 1327, + + 1327, 296, 297, 298, 311, 288, 170, 310, 226, 308, + 326, 329, 299, 307, 1327, 1327, 1303, 351, 359, 360, + 1327, 1327, 1302, 365, 366, 371, 1313, 1312, 373, 377, + 1304, 1303, 373, 1327, 1309, 377, 383, 390, 0, 397, + 1291, 1290, 1289, 365, 302, 332, 385, 417, 1258, 1270, + 418, 1265, 373, 375, 310, 1327, 198, 402, 1327, 0, + 1295, 380, 1294, 1293, 1327, 1299, 1327, 428, 1255, 1327, + 1327, 1327, 1297, 408, 406, 409, 1327, 1285, 1285, 1294, + 426, 430, 1265, 1266, 62, 435, 437, 412, 420, 432, + 416, 434, 436, 237, 440, 444, 446, 451, 439, 454, + + 456, 455, 1327, 1291, 457, 459, 460, 463, 464, 468, + 471, 472, 479, 480, 474, 481, 1327, 506, 520, 525, + 1327, 530, 1327, 512, 532, 537, 1327, 1278, 1327, 1327, + 1327, 1327, 1282, 1281, 532, 1287, 1327, 536, 0, 1269, + 0, 1268, 1267, 517, 521, 522, 524, 1249, 1236, 1238, + 1239, 1224, 1327, 1248, 1222, 1327, 1221, 1237, 526, 536, + 1250, 1327, 1266, 1265, 1264, 1327, 1327, 1270, 1327, 1237, + 1268, 1327, 537, 538, 540, 1327, 559, 1267, 1327, 1238, + 554, 544, 554, 547, 555, 556, 557, 559, 1248, 560, + 558, 561, 562, 567, 566, 573, 564, 574, 581, 575, + + 484, 1264, 1327, 576, 583, 580, 585, 589, 592, 598, + 603, 587, 605, 609, 611, 634, 1327, 639, 1246, 1245, + 1244, 1243, 1242, 612, 1241, 614, 615, 1227, 1206, 1221, + 451, 1327, 1221, 1327, 1327, 1202, 623, 624, 1229, 1327, + 1327, 1327, 1210, 627, 1233, 1232, 647, 1327, 631, 1231, + 632, 636, 637, 1230, 638, 1229, 639, 640, 642, 648, + 641, 649, 654, 651, 650, 655, 652, 1228, 664, 657, + 660, 672, 675, 677, 679, 1227, 680, 682, 683, 1226, + 704, 1327, 715, 706, 1225, 1224, 1223, 1222, 1197, 1199, + 717, 1192, 1201, 1204, 694, 691, 0, 1183, 696, 705, + + 1215, 708, 1214, 709, 710, 711, 712, 714, 1213, 719, + 716, 717, 1212, 720, 722, 1211, 724, 723, 726, 733, + 728, 731, 734, 738, 1186, 1179, 771, 1180, 1177, 1168, + 744, 737, 1188, 1175, 739, 751, 1182, 759, 756, 748, + 752, 1171, 1156, 1155, 1154, 760, 755, 762, 763, 774, + 776, 778, 781, 785, 782, 1112, 1087, 819, 751, 1076, + 787, 788, 1085, 1053, 790, 791, 792, 1062, 786, 793, + 796, 1053, 798, 813, 799, 800, 1044, 1029, 804, 820, + 944, 927, 970, 929, 935, 842, 844, 834, 852, 954, + 829, 953, 951, 839, 919, 821, 840, 841, 843, 845, + + 847, 866, 868, 931, 853, 851, 880, 887, 891, 899, + 864, 867, 861, 853, 859, 860, 863, 864, 893, 869, + 1327, 469, 917, 908, 925, 1327, 907, 417, 901, 415, + 911, 304, 285, 944, 1327, 935, 933, 1327, 908, 238, + 178, 946, 912, 127, 940, 117, 964, 966, 1327, 1327, + 983, 992, 1001, 1010, 1019, 1028, 1037, 1046, 1049, 1053, + 1061, 1070, 1079, 1084, 1093, 1102, 1107, 1110, 1113, 1121, + 1130, 1139, 1148, 1153, 1162, 1170, 1172, 1176, 1180, 1187, + 1191, 1199, 1208, 1217 } ; -static yyconst short int yy_def[214] = +static yyconst flex_int16_t yy_def[585] = { 0, - 199, 199, 200, 200, 201, 201, 202, 202, 198, 9, - 9, 11, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 203, 198, 198, - 198, 198, 198, 198, 204, 198, 205, 206, 206, 198, - 198, 198, 198, 198, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 198, 198, 198, 207, - 198, 198, 198, 198, 198, 198, 198, 198, 208, 198, - 198, 198, 198, 209, 210, 206, 211, 206, 198, 198, - 212, 198, 198, 198, 213, 198, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - - 206, 206, 206, 207, 198, 198, 198, 198, 198, 198, - 198, 208, 198, 209, 198, 210, 211, 206, 198, 212, - 198, 198, 213, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 198, 198, 198, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 198, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, - 206, 206, 206, 206, 206, 206, 206, 0, 198, 198, - - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198 + 550, 1, 551, 551, 552, 552, 553, 553, 1, 1, + 554, 554, 1, 13, 1, 1, 1, 17, 555, 555, + 556, 556, 557, 557, 550, 550, 550, 550, 550, 558, + 550, 550, 550, 550, 559, 560, 560, 560, 560, 550, + 550, 550, 560, 560, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 561, 550, 550, 550, + 550, 550, 550, 550, 550, 562, 550, 550, 550, 560, + 560, 560, 550, 550, 550, 550, 550, 563, 550, 550, + 550, 559, 564, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 550, 550, 550, 550, 550, + + 550, 550, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 565, 550, 550, 566, 550, 550, 550, 567, 550, + 568, 560, 569, 560, 560, 560, 560, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 560, 560, 550, 570, + 550, 550, 550, 550, 550, 571, 550, 550, 550, 550, + 550, 550, 572, 560, 560, 560, 550, 550, 550, 573, + 550, 550, 574, 550, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + + 560, 560, 550, 575, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 550, 550, 550, 550, + 550, 576, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 566, 550, 550, 567, 568, + 577, 578, 579, 560, 560, 560, 560, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 560, 560, + 550, 550, 550, 550, 550, 550, 550, 571, 550, 550, + 572, 550, 560, 560, 560, 550, 550, 573, 550, 574, + 564, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + + 560, 575, 550, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 580, 550, 550, 581, 578, + 550, 579, 569, 560, 560, 560, 560, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 560, 560, 550, 550, + 550, 550, 550, 560, 560, 560, 550, 550, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 550, 550, 580, 550, 581, 560, 560, 560, 550, 550, + 550, 550, 550, 550, 560, 560, 582, 550, 560, 560, + + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 550, 550, 550, 550, 550, 550, + 560, 560, 550, 550, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 550, 550, 550, 550, 550, + 560, 560, 550, 550, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 550, 550, 550, 550, 550, 560, 560, 550, 550, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + + 560, 550, 550, 583, 550, 550, 550, 550, 550, 550, + 550, 560, 560, 560, 560, 560, 560, 560, 560, 583, + 550, 550, 550, 550, 550, 550, 584, 560, 560, 560, + 560, 560, 550, 550, 550, 550, 584, 550, 560, 560, + 550, 550, 560, 550, 550, 560, 550, 550, 550, 0, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550 } ; -static yyconst short int yy_nxt[474] = +static yyconst flex_int16_t yy_nxt[1387] = { 0, - 198, 15, 16, 15, 16, 21, 19, 21, 17, 22, - 17, 22, 33, 34, 77, 33, 34, 59, 18, 60, - 18, 24, 25, 62, 26, 35, 65, 27, 35, 68, - 73, 69, 74, 77, 28, 126, 63, 79, 79, 79, - 80, 82, 81, 83, 83, 84, 77, 66, 67, 77, - 82, 78, 86, 86, 86, 29, 30, 24, 25, 31, - 26, 77, 77, 27, 87, 89, 77, 77, 77, 85, - 28, 77, 88, 77, 108, 109, 77, 90, 77, 91, - 125, 77, 92, 77, 93, 102, 101, 150, 124, 103, - 77, 29, 30, 14, 15, 16, 14, 14, 14, 14, - - 14, 36, 14, 14, 14, 37, 38, 38, 14, 38, - 38, 38, 38, 38, 39, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 40, - 14, 41, 42, 43, 44, 44, 77, 77, 77, 77, - 45, 77, 46, 47, 48, 49, 77, 77, 50, 51, - 98, 99, 52, 53, 118, 54, 94, 55, 56, 100, - 57, 58, 130, 95, 96, 77, 77, 97, 119, 119, - 119, 122, 122, 122, 82, 77, 83, 83, 84, 82, - 77, 84, 84, 84, 82, 77, 86, 86, 86, 77, - 77, 77, 77, 77, 77, 77, 127, 131, 132, 134, - - 129, 128, 77, 133, 77, 136, 77, 77, 135, 77, - 77, 137, 77, 77, 138, 119, 119, 119, 141, 77, - 151, 139, 140, 145, 122, 122, 122, 77, 146, 77, - 147, 152, 148, 149, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 153, 155, 162, - 77, 77, 157, 160, 156, 159, 154, 164, 165, 158, - 161, 77, 77, 77, 166, 169, 171, 172, 167, 168, - 77, 173, 77, 77, 170, 77, 174, 77, 77, 77, - 77, 77, 77, 176, 77, 178, 179, 175, 183, 77, - 77, 77, 181, 77, 77, 180, 177, 184, 185, 77, - - 77, 182, 77, 188, 77, 187, 77, 191, 189, 186, - 192, 77, 190, 77, 193, 77, 77, 194, 77, 77, - 77, 196, 197, 77, 77, 77, 77, 77, 77, 77, - 77, 195, 14, 14, 14, 14, 14, 14, 20, 20, - 20, 20, 20, 20, 23, 23, 23, 23, 23, 23, - 32, 32, 32, 32, 32, 32, 70, 77, 70, 70, - 70, 70, 72, 163, 72, 72, 72, 72, 75, 75, - 76, 76, 76, 76, 104, 104, 104, 104, 104, 104, - 112, 112, 112, 112, 112, 112, 114, 114, 114, 114, - 114, 114, 116, 116, 116, 116, 117, 117, 117, 117, - - 120, 120, 120, 120, 120, 120, 123, 77, 123, 121, - 77, 77, 115, 113, 144, 143, 142, 105, 121, 77, - 77, 77, 115, 113, 111, 110, 107, 106, 105, 77, - 71, 64, 61, 198, 13, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198 + 26, 27, 28, 27, 29, 27, 26, 26, 26, 30, + 26, 26, 26, 31, 32, 33, 34, 34, 34, 35, + 26, 26, 36, 36, 36, 36, 36, 36, 26, 26, + 26, 36, 36, 36, 37, 36, 38, 39, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 26, 26, 40, + 46, 143, 47, 40, 151, 41, 42, 46, 151, 47, + 48, 52, 49, 53, 134, 54, 135, 48, 55, 143, + 68, 143, 63, 56, 64, 144, 65, 63, 69, 64, + 50, 65, 67, 68, 41, 75, 143, 76, 57, 77, + + 282, 69, 28, 147, 116, 43, 152, 44, 70, 66, + 36, 71, 117, 158, 66, 75, 165, 76, 166, 77, + 79, 70, 78, 36, 71, 72, 58, 59, 52, 143, + 53, 73, 54, 60, 61, 55, 143, 28, 72, 122, + 56, 98, 78, 41, 73, 26, 98, 123, 118, 28, + 26, 116, 118, 174, 119, 57, 172, 143, 173, 120, + 124, 28, 143, 122, 124, 36, 125, 36, 36, 143, + 36, 126, 36, 36, 151, 143, 257, 28, 151, 128, + 143, 191, 176, 58, 59, 80, 81, 129, 96, 143, + 143, 82, 28, 96, 128, 145, 153, 130, 143, 146, + + 83, 143, 129, 154, 84, 157, 85, 86, 87, 88, + 175, 155, 89, 209, 544, 90, 152, 143, 91, 92, + 185, 156, 93, 72, 94, 95, 179, 190, 180, 96, + 97, 99, 194, 148, 259, 100, 101, 148, 143, 102, + 133, 133, 133, 133, 136, 143, 137, 137, 137, 138, + 136, 161, 140, 140, 140, 140, 143, 143, 103, 104, + 105, 106, 107, 151, 192, 89, 212, 151, 90, 108, + 109, 110, 111, 291, 162, 112, 113, 94, 114, 149, + 168, 150, 143, 151, 168, 143, 139, 151, 178, 143, + 133, 133, 133, 133, 181, 181, 181, 181, 182, 182, + + 182, 182, 163, 164, 143, 152, 143, 143, 203, 189, + 204, 143, 193, 184, 143, 200, 143, 143, 143, 169, + 541, 143, 152, 143, 186, 152, 143, 143, 187, 143, + 143, 188, 201, 208, 197, 198, 195, 186, 202, 196, + 205, 213, 210, 206, 188, 143, 199, 207, 143, 257, + 211, 143, 218, 202, 245, 216, 218, 189, 214, 258, + 151, 220, 221, 219, 151, 222, 224, 151, 197, 215, + 224, 151, 226, 227, 217, 230, 226, 225, 151, 230, + 199, 246, 151, 228, 143, 229, 263, 231, 235, 235, + 235, 235, 238, 238, 238, 238, 136, 244, 137, 137, + + 137, 138, 152, 136, 143, 138, 138, 138, 138, 152, + 136, 254, 140, 140, 140, 140, 251, 247, 148, 151, + 152, 143, 148, 151, 252, 143, 255, 143, 143, 168, + 253, 143, 256, 168, 143, 143, 143, 264, 265, 143, + 273, 181, 181, 181, 181, 182, 182, 182, 182, 275, + 260, 143, 274, 143, 143, 143, 143, 285, 143, 143, + 184, 152, 288, 143, 149, 143, 150, 283, 169, 284, + 143, 152, 286, 143, 143, 143, 143, 294, 143, 143, + 292, 290, 143, 143, 287, 289, 293, 143, 297, 296, + 143, 143, 295, 143, 298, 301, 308, 306, 143, 143, + + 143, 533, 392, 143, 299, 300, 311, 218, 253, 304, + 288, 218, 314, 224, 305, 307, 310, 224, 219, 368, + 312, 220, 221, 309, 225, 222, 220, 221, 315, 313, + 220, 220, 221, 226, 227, 220, 143, 226, 318, 227, + 143, 143, 318, 143, 228, 143, 317, 235, 235, 235, + 235, 238, 238, 238, 238, 143, 143, 143, 337, 143, + 347, 348, 327, 143, 347, 325, 143, 324, 326, 182, + 182, 182, 182, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 345, 143, 184, 143, 143, 344, 338, 353, + 346, 355, 143, 143, 143, 143, 349, 351, 356, 143, + + 143, 354, 143, 350, 143, 352, 143, 357, 143, 359, + 361, 143, 371, 360, 358, 362, 364, 143, 363, 370, + 365, 366, 143, 377, 143, 369, 367, 373, 143, 372, + 143, 143, 374, 143, 143, 381, 382, 378, 375, 381, + 318, 227, 143, 143, 318, 376, 143, 380, 347, 348, + 143, 143, 347, 384, 379, 143, 143, 143, 143, 143, + 143, 143, 386, 387, 396, 388, 395, 143, 143, 143, + 143, 143, 405, 143, 143, 399, 143, 346, 406, 143, + 402, 408, 400, 143, 407, 412, 410, 401, 404, 403, + 411, 143, 417, 414, 143, 413, 143, 416, 143, 143, + + 409, 143, 143, 419, 415, 381, 382, 381, 382, 381, + 143, 381, 418, 143, 423, 143, 381, 382, 427, 411, + 381, 421, 427, 422, 143, 420, 424, 143, 143, 143, + 143, 143, 435, 143, 384, 143, 143, 431, 143, 143, + 432, 143, 143, 143, 437, 143, 441, 143, 442, 438, + 143, 444, 143, 143, 447, 448, 143, 143, 143, 436, + 440, 439, 443, 143, 451, 446, 449, 143, 445, 455, + 143, 143, 427, 462, 143, 143, 427, 450, 143, 143, + 452, 143, 143, 453, 465, 454, 458, 458, 458, 458, + 461, 466, 468, 143, 467, 143, 471, 143, 472, 469, + + 143, 143, 484, 470, 143, 143, 143, 143, 256, 143, + 143, 143, 143, 473, 474, 143, 479, 143, 143, 143, + 483, 486, 477, 143, 483, 478, 491, 476, 492, 494, + 475, 495, 143, 480, 458, 458, 458, 458, 487, 143, + 143, 490, 493, 507, 497, 508, 498, 507, 143, 508, + 509, 510, 510, 511, 496, 500, 499, 511, 143, 143, + 143, 143, 143, 143, 143, 512, 143, 507, 514, 508, + 527, 507, 143, 508, 513, 521, 501, 516, 143, 143, + 143, 507, 143, 143, 527, 507, 143, 522, 508, 528, + 517, 529, 508, 515, 519, 523, 523, 523, 523, 530, + + 255, 518, 524, 524, 524, 524, 525, 525, 525, 525, + 526, 531, 143, 538, 525, 525, 525, 525, 534, 535, + 143, 536, 534, 524, 524, 524, 524, 143, 538, 532, + 143, 143, 523, 523, 523, 523, 526, 521, 143, 538, + 525, 525, 525, 525, 539, 534, 535, 540, 546, 534, + 542, 542, 542, 542, 538, 547, 547, 547, 547, 545, + 543, 542, 542, 542, 542, 548, 549, 548, 549, 548, + 143, 548, 143, 143, 506, 505, 504, 503, 502, 547, + 547, 547, 547, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 51, 51, 51, 51, 51, 51, 51, 51, + + 51, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 115, + 115, 115, 115, 115, 115, 115, 115, 115, 121, 121, + 121, 121, 121, 121, 121, 121, 121, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 131, 131, 143, 131, + 131, 131, 131, 131, 131, 141, 141, 142, 142, 142, + 142, 167, 167, 143, 167, 167, 167, 167, 167, 167, + 171, 171, 143, 171, 171, 171, 171, 171, 171, 177, + 177, 143, 177, 177, 177, 177, 177, 177, 183, 489, + 183, 183, 183, 233, 233, 488, 233, 233, 233, 233, + + 233, 233, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 239, 485, 239, 240, 240, 240, 240, 243, 243, + 243, 261, 261, 482, 261, 261, 261, 261, 261, 261, + 268, 268, 268, 268, 268, 268, 268, 268, 268, 271, + 271, 271, 271, 271, 271, 271, 271, 271, 278, 278, + 278, 278, 278, 278, 278, 278, 278, 280, 481, 280, + 280, 280, 302, 302, 302, 302, 302, 302, 302, 302, + 302, 316, 316, 143, 143, 143, 316, 316, 319, 319, + 320, 320, 320, 320, 322, 322, 322, 322, 383, 383, + 143, 383, 383, 383, 383, 385, 385, 385, 385, 433, + + 433, 143, 433, 433, 433, 433, 433, 433, 520, 520, + 464, 463, 520, 520, 520, 520, 520, 537, 537, 460, + 537, 537, 537, 537, 537, 537, 459, 252, 457, 456, + 143, 143, 143, 143, 143, 434, 430, 429, 428, 426, + 425, 143, 143, 143, 241, 143, 143, 143, 143, 143, + 143, 143, 143, 398, 397, 394, 393, 391, 390, 389, + 143, 550, 323, 242, 321, 241, 303, 143, 184, 279, + 272, 343, 269, 342, 341, 340, 339, 336, 335, 334, + 333, 332, 331, 330, 329, 328, 323, 321, 241, 237, + 232, 232, 317, 303, 281, 184, 279, 277, 276, 272, + + 270, 269, 267, 266, 262, 250, 249, 248, 242, 143, + 241, 237, 234, 232, 230, 230, 223, 217, 170, 160, + 159, 143, 132, 550, 41, 41, 25, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550 } ; -static yyconst short int yy_chk[474] = +static yyconst flex_int16_t yy_chk[1387] = { 0, - 0, 1, 1, 2, 2, 3, 2, 4, 1, 3, - 2, 4, 7, 7, 89, 8, 8, 17, 1, 17, - 2, 5, 5, 19, 5, 7, 26, 5, 8, 27, - 36, 27, 36, 39, 5, 89, 19, 41, 41, 41, - 42, 43, 42, 43, 43, 43, 45, 26, 26, 47, - 44, 39, 44, 44, 44, 5, 5, 6, 6, 6, - 6, 46, 48, 6, 45, 47, 49, 50, 51, 43, - 6, 55, 46, 56, 65, 65, 88, 48, 87, 49, - 88, 197, 50, 128, 51, 56, 55, 128, 87, 56, - 196, 6, 6, 9, 9, 9, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 11, 11, 11, 11, 11, 195, 194, 78, 54, - 11, 52, 11, 11, 11, 11, 53, 93, 11, 11, - 54, 54, 11, 11, 78, 11, 52, 11, 11, 54, - 11, 11, 93, 52, 53, 192, 190, 53, 79, 79, - 79, 82, 82, 82, 83, 90, 83, 83, 83, 84, - 92, 84, 84, 84, 86, 91, 86, 86, 86, 94, - 95, 96, 98, 100, 97, 99, 90, 94, 95, 97, - - 92, 91, 101, 96, 102, 99, 103, 124, 98, 118, - 130, 100, 125, 131, 101, 119, 119, 119, 103, 127, - 130, 101, 102, 118, 122, 122, 122, 126, 124, 132, - 125, 131, 126, 127, 133, 134, 135, 136, 137, 138, - 140, 139, 141, 146, 150, 148, 156, 132, 134, 141, - 152, 153, 136, 139, 135, 138, 133, 146, 148, 137, - 140, 154, 155, 157, 150, 154, 156, 157, 152, 153, - 158, 157, 159, 160, 155, 161, 158, 164, 165, 167, - 168, 169, 170, 160, 172, 164, 165, 159, 170, 174, - 176, 173, 168, 178, 180, 167, 161, 172, 173, 177, - - 181, 169, 182, 177, 188, 176, 187, 181, 178, 174, - 182, 189, 180, 191, 187, 193, 186, 188, 185, 184, - 183, 191, 193, 179, 175, 171, 166, 162, 151, 149, - 147, 189, 199, 199, 199, 199, 199, 199, 200, 200, - 200, 200, 200, 200, 201, 201, 201, 201, 201, 201, - 202, 202, 202, 202, 202, 202, 203, 145, 203, 203, - 203, 203, 204, 142, 204, 204, 204, 204, 205, 205, - 206, 206, 206, 206, 207, 207, 207, 207, 207, 207, - 208, 208, 208, 208, 208, 208, 209, 209, 209, 209, - 209, 209, 210, 210, 210, 210, 211, 211, 211, 211, - - 212, 212, 212, 212, 212, 212, 213, 129, 213, 120, - 117, 116, 114, 112, 109, 108, 106, 104, 81, 77, - 76, 75, 74, 69, 67, 66, 62, 61, 60, 38, - 31, 22, 18, 13, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, - 198, 198, 198 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 3, 37, 3, 2, 41, 2, 2, 4, 41, 4, + 3, 5, 4, 5, 32, 5, 32, 4, 5, 39, + 9, 185, 7, 5, 7, 37, 7, 8, 9, 8, + 4, 8, 8, 10, 10, 11, 44, 11, 5, 11, + + 185, 10, 19, 39, 19, 2, 41, 2, 9, 7, + 9, 9, 19, 44, 8, 12, 56, 12, 56, 12, + 12, 10, 11, 10, 10, 9, 5, 5, 6, 70, + 6, 9, 6, 6, 6, 6, 546, 21, 10, 21, + 6, 15, 12, 16, 10, 15, 16, 21, 20, 20, + 16, 20, 20, 70, 20, 6, 69, 88, 69, 20, + 22, 22, 72, 22, 22, 15, 22, 15, 15, 38, + 16, 22, 16, 16, 49, 43, 544, 23, 49, 23, + 71, 88, 72, 6, 6, 13, 13, 23, 15, 107, + 84, 13, 24, 16, 24, 38, 42, 24, 91, 38, + + 13, 87, 24, 42, 13, 43, 13, 13, 13, 13, + 71, 42, 13, 107, 541, 13, 49, 157, 13, 13, + 84, 42, 13, 13, 13, 13, 81, 87, 81, 13, + 13, 17, 91, 40, 157, 17, 17, 40, 89, 17, + 31, 31, 31, 31, 33, 109, 33, 33, 33, 33, + 34, 55, 34, 34, 34, 34, 194, 540, 17, 17, + 17, 17, 17, 67, 89, 17, 109, 67, 17, 17, + 17, 17, 17, 194, 55, 17, 17, 17, 17, 40, + 60, 40, 86, 79, 60, 90, 33, 79, 80, 94, + 80, 80, 80, 80, 82, 82, 82, 82, 83, 83, + + 83, 83, 55, 55, 85, 67, 92, 106, 102, 86, + 102, 95, 90, 83, 93, 94, 103, 104, 113, 60, + 533, 145, 60, 532, 85, 79, 114, 110, 85, 108, + 105, 85, 95, 106, 93, 93, 92, 104, 95, 92, + 103, 110, 108, 103, 104, 111, 93, 105, 112, 155, + 108, 146, 118, 114, 145, 113, 118, 105, 111, 155, + 119, 120, 120, 118, 119, 120, 124, 125, 112, 112, + 124, 125, 126, 126, 120, 129, 126, 124, 130, 130, + 112, 146, 130, 126, 144, 126, 162, 129, 133, 133, + 133, 133, 136, 136, 136, 136, 137, 144, 137, 137, + + 137, 137, 119, 138, 147, 138, 138, 138, 138, 125, + 140, 154, 140, 140, 140, 140, 153, 147, 148, 151, + 130, 158, 148, 151, 153, 175, 154, 174, 176, 168, + 153, 188, 154, 168, 530, 191, 528, 162, 162, 189, + 174, 181, 181, 181, 181, 182, 182, 182, 182, 176, + 158, 190, 175, 192, 186, 193, 187, 188, 199, 195, + 182, 151, 191, 196, 148, 197, 148, 186, 168, 187, + 198, 168, 189, 200, 202, 201, 205, 196, 206, 207, + 195, 193, 208, 209, 190, 192, 195, 210, 199, 198, + 211, 212, 197, 215, 200, 202, 209, 207, 213, 214, + + 216, 522, 331, 301, 200, 201, 212, 218, 331, 205, + 209, 218, 215, 224, 206, 208, 211, 224, 218, 301, + 213, 219, 219, 210, 224, 219, 220, 220, 216, 214, + 220, 222, 222, 225, 225, 222, 244, 225, 226, 226, + 245, 246, 226, 247, 225, 259, 225, 235, 235, 235, + 235, 238, 238, 238, 238, 260, 273, 274, 259, 275, + 277, 277, 247, 282, 277, 245, 284, 244, 246, 281, + 281, 281, 281, 283, 285, 286, 287, 291, 288, 290, + 292, 293, 274, 297, 281, 295, 294, 273, 260, 286, + 275, 288, 296, 298, 300, 304, 282, 284, 290, 306, + + 299, 287, 305, 283, 307, 285, 312, 291, 308, 293, + 294, 309, 306, 293, 292, 295, 297, 310, 296, 305, + 298, 299, 311, 312, 313, 304, 300, 308, 314, 307, + 315, 324, 309, 326, 327, 316, 316, 313, 310, 316, + 318, 318, 337, 338, 318, 311, 344, 315, 347, 347, + 349, 351, 347, 316, 314, 352, 353, 355, 357, 358, + 361, 359, 324, 326, 338, 327, 337, 360, 362, 365, + 364, 367, 358, 363, 366, 349, 370, 344, 359, 371, + 353, 361, 351, 369, 360, 364, 363, 352, 357, 355, + 363, 372, 370, 366, 373, 365, 374, 369, 375, 377, + + 362, 378, 379, 372, 367, 381, 381, 384, 384, 381, + 396, 384, 371, 395, 377, 399, 383, 383, 391, 379, + 383, 374, 391, 375, 400, 373, 378, 402, 404, 405, + 406, 407, 399, 408, 383, 411, 412, 395, 410, 414, + 396, 415, 418, 417, 402, 419, 407, 421, 408, 404, + 422, 411, 420, 423, 415, 417, 432, 424, 435, 400, + 406, 405, 410, 431, 420, 414, 418, 440, 412, 424, + 436, 441, 427, 432, 447, 439, 427, 419, 438, 446, + 421, 448, 449, 422, 435, 423, 427, 427, 427, 427, + 431, 436, 439, 450, 438, 451, 446, 452, 447, 440, + + 453, 455, 459, 441, 454, 469, 461, 462, 459, 465, + 466, 467, 470, 448, 449, 471, 454, 473, 475, 476, + 458, 461, 452, 479, 458, 453, 466, 451, 467, 470, + 450, 471, 474, 455, 458, 458, 458, 458, 462, 480, + 496, 465, 469, 486, 474, 487, 475, 486, 491, 487, + 488, 488, 488, 489, 473, 479, 476, 489, 494, 497, + 498, 486, 499, 487, 500, 491, 501, 502, 496, 503, + 511, 502, 514, 503, 494, 520, 480, 498, 515, 516, + 513, 507, 517, 518, 511, 507, 512, 506, 508, 514, + 499, 515, 508, 497, 501, 507, 507, 507, 507, 517, + + 505, 500, 508, 508, 508, 508, 509, 509, 509, 509, + 510, 518, 519, 527, 510, 510, 510, 510, 523, 523, + 529, 524, 523, 524, 524, 524, 524, 539, 527, 519, + 531, 543, 523, 523, 523, 523, 525, 504, 495, 537, + 525, 525, 525, 525, 529, 534, 534, 531, 543, 534, + 536, 536, 536, 536, 537, 545, 545, 545, 545, 542, + 539, 542, 542, 542, 542, 547, 547, 548, 548, 547, + 493, 548, 492, 490, 485, 484, 483, 482, 481, 547, + 547, 547, 547, 551, 551, 551, 551, 551, 551, 551, + 551, 551, 552, 552, 552, 552, 552, 552, 552, 552, + + 552, 553, 553, 553, 553, 553, 553, 553, 553, 553, + 554, 554, 554, 554, 554, 554, 554, 554, 554, 555, + 555, 555, 555, 555, 555, 555, 555, 555, 556, 556, + 556, 556, 556, 556, 556, 556, 556, 557, 557, 557, + 557, 557, 557, 557, 557, 557, 558, 558, 478, 558, + 558, 558, 558, 558, 558, 559, 559, 560, 560, 560, + 560, 561, 561, 477, 561, 561, 561, 561, 561, 561, + 562, 562, 472, 562, 562, 562, 562, 562, 562, 563, + 563, 468, 563, 563, 563, 563, 563, 563, 564, 464, + 564, 564, 564, 565, 565, 463, 565, 565, 565, 565, + + 565, 565, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 567, 460, 567, 568, 568, 568, 568, 569, 569, + 569, 570, 570, 457, 570, 570, 570, 570, 570, 570, + 571, 571, 571, 571, 571, 571, 571, 571, 571, 572, + 572, 572, 572, 572, 572, 572, 572, 572, 573, 573, + 573, 573, 573, 573, 573, 573, 573, 574, 456, 574, + 574, 574, 575, 575, 575, 575, 575, 575, 575, 575, + 575, 576, 576, 445, 444, 443, 576, 576, 577, 577, + 578, 578, 578, 578, 579, 579, 579, 579, 580, 580, + 442, 580, 580, 580, 580, 581, 581, 581, 581, 582, + + 582, 437, 582, 582, 582, 582, 582, 582, 583, 583, + 434, 433, 583, 583, 583, 583, 583, 584, 584, 430, + 584, 584, 584, 584, 584, 584, 429, 428, 426, 425, + 416, 413, 409, 403, 401, 398, 394, 393, 392, 390, + 389, 388, 387, 386, 385, 380, 376, 368, 356, 354, + 350, 346, 345, 343, 339, 336, 333, 330, 329, 328, + 325, 323, 322, 321, 320, 319, 302, 289, 280, 278, + 271, 270, 268, 265, 264, 263, 261, 258, 257, 255, + 254, 252, 251, 250, 249, 248, 243, 242, 240, 236, + 234, 233, 228, 204, 184, 183, 180, 179, 178, 173, + + 169, 166, 164, 163, 161, 152, 150, 149, 143, 142, + 141, 135, 132, 131, 128, 127, 123, 117, 61, 50, + 48, 36, 30, 25, 18, 14, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, + 550, 550, 550, 550, 550, 550 } ; -static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +extern int yy_flex_debug; +int yy_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; static char *yy_full_match; static int yy_lp; #define REJECT \ { \ -*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yy_full_match; /* restore poss. backed-over text */ \ -++yy_lp; \ +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +++(yy_lp); \ goto find_rule; \ } + #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "lexer.l" -#define INITIAL 0 /* GOB C Preprocessor * Copyright (C) 1999 the Free Software Foundation. * @@ -592,27 +1032,51 @@ char *yytext; #line 22 "lexer.l" #include "config.h" +#include +#include +#include #include +#include "treefuncs.h" #include "parse.h" +#include "main.h" +#include "util.h" static int parenth_depth = 0; -static int before_comment = INITIAL; -static int class_after_c = FALSE; -static int header_c = FALSE; +static int before_comment +/* New flex is on drugs */ +#if defined(FLEX_SCANNER) && ! defined(INITIAL) + = 0; +#else + = INITIAL; +#endif +static gboolean class_after_c = FALSE; +static int code_type = CCODE; +static int before_string; +static int property_paren_depth = 0; + +/* GTK+ doc stuff */ +static char *gtk_doc_func = NULL; /* current gtk-doc func */ +GHashTable *gtk_doc_hash = NULL; static GString *cbuf = NULL; int ccode_line = 1; +GList *include_files = NULL; +/* 0 no, 1 means yes, 2+ means don't even start looking anymore */ +static int look_for_includes = 0; + int line_no = 1; +/* last filename parsed from a #line directive */ +char *hline_filename = NULL; static void clear_cbuf(void) { if(!cbuf) { - cbuf = g_string_new(""); + cbuf = g_string_new(NULL); } else { - cbuf = g_string_assign(cbuf,""); + cbuf = g_string_assign(cbuf, ""); } } @@ -626,17 +1090,62 @@ add_to_cbuf(char *s) } } -#define COMMENT 1 +static void +add_gtk_doc_func(void) +{ + if(!gtk_doc_func) + return; + + if(!gtk_doc_hash) + gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal); + g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str)); + clear_cbuf(); + + gtk_doc_func = NULL; +} + +/* Ugly warning avoiding */ +#ifdef FLEX_SCANNER +int yylex(void); +#endif + + -#define C_CODE 2 -#define C_CODE_STRING 3 -#define CLASS_CODE 4 -#define CLASS_CODE_I 5 -#line 640 "lex.yy.c" + + + + + +#line 1124 "lex.yy.c" + +#define INITIAL 0 +#define COMMENT 1 +#define C_CODE 2 +#define CODE_STRING 3 +#define CLASS_CODE 4 +#define CLASS_STRING 5 +#define CLASS_CODE_I 6 +#define PROPERTY_CODE 7 +#define PROPERTY_CODE_I 8 +#define GTK_DOC_BEFORE_NAME 9 +#define GTK_DOC 10 +#define GTK_DOC_LINE 11 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif /* Macros after this point can all be overridden by user definitions in * section 1. @@ -644,65 +1153,30 @@ add_to_cbuf(char *s) #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int yywrap (void ); #else -extern int yywrap YY_PROTO(( void )); -#endif +extern int yywrap (void ); #endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); #endif + static void yyunput (int c,char *buf_ptr ); + #ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); +static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif +#ifdef __cplusplus +static int yyinput (void ); #else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 +static int input (void ); #endif -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -711,7 +1185,6 @@ YY_MALLOC_DECL #endif /* Copy whatever the last rule matched to the standard output. */ - #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). @@ -724,9 +1197,10 @@ YY_MALLOC_DECL */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -736,9 +1210,22 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -759,12 +1246,18 @@ YY_MALLOC_DECL #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -780,31 +1273,44 @@ YY_MALLOC_DECL #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ - yy_current_buffer->yy_at_bol = \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION +/** The main scanner function which does all the work. + */ YY_DECL - { +{ register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; + +#line 117 "lexer.l" + + + +/* Avoid warning from flex, cuz flex sucks */ +#ifdef FLEX_SCANNER +yy_current_state = 0; +#endif -#line 66 "lexer.l" -#line 797 "lex.yy.c" +#line 1300 "lex.yy.c" - if ( yy_init ) + if ( (yy_init) ) { - yy_init = 0; + (yy_init) = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)yyalloc(YY_BUF_SIZE + 2 ); + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -812,29 +1318,33 @@ YY_DECL if ( ! yyout ) yyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); /* Support of yytext. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + yy_match: do { @@ -842,450 +1352,1080 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 551 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } - while ( yy_base[yy_current_state] != 435 ); + while ( yy_base[yy_current_state] != 1327 ); yy_find_action: - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { - if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) { - yy_act = yy_acclist[yy_lp]; + yy_act = yy_acclist[(yy_lp)]; { - yy_full_match = yy_cp; + (yy_full_match) = yy_cp; break; } } --yy_cp; - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 1: +/* rule 1 can match eol */ YY_RULE_SETUP -#line 68 "lexer.l" +#line 127 "lexer.l" { line_no++; REJECT; } YY_BREAK case 2: -*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ -yy_c_buf_p = yy_cp -= 1; +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 70 "lexer.l" -{ ; /*comment, ignore*/ } +#line 129 "lexer.l" +{ +/* Thy evil easter egg */ +#define QQ(x) long x +#define KK(x) =atoi(__(&,,x,)) +#define MM(x,a) {QQ(i);for(i=2;i'); + *p = '\0'; + include_files = g_list_prepend(include_files,g_strdup(file)); + g_free(str); + } + REJECT; +} YY_BREAK case 6: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 74 "lexer.l" -{BEGIN(COMMENT); before_comment = INITIAL; } +#line 207 "lexer.l" +{ + /* eat out gtk doc stuff */ + BEGIN(GTK_DOC_BEFORE_NAME); + clear_cbuf(); + } YY_BREAK case 7: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 75 "lexer.l" -{BEGIN(COMMENT); before_comment = C_CODE; } +#line 212 "lexer.l" +{ + /* empty doc lines */ + ; + } YY_BREAK case 8: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 76 "lexer.l" -{BEGIN(COMMENT); before_comment = CLASS_CODE; } +#line 216 "lexer.l" +{ + char *p; + BEGIN(GTK_DOC); + p = strchr(yytext, '*'); + g_free(gtk_doc_func); + gtk_doc_func = g_strdup(p+2); + p = strchr(gtk_doc_func, ':'); + if(p) *p='\0'; + g_strstrip(gtk_doc_func); + } YY_BREAK case 9: YY_RULE_SETUP -#line 77 "lexer.l" -{BEGIN(COMMENT); before_comment = CLASS_CODE_I; } +#line 226 "lexer.l" +{ + BEGIN(CLASS_CODE_I); + } YY_BREAK case 10: YY_RULE_SETUP -#line 78 "lexer.l" -{BEGIN(before_comment);} +#line 229 "lexer.l" +{ + BEGIN(COMMENT); + before_comment = CLASS_CODE_I; + } YY_BREAK case 11: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 79 "lexer.l" -{ ; /* comment, ignore */ } +#line 233 "lexer.l" +{ + /* empty doc lines */ + add_to_cbuf(" *\n"); + } YY_BREAK case 12: YY_RULE_SETUP -#line 80 "lexer.l" -{ ; /* comment, ignore */ } +#line 237 "lexer.l" +{ + BEGIN(CLASS_CODE_I); + add_gtk_doc_func(); + } YY_BREAK case 13: YY_RULE_SETUP -#line 82 "lexer.l" +#line 241 "lexer.l" { - BEGIN(C_CODE); - parenth_depth = 1; - class_after_c = FALSE; - header_c = TRUE; - clear_cbuf(); - ccode_line = line_no; + fflush(stdout); + add_to_cbuf(" * "); + BEGIN(GTK_DOC_LINE); } YY_BREAK case 14: YY_RULE_SETUP -#line 90 "lexer.l" +#line 246 "lexer.l" { - BEGIN(C_CODE); - parenth_depth = 1; - class_after_c = FALSE; - header_c = FALSE; - clear_cbuf(); - ccode_line = line_no; + BEGIN(CLASS_CODE_I); } YY_BREAK case 15: YY_RULE_SETUP -#line 98 "lexer.l" +#line 249 "lexer.l" { - BEGIN(INITIAL); - yylval.cbuf = cbuf; - cbuf = NULL; - if(header_c) - return HCODE; - else - return CCODE; + BEGIN(COMMENT); + before_comment = CLASS_CODE_I; } YY_BREAK case 16: YY_RULE_SETUP -#line 108 "lexer.l" -{ add_to_cbuf(yytext); } +#line 253 "lexer.l" +{ + BEGIN(CLASS_CODE_I); + add_to_cbuf("\n"); + add_gtk_doc_func(); + } YY_BREAK case 17: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 109 "lexer.l" -{ add_to_cbuf(yytext); } +#line 258 "lexer.l" +{ + BEGIN(GTK_DOC); + add_to_cbuf(yytext); + add_to_cbuf("\n"); + } YY_BREAK case 18: YY_RULE_SETUP -#line 110 "lexer.l" -{ add_to_cbuf(yytext); } +#line 263 "lexer.l" +{ + fflush(stdout); + add_to_cbuf(yytext); + } YY_BREAK case 19: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 111 "lexer.l" -{ add_to_cbuf(yytext); } +#line 268 "lexer.l" +{ add_to_cbuf(yytext); /*comment, ignore*/ } YY_BREAK case 20: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 113 "lexer.l" -{ add_to_cbuf(yytext); } +#line 269 "lexer.l" +{ ; /*comment, ignore*/ } YY_BREAK case 21: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 114 "lexer.l" -{ - BEGIN(C_CODE_STRING); - add_to_cbuf(yytext); - } +#line 270 "lexer.l" +{ ; /*comment, ignore*/ } YY_BREAK case 22: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 118 "lexer.l" -{ - add_to_cbuf(yytext); - } +#line 271 "lexer.l" +{ ; /*comment, ignore*/ } YY_BREAK case 23: YY_RULE_SETUP -#line 121 "lexer.l" -{ - BEGIN(C_CODE); - add_to_cbuf(yytext); - } +#line 272 "lexer.l" +{BEGIN(COMMENT); before_comment = INITIAL; } YY_BREAK case 24: YY_RULE_SETUP -#line 125 "lexer.l" +#line 273 "lexer.l" { - add_to_cbuf(yytext); - } + add_to_cbuf(yytext); + BEGIN(COMMENT); + before_comment = C_CODE; +} YY_BREAK case 25: YY_RULE_SETUP -#line 129 "lexer.l" -{ - parenth_depth++; - add_to_cbuf(yytext); - } +#line 278 "lexer.l" +{BEGIN(COMMENT); before_comment = CLASS_CODE; } YY_BREAK case 26: YY_RULE_SETUP -#line 133 "lexer.l" -{ - parenth_depth--; - if(parenth_depth<0) { - REJECT; - } else if(parenth_depth==0 && class_after_c) { - BEGIN(CLASS_CODE_I); - yylval.cbuf = cbuf; - cbuf = NULL; - return CCODE; - } - add_to_cbuf(yytext); - } +#line 279 "lexer.l" +{BEGIN(COMMENT); before_comment = CLASS_CODE_I; } YY_BREAK case 27: YY_RULE_SETUP -#line 146 "lexer.l" -{ add_to_cbuf(yytext); } +#line 280 "lexer.l" +{BEGIN(COMMENT); before_comment = PROPERTY_CODE_I; } YY_BREAK case 28: YY_RULE_SETUP -#line 147 "lexer.l" -{ add_to_cbuf(yytext); } +#line 281 "lexer.l" +{ + if(before_comment == C_CODE) add_to_cbuf(yytext); + BEGIN(before_comment); + } YY_BREAK case 29: YY_RULE_SETUP -#line 149 "lexer.l" +#line 285 "lexer.l" { - BEGIN(CLASS_CODE); - return CLASS; + /* comment, ignore */ + if(before_comment == C_CODE) add_to_cbuf(yytext); } YY_BREAK case 30: +/* rule 30 can match eol */ YY_RULE_SETUP -#line 154 "lexer.l" -{return FROM;} +#line 289 "lexer.l" +{ + /* comment, ignore */ + if(before_comment == C_CODE) add_to_cbuf(yytext); + } YY_BREAK case 31: YY_RULE_SETUP -#line 156 "lexer.l" -{return VOID;} +#line 294 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = ACODE; + clear_cbuf(); + ccode_line = line_no; + } YY_BREAK case 32: YY_RULE_SETUP -#line 157 "lexer.l" -{return STRUCT;} +#line 302 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = ATCODE; + clear_cbuf(); + ccode_line = line_no; + } YY_BREAK case 33: YY_RULE_SETUP -#line 158 "lexer.l" -{return UNION;} +#line 311 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = HTCODE; + clear_cbuf(); + ccode_line = line_no; + } YY_BREAK case 34: YY_RULE_SETUP -#line 159 "lexer.l" -{return ENUM;} +#line 319 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = PHCODE; + clear_cbuf(); + ccode_line = line_no; + } YY_BREAK case 35: YY_RULE_SETUP -#line 160 "lexer.l" -{return SIGNED;} +#line 327 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = HCODE; + clear_cbuf(); + ccode_line = line_no; + } YY_BREAK case 36: YY_RULE_SETUP -#line 161 "lexer.l" -{return UNSIGNED;} +#line 335 "lexer.l" +{ + BEGIN(C_CODE); + parenth_depth = 1; + class_after_c = FALSE; + code_type = CCODE; + clear_cbuf(); + ccode_line = line_no; + if(look_for_includes==0) + look_for_includes=1; + } YY_BREAK case 37: YY_RULE_SETUP -#line 162 "lexer.l" -{return LONG;} +#line 345 "lexer.l" +{ + BEGIN(INITIAL); + yylval.cbuf = cbuf; + cbuf = NULL; + if(look_for_includes==1) + look_for_includes=0; + return code_type; + } YY_BREAK case 38: YY_RULE_SETUP -#line 163 "lexer.l" -{return SHORT;} +#line 354 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 39: YY_RULE_SETUP -#line 164 "lexer.l" -{return INT;} +#line 355 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 40: YY_RULE_SETUP -#line 165 "lexer.l" -{return FLOAT;} +#line 356 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 41: YY_RULE_SETUP -#line 166 "lexer.l" -{return DOUBLE;} +#line 357 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 42: YY_RULE_SETUP -#line 167 "lexer.l" -{return CHAR;} +#line 358 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 43: YY_RULE_SETUP -#line 169 "lexer.l" -{yylval.line = line_no; return PUBLIC;} +#line 359 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 44: YY_RULE_SETUP -#line 170 "lexer.l" -{yylval.line = line_no; return PRIVATE;} +#line 361 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 45: YY_RULE_SETUP -#line 171 "lexer.l" -{yylval.line = line_no; return ARGUMENT;} +#line 364 "lexer.l" +{ + BEGIN(CODE_STRING); + before_string = C_CODE; + add_to_cbuf(yytext); + } YY_BREAK case 46: YY_RULE_SETUP -#line 172 "lexer.l" -{yylval.line = line_no; return VIRTUAL;} +#line 369 "lexer.l" +{ + BEGIN(CODE_STRING); + before_string = PROPERTY_CODE_I; + add_to_cbuf(yytext); + } YY_BREAK case 47: YY_RULE_SETUP -#line 173 "lexer.l" -{yylval.line = line_no; return SIGNAL;} +#line 374 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 48: YY_RULE_SETUP -#line 174 "lexer.l" -{yylval.line = line_no; return OVERRIDE;} +#line 375 "lexer.l" +{ + BEGIN(before_string); + add_to_cbuf(yytext); + if (before_string == PROPERTY_CODE_I) { + yylval.id = cbuf->str; + g_string_free (cbuf, FALSE); + cbuf = NULL; + return STRING; + } + } YY_BREAK case 49: YY_RULE_SETUP -#line 175 "lexer.l" -{return ONERROR;} +#line 385 "lexer.l" +{ add_to_cbuf(yytext); } YY_BREAK case 50: +/* rule 50 can match eol */ YY_RULE_SETUP -#line 176 "lexer.l" +#line 386 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 388 "lexer.l" +{ + parenth_depth++; + add_to_cbuf(yytext); + } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 392 "lexer.l" +{ + parenth_depth--; + if(parenth_depth<0) { + REJECT; + } else if(parenth_depth==0 && class_after_c) { + BEGIN(CLASS_CODE_I); + yylval.cbuf = cbuf; + cbuf = NULL; + return CCODE; + } + add_to_cbuf(yytext); + } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 405 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 54: +/* rule 54 can match eol */ +YY_RULE_SETUP +#line 406 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 408 "lexer.l" +{ + static int found_classes = 0; + look_for_includes = 2; + BEGIN(CLASS_CODE); + + if(++found_classes > 1) { + error_print(GOB_ERROR, line_no, + "Only one class per file allowed"); + } + + return CLASS; + } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 421 "lexer.l" +{ return ERROR; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 422 "lexer.l" +{ return ENUM; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 423 "lexer.l" +{ return FLAGS; } + YY_BREAK +case 59: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 425 "lexer.l" +{ + int maj = 0, min = 0, pl = 0; + int rmaj = 0, rmin = 0, rpl = 0; + int effective_maj = 0; + int effective_rmaj = 0; + char *p; + + sscanf (VERSION, "%d.%d.%d", &rmaj, &rmin, &rpl); + effective_rmaj = rmaj; + if (rmin >= 90) + effective_rmaj = rmaj + 1; + + p = strchr (yytext,'r'); + g_assert (p); /* we MUST have found it */ + sscanf (p, "requires %d.%d.%d", &maj, &min, &pl); + effective_maj = maj; + if (min >= 90) + effective_maj = maj + 1; + + if(rmaj < maj || + (rmaj == maj && rmin < min) || + (rmaj == maj && rmin == min && rpl < pl)) { + error_printf (GOB_ERROR, line_no, + "GOB version at least %d.%d.%d required " + "(this is %s)\n" + "To upgrade your gob, see: " + "http://www.5z.com/jirka/gob.html", + maj, min, pl, VERSION); + } + + if(effective_rmaj != effective_maj) { + error_printf(GOB_ERROR, line_no, + "GOB major version %d required " + "(this is %s)\n" + "To upgrade your gob, see: " + "http://www.5z.com/jirka/gob.html", + effective_maj, VERSION); + } + + } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 466 "lexer.l" +{ + if(for_cpp) { + error_printf(GOB_WARN, line_no, + "'%s' keyword should not " + "be used when generating " + "C++ code", yytext); + } + REJECT; + } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 476 "lexer.l" +{return FROM;} + YY_BREAK +case 62: +YY_RULE_SETUP +#line 477 "lexer.l" +{ + BEGIN(CLASS_STRING); + before_string = CLASS_CODE; + add_to_cbuf(yytext); + } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 482 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 483 "lexer.l" +{ + BEGIN(before_string); + add_to_cbuf(yytext); + yylval.id = cbuf->str; + g_string_free (cbuf, FALSE); + cbuf = NULL; + return STRING; + } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 491 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 66: +/* rule 66 can match eol */ +YY_RULE_SETUP +#line 492 "lexer.l" +{ add_to_cbuf(yytext); } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 494 "lexer.l" +{return VOID;} + YY_BREAK +case 68: +YY_RULE_SETUP +#line 495 "lexer.l" +{return STRUCT;} + YY_BREAK +case 69: +YY_RULE_SETUP +#line 496 "lexer.l" +{return UNION;} + YY_BREAK +case 70: +YY_RULE_SETUP +#line 497 "lexer.l" +{return ENUM;} + YY_BREAK +case 71: +YY_RULE_SETUP +#line 498 "lexer.l" +{return SIGNED;} + YY_BREAK +case 72: +YY_RULE_SETUP +#line 499 "lexer.l" +{return UNSIGNED;} + YY_BREAK +case 73: +YY_RULE_SETUP +#line 500 "lexer.l" +{return LONG;} + YY_BREAK +case 74: +YY_RULE_SETUP +#line 501 "lexer.l" +{return SHORT;} + YY_BREAK +case 75: +YY_RULE_SETUP +#line 502 "lexer.l" +{return INT;} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 503 "lexer.l" +{return FLOAT;} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 504 "lexer.l" +{return DOUBLE;} + YY_BREAK +case 78: +YY_RULE_SETUP +#line 505 "lexer.l" +{return CHAR;} + YY_BREAK +case 79: +YY_RULE_SETUP +#line 506 "lexer.l" +{return CONST;} + YY_BREAK +case 80: +YY_RULE_SETUP +#line 508 "lexer.l" +{return THREEDOTS;} + YY_BREAK +case 81: +YY_RULE_SETUP +#line 510 "lexer.l" +{yylval.line = line_no; return PUBLIC;} + YY_BREAK +case 82: +YY_RULE_SETUP +#line 511 "lexer.l" +{yylval.line = line_no; return PRIVATE;} + YY_BREAK +case 83: +YY_RULE_SETUP +#line 512 "lexer.l" +{yylval.line = line_no; return PROTECTED;} + YY_BREAK +case 84: +YY_RULE_SETUP +#line 513 "lexer.l" +{yylval.line = line_no; return CLASSWIDE;} + YY_BREAK +case 85: +YY_RULE_SETUP +#line 514 "lexer.l" +{yylval.line = line_no; return ARGUMENT;} + YY_BREAK +case 86: +YY_RULE_SETUP +#line 515 "lexer.l" +{yylval.line = line_no; return VIRTUAL;} + YY_BREAK +case 87: +YY_RULE_SETUP +#line 516 "lexer.l" +{yylval.line = line_no; return SIGNAL;} + YY_BREAK +case 88: +YY_RULE_SETUP +#line 517 "lexer.l" +{yylval.line = line_no; return OVERRIDE;} + YY_BREAK +case 89: +YY_RULE_SETUP +#line 518 "lexer.l" +{ + yylval.line = line_no; + BEGIN(PROPERTY_CODE); + return PROPERTY; + } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 523 "lexer.l" +{ yylval.line = line_no; return NICK; } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 524 "lexer.l" +{ yylval.line = line_no; return BLURB; } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 525 "lexer.l" +{ yylval.line = line_no; return MAXIMUM; } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 526 "lexer.l" +{ yylval.line = line_no; return MINIMUM; } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 527 "lexer.l" +{ yylval.line = line_no; return DEFAULT_VALUE; } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 528 "lexer.l" +{ yylval.line = line_no; return FLAGS; } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 529 "lexer.l" +{ yylval.line = line_no; return TYPE; } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 530 "lexer.l" +{ yylval.line = line_no; return FLAGS_TYPE; } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 531 "lexer.l" +{ yylval.line = line_no; return ENUM_TYPE; } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 532 "lexer.l" +{ yylval.line = line_no; return PARAM_TYPE; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 533 "lexer.l" +{ yylval.line = line_no; return BOXED_TYPE; } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 534 "lexer.l" +{ yylval.line = line_no; return OBJECT_TYPE; } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 535 "lexer.l" +{ + yylval.line = line_no; + property_paren_depth = 1; + BEGIN(PROPERTY_CODE_I); + return '('; + } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 541 "lexer.l" +{ + yylval.line = line_no; + property_paren_depth++; + return '('; + } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 546 "lexer.l" +{ + yylval.line = line_no; + property_paren_depth--; + if (property_paren_depth == 0) { + BEGIN(CLASS_CODE_I); + } + return ')'; + } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 555 "lexer.l" { yylval.id = g_strdup(yytext); return NUMBER; } YY_BREAK -case 51: +case 106: YY_RULE_SETUP -#line 180 "lexer.l" +#line 559 "lexer.l" { + /* This is cpp kind of token thingie */ + if (for_cpp) { + yylval.id = g_strdup(yytext); + return TOKEN; + } else { + REJECT; + } + } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 568 "lexer.l" +{ + /* this one is for a classname with a namespace */ yylval.id = g_strdup(yytext); return TYPETOKEN; } YY_BREAK -case 52: +case 108: YY_RULE_SETUP -#line 184 "lexer.l" +#line 573 "lexer.l" +{ + /* this is for a classname with an empty namespace */ + yylval.id = g_strdup(yytext); + return TYPETOKEN; + } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 578 "lexer.l" { yylval.id = g_strdup(yytext); return TOKEN; } YY_BREAK -case 53: +case 110: YY_RULE_SETUP -#line 189 "lexer.l" +#line 582 "lexer.l" +{ + yylval.id = g_strdup(yytext); + return SINGLE_CHAR; + } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 587 "lexer.l" +{ + yylval.id = g_strdup(yytext); + return ARRAY_DIM; + } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 591 "lexer.l" +{ + /* cheat for bitfield */ + yylval.id = g_strdup(yytext); + return ARRAY_DIM; + } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 596 "lexer.l" { BEGIN(CLASS_CODE_I); return '{'; } YY_BREAK -case 54: +case 114: YY_RULE_SETUP -#line 193 "lexer.l" +#line 600 "lexer.l" { BEGIN(C_CODE); parenth_depth=1; class_after_c = TRUE; - ccode_line = line_no; yylval.line = line_no; + clear_cbuf(); + ccode_line = line_no; return '{'; } YY_BREAK -case 55: +case 115: YY_RULE_SETUP -#line 201 "lexer.l" +#line 609 "lexer.l" { BEGIN(INITIAL); return '}'; } YY_BREAK -case 56: +case 116: YY_RULE_SETUP -#line 206 "lexer.l" +#line 614 "lexer.l" ; /*ignore*/ YY_BREAK -case 57: +case 117: YY_RULE_SETUP -#line 208 "lexer.l" +#line 616 "lexer.l" { yylval.line = line_no; return yytext[0]; } YY_BREAK -case 58: +case 118: +/* rule 118 can match eol */ YY_RULE_SETUP -#line 212 "lexer.l" +#line 621 "lexer.l" +; /*ignore*/ + YY_BREAK +case 119: +*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 623 "lexer.l" +{ + char *p; + int t; + p = strchr (yytext,'p'); + g_assert (p); /* we MUST have found it */ + sscanf (p, "prealloc %d", &t); + prealloc=t; + } + YY_BREAK +case 120: +YY_RULE_SETUP +#line 632 "lexer.l" ECHO; YY_BREAK -#line 1258 "lex.yy.c" +#line 2392 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(C_CODE): - case YY_STATE_EOF(C_CODE_STRING): + case YY_STATE_EOF(CODE_STRING): case YY_STATE_EOF(CLASS_CODE): + case YY_STATE_EOF(CLASS_STRING): case YY_STATE_EOF(CLASS_CODE_I): + case YY_STATE_EOF(PROPERTY_CODE): + case YY_STATE_EOF(PROPERTY_CODE_I): + case YY_STATE_EOF(GTK_DOC_BEFORE_NAME): + case YY_STATE_EOF(GTK_DOC): + case YY_STATE_EOF(GTK_DOC_LINE): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1295,13 +2435,13 @@ ECHO; * end-of-buffer state). Contrast this with the test * in input(). */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -1314,30 +2454,30 @@ ECHO; yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1348,7 +2488,7 @@ ECHO; * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -1356,30 +2496,30 @@ ECHO; else { - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; @@ -1390,8 +2530,7 @@ ECHO; "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1400,21 +2539,20 @@ ECHO; * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1434,86 +2572,52 @@ static int yy_get_next_buffer() /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT + YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); - yy_current_buffer->yy_n_chars = yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); + yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1521,147 +2625,133 @@ static int yy_get_next_buffer() else ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; - } - +} /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() - { + static yy_state_type yy_get_previous_state (void) +{ register yy_state_type yy_current_state; register char *yy_cp; - - yy_current_state = yy_start; + + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 551 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - + register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 199 ) + if ( yy_current_state >= 551 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 198); + yy_is_jam = (yy_current_state == 550); if ( ! yy_is_jam ) - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; - } - +} -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - while ( source > yy_current_buffer->yy_ch_buf ) + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - +#ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput() + static int yyinput (void) #else -static int input() + static int input (void) #endif - { - int c; - *yy_c_buf_p = yy_hold_char; +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ - *yy_c_buf_p = '\0'; + *(yy_c_buf_p) = '\0'; else { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); - switch ( yy_get_next_buffer() ) + switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() @@ -1675,16 +2765,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + yyrestart(yyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( yywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1694,91 +2784,94 @@ static int input() } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; + (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); - yy_current_buffer->yy_at_bol = (c == '\n'); + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +} +#endif /* ifndef YY_NO_INPUT */ - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); } + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1787,80 +2880,75 @@ int size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer(b,file ); return b; - } - +} -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - + yyfree((void *) b->yy_ch_buf ); -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif + yyfree((void *) b ); +} +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} - { - if ( ! b ) +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -1877,29 +2965,121 @@ YY_BUFFER_STATE b; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; } + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1913,47 +3093,42 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str ) +{ + + return yy_scan_bytes(yy_str,strlen(yy_str) ); +} -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len ) +{ YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; - buf = (char *) yy_flex_alloc( n ); + buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -1962,7 +3137,7 @@ int len; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -1972,148 +3147,166 @@ int len; b->yy_is_our_buffer = 1; return b; - } -#endif - +} -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 #endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); +/* Redefine yyless() so it works in section 3 code. */ - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } +/* Accessor methods (get/set functions) to struct members. */ - yy_start_stack[yy_start_stack_ptr++] = YY_START; +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} - BEGIN(new_state); - } -#endif +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif +/** Get the current token. + * + */ +char *yyget_text (void) +{ + return yytext; +} -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} +int yyget_debug (void) +{ + return yy_flex_debug; +} +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} -/* Redefine yyless() so it works in section 3 code. */ +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + yyfree ( (yy_state_buf) ); + + return 0; +} -/* Internal utility routines. */ +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; - for ( i = 0; i < n; ++i ) + for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; - for ( n = 0; s[n]; ++n ) + for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *yyalloc (yy_size_t size ) +{ return (void *) malloc( size ); - } +} -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { +void *yyrealloc (void * ptr, yy_size_t size ) +{ /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2122,23 +3315,28 @@ yy_size_t size; * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); - } +} -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL #endif -#line 212 "lexer.l" +#line 632 "lexer.l" + + +