diff --git a/direct/src/dcparser/dcLexer.cxx.prebuilt b/direct/src/dcparser/dcLexer.cxx.prebuilt index 1df1eab7ed..443af02185 100644 --- a/direct/src/dcparser/dcLexer.cxx.prebuilt +++ b/direct/src/dcparser/dcLexer.cxx.prebuilt @@ -1,8 +1,13 @@ +#line 2 "lex.yy.c" + +#line 4 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + #define yy_create_buffer dcyy_create_buffer #define yy_delete_buffer dcyy_delete_buffer -#define yy_scan_buffer dcyy_scan_buffer -#define yy_scan_string dcyy_scan_string -#define yy_scan_bytes dcyy_scan_bytes #define yy_flex_debug dcyy_flex_debug #define yy_init_buffer dcyy_init_buffer #define yy_flush_buffer dcyy_flush_buffer @@ -11,78 +16,117 @@ #define yyin dcyyin #define yyleng dcyyleng #define yylex dcyylex +#define yylineno dcyylineno #define yyout dcyyout #define yyrestart dcyyrestart #define yytext dcyytext #define yywrap dcyywrap - -#line 20 "lex.yy.c" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ +#define yyalloc dcyyalloc +#define yyrealloc dcyyrealloc +#define yyfree dcyyfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#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 -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif +/* end standard C headers. */ + +/* 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 + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 #endif +#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 -#ifndef _WIN32 -#endif - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) -#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__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 @@ -97,71 +141,70 @@ * 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 dcyyrestart(dcyyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#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; +extern int dcyyleng; + +extern FILE *dcyyin, *dcyyout; #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; \ + /* Undo effects of setting up dcyytext. */ \ + 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_DO_BEFORE_ACTION; /* set up yytext again */ \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up dcyytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; +#define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -198,12 +241,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 @@ -213,99 +260,133 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. + * (via dcyyrestart()), so that the user can continue scanning by + * just pointing dcyyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 - }; -static YY_BUFFER_STATE yy_current_buffer = 0; + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* 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. */ +/* yy_hold_char holds the character lost when dcyytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +int dcyyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... +/* Flag which is used to allow dcyywrap()'s to do buffer switches + * instead of setting up a fresh dcyyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void dcyyrestart (FILE *input_file ); +void dcyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE dcyy_create_buffer (FILE *file,int size ); +void dcyy_delete_buffer (YY_BUFFER_STATE b ); +void dcyy_flush_buffer (YY_BUFFER_STATE b ); +void dcyypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void dcyypop_buffer_state (void ); -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 ) +static void dcyyensure_buffer_stack (void ); +static void dcyy_load_buffer_state (void ); +static void dcyy_init_buffer (YY_BUFFER_STATE b,FILE *file ); -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 )); +#define YY_FLUSH_BUFFER dcyy_flush_buffer(YY_CURRENT_BUFFER ) -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 * )); +YY_BUFFER_STATE dcyy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE dcyy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE dcyy_scan_bytes (yyconst char *bytes,int len ); -#define yy_new_buffer yy_create_buffer +void *dcyyalloc (yy_size_t ); +void *dcyyrealloc (void *,yy_size_t ); +void dcyyfree (void * ); + +#define yy_new_buffer dcyy_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 ){ \ + dcyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + dcyy_create_buffer(dcyyin,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 ){\ + dcyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + dcyy_create_buffer(dcyyin,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) typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +FILE *dcyyin = (FILE *) 0, *dcyyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int dcyylineno; + +int dcyylineno = 1; + +extern char *dcyytext; +#define yytext_ptr dcyytext + +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. + * corresponding action - sets up dcyytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + dcyyleng = (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 44 #define YY_END_OF_BUFFER 45 -static yyconst short int yy_accept[165] = +/* 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_accept[165] = { 0, 0, 0, 45, 43, 2, 1, 39, 40, 43, 43, 43, 35, 35, 41, 42, 42, 42, 42, 42, 42, @@ -327,7 +408,7 @@ static yyconst short int yy_accept[165] = 42, 42, 33, 0 } ; -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, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -359,7 +440,7 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[44] = +static yyconst flex_int32_t yy_meta[44] = { 0, 1, 1, 2, 1, 1, 1, 3, 4, 1, 5, 5, 5, 5, 5, 5, 5, 5, 1, 6, 6, @@ -368,7 +449,7 @@ static yyconst int yy_meta[44] = 7, 8, 7 } ; -static yyconst short int yy_base[173] = +static yyconst flex_int16_t yy_base[173] = { 0, 0, 0, 209, 210, 210, 0, 210, 210, 200, 0, 38, 37, 38, 210, 0, 16, 27, 26, 22, 24, @@ -391,7 +472,7 @@ static yyconst short int yy_base[173] = 107, 111 } ; -static yyconst short int yy_def[173] = +static yyconst flex_int16_t yy_def[173] = { 0, 164, 1, 164, 164, 164, 165, 164, 164, 166, 167, 164, 168, 168, 164, 169, 169, 169, 169, 169, 169, @@ -414,7 +495,7 @@ static yyconst short int yy_def[173] = 164, 164 } ; -static yyconst short int yy_nxt[254] = +static yyconst flex_int16_t yy_nxt[254] = { 0, 4, 5, 6, 7, 8, 4, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 14, 15, 15, @@ -446,7 +527,7 @@ static yyconst short int yy_nxt[254] = 164, 164, 164 } ; -static yyconst short int yy_chk[254] = +static yyconst flex_int16_t yy_chk[254] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -481,6 +562,9 @@ static yyconst short int yy_chk[254] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int dcyy_flex_debug; +int dcyy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -488,9 +572,8 @@ static char *yy_last_accepting_cpos; #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +char *dcyytext; #line 1 "dcLexer.lxx" -#define INITIAL 0 /* // Filename: dcLexer.lxx // Created by: drose (05Oct00) @@ -503,6 +586,7 @@ char *yytext; #include "dcParser.h" #include "dcFile.h" #include "dcindent.h" +#include "pstrtod.h" static int yyinput(void); // declared by flex. @@ -886,10 +970,54 @@ eat_c_comment() { // accept() is called below as each piece is pulled off and // accepted by the lexer; it increments the current column number. inline void accept() { - col_number += yyleng; + col_number += dcyyleng; } -#line 894 "lex.yy.c" +#line 977 "lex.yy.c" + +#define INITIAL 0 + +#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. + */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int dcyylex_destroy (void ); + +int dcyyget_debug (void ); + +void dcyyset_debug (int debug_flag ); + +YY_EXTRA_TYPE dcyyget_extra (void ); + +void dcyyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *dcyyget_in (void ); + +void dcyyset_in (FILE * in_str ); + +FILE *dcyyget_out (void ); + +void dcyyset_out (FILE * out_str ); + +int dcyyget_leng (void ); + +char *dcyyget_text (void ); + +int dcyyget_lineno (void ); + +void dcyyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -897,65 +1025,30 @@ inline void accept() { #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int dcyywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int dcyywrap (void ); #endif #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 )); +static int yyinput (void ); #else -static int input YY_PROTO(( void )); -#endif +static int input (void ); #endif -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -964,12 +1057,11 @@ 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(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( dcyytext, dcyyleng, 1, dcyyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -977,22 +1069,23 @@ 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 = '*'; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( dcyyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ + if ( c == EOF && ferror( dcyyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = fread(buf, 1, max_size, dcyyin))==0 && ferror(dcyyin)) \ { \ if( errno != EINTR) \ { \ @@ -1000,9 +1093,11 @@ YY_MALLOC_DECL break; \ } \ errno=0; \ - clearerr(yyin); \ + clearerr(dcyyin); \ } \ - } + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -1023,14 +1118,20 @@ 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 -/* Code executed at the beginning of each rule, after yytext and yyleng +extern int dcyylex (void); + +#define YY_DECL int dcyylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after dcyytext and dcyyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -1045,13 +1146,15 @@ YY_MALLOC_DECL #define YY_RULE_SETUP \ 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 407 "dcLexer.lxx" + +#line 408 "dcLexer.lxx" @@ -1062,53 +1165,55 @@ YY_DECL } -#line 1067 "lex.yy.c" +#line 1170 "lex.yy.c" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! dcyyin ) + dcyyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! dcyyout ) + dcyyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + dcyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + dcyy_create_buffer(dcyyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + dcyy_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; + /* Support of dcyytext. */ + *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_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1125,29 +1230,28 @@ yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: +/* rule 1 can match eol */ YY_RULE_SETUP -#line 417 "dcLexer.lxx" +#line 418 "dcLexer.lxx" { // New line. Save a copy of the line so we can print it out for the // benefit of the user in case we get an error. @@ -1164,7 +1268,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 431 "dcLexer.lxx" +#line 432 "dcLexer.lxx" { // Eat whitespace. accept(); @@ -1172,7 +1276,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 436 "dcLexer.lxx" +#line 437 "dcLexer.lxx" { // Eat C++-style comments. accept(); @@ -1180,7 +1284,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 441 "dcLexer.lxx" +#line 442 "dcLexer.lxx" { // Eat C-style comments. accept(); @@ -1189,7 +1293,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 448 "dcLexer.lxx" +#line 449 "dcLexer.lxx" { accept(); return KW_DCLASS; @@ -1197,7 +1301,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 453 "dcLexer.lxx" +#line 454 "dcLexer.lxx" { accept(); return KW_STRUCT; @@ -1205,7 +1309,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 458 "dcLexer.lxx" +#line 459 "dcLexer.lxx" { accept(); return KW_FROM; @@ -1213,7 +1317,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 463 "dcLexer.lxx" +#line 464 "dcLexer.lxx" { accept(); return KW_IMPORT; @@ -1221,7 +1325,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 468 "dcLexer.lxx" +#line 469 "dcLexer.lxx" { accept(); return KW_KEYWORD; @@ -1229,7 +1333,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 473 "dcLexer.lxx" +#line 474 "dcLexer.lxx" { accept(); return KW_TYPEDEF; @@ -1237,7 +1341,7 @@ YY_RULE_SETUP YY_BREAK case 11: YY_RULE_SETUP -#line 478 "dcLexer.lxx" +#line 479 "dcLexer.lxx" { accept(); return KW_SWITCH; @@ -1245,7 +1349,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 483 "dcLexer.lxx" +#line 484 "dcLexer.lxx" { accept(); return KW_CASE; @@ -1253,7 +1357,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 488 "dcLexer.lxx" +#line 489 "dcLexer.lxx" { accept(); return KW_DEFAULT; @@ -1261,7 +1365,7 @@ YY_RULE_SETUP YY_BREAK case 14: YY_RULE_SETUP -#line 493 "dcLexer.lxx" +#line 494 "dcLexer.lxx" { accept(); return KW_BREAK; @@ -1269,7 +1373,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 498 "dcLexer.lxx" +#line 499 "dcLexer.lxx" { accept(); return KW_INT8; @@ -1277,7 +1381,7 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 503 "dcLexer.lxx" +#line 504 "dcLexer.lxx" { accept(); return KW_INT16; @@ -1285,7 +1389,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 508 "dcLexer.lxx" +#line 509 "dcLexer.lxx" { accept(); return KW_INT32; @@ -1293,7 +1397,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 513 "dcLexer.lxx" +#line 514 "dcLexer.lxx" { accept(); return KW_INT64; @@ -1301,7 +1405,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 518 "dcLexer.lxx" +#line 519 "dcLexer.lxx" { accept(); return KW_UINT8; @@ -1309,7 +1413,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 523 "dcLexer.lxx" +#line 524 "dcLexer.lxx" { accept(); return KW_UINT16; @@ -1317,7 +1421,7 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 528 "dcLexer.lxx" +#line 529 "dcLexer.lxx" { accept(); return KW_UINT32; @@ -1325,7 +1429,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 533 "dcLexer.lxx" +#line 534 "dcLexer.lxx" { accept(); return KW_UINT64; @@ -1333,7 +1437,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 538 "dcLexer.lxx" +#line 539 "dcLexer.lxx" { accept(); return KW_FLOAT64; @@ -1341,7 +1445,7 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 543 "dcLexer.lxx" +#line 544 "dcLexer.lxx" { accept(); return KW_STRING; @@ -1349,7 +1453,7 @@ YY_RULE_SETUP YY_BREAK case 25: YY_RULE_SETUP -#line 548 "dcLexer.lxx" +#line 549 "dcLexer.lxx" { accept(); return KW_BLOB; @@ -1357,7 +1461,7 @@ YY_RULE_SETUP YY_BREAK case 26: YY_RULE_SETUP -#line 553 "dcLexer.lxx" +#line 554 "dcLexer.lxx" { accept(); return KW_BLOB32; @@ -1365,7 +1469,7 @@ YY_RULE_SETUP YY_BREAK case 27: YY_RULE_SETUP -#line 558 "dcLexer.lxx" +#line 559 "dcLexer.lxx" { accept(); return KW_INT8ARRAY; @@ -1373,7 +1477,7 @@ YY_RULE_SETUP YY_BREAK case 28: YY_RULE_SETUP -#line 563 "dcLexer.lxx" +#line 564 "dcLexer.lxx" { accept(); return KW_INT16ARRAY; @@ -1381,7 +1485,7 @@ YY_RULE_SETUP YY_BREAK case 29: YY_RULE_SETUP -#line 568 "dcLexer.lxx" +#line 569 "dcLexer.lxx" { accept(); return KW_INT32ARRAY; @@ -1389,7 +1493,7 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 573 "dcLexer.lxx" +#line 574 "dcLexer.lxx" { accept(); return KW_UINT8ARRAY; @@ -1397,7 +1501,7 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -#line 578 "dcLexer.lxx" +#line 579 "dcLexer.lxx" { accept(); return KW_UINT16ARRAY; @@ -1405,7 +1509,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 583 "dcLexer.lxx" +#line 584 "dcLexer.lxx" { accept(); return KW_UINT32ARRAY; @@ -1413,7 +1517,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 588 "dcLexer.lxx" +#line 589 "dcLexer.lxx" { accept(); return KW_UINT32UINT8ARRAY; @@ -1421,7 +1525,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 593 "dcLexer.lxx" +#line 594 "dcLexer.lxx" { accept(); return KW_CHAR; @@ -1429,7 +1533,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 598 "dcLexer.lxx" +#line 599 "dcLexer.lxx" { // An unsigned integer number. accept(); @@ -1455,7 +1559,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 621 "dcLexer.lxx" +#line 622 "dcLexer.lxx" { // A signed integer number. accept(); @@ -1504,7 +1608,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 667 "dcLexer.lxx" +#line 668 "dcLexer.lxx" { // A hexadecimal integer number. accept(); @@ -1534,18 +1638,18 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 694 "dcLexer.lxx" +#line 695 "dcLexer.lxx" { // A floating-point number. accept(); - dcyylval.u.real = atof(dcyytext); + dcyylval.u.real = patof(dcyytext); dcyylval.str = dcyytext; return REAL; } YY_BREAK case 39: YY_RULE_SETUP -#line 702 "dcLexer.lxx" +#line 703 "dcLexer.lxx" { // Quoted string. accept(); @@ -1555,7 +1659,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 709 "dcLexer.lxx" +#line 710 "dcLexer.lxx" { // Single-quoted string. accept(); @@ -1565,7 +1669,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 716 "dcLexer.lxx" +#line 717 "dcLexer.lxx" { // Long hex string. accept(); @@ -1575,7 +1679,7 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 723 "dcLexer.lxx" +#line 724 "dcLexer.lxx" { // Identifier or keyword. accept(); @@ -1593,7 +1697,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 739 "dcLexer.lxx" +#line 740 "dcLexer.lxx" { // Send any other printable character as itself. accept(); @@ -1602,36 +1706,36 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 745 "dcLexer.lxx" +#line 746 "dcLexer.lxx" ECHO; YY_BREAK -#line 1610 "lex.yy.c" +#line 1714 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + 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 + * just pointed dcyyin at a new source and called + * dcyylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = dcyyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1641,13 +1745,13 @@ case YY_STATE_EOF(INITIAL): * 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 @@ -1660,41 +1764,41 @@ case YY_STATE_EOF(INITIAL): 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 ( dcyywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * yytext, we can now set up + * dcyytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -1702,30 +1806,30 @@ case YY_STATE_EOF(INITIAL): 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; @@ -1736,8 +1840,7 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of dcyylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1746,21 +1849,20 @@ case YY_STATE_EOF(INITIAL): * 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. @@ -1780,34 +1882,30 @@ 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; + int 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; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -1820,8 +1918,7 @@ static int yy_get_next_buffer() 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 ); + dcyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1831,35 +1928,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->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), (size_t) 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 ); + dcyyrestart(dcyyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1867,32 +1964,39 @@ 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; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) dcyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } + (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_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; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1904,30 +2008,23 @@ static yy_state_type yy_get_previous_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 char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1939,80 +2036,73 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 164); return yy_is_jam ? 0 : yy_current_state; - } +} + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + /* undo effects of setting up dcyytext */ + *yy_cp = (yy_hold_char); - /* undo effects of setting up yytext */ - *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); - *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() @@ -2026,16 +2116,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + dcyyrestart(dcyyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( dcyywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -2045,175 +2135,169 @@ 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 dcyytext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** 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 dcyyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + dcyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + dcyy_create_buffer(dcyyin,YY_BUF_SIZE ); } + dcyy_init_buffer(YY_CURRENT_BUFFER,input_file ); + dcyy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void dcyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * dcyypop_buffer_state(); + * dcyypush_buffer_state(new_buffer); + */ + dcyyensure_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; + dcyy_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 + * EOF (dcyywrap()) processing, but the only time this flag + * is looked at is after dcyywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void dcyy_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; + dcyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** 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 dcyy_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) dcyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in dcyy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) dcyyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in dcyy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + dcyy_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 dcyy_create_buffer() + * + */ + void dcyy_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 ); + dcyyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + dcyyfree((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 dcyyrestart() or at EOF. + */ + static void dcyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -#ifndef _WIN32 -#else -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + dcyy_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 - } + /* If b is the current buffer, then dcyy_init_buffer was _probably_ + * called from dcyyrestart() 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; +} -#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 ) +/** 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 dcyy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -2230,31 +2314,127 @@ 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 ) + dcyy_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 dcyypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + dcyyensure_buffer_stack(); + + /* This block is copied from dcyy_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 dcyy_switch_to_buffer. */ + dcyy_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 dcyypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + dcyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + dcyy_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 dcyyensure_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**)dcyyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in dcyyensure_buffer_stack()" ); + + 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 - { + /* 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**)dcyyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in dcyyensure_buffer_stack()" ); + + /* 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 dcyy_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) dcyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in dcyy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; @@ -2266,58 +2446,53 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + dcyy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to dcyylex() will + * scan from a @e copy of @a str. + * @param yystr 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 + * dcyy_scan_bytes() instead. + */ +YY_BUFFER_STATE dcyy_scan_string (yyconst char * yystr ) +{ + + return dcyy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to dcyylex() 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 dcyy_scan_bytes (yyconst char * yybytes, int _yybytes_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 ); + n = _yybytes_len + 2; + buf = (char *) dcyyalloc(n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in dcyy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = dcyy_scan_buffer(buf,n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in dcyy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -2325,78 +2500,17 @@ 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; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +} #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); - } - - +} /* Redefine yyless() so it works in section 3 code. */ @@ -2404,69 +2518,178 @@ char msg[]; #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; \ + /* Undo effects of setting up dcyytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + dcyytext[dcyyleng] = (yy_hold_char); \ + (yy_c_buf_p) = dcyytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + dcyyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int dcyyget_lineno (void) +{ + + return dcyylineno; +} + +/** Get the input stream. + * + */ +FILE *dcyyget_in (void) +{ + return dcyyin; +} + +/** Get the output stream. + * + */ +FILE *dcyyget_out (void) +{ + return dcyyout; +} + +/** Get the length of the current token. + * + */ +int dcyyget_leng (void) +{ + return dcyyleng; +} + +/** Get the current token. + * + */ + +char *dcyyget_text (void) +{ + return dcyytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void dcyyset_lineno (int line_number ) +{ + + dcyylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see dcyy_switch_to_buffer + */ +void dcyyset_in (FILE * in_str ) +{ + dcyyin = in_str ; +} + +void dcyyset_out (FILE * out_str ) +{ + dcyyout = out_str ; +} + +int dcyyget_debug (void) +{ + return dcyy_flex_debug; +} + +void dcyyset_debug (int bdebug ) +{ + dcyy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from dcyylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + dcyyin = stdin; + dcyyout = stdout; +#else + dcyyin = (FILE *) 0; + dcyyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * dcyylex_init() + */ + return 0; +} + +/* dcyylex_destroy is for both reentrant and non-reentrant scanners. */ +int dcyylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + dcyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + dcyypop_buffer_state(); + } + + /* Destroy the stack itself. */ + dcyyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * dcyylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *dcyyalloc (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 *dcyyrealloc (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 @@ -2475,23 +2698,13 @@ 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 dcyyfree (void * ptr ) +{ + free( (char *) ptr ); /* see dcyyrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 745 "dcLexer.lxx" +#define YYTABLES_NAME "yytables" + +#line 746 "dcLexer.lxx" diff --git a/direct/src/dcparser/dcLexer.lxx b/direct/src/dcparser/dcLexer.lxx index facbdefa1a..6ef742e3c7 100644 --- a/direct/src/dcparser/dcLexer.lxx +++ b/direct/src/dcparser/dcLexer.lxx @@ -11,6 +11,7 @@ #include "dcParser.h" #include "dcFile.h" #include "dcindent.h" +#include "pstrtod.h" static int yyinput(void); // declared by flex. @@ -694,7 +695,7 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) {REALNUM} { // A floating-point number. accept(); - dcyylval.u.real = atof(dcyytext); + dcyylval.u.real = patof(dcyytext); dcyylval.str = dcyytext; return REAL; } diff --git a/direct/src/dcparser/dcParser.cxx.prebuilt b/direct/src/dcparser/dcParser.cxx.prebuilt index 7f0a2a031b..25be77444f 100644 --- a/direct/src/dcparser/dcParser.cxx.prebuilt +++ b/direct/src/dcparser/dcParser.cxx.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 2.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,13 +20,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -37,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.1" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -249,7 +259,7 @@ dc_cleanup_parser() { # define YYTOKEN_TABLE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -261,25 +271,58 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 219 of yacc.c. */ -#line 266 "y.tab.c" +/* Line 216 of yacc.c. */ +#line 276 "y.tab.c" -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ +#ifdef short +# undef short #endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; #endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; #endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; #endif +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -290,7 +333,32 @@ typedef int YYSTYPE; # endif #endif -#if ! defined (yyoverflow) || YYERROR_VERBOSE +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -298,64 +366,76 @@ typedef int YYSTYPE; # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# ifdef __cplusplus -extern "C" { +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif -# ifdef __cplusplus -} -# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -365,13 +445,13 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else @@ -382,7 +462,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -400,28 +480,22 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 57 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 430 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 58 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 82 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 190 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 282 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ @@ -432,7 +506,7 @@ union yyalloc ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -469,7 +543,7 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned short int yyprhs[] = +static const yytype_uint16 yyprhs[] = { 0, 0, 3, 6, 9, 12, 14, 17, 20, 23, 26, 29, 32, 34, 38, 40, 44, 47, 48, 54, @@ -493,8 +567,8 @@ static const unsigned short int yyprhs[] = 527 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = { 59, 0, -1, 40, 60, -1, 41, 114, -1, 42, 100, -1, 139, -1, 60, 43, -1, 60, 70, -1, @@ -552,7 +626,7 @@ static const short int yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 168, 168, 169, 170, 177, 178, 179, 190, 196, 197, 198, 202, 203, 210, 211, 218, 223, 222, 230, @@ -579,7 +653,7 @@ static const unsigned short int yyrline[] = #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "UNSIGNED_INTEGER", "SIGNED_INTEGER", @@ -618,7 +692,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -630,7 +704,7 @@ static const unsigned short int yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 58, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 61, 61, 62, 62, 63, 64, 63, 65, @@ -655,7 +729,7 @@ static const unsigned char yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 3, 1, 3, 2, 0, 5, 1, @@ -682,7 +756,7 @@ static const unsigned char yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { 0, 190, 0, 190, 0, 2, 5, 116, 115, 127, 128, 129, 0, 130, 134, 132, 125, 126, 3, 122, @@ -715,8 +789,8 @@ static const unsigned char yydefact[] = 173, 185 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { -1, 4, 5, 97, 98, 64, 186, 209, 210, 65, 66, 104, 67, 68, 143, 204, 183, 205, 222, 240, @@ -732,7 +806,7 @@ static const short int yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -127 -static const short int yypact[] = +static const yytype_int16 yypact[] = { 8, -127, 104, 359, 35, 128, -127, -127, -127, 20, -127, 22, 28, -127, -127, -127, 37, 53, -127, -127, @@ -766,7 +840,7 @@ static const short int yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = +static const yytype_int16 yypgoto[] = { -127, -127, -127, -126, 142, -127, -127, -127, -127, -127, -127, -127, -127, -127, -127, -21, -127, -127, -127, -127, @@ -784,7 +858,7 @@ static const short int yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -176 -static const short int yytable[] = +static const yytype_int16 yytable[] = { 18, 134, 47, 48, 6, 158, 56, 87, 88, 129, 129, 171, 130, 130, 96, 107, 108, 7, 8, 126, @@ -832,7 +906,7 @@ static const short int yytable[] = 42 }; -static const short int yycheck[] = +static const yytype_int16 yycheck[] = { 2, 91, 3, 3, 1, 121, 3, 47, 48, 90, 91, 4, 90, 91, 8, 71, 72, 3, 4, 5, @@ -882,7 +956,7 @@ static const short int yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 40, 41, 42, 59, 60, 139, 3, 4, 5, 6, 7, 8, 48, 51, 56, 110, 111, 114, 116, @@ -940,7 +1014,7 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ @@ -948,7 +1022,7 @@ do \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) #define YYTERROR 1 @@ -963,7 +1037,7 @@ while (0) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (N) \ + if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -977,7 +1051,7 @@ while (0) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (0) + while (YYID (0)) #endif @@ -986,11 +1060,11 @@ while (0) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -1017,36 +1091,96 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short int *bottom; - short int *top; + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) + for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -1055,37 +1189,45 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1119,42 +1261,44 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1180,7 +1324,7 @@ yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - size_t yyn = 0; + YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) @@ -1215,53 +1359,123 @@ yytnamerr (char *yyres, const char *yystr) } # endif -#endif /* YYERROR_VERBOSE */ +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else @@ -1272,8 +1486,7 @@ yydestruct (yymsg, yytype, yyvaluep) YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; @@ -1283,7 +1496,7 @@ yydestruct (yymsg, yytype, yyvaluep) { default: - break; + break; } } @@ -1291,13 +1504,13 @@ yydestruct (yymsg, yytype, yyvaluep) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); @@ -1322,14 +1535,18 @@ int yynerrs; `----------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -1347,6 +1564,12 @@ yyparse () int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif /* Three stacks and their tools: `yyss': related to states, @@ -1357,9 +1580,9 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; @@ -1368,7 +1591,7 @@ yyparse () -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; @@ -1377,9 +1600,9 @@ yyparse () YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1403,8 +1626,7 @@ yyparse () `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -1417,11 +1639,11 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the @@ -1449,7 +1671,7 @@ yyparse () yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) @@ -1484,12 +1706,10 @@ yyparse () `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -1531,22 +1751,21 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1584,19 +1803,19 @@ yyreduce: case 4: #line 171 "dcParser.yxx" { - parameter_description = (yyvsp[0].u.field); + parameter_description = (yyvsp[(2) - (2)].u.field); } break; case 7: #line 180 "dcParser.yxx" { - if (!dc_file->add_class((yyvsp[0].u.dclass))) { - DCClass *old_class = dc_file->get_class_by_name((yyvsp[0].u.dclass)->get_name()); + if (!dc_file->add_class((yyvsp[(2) - (2)].u.dclass))) { + DCClass *old_class = dc_file->get_class_by_name((yyvsp[(2) - (2)].u.dclass)->get_name()); if (old_class != (DCClass *)NULL && old_class->is_bogus_class()) { - yyerror("Base class defined after its first reference: " + (yyvsp[0].u.dclass)->get_name()); + yyerror("Base class defined after its first reference: " + (yyvsp[(2) - (2)].u.dclass)->get_name()); } else { - yyerror("Duplicate class name: " + (yyvsp[0].u.dclass)->get_name()); + yyerror("Duplicate class name: " + (yyvsp[(2) - (2)].u.dclass)->get_name()); } } } @@ -1605,8 +1824,8 @@ yyreduce: case 8: #line 191 "dcParser.yxx" { - if (!dc_file->add_switch((yyvsp[0].u.dswitch))) { - yyerror("Duplicate class name: " + (yyvsp[0].u.dswitch)->get_name()); + if (!dc_file->add_switch((yyvsp[(2) - (2)].u.dswitch))) { + yyerror("Duplicate class name: " + (yyvsp[(2) - (2)].u.dswitch)->get_name()); } } break; @@ -1614,28 +1833,28 @@ yyreduce: case 13: #line 204 "dcParser.yxx" { - (yyval.str) = (yyvsp[-2].str) + string("/") + (yyvsp[0].str); + (yyval.str) = (yyvsp[(1) - (3)].str) + string("/") + (yyvsp[(3) - (3)].str); } break; case 15: #line 212 "dcParser.yxx" { - (yyval.str) = (yyvsp[-2].str) + string(".") + (yyvsp[0].str); + (yyval.str) = (yyvsp[(1) - (3)].str) + string(".") + (yyvsp[(3) - (3)].str); } break; case 16: #line 219 "dcParser.yxx" { - dc_file->add_import_module((yyvsp[0].str)); + dc_file->add_import_module((yyvsp[(2) - (2)].str)); } break; case 17: #line 223 "dcParser.yxx" { - dc_file->add_import_module((yyvsp[-1].str)); + dc_file->add_import_module((yyvsp[(2) - (3)].str)); } break; @@ -1649,22 +1868,22 @@ yyreduce: case 21: #line 239 "dcParser.yxx" { - dc_file->add_import_symbol((yyvsp[0].str)); + dc_file->add_import_symbol((yyvsp[(1) - (1)].str)); } break; case 22: #line 243 "dcParser.yxx" { - dc_file->add_import_symbol((yyvsp[0].str)); + dc_file->add_import_symbol((yyvsp[(3) - (3)].str)); } break; case 23: #line 250 "dcParser.yxx" { - if ((yyvsp[0].u.parameter) != (DCParameter *)NULL) { - DCTypedef *dtypedef = new DCTypedef((yyvsp[0].u.parameter)); + if ((yyvsp[(2) - (2)].u.parameter) != (DCParameter *)NULL) { + DCTypedef *dtypedef = new DCTypedef((yyvsp[(2) - (2)].u.parameter)); if (!dc_file->add_typedef(dtypedef)) { DCTypedef *old_typedef = dc_file->get_typedef_by_name(dtypedef->get_name()); @@ -1681,7 +1900,7 @@ yyreduce: case 26: #line 273 "dcParser.yxx" { - dc_file->add_keyword((yyvsp[0].str)); + dc_file->add_keyword((yyvsp[(2) - (2)].str)); } break; @@ -1692,14 +1911,14 @@ yyreduce: // explicitly defining it, clear its bitmask, so that we will have a // new hash code--doing this will allow us to phase out the // historical hash code support later. - ((DCKeyword *)(yyvsp[0].u.keyword))->clear_historical_flag(); + ((DCKeyword *)(yyvsp[(2) - (2)].u.keyword))->clear_historical_flag(); } break; case 30: #line 293 "dcParser.yxx" { - current_class = new DCClass(dc_file, (yyvsp[0].str), false, false); + current_class = new DCClass(dc_file, (yyvsp[(2) - (2)].str), false, false); } break; @@ -1707,7 +1926,7 @@ yyreduce: #line 297 "dcParser.yxx" { (yyval.u.dclass) = current_class; - current_class = (yyvsp[-4].u.dclass); + current_class = (yyvsp[(3) - (7)].u.dclass); } break; @@ -1719,10 +1938,10 @@ yyreduce: (yyval.u.dclass) = NULL; } else { - DCClass *dclass = dc_file->get_class_by_name((yyvsp[0].str)); + DCClass *dclass = dc_file->get_class_by_name((yyvsp[(1) - (1)].str)); if (dclass == (DCClass *)NULL) { // Create a bogus class as a forward reference. - dclass = new DCClass(dc_file, (yyvsp[0].str), false, true); + dclass = new DCClass(dc_file, (yyvsp[(1) - (1)].str), false, true); dc_file->add_class(dclass); } if (dclass->is_struct()) { @@ -1737,8 +1956,8 @@ yyreduce: case 35: #line 333 "dcParser.yxx" { - if ((yyvsp[0].u.dclass) != (DCClass *)NULL) { - current_class->add_parent((yyvsp[0].u.dclass)); + if ((yyvsp[(1) - (1)].u.dclass) != (DCClass *)NULL) { + current_class->add_parent((yyvsp[(1) - (1)].u.dclass)); } } break; @@ -1750,8 +1969,8 @@ yyreduce: yyerror("Multiple inheritance is not supported without \"dc-multiple-inheritance 1\" in your Config.prc file."); } else { - if ((yyvsp[0].u.dclass) != (DCClass *)NULL) { - current_class->add_parent((yyvsp[0].u.dclass)); + if ((yyvsp[(3) - (3)].u.dclass) != (DCClass *)NULL) { + current_class->add_parent((yyvsp[(3) - (3)].u.dclass)); } } } @@ -1760,11 +1979,11 @@ yyreduce: case 39: #line 355 "dcParser.yxx" { - if ((yyvsp[-1].u.field) == (DCField *)NULL) { + if ((yyvsp[(2) - (3)].u.field) == (DCField *)NULL) { // Pass this error up. - } else if (!current_class->add_field((yyvsp[-1].u.field))) { - yyerror("Duplicate field name: " + (yyvsp[-1].u.field)->get_name()); - } else if ((yyvsp[-1].u.field)->get_number() < 0) { + } else if (!current_class->add_field((yyvsp[(2) - (3)].u.field))) { + yyerror("Duplicate field name: " + (yyvsp[(2) - (3)].u.field)->get_name()); + } else if ((yyvsp[(2) - (3)].u.field)->get_number() < 0) { yyerror("A non-network field cannot be stored on a dclass"); } } @@ -1773,13 +1992,13 @@ yyreduce: case 40: #line 368 "dcParser.yxx" { - if ((yyvsp[-1].u.field) != (DCField *)NULL) { - if ((yyvsp[-1].u.field)->get_name().empty()) { + if ((yyvsp[(1) - (2)].u.field) != (DCField *)NULL) { + if ((yyvsp[(1) - (2)].u.field)->get_name().empty()) { yyerror("Field name required."); } - (yyvsp[-1].u.field)->copy_keywords(current_keyword_list); + (yyvsp[(1) - (2)].u.field)->copy_keywords(current_keyword_list); } - (yyval.u.field) = (yyvsp[-1].u.field); + (yyval.u.field) = (yyvsp[(1) - (2)].u.field); } break; @@ -1787,27 +2006,27 @@ yyreduce: #line 379 "dcParser.yxx" { yyerror("Unnamed parameters are not allowed on a dclass"); - if ((yyvsp[-1].u.parameter) != (DCField *)NULL) { - (yyvsp[-1].u.parameter)->copy_keywords(current_keyword_list); + if ((yyvsp[(1) - (2)].u.parameter) != (DCField *)NULL) { + (yyvsp[(1) - (2)].u.parameter)->copy_keywords(current_keyword_list); } - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; case 43: #line 387 "dcParser.yxx" { - if ((yyvsp[-1].u.parameter) != (DCField *)NULL) { - (yyvsp[-1].u.parameter)->copy_keywords(current_keyword_list); + if ((yyvsp[(1) - (2)].u.parameter) != (DCField *)NULL) { + (yyvsp[(1) - (2)].u.parameter)->copy_keywords(current_keyword_list); } - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; case 44: #line 397 "dcParser.yxx" { - current_class = new DCClass(dc_file, (yyvsp[0].str), true, false); + current_class = new DCClass(dc_file, (yyvsp[(2) - (2)].str), true, false); } break; @@ -1815,7 +2034,7 @@ yyreduce: #line 401 "dcParser.yxx" { (yyval.u.dclass) = current_class; - current_class = (yyvsp[-4].u.dclass); + current_class = (yyvsp[(3) - (7)].u.dclass); } break; @@ -1827,10 +2046,10 @@ yyreduce: (yyval.u.dclass) = NULL; } else { - DCClass *dstruct = dc_file->get_class_by_name((yyvsp[0].str)); + DCClass *dstruct = dc_file->get_class_by_name((yyvsp[(1) - (1)].str)); if (dstruct == (DCClass *)NULL) { // Create a bogus class as a forward reference. - dstruct = new DCClass(dc_file, (yyvsp[0].str), false, true); + dstruct = new DCClass(dc_file, (yyvsp[(1) - (1)].str), false, true); dc_file->add_class(dstruct); } if (!dstruct->is_struct()) { @@ -1845,8 +2064,8 @@ yyreduce: case 49: #line 437 "dcParser.yxx" { - if ((yyvsp[0].u.dclass) != (DCClass *)NULL) { - current_class->add_parent((yyvsp[0].u.dclass)); + if ((yyvsp[(1) - (1)].u.dclass) != (DCClass *)NULL) { + current_class->add_parent((yyvsp[(1) - (1)].u.dclass)); } } break; @@ -1854,8 +2073,8 @@ yyreduce: case 50: #line 443 "dcParser.yxx" { - if ((yyvsp[0].u.dclass) != (DCClass *)NULL) { - current_class->add_parent((yyvsp[0].u.dclass)); + if ((yyvsp[(3) - (3)].u.dclass) != (DCClass *)NULL) { + current_class->add_parent((yyvsp[(3) - (3)].u.dclass)); } } break; @@ -1863,10 +2082,10 @@ yyreduce: case 53: #line 454 "dcParser.yxx" { - if ((yyvsp[-1].u.field) == (DCField *)NULL) { + if ((yyvsp[(2) - (3)].u.field) == (DCField *)NULL) { // Pass this error up. - } else if (!current_class->add_field((yyvsp[-1].u.field))) { - yyerror("Duplicate field name: " + (yyvsp[-1].u.field)->get_name()); + } else if (!current_class->add_field((yyvsp[(2) - (3)].u.field))) { + yyerror("Duplicate field name: " + (yyvsp[(2) - (3)].u.field)->get_name()); } } break; @@ -1874,24 +2093,24 @@ yyreduce: case 54: #line 465 "dcParser.yxx" { - if ((yyvsp[-1].u.field)->get_name().empty()) { + if ((yyvsp[(1) - (2)].u.field)->get_name().empty()) { yyerror("Field name required."); } - (yyval.u.field) = (yyvsp[-1].u.field); + (yyval.u.field) = (yyvsp[(1) - (2)].u.field); } break; case 56: #line 473 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; case 57: #line 477 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; @@ -1901,9 +2120,9 @@ yyreduce: if (current_class == (DCClass *)NULL) { yyerror("Cannot define a method outside of a struct or class."); DCClass *temp_class = new DCClass(dc_file, "temp", false, false); // memory leak. - current_atomic = new DCAtomicField((yyvsp[-1].str), temp_class, false); + current_atomic = new DCAtomicField((yyvsp[(1) - (2)].str), temp_class, false); } else { - current_atomic = new DCAtomicField((yyvsp[-1].str), current_class, false); + current_atomic = new DCAtomicField((yyvsp[(1) - (2)].str), current_class, false); } } break; @@ -1912,15 +2131,15 @@ yyreduce: #line 494 "dcParser.yxx" { (yyval.u.field) = current_atomic; - current_atomic = (yyvsp[-2].u.atomic); + current_atomic = (yyvsp[(3) - (5)].u.atomic); } break; case 64: #line 512 "dcParser.yxx" { - if ((yyvsp[0].u.parameter) != (DCParameter *)NULL) { - current_atomic->add_element((yyvsp[0].u.parameter)); + if ((yyvsp[(1) - (1)].u.parameter) != (DCParameter *)NULL) { + current_atomic->add_element((yyvsp[(1) - (1)].u.parameter)); } } break; @@ -1928,14 +2147,14 @@ yyreduce: case 65: #line 521 "dcParser.yxx" { - current_parameter = (yyvsp[0].u.parameter); + current_parameter = (yyvsp[(1) - (1)].u.parameter); } break; case 66: #line 525 "dcParser.yxx" { - (yyval.u.parameter) = (yyvsp[0].u.parameter); + (yyval.u.parameter) = (yyvsp[(3) - (3)].u.parameter); } break; @@ -1944,8 +2163,8 @@ yyreduce: { current_packer = &default_packer; current_packer->clear_data(); - if ((yyvsp[-1].u.parameter) != (DCField *)NULL) { - current_packer->begin_pack((yyvsp[-1].u.parameter)); + if ((yyvsp[(1) - (2)].u.parameter) != (DCField *)NULL) { + current_packer->begin_pack((yyvsp[(1) - (2)].u.parameter)); } } break; @@ -1954,11 +2173,11 @@ yyreduce: #line 545 "dcParser.yxx" { bool is_valid = false; - if ((yyvsp[-3].u.parameter) != (DCField *)NULL) { - is_valid = (yyvsp[-3].u.parameter)->is_valid(); + if ((yyvsp[(1) - (4)].u.parameter) != (DCField *)NULL) { + is_valid = (yyvsp[(1) - (4)].u.parameter)->is_valid(); } if (current_packer->end_pack()) { - (yyvsp[-3].u.parameter)->set_default_value(current_packer->get_string()); + (yyvsp[(1) - (4)].u.parameter)->set_default_value(current_packer->get_string()); } else { if (is_valid) { @@ -1976,8 +2195,8 @@ yyreduce: { current_packer = &default_packer; current_packer->clear_data(); - if ((yyvsp[-1].u.parameter) != (DCField *)NULL) { - current_packer->begin_pack((yyvsp[-1].u.parameter)); + if ((yyvsp[(1) - (2)].u.parameter) != (DCField *)NULL) { + current_packer->begin_pack((yyvsp[(1) - (2)].u.parameter)); } } break; @@ -1986,11 +2205,11 @@ yyreduce: #line 575 "dcParser.yxx" { bool is_valid = false; - if ((yyvsp[-3].u.parameter) != (DCField *)NULL) { - is_valid = (yyvsp[-3].u.parameter)->is_valid(); + if ((yyvsp[(1) - (4)].u.parameter) != (DCField *)NULL) { + is_valid = (yyvsp[(1) - (4)].u.parameter)->is_valid(); } if (current_packer->end_pack()) { - (yyvsp[-3].u.parameter)->set_default_value(current_packer->get_string()); + (yyvsp[(1) - (4)].u.parameter)->set_default_value(current_packer->get_string()); } else { if (is_valid) { @@ -2006,49 +2225,49 @@ yyreduce: case 78: #line 606 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[0].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (1)].u.parameter); } break; case 79: #line 610 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[0].u.field); + (yyval.u.field) = (yyvsp[(1) - (1)].u.field); } break; case 80: #line 617 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[-1].u.field); + (yyval.u.field) = (yyvsp[(1) - (2)].u.field); } break; case 81: #line 621 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; case 82: #line 625 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[-1].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (2)].u.parameter); } break; case 83: #line 632 "dcParser.yxx" { - (yyval.u.parameter) = new DCSimpleParameter((yyvsp[0].u.subatomic)); + (yyval.u.parameter) = new DCSimpleParameter((yyvsp[(1) - (1)].u.subatomic)); } break; case 84: #line 636 "dcParser.yxx" { - DCSimpleParameter *simple_param = (yyvsp[-3].u.parameter)->as_simple_parameter(); + DCSimpleParameter *simple_param = (yyvsp[(1) - (4)].u.parameter)->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); if (!simple_param->set_range(double_range)) { yyerror("Inappropriate range for type"); @@ -2060,12 +2279,12 @@ yyreduce: case 85: #line 645 "dcParser.yxx" { - DCSimpleParameter *simple_param = (yyvsp[-2].u.parameter)->as_simple_parameter(); + DCSimpleParameter *simple_param = (yyvsp[(1) - (3)].u.parameter)->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); if (!simple_param->is_numeric_type()) { yyerror("A divisor is only valid on a numeric type."); - } else if (!simple_param->set_divisor((yyvsp[0].u.s_uint))) { + } else if (!simple_param->set_divisor((yyvsp[(3) - (3)].u.s_uint))) { yyerror("Invalid divisor."); } else if (simple_param->has_modulus() && !simple_param->set_modulus(simple_param->get_modulus())) { @@ -2079,12 +2298,12 @@ yyreduce: case 86: #line 661 "dcParser.yxx" { - DCSimpleParameter *simple_param = (yyvsp[-2].u.parameter)->as_simple_parameter(); + DCSimpleParameter *simple_param = (yyvsp[(1) - (3)].u.parameter)->as_simple_parameter(); nassertr(simple_param != (DCSimpleParameter *)NULL, 0); if (!simple_param->is_numeric_type()) { yyerror("A divisor is only valid on a numeric type."); - } else if (!simple_param->set_modulus((yyvsp[0].u.real))) { + } else if (!simple_param->set_modulus((yyvsp[(3) - (3)].u.real))) { yyerror("Invalid modulus."); } (yyval.u.parameter) = simple_param; @@ -2099,22 +2318,22 @@ yyreduce: (yyval.u.parameter) = NULL; } else { - DCTypedef *dtypedef = dc_file->get_typedef_by_name((yyvsp[0].str)); + DCTypedef *dtypedef = dc_file->get_typedef_by_name((yyvsp[(1) - (1)].str)); if (dtypedef == (DCTypedef *)NULL) { // Maybe it's a class name. - DCClass *dclass = dc_file->get_class_by_name((yyvsp[0].str)); + DCClass *dclass = dc_file->get_class_by_name((yyvsp[(1) - (1)].str)); if (dclass != (DCClass *)NULL) { // Create an implicit typedef for this. dtypedef = new DCTypedef(new DCClassParameter(dclass), true); } else { // Maybe it's a switch name. - DCSwitch *dswitch = dc_file->get_switch_by_name((yyvsp[0].str)); + DCSwitch *dswitch = dc_file->get_switch_by_name((yyvsp[(1) - (1)].str)); if (dswitch != (DCSwitch *)NULL) { // This also gets an implicit typedef. dtypedef = new DCTypedef(new DCSwitchParameter(dswitch), true); } else { // It's an undefined typedef. Create a bogus forward reference. - dtypedef = new DCTypedef((yyvsp[0].str)); + dtypedef = new DCTypedef((yyvsp[(1) - (1)].str)); } } @@ -2130,17 +2349,17 @@ yyreduce: #line 709 "dcParser.yxx" { // This is an inline struct definition. - if ((yyvsp[0].u.dclass) == (DCClass *)NULL) { + if ((yyvsp[(1) - (1)].u.dclass) == (DCClass *)NULL) { (yyval.u.parameter) = NULL; } else { if (dc_file != (DCFile *)NULL) { - dc_file->add_thing_to_delete((yyvsp[0].u.dclass)); + dc_file->add_thing_to_delete((yyvsp[(1) - (1)].u.dclass)); } else { // This is a memory leak--this happens when we put an anonymous // struct reference within the string passed to // DCPackerInterface::check_match(). Maybe it doesn't really matter. } - (yyval.u.parameter) = new DCClassParameter((yyvsp[0].u.dclass)); + (yyval.u.parameter) = new DCClassParameter((yyvsp[(1) - (1)].u.dclass)); } } break; @@ -2149,17 +2368,17 @@ yyreduce: #line 725 "dcParser.yxx" { // This is an inline switch definition. - if ((yyvsp[0].u.dswitch) == (DCSwitch *)NULL) { + if ((yyvsp[(1) - (1)].u.dswitch) == (DCSwitch *)NULL) { (yyval.u.parameter) = NULL; } else { if (dc_file != (DCFile *)NULL) { - dc_file->add_thing_to_delete((yyvsp[0].u.dswitch)); + dc_file->add_thing_to_delete((yyvsp[(1) - (1)].u.dswitch)); } else { // This is a memory leak--this happens when we put an anonymous // switch reference within the string passed to // DCPackerInterface::check_match(). Maybe it doesn't really matter. } - (yyval.u.parameter) = new DCSwitchParameter((yyvsp[0].u.dswitch)); + (yyval.u.parameter) = new DCSwitchParameter((yyvsp[(1) - (1)].u.dswitch)); } } break; @@ -2175,7 +2394,7 @@ yyreduce: #line 748 "dcParser.yxx" { double_range.clear(); - if (!double_range.add_range((yyvsp[0].u.real), (yyvsp[0].u.real))) { + if (!double_range.add_range((yyvsp[(1) - (1)].u.real), (yyvsp[(1) - (1)].u.real))) { yyerror("Overlapping range"); } } @@ -2185,7 +2404,7 @@ yyreduce: #line 755 "dcParser.yxx" { double_range.clear(); - if (!double_range.add_range((yyvsp[-2].u.real), (yyvsp[0].u.real))) { + if (!double_range.add_range((yyvsp[(1) - (3)].u.real), (yyvsp[(3) - (3)].u.real))) { yyerror("Overlapping range"); } } @@ -2195,9 +2414,9 @@ yyreduce: #line 762 "dcParser.yxx" { double_range.clear(); - if ((yyvsp[0].u.real) >= 0) { + if ((yyvsp[(2) - (2)].u.real) >= 0) { yyerror("Syntax error"); - } else if (!double_range.add_range((yyvsp[-1].u.real), -(yyvsp[0].u.real))) { + } else if (!double_range.add_range((yyvsp[(1) - (2)].u.real), -(yyvsp[(2) - (2)].u.real))) { yyerror("Overlapping range"); } } @@ -2206,7 +2425,7 @@ yyreduce: case 95: #line 771 "dcParser.yxx" { - if (!double_range.add_range((yyvsp[0].u.real), (yyvsp[0].u.real))) { + if (!double_range.add_range((yyvsp[(3) - (3)].u.real), (yyvsp[(3) - (3)].u.real))) { yyerror("Overlapping range"); } } @@ -2215,7 +2434,7 @@ yyreduce: case 96: #line 777 "dcParser.yxx" { - if (!double_range.add_range((yyvsp[-2].u.real), (yyvsp[0].u.real))) { + if (!double_range.add_range((yyvsp[(3) - (5)].u.real), (yyvsp[(5) - (5)].u.real))) { yyerror("Overlapping range"); } } @@ -2224,9 +2443,9 @@ yyreduce: case 97: #line 783 "dcParser.yxx" { - if ((yyvsp[0].u.real) >= 0) { + if ((yyvsp[(4) - (4)].u.real) >= 0) { yyerror("Syntax error"); - } else if (!double_range.add_range((yyvsp[-1].u.real), -(yyvsp[0].u.real))) { + } else if (!double_range.add_range((yyvsp[(3) - (4)].u.real), -(yyvsp[(4) - (4)].u.real))) { yyerror("Overlapping range"); } } @@ -2243,7 +2462,7 @@ yyreduce: #line 798 "dcParser.yxx" { uint_range.clear(); - if (!uint_range.add_range((yyvsp[0].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(1) - (1)].u.s_uint), (yyvsp[(1) - (1)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2253,7 +2472,7 @@ yyreduce: #line 805 "dcParser.yxx" { uint_range.clear(); - if (!uint_range.add_range((yyvsp[-2].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(1) - (3)].u.s_uint), (yyvsp[(3) - (3)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2263,7 +2482,7 @@ yyreduce: #line 812 "dcParser.yxx" { uint_range.clear(); - if (!uint_range.add_range((yyvsp[-1].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(1) - (2)].u.s_uint), (yyvsp[(2) - (2)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2272,7 +2491,7 @@ yyreduce: case 102: #line 819 "dcParser.yxx" { - if (!uint_range.add_range((yyvsp[0].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(3) - (3)].u.s_uint), (yyvsp[(3) - (3)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2281,7 +2500,7 @@ yyreduce: case 103: #line 825 "dcParser.yxx" { - if (!uint_range.add_range((yyvsp[-2].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(3) - (5)].u.s_uint), (yyvsp[(5) - (5)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2290,7 +2509,7 @@ yyreduce: case 104: #line 831 "dcParser.yxx" { - if (!uint_range.add_range((yyvsp[-1].u.s_uint), (yyvsp[0].u.s_uint))) { + if (!uint_range.add_range((yyvsp[(3) - (4)].u.s_uint), (yyvsp[(4) - (4)].u.s_uint))) { yyerror("Overlapping range"); } } @@ -2299,10 +2518,10 @@ yyreduce: case 106: #line 841 "dcParser.yxx" { - if ((yyvsp[-3].u.parameter) == (DCParameter *)NULL) { + if ((yyvsp[(1) - (4)].u.parameter) == (DCParameter *)NULL) { (yyval.u.parameter) = NULL; } else { - (yyval.u.parameter) = (yyvsp[-3].u.parameter)->append_array_specification(uint_range); + (yyval.u.parameter) = (yyvsp[(1) - (4)].u.parameter)->append_array_specification(uint_range); } } break; @@ -2310,7 +2529,7 @@ yyreduce: case 107: #line 852 "dcParser.yxx" { - current_parameter->set_name((yyvsp[0].str)); + current_parameter->set_name((yyvsp[(1) - (1)].str)); (yyval.u.parameter) = current_parameter; } break; @@ -2318,7 +2537,7 @@ yyreduce: case 108: #line 857 "dcParser.yxx" { - DCSimpleParameter *simple_param = (yyvsp[-2].u.parameter)->as_simple_parameter(); + DCSimpleParameter *simple_param = (yyvsp[(1) - (3)].u.parameter)->as_simple_parameter(); if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) { yyerror("A divisor is only allowed on a primitive type."); @@ -2326,7 +2545,7 @@ yyreduce: yyerror("A divisor is only valid on a numeric type."); } else { - if (!simple_param->set_divisor((yyvsp[0].u.s_uint))) { + if (!simple_param->set_divisor((yyvsp[(3) - (3)].u.s_uint))) { yyerror("Invalid divisor."); } } @@ -2336,7 +2555,7 @@ yyreduce: case 109: #line 872 "dcParser.yxx" { - DCSimpleParameter *simple_param = (yyvsp[-2].u.parameter)->as_simple_parameter(); + DCSimpleParameter *simple_param = (yyvsp[(1) - (3)].u.parameter)->as_simple_parameter(); if (simple_param == NULL || simple_param->get_typedef() != (DCTypedef *)NULL) { yyerror("A modulus is only allowed on a primitive type."); @@ -2344,7 +2563,7 @@ yyreduce: yyerror("A modulus is only valid on a numeric type."); } else { - if (!simple_param->set_modulus((yyvsp[0].u.real))) { + if (!simple_param->set_modulus((yyvsp[(3) - (3)].u.real))) { yyerror("Invalid modulus."); } } @@ -2354,18 +2573,18 @@ yyreduce: case 110: #line 887 "dcParser.yxx" { - (yyval.u.parameter) = (yyvsp[-3].u.parameter)->append_array_specification(uint_range); + (yyval.u.parameter) = (yyvsp[(1) - (4)].u.parameter)->append_array_specification(uint_range); } break; case 111: #line 894 "dcParser.yxx" { - if ((yyvsp[0].str).length() != 1) { + if ((yyvsp[(1) - (1)].str).length() != 1) { yyerror("Single character required."); (yyval.u.s_uint) = 0; } else { - (yyval.u.s_uint) = (unsigned char)(yyvsp[0].str)[0]; + (yyval.u.s_uint) = (unsigned char)(yyvsp[(1) - (1)].str)[0]; } } break; @@ -2373,8 +2592,8 @@ yyreduce: case 113: #line 907 "dcParser.yxx" { - (yyval.u.s_uint) = (unsigned int)(yyvsp[0].u.uint64); - if ((yyval.u.s_uint) != (yyvsp[0].u.uint64)) { + (yyval.u.s_uint) = (unsigned int)(yyvsp[(1) - (1)].u.uint64); + if ((yyval.u.s_uint) != (yyvsp[(1) - (1)].u.uint64)) { yyerror("Number out of range."); (yyval.u.s_uint) = 1; } @@ -2384,11 +2603,11 @@ yyreduce: case 114: #line 918 "dcParser.yxx" { - (yyval.u.s_uint) = (unsigned int)-(yyvsp[0].u.int64); - if ((yyvsp[0].u.int64) >= 0) { + (yyval.u.s_uint) = (unsigned int)-(yyvsp[(1) - (1)].u.int64); + if ((yyvsp[(1) - (1)].u.int64) >= 0) { yyerror("Syntax error."); - } else if ((yyval.u.s_uint) != -(yyvsp[0].u.int64)) { + } else if ((yyval.u.s_uint) != -(yyvsp[(1) - (1)].u.int64)) { yyerror("Number out of range."); (yyval.u.s_uint) = 1; } @@ -2398,25 +2617,25 @@ yyreduce: case 117: #line 940 "dcParser.yxx" { - (yyval.u.real) = (double)(yyvsp[0].u.uint64); + (yyval.u.real) = (double)(yyvsp[(1) - (1)].u.uint64); } break; case 118: #line 944 "dcParser.yxx" { - (yyval.u.real) = (double)(yyvsp[0].u.int64); + (yyval.u.real) = (double)(yyvsp[(1) - (1)].u.int64); } break; case 120: #line 952 "dcParser.yxx" { - if ((yyvsp[0].str).length() != 1) { + if ((yyvsp[(1) - (1)].str).length() != 1) { yyerror("Single character required."); (yyval.u.real) = 0; } else { - (yyval.u.real) = (double)(unsigned char)(yyvsp[0].str)[0]; + (yyval.u.real) = (double)(unsigned char)(yyvsp[(1) - (1)].str)[0]; } } break; @@ -2430,9 +2649,9 @@ yyreduce: case 123: #line 969 "dcParser.yxx" { - if ((yyvsp[-1].str) != current_packer->get_current_field_name()) { + if ((yyvsp[(1) - (2)].str) != current_packer->get_current_field_name()) { ostringstream strm; - strm << "Got '" << (yyvsp[-1].str) << "', expected '" + strm << "Got '" << (yyvsp[(1) - (2)].str) << "', expected '" << current_packer->get_current_field_name() << "'"; yyerror(strm.str()); } @@ -2448,35 +2667,35 @@ yyreduce: case 125: #line 984 "dcParser.yxx" { - current_packer->pack_int64((yyvsp[0].u.int64)); + current_packer->pack_int64((yyvsp[(1) - (1)].u.int64)); } break; case 126: #line 988 "dcParser.yxx" { - current_packer->pack_uint64((yyvsp[0].u.uint64)); + current_packer->pack_uint64((yyvsp[(1) - (1)].u.uint64)); } break; case 127: #line 992 "dcParser.yxx" { - current_packer->pack_double((yyvsp[0].u.real)); + current_packer->pack_double((yyvsp[(1) - (1)].u.real)); } break; case 128: #line 996 "dcParser.yxx" { - current_packer->pack_string((yyvsp[0].str)); + current_packer->pack_string((yyvsp[(1) - (1)].str)); } break; case 129: #line 1000 "dcParser.yxx" { - current_packer->pack_literal_value((yyvsp[0].str)); + current_packer->pack_literal_value((yyvsp[(1) - (1)].str)); } break; @@ -2525,8 +2744,8 @@ yyreduce: case 136: #line 1028 "dcParser.yxx" { - for (unsigned int i = 0; i < (yyvsp[0].u.s_uint); i++) { - current_packer->pack_int64((yyvsp[-2].u.int64)); + for (unsigned int i = 0; i < (yyvsp[(3) - (3)].u.s_uint); i++) { + current_packer->pack_int64((yyvsp[(1) - (3)].u.int64)); } } break; @@ -2534,8 +2753,8 @@ yyreduce: case 137: #line 1034 "dcParser.yxx" { - for (unsigned int i = 0; i < (yyvsp[0].u.s_uint); i++) { - current_packer->pack_uint64((yyvsp[-2].u.uint64)); + for (unsigned int i = 0; i < (yyvsp[(3) - (3)].u.s_uint); i++) { + current_packer->pack_uint64((yyvsp[(1) - (3)].u.uint64)); } } break; @@ -2543,8 +2762,8 @@ yyreduce: case 138: #line 1040 "dcParser.yxx" { - for (unsigned int i = 0; i < (yyvsp[0].u.s_uint); i++) { - current_packer->pack_double((yyvsp[-2].u.real)); + for (unsigned int i = 0; i < (yyvsp[(3) - (3)].u.s_uint); i++) { + current_packer->pack_double((yyvsp[(1) - (3)].u.real)); } } break; @@ -2552,8 +2771,8 @@ yyreduce: case 139: #line 1046 "dcParser.yxx" { - for (unsigned int i = 0; i < (yyvsp[0].u.s_uint); i++) { - current_packer->pack_literal_value((yyvsp[-2].str)); + for (unsigned int i = 0; i < (yyvsp[(3) - (3)].u.s_uint); i++) { + current_packer->pack_literal_value((yyvsp[(1) - (3)].str)); } } break; @@ -2708,7 +2927,7 @@ yyreduce: case 167: #line 1157 "dcParser.yxx" { - current_keyword_list.add_keyword((yyvsp[0].u.keyword)); + current_keyword_list.add_keyword((yyvsp[(2) - (2)].u.keyword)); } break; @@ -2724,7 +2943,7 @@ yyreduce: case 169: #line 1173 "dcParser.yxx" { - current_molecular = new DCMolecularField((yyvsp[-1].str), current_class); + current_molecular = new DCMolecularField((yyvsp[(1) - (2)].str), current_class); } break; @@ -2738,25 +2957,25 @@ yyreduce: case 171: #line 1184 "dcParser.yxx" { - DCField *field = current_class->get_field_by_name((yyvsp[0].str)); + DCField *field = current_class->get_field_by_name((yyvsp[(1) - (1)].str)); (yyval.u.atomic) = (DCAtomicField *)NULL; if (field == (DCField *)NULL) { // Maybe the field is unknown because the class is partially // bogus. In that case, allow it for now; create a bogus field as // a placeholder. if (current_class->inherits_from_bogus_class()) { - (yyval.u.atomic) = new DCAtomicField((yyvsp[0].str), current_class, true); + (yyval.u.atomic) = new DCAtomicField((yyvsp[(1) - (1)].str), current_class, true); current_class->add_field((yyval.u.atomic)); } else { // Nope, it's a fully-defined class, so this is a real error. - yyerror("Unknown field: " + (yyvsp[0].str)); + yyerror("Unknown field: " + (yyvsp[(1) - (1)].str)); } } else { (yyval.u.atomic) = field->as_atomic_field(); if ((yyval.u.atomic) == (DCAtomicField *)NULL) { - yyerror("Not an atomic field: " + (yyvsp[0].str)); + yyerror("Not an atomic field: " + (yyvsp[(1) - (1)].str)); } } } @@ -2765,8 +2984,8 @@ yyreduce: case 172: #line 1211 "dcParser.yxx" { - if ((yyvsp[0].u.atomic) != (DCAtomicField *)NULL) { - current_molecular->add_atomic((yyvsp[0].u.atomic)); + if ((yyvsp[(1) - (1)].u.atomic) != (DCAtomicField *)NULL) { + current_molecular->add_atomic((yyvsp[(1) - (1)].u.atomic)); } } break; @@ -2774,12 +2993,12 @@ yyreduce: case 173: #line 1217 "dcParser.yxx" { - if ((yyvsp[0].u.atomic) != (DCAtomicField *)NULL) { - current_molecular->add_atomic((yyvsp[0].u.atomic)); - if (!(yyvsp[0].u.atomic)->is_bogus_field() && !current_molecular->compare_keywords(*(yyvsp[0].u.atomic))) { + if ((yyvsp[(3) - (3)].u.atomic) != (DCAtomicField *)NULL) { + current_molecular->add_atomic((yyvsp[(3) - (3)].u.atomic)); + if (!(yyvsp[(3) - (3)].u.atomic)->is_bogus_field() && !current_molecular->compare_keywords(*(yyvsp[(3) - (3)].u.atomic))) { yyerror("Mismatched keywords in molecule between " + current_molecular->get_atomic(0)->get_name() + " and " + - (yyvsp[0].u.atomic)->get_name()); + (yyvsp[(3) - (3)].u.atomic)->get_name()); } } } @@ -2795,7 +3014,7 @@ yyreduce: case 176: #line 1239 "dcParser.yxx" { - current_switch = new DCSwitch((yyvsp[-4].str), (yyvsp[-2].u.field)); + current_switch = new DCSwitch((yyvsp[(2) - (6)].str), (yyvsp[(4) - (6)].u.field)); } break; @@ -2803,7 +3022,7 @@ yyreduce: #line 1243 "dcParser.yxx" { (yyval.u.dswitch) = current_switch; - current_switch = (DCSwitch *)(yyvsp[-2].u.parameter); + current_switch = (DCSwitch *)(yyvsp[(7) - (9)].u.parameter); } break; @@ -2812,9 +3031,9 @@ yyreduce: { if (!current_switch->is_field_valid()) { yyerror("case declaration required before first element"); - } else if ((yyvsp[-1].u.field) != (DCField *)NULL) { - if (!current_switch->add_field((yyvsp[-1].u.field))) { - yyerror("Duplicate field name: " + (yyvsp[-1].u.field)->get_name()); + } else if ((yyvsp[(2) - (3)].u.field) != (DCField *)NULL) { + if (!current_switch->add_field((yyvsp[(2) - (3)].u.field))) { + yyerror("Duplicate field name: " + (yyvsp[(2) - (3)].u.field)->get_name()); } } } @@ -2863,28 +3082,26 @@ yyreduce: case 188: #line 1307 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[0].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (1)].u.parameter); } break; case 189: #line 1311 "dcParser.yxx" { - (yyval.u.field) = (yyvsp[0].u.parameter); + (yyval.u.field) = (yyvsp[(1) - (1)].u.parameter); } break; +/* Line 1267 of yacc.c. */ +#line 3099 "y.tab.c" default: break; } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); -/* Line 1126 of yacc.c. */ -#line 2883 "y.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -2913,110 +3130,41 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - char *yymsg = 0; -# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -#if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -#endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= yysize1 < yysize; - yysize = yysize1; - - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yymsg; - int yyi = 0; - while ((*yyp = *yyf)) - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - yyerror (yymsg); +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - } - else - { - yyerror (YY_("syntax error")); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) goto yyexhaustedlab; - } - } - else -#endif /* YYERROR_VERBOSE */ - yyerror (YY_("syntax error")); + } + } +#endif } @@ -3027,14 +3175,15 @@ yyerrlab: error, discard it. */ if (yychar <= YYEOF) - { + { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; - } + } else { - yydestruct ("Error: discarding", yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; } } @@ -3052,11 +3201,14 @@ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ - if (0) + if (/*CONSTCOND*/ 0) goto yyerrorlab; -yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -3086,8 +3238,9 @@ yyerrlab1: YYABORT; - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -3098,7 +3251,7 @@ yyerrlab1: *++yyvsp = yylval; - /* Shift the error token. */ + /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; @@ -3133,17 +3286,26 @@ yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); - YYPOPSTACK; + YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } diff --git a/direct/src/dcparser/dcParser.h.prebuilt b/direct/src/dcparser/dcParser.h.prebuilt index 8c1f83d480..b4741de4e7 100644 --- a/direct/src/dcparser/dcParser.h.prebuilt +++ b/direct/src/dcparser/dcParser.h.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 2.1. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,10 +20,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -116,7 +126,7 @@ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -125,5 +135,3 @@ typedef int YYSTYPE; extern YYSTYPE dcyylval; - - diff --git a/panda/src/egg/lexer.cxx.prebuilt b/panda/src/egg/lexer.cxx.prebuilt index b68c01122f..4109ffa33d 100644 --- a/panda/src/egg/lexer.cxx.prebuilt +++ b/panda/src/egg/lexer.cxx.prebuilt @@ -1,8 +1,13 @@ +#line 2 "lex.yy.c" + +#line 4 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + #define yy_create_buffer eggyy_create_buffer #define yy_delete_buffer eggyy_delete_buffer -#define yy_scan_buffer eggyy_scan_buffer -#define yy_scan_string eggyy_scan_string -#define yy_scan_bytes eggyy_scan_bytes #define yy_flex_debug eggyy_flex_debug #define yy_init_buffer eggyy_init_buffer #define yy_flush_buffer eggyy_flush_buffer @@ -11,75 +16,117 @@ #define yyin eggyyin #define yyleng eggyyleng #define yylex eggyylex +#define yylineno eggyylineno #define yyout eggyyout #define yyrestart eggyyrestart #define yytext eggyytext #define yywrap eggyywrap - -#line 20 "lex.yy.c" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ +#define yyalloc eggyyalloc +#define yyrealloc eggyyrealloc +#define yyfree eggyyfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#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 - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - +#include +#include #include -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS +/* end standard C headers. */ + +/* 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 + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#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 /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) -#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__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 @@ -94,71 +141,70 @@ * 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 eggyyrestart(eggyyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#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; +extern int eggyyleng; + +extern FILE *eggyyin, *eggyyout; #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; \ + /* Undo effects of setting up eggyytext. */ \ + 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_DO_BEFORE_ACTION; /* set up yytext again */ \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up eggyytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; +#define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -195,12 +241,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 @@ -210,99 +260,133 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. + * (via eggyyrestart()), so that the user can continue scanning by + * just pointing eggyyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 - }; -static YY_BUFFER_STATE yy_current_buffer = 0; + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* 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. */ +/* yy_hold_char holds the character lost when eggyytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +int eggyyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... +/* Flag which is used to allow eggyywrap()'s to do buffer switches + * instead of setting up a fresh eggyyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void eggyyrestart (FILE *input_file ); +void eggyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE eggyy_create_buffer (FILE *file,int size ); +void eggyy_delete_buffer (YY_BUFFER_STATE b ); +void eggyy_flush_buffer (YY_BUFFER_STATE b ); +void eggyypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void eggyypop_buffer_state (void ); -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 ) +static void eggyyensure_buffer_stack (void ); +static void eggyy_load_buffer_state (void ); +static void eggyy_init_buffer (YY_BUFFER_STATE b,FILE *file ); -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 )); +#define YY_FLUSH_BUFFER eggyy_flush_buffer(YY_CURRENT_BUFFER ) -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 * )); +YY_BUFFER_STATE eggyy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE eggyy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE eggyy_scan_bytes (yyconst char *bytes,int len ); -#define yy_new_buffer yy_create_buffer +void *eggyyalloc (yy_size_t ); +void *eggyyrealloc (void *,yy_size_t ); +void eggyyfree (void * ); + +#define yy_new_buffer eggyy_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 ){ \ + eggyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + eggyy_create_buffer(eggyyin,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 ){\ + eggyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + eggyy_create_buffer(eggyyin,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) typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +FILE *eggyyin = (FILE *) 0, *eggyyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int eggyylineno; + +int eggyylineno = 1; + +extern char *eggyytext; +#define yytext_ptr eggyytext + +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. + * corresponding action - sets up eggyytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + eggyyleng = (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 99 #define YY_END_OF_BUFFER 100 -static yyconst short int yy_accept[577] = +/* 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_accept[577] = { 0, 0, 0, 100, 98, 2, 1, 97, 98, 98, 98, 98, 89, 89, 89, 98, 98, 98, 5, 98, 1, @@ -323,7 +407,7 @@ static yyconst short int yy_accept[577] = 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 98, 80, 98, 98, 98, 98, 98, 98, + 98, 98, 80, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 25, 98, 98, 98, 98, 98, @@ -350,12 +434,12 @@ static yyconst short int yy_accept[577] = 98, 98, 98, 98, 43, 98, 98, 98, 98, 98, 98, 53, 57, 58, 98, 98, 62, 98, 98, 98, - 98, 98, 98, 98, 98, 98, 98, 98, 98, 83, + 98, 98, 98, 98, 98, 98, 98, 98, 83, 98, 98, 98, 98, 98, 98, 98, 98, 98, 15, 16, 98, 98, 98, 98, 21, 98, 34, 98, 98, 39, 40, 98, 98, 98, 98, 98, 50, 98, 61, 98, 67, 68, 69, 98, 98, 98, 98, 78, 79, 81, - 82, 98, 98, 98, 98, 98, 98, 98, 11, 98, + 98, 98, 98, 82, 98, 98, 98, 98, 11, 98, 98, 98, 26, 98, 35, 38, 98, 98, 98, 98, 98, 60, 98, 70, 98, 98, 98, 98, 98, 98, @@ -369,7 +453,7 @@ static yyconst short int yy_accept[577] = 98, 63, 18, 98, 28, 0 } ; -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, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -377,14 +461,14 @@ static yyconst int yy_ec[256] = 1, 2, 1, 4, 5, 6, 1, 1, 1, 1, 1, 7, 8, 1, 9, 10, 11, 12, 13, 14, 15, 16, 14, 14, 14, 14, 14, 1, 1, 17, - 1, 18, 1, 1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 1, 1, 1, 1, 19, 1, 20, 21, 22, 23, + 1, 18, 1, 1, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 1, 1, 1, 1, 45, 1, 46, 47, 48, 49, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 1, 46, 1, 1, 1, 1, 1, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 1, 72, 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, @@ -401,88 +485,91 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[47] = +static yyconst flex_int32_t yy_meta[73] = { 0, 1, 2, 3, 2, 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 + 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 } ; -static yyconst short int yy_base[582] = +static yyconst flex_int16_t yy_base[582] = { 0, - 0, 45, 698, 0, 699, 0, 699, 8, 82, 22, - 18, 101, 9, 20, 125, 664, 676, 699, 0, 0, - 52, 29, 59, 662, 69, 0, 40, 114, 14, 161, - 166, 187, 661, 79, 108, 192, 665, 655, 658, 656, - 656, 11, 86, 36, 50, 654, 75, 191, 197, 99, - 186, 662, 661, 652, 236, 659, 75, 0, 19, 230, - 241, 0, 655, 654, 636, 660, 100, 646, 658, 643, - 162, 658, 638, 636, 648, 634, 637, 644, 632, 627, - 623, 633, 634, 630, 67, 635, 628, 628, 626, 620, - 635, 633, 619, 618, 625, 630, 613, 12, 626, 629, + 0, 71, 1210, 0, 1211, 0, 1211, 8, 23, 28, + 18, 134, 55, 79, 203, 2, 0, 1211, 0, 0, + 94, 101, 122, 17, 146, 0, 24, 151, 18, 174, + 263, 276, 31, 277, 289, 338, 72, 64, 69, 71, + 80, 146, 261, 284, 300, 108, 312, 352, 376, 293, + 401, 129, 146, 139, 442, 151, 49, 0, 35, 179, + 339, 0, 151, 271, 259, 286, 337, 309, 352, 349, + 383, 1191, 354, 374, 391, 384, 390, 400, 396, 394, + 392, 404, 407, 411, 432, 422, 427, 434, 434, 430, + 448, 449, 437, 438, 447, 455, 440, 452, 457, 463, - 610, 628, 627, 610, 625, 616, 237, 600, 618, 199, - 602, 610, 609, 620, 607, 0, 606, 598, 602, 0, - 621, 604, 0, 598, 598, 601, 606, 596, 592, 602, - 587, 585, 591, 102, 584, 0, 581, 601, 598, 578, - 579, 594, 590, 595, 567, 591, 586, 569, 577, 568, - 573, 566, 580, 568, 51, 578, 576, 568, 578, 574, - 573, 557, 562, 550, 575, 572, 163, 558, 559, 549, - 565, 548, 555, 567, 558, 93, 550, 549, 556, 80, - 562, 546, 545, 0, 544, 543, 536, 568, 530, 539, - 546, 535, 545, 544, 546, 529, 534, 557, 539, 534, + 446, 466, 467, 453, 470, 463, 494, 449, 475, 501, + 465, 478, 1190, 492, 493, 0, 487, 498, 498, 0, + 1195, 504, 0, 500, 502, 508, 515, 507, 505, 517, + 504, 505, 513, 537, 509, 0, 514, 1188, 538, 523, + 537, 554, 552, 1187, 532, 558, 555, 541, 551, 544, + 551, 547, 563, 553, 570, 566, 566, 560, 572, 571, + 573, 559, 567, 568, 1186, 596, 603, 593, 597, 589, + 607, 592, 601, 1185, 607, 605, 602, 604, 613, 620, + 1184, 608, 0, 609, 612, 610, 618, 1195, 611, 628, + 641, 635, 653, 656, 661, 646, 653, 1193, 661, 658, - 537, 526, 536, 540, 0, 517, 536, 523, 534, 528, - 0, 534, 519, 532, 514, 508, 527, 507, 507, 526, - 525, 505, 513, 509, 521, 518, 499, 514, 498, 514, - 494, 506, 0, 513, 491, 511, 510, 509, 498, 147, - 501, 496, 501, 498, 0, 497, 492, 479, 492, 479, - 498, 482, 496, 0, 479, 478, 477, 476, 485, 488, - 259, 482, 0, 469, 468, 486, 469, 470, 477, 482, - 476, 475, 464, 463, 467, 0, 463, 460, 472, 473, - 472, 0, 461, 0, 470, 464, 453, 467, 466, 0, - 0, 455, 439, 463, 0, 449, 114, 440, 460, 444, + 663, 655, 667, 1181, 0, 651, 672, 662, 675, 671, + 0, 1180, 666, 1179, 664, 660, 681, 663, 665, 1178, + 1177, 668, 678, 677, 1176, 695, 682, 702, 694, 714, + 697, 711, 0, 1175, 699, 1174, 1173, 1172, 711, 720, + 717, 715, 723, 722, 0, 724, 721, 710, 726, 715, + 1171, 721, 1170, 0, 721, 722, 723, 735, 726, 742, + 777, 744, 0, 741, 748, 1169, 754, 763, 779, 1168, + 781, 783, 774, 775, 781, 0, 779, 778, 793, 1167, + 1166, 0, 786, 0, 1165, 793, 784, 1164, 1163, 0, + 0, 790, 776, 1147, 0, 789, 801, 782, 1146, 799, - 445, 441, 0, 450, 0, 0, 0, 441, 435, 453, - 437, 436, 441, 449, 433, 427, 427, 424, 199, 0, - 436, 0, 422, 421, 420, 419, 414, 423, 0, 0, - 431, 432, 0, 433, 432, 433, 0, 432, 425, 409, - 423, 413, 406, 422, 412, 0, 0, 420, 0, 417, - 418, 0, 0, 419, 169, 0, 420, 397, 396, 396, - 0, 408, 405, 399, 413, 412, 411, 0, 406, 401, - 204, 0, 387, 386, 400, 396, 388, 401, 389, 381, - 380, 379, 378, 241, 387, 383, 373, 375, 380, 0, - 0, 392, 391, 375, 387, 371, 381, 386, 362, 384, + 811, 815, 0, 827, 0, 0, 0, 820, 816, 1144, + 821, 822, 829, 1137, 824, 820, 823, 822, 837, 0, + 837, 0, 825, 826, 828, 827, 832, 839, 0, 0, + 849, 852, 0, 855, 857, 1132, 0, 1131, 862, 854, + 872, 870, 866, 884, 876, 0, 0, 886, 0, 885, + 888, 0, 0, 891, 40, 0, 1128, 872, 874, 876, + 0, 890, 889, 885, 755, 526, 413, 0, 897, 895, + 903, 0, 885, 887, 903, 901, 895, 911, 909, 909, + 911, 912, 943, 919, 931, 929, 921, 927, 934, 0, + 0, 412, 411, 933, 948, 934, 946, 410, 930, 409, - 377, 369, 381, 380, 0, 360, 359, 351, 370, 367, - 374, 0, 0, 0, 367, 372, 0, 355, 370, 369, - 368, 347, 347, 344, 358, 363, 362, 361, 360, 0, - 344, 342, 351, 342, 339, 335, 348, 352, 0, 0, - 330, 329, 333, 348, 0, 341, 0, 346, 345, 0, - 0, 321, 336, 325, 326, 331, 0, 339, 0, 323, - 0, 0, 0, 337, 322, 329, 239, 0, 0, 0, - 0, 324, 317, 325, 219, 329, 307, 244, 0, 329, - 322, 307, 0, 307, 0, 0, 319, 322, 317, 301, - 300, 0, 315, 0, 319, 318, 315, 295, 301, 301, + 948, 942, 373, 371, 0, 938, 942, 937, 958, 957, + 369, 0, 0, 0, 961, 367, 0, 955, 365, 361, + 330, 956, 964, 964, 980, 322, 316, 300, 0, 978, + 979, 990, 290, 983, 983, 981, 996, 288, 0, 0, + 981, 983, 989, 278, 0, 1000, 0, 277, 275, 0, + 0, 984, 1001, 992, 996, 1005, 0, 189, 0, 1000, + 0, 0, 0, 181, 1002, 1011, 1030, 0, 0, 0, + 1008, 1003, 1014, 0, 1024, 1028, 1016, 1050, 0, 167, + 1034, 1027, 0, 1030, 0, 0, 1047, 1053, 1050, 1037, + 1038, 0, 1055, 0, 159, 138, 1059, 1041, 1049, 1052, - 313, 0, 292, 306, 304, 0, 303, 0, 288, 301, - 285, 305, 300, 303, 302, 301, 290, 0, 0, 284, - 279, 297, 296, 0, 307, 294, 293, 277, 265, 290, - 283, 0, 282, 0, 0, 0, 266, 286, 275, 0, - 0, 284, 0, 0, 262, 262, 0, 256, 280, 269, - 0, 261, 0, 271, 255, 234, 0, 234, 249, 228, - 223, 205, 176, 0, 180, 140, 127, 125, 0, 123, - 43, 0, 0, 33, 0, 699, 284, 0, 287, 289, - 291 + 137, 0, 1048, 1064, 1064, 0, 1065, 0, 1052, 1067, + 1054, 134, 1074, 124, 122, 115, 1069, 0, 0, 1069, + 1072, 105, 104, 0, 114, 101, 100, 1078, 1068, 79, + 1095, 0, 1097, 0, 0, 0, 1083, 48, 1097, 0, + 0, 46, 0, 0, 1087, 1089, 0, 1085, 44, 1102, + 0, 1096, 0, 1108, 1094, 1099, 0, 1101, 42, 1100, + 1116, 1107, 1109, 0, 40, 1111, 1110, 39, 0, 34, + 1114, 0, 0, 27, 0, 1211, 1171, 0, 1174, 1176, + 1178 } ; -static yyconst short int yy_def[582] = +static yyconst flex_int16_t yy_def[582] = { 0, 577, 577, 576, 578, 576, 579, 576, 578, 578, 578, - 578, 578, 12, 12, 578, 578, 578, 576, 578, 579, - 578, 12, 12, 578, 578, 578, 580, 578, 578, 578, + 578, 578, 578, 578, 576, 578, 578, 576, 578, 579, + 578, 578, 578, 578, 578, 578, 580, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 580, 581, 578, 578, @@ -546,181 +633,302 @@ static yyconst short int yy_def[582] = 576 } ; -static yyconst short int yy_nxt[746] = +static yyconst flex_int16_t yy_nxt[1284] = { 0, 19, 5, 6, 7, 576, 576, 576, 8, 9, 10, - 11, 12, 13, 14, 14, 14, 15, 21, 32, 22, - 22, 22, 22, 22, 26, 59, 59, 16, 27, 19, - 59, 59, 17, 25, 25, 25, 25, 25, 88, 163, - 19, 58, 164, 58, 89, 18, 5, 6, 7, 19, - 575, 19, 8, 9, 10, 11, 12, 13, 14, 14, - 14, 15, 19, 25, 25, 25, 25, 25, 55, 93, - 95, 19, 16, 574, 222, 94, 58, 17, 58, 19, - 25, 25, 25, 25, 25, 58, 96, 223, 149, 97, - 18, 21, 30, 22, 23, 22, 22, 22, 99, 252, + 11, 12, 13, 14, 14, 14, 15, 21, 54, 22, + 22, 22, 22, 22, 26, 58, 16, 58, 27, 59, + 59, 17, 21, 53, 22, 23, 22, 22, 22, 25, + 25, 25, 25, 25, 575, 54, 59, 59, 56, 24, + 58, 573, 58, 16, 403, 404, 572, 569, 17, 564, + 53, 557, 64, 553, 32, 551, 22, 22, 22, 22, + 22, 18, 5, 6, 7, 56, 24, 30, 8, 9, + 10, 11, 12, 13, 14, 14, 14, 15, 28, 64, + 22, 22, 22, 22, 22, 58, 547, 16, 83, 84, - 100, 19, 65, 66, 150, 90, 67, 112, 101, 24, - 28, 253, 22, 22, 22, 22, 22, 113, 68, 91, - 58, 29, 92, 247, 30, 25, 25, 25, 25, 25, - 128, 248, 129, 201, 69, 358, 202, 30, 70, 114, - 573, 71, 572, 31, 33, 34, 35, 36, 72, 37, - 38, 359, 39, 40, 41, 42, 43, 44, 45, 46, - 571, 47, 48, 49, 50, 51, 309, 52, 60, 60, - 310, 570, 61, 61, 61, 61, 61, 62, 62, 62, - 62, 62, 235, 403, 404, 62, 62, 62, 62, 62, - 62, 63, 133, 134, 115, 135, 102, 569, 25, 25, + 85, 30, 17, 86, 30, 25, 25, 25, 25, 25, + 28, 87, 22, 22, 22, 22, 22, 544, 543, 542, + 58, 541, 540, 30, 16, 83, 84, 85, 30, 17, + 86, 55, 536, 22, 22, 22, 22, 22, 87, 535, + 98, 534, 18, 28, 30, 22, 22, 22, 22, 22, + 30, 532, 119, 29, 524, 519, 30, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 98, 30, 120, + 121, 30, 88, 30, 123, 31, 518, 124, 89, 119, + 29, 60, 60, 30, 508, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 30, 120, 121, 494, 88, - 25, 25, 25, 116, 117, 236, 237, 238, 568, 118, - 30, 73, 103, 74, 104, 75, 107, 105, 178, 76, - 108, 417, 179, 377, 77, 418, 180, 109, 78, 378, - 79, 80, 106, 110, 81, 82, 502, 503, 567, 111, - 122, 61, 61, 61, 61, 61, 566, 25, 25, 25, - 25, 25, 61, 61, 61, 61, 61, 173, 430, 30, - 431, 506, 174, 497, 565, 507, 564, 563, 562, 175, - 329, 329, 329, 329, 329, 432, 498, 433, 329, 329, - 329, 329, 329, 329, 4, 4, 4, 20, 20, 57, - 57, 58, 58, 561, 560, 559, 558, 557, 556, 555, + 30, 123, 31, 19, 124, 89, 492, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 33, 34, 35, 36, 19, 37, 38, 19, 39, + 40, 41, 42, 43, 44, 45, 46, 19, 47, 48, + 49, 50, 51, 19, 52, 19, 19, 19, 33, 34, + 35, 36, 19, 37, 38, 19, 39, 40, 41, 42, + 43, 44, 45, 46, 19, 47, 48, 49, 50, 51, + 19, 52, 19, 19, 62, 62, 62, 62, 62, 90, + 63, 62, 62, 62, 62, 62, 62, 25, 25, 25, + 25, 25, 486, 91, 485, 483, 92, 125, 30, 65, - 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, - 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, - 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, - 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, - 514, 513, 512, 511, 510, 509, 508, 505, 504, 501, - 500, 499, 496, 495, 494, 493, 492, 491, 490, 489, - 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, - 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, - 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, - 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, + 66, 112, 126, 67, 127, 479, 90, 474, 62, 62, + 62, 62, 62, 62, 69, 68, 93, 470, 70, 95, + 91, 71, 94, 92, 125, 30, 65, 66, 72, 126, + 67, 127, 113, 469, 99, 96, 100, 114, 97, 468, + 130, 69, 68, 93, 101, 70, 95, 463, 71, 94, + 61, 61, 61, 61, 61, 72, 73, 102, 74, 113, + 75, 99, 96, 100, 76, 97, 128, 130, 129, 77, + 131, 101, 103, 78, 104, 79, 80, 105, 462, 81, + 82, 132, 461, 73, 459, 74, 457, 75, 451, 137, + 450, 76, 106, 128, 107, 129, 77, 131, 108, 103, - 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, - 438, 437, 436, 435, 434, 429, 428, 427, 426, 425, - 424, 423, 422, 421, 420, 419, 416, 415, 414, 413, - 412, 411, 410, 409, 408, 407, 406, 405, 402, 401, - 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, - 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, - 380, 379, 376, 375, 374, 373, 372, 371, 370, 369, - 368, 367, 366, 365, 364, 363, 362, 361, 360, 357, - 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, - 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, + 78, 104, 79, 80, 105, 109, 81, 82, 132, 115, + 138, 110, 133, 134, 139, 135, 137, 111, 116, 106, + 140, 107, 141, 117, 142, 108, 447, 445, 440, 439, + 414, 143, 109, 144, 145, 146, 147, 138, 110, 133, + 134, 139, 135, 148, 111, 118, 122, 140, 151, 141, + 117, 142, 149, 25, 25, 25, 25, 25, 143, 152, + 144, 145, 146, 147, 30, 153, 154, 155, 150, 156, + 148, 157, 158, 159, 160, 151, 161, 162, 163, 149, + 165, 164, 166, 167, 168, 169, 152, 170, 171, 172, + 176, 30, 153, 154, 155, 150, 156, 177, 157, 158, - 336, 335, 334, 333, 332, 331, 330, 328, 327, 326, - 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, - 315, 314, 313, 312, 311, 308, 307, 306, 305, 304, - 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, - 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, - 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, - 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, - 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, - 251, 250, 249, 246, 245, 244, 243, 242, 241, 240, - 239, 234, 233, 232, 231, 230, 229, 228, 227, 226, + 159, 160, 181, 161, 162, 163, 182, 165, 164, 166, + 167, 168, 169, 173, 170, 171, 172, 176, 174, 178, + 184, 185, 186, 179, 177, 175, 187, 180, 188, 181, + 190, 191, 192, 182, 193, 194, 195, 196, 197, 198, + 173, 199, 200, 413, 203, 174, 178, 184, 185, 186, + 179, 204, 175, 187, 180, 188, 206, 190, 191, 192, + 207, 193, 194, 195, 196, 197, 198, 201, 199, 200, + 202, 203, 208, 209, 210, 212, 213, 214, 204, 215, + 216, 217, 218, 206, 219, 220, 221, 207, 224, 225, + 226, 227, 222, 228, 201, 229, 230, 202, 231, 208, - 225, 224, 221, 220, 219, 218, 217, 216, 215, 214, - 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, - 203, 200, 199, 198, 197, 196, 195, 194, 193, 192, - 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, - 181, 177, 176, 172, 171, 170, 169, 168, 167, 166, - 165, 162, 161, 160, 159, 158, 157, 156, 155, 154, - 153, 152, 151, 148, 147, 146, 145, 144, 143, 142, - 141, 140, 139, 138, 137, 136, 132, 131, 130, 127, - 126, 125, 124, 123, 121, 120, 119, 98, 87, 86, - 85, 84, 83, 64, 56, 54, 53, 576, 3, 576, + 209, 210, 212, 213, 214, 223, 215, 216, 217, 218, + 232, 219, 220, 221, 234, 224, 225, 226, 227, 222, + 228, 235, 229, 230, 239, 231, 240, 241, 242, 243, + 244, 246, 223, 249, 247, 250, 251, 232, 252, 255, + 256, 234, 248, 257, 236, 237, 238, 258, 235, 259, + 253, 239, 261, 240, 241, 242, 243, 244, 246, 262, + 249, 247, 250, 251, 263, 252, 255, 256, 264, 248, + 257, 236, 237, 238, 258, 265, 259, 253, 266, 261, + 267, 268, 269, 271, 272, 273, 262, 274, 275, 277, + 278, 263, 279, 280, 281, 264, 283, 285, 286, 287, + 288, 289, 265, 292, 293, 266, 294, 267, 268, 269, + 271, 272, 273, 296, 274, 275, 277, 278, 297, 279, + 280, 281, 298, 283, 285, 286, 287, 288, 289, 299, + 292, 293, 300, 294, 301, 302, 304, 308, 309, 311, + 296, 312, 310, 313, 314, 297, 315, 316, 317, 298, + 318, 319, 321, 323, 324, 325, 299, 326, 327, 300, + 328, 301, 302, 304, 308, 309, 311, 330, 312, 310, + 313, 314, 412, 315, 316, 317, 331, 318, 319, 321, + 323, 324, 325, 332, 326, 327, 334, 328, 329, 329, + 329, 329, 329, 335, 330, 329, 329, 329, 329, 329, + + 329, 336, 338, 331, 339, 340, 341, 342, 343, 344, + 332, 345, 348, 334, 350, 351, 354, 355, 357, 360, + 335, 358, 329, 329, 329, 329, 329, 329, 336, 338, + 362, 339, 340, 341, 342, 343, 344, 359, 345, 348, + 363, 350, 351, 354, 355, 357, 360, 364, 358, 365, + 366, 367, 369, 370, 371, 373, 374, 362, 375, 376, + 377, 379, 380, 381, 359, 382, 378, 363, 383, 384, + 385, 386, 387, 388, 364, 389, 365, 366, 367, 369, + 370, 371, 373, 374, 392, 375, 376, 377, 379, 380, + 381, 393, 382, 378, 394, 383, 384, 385, 386, 387, + + 388, 395, 389, 396, 397, 398, 399, 400, 401, 402, + 406, 392, 407, 408, 409, 410, 411, 415, 393, 416, + 417, 394, 419, 418, 420, 421, 422, 423, 395, 424, + 396, 397, 398, 399, 400, 401, 402, 406, 425, 407, + 408, 409, 410, 411, 415, 426, 416, 427, 428, 419, + 418, 420, 421, 422, 423, 433, 424, 434, 435, 436, + 429, 430, 437, 438, 441, 425, 442, 443, 444, 446, + 448, 449, 426, 452, 427, 428, 431, 453, 432, 454, + 455, 456, 433, 458, 434, 435, 436, 460, 430, 437, + 438, 441, 464, 442, 443, 444, 446, 448, 449, 465, + + 452, 466, 467, 431, 453, 432, 454, 455, 456, 471, + 458, 472, 473, 475, 460, 476, 477, 478, 480, 464, + 481, 482, 484, 487, 488, 489, 465, 490, 466, 467, + 491, 493, 495, 496, 499, 500, 471, 501, 472, 473, + 475, 502, 476, 477, 478, 480, 504, 481, 482, 484, + 487, 488, 489, 497, 490, 505, 509, 491, 493, 495, + 496, 499, 500, 510, 501, 511, 498, 506, 503, 512, + 507, 513, 514, 504, 515, 516, 517, 520, 521, 522, + 497, 523, 505, 509, 525, 526, 527, 528, 529, 530, + 510, 531, 511, 498, 533, 537, 512, 507, 513, 514, + + 538, 515, 516, 517, 520, 521, 522, 539, 523, 545, + 546, 525, 526, 527, 528, 529, 530, 548, 531, 549, + 550, 533, 537, 552, 554, 555, 556, 538, 558, 559, + 560, 561, 562, 563, 539, 565, 545, 546, 566, 567, + 568, 570, 571, 574, 548, 405, 549, 550, 391, 390, + 552, 554, 555, 556, 372, 558, 559, 560, 561, 562, + 563, 368, 565, 361, 356, 566, 567, 568, 570, 571, + 574, 4, 4, 4, 20, 20, 57, 57, 58, 58, + 353, 352, 349, 347, 346, 337, 333, 322, 320, 307, + 306, 305, 303, 295, 291, 290, 284, 282, 276, 270, + + 260, 254, 245, 233, 211, 205, 189, 183, 136, 576, + 3, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576 + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576 } ; -static yyconst short int yy_chk[746] = +static yyconst flex_int16_t yy_chk[1284] = { 0, 578, 1, 1, 1, 0, 0, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 8, 13, 8, - 8, 8, 8, 8, 11, 29, 29, 1, 11, 13, - 59, 59, 1, 10, 10, 10, 10, 10, 42, 98, - 14, 27, 98, 27, 42, 1, 2, 2, 2, 22, - 574, 13, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 14, 21, 21, 21, 21, 21, 23, 44, - 45, 22, 2, 571, 155, 44, 57, 2, 57, 23, - 25, 25, 25, 25, 25, 27, 45, 155, 85, 45, - 2, 9, 25, 9, 9, 9, 9, 9, 47, 180, + 1, 1, 1, 1, 1, 1, 1, 8, 17, 8, + 8, 8, 8, 8, 11, 27, 1, 27, 11, 29, + 29, 1, 9, 16, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 574, 17, 59, 59, 24, 9, + 57, 570, 57, 1, 355, 355, 568, 565, 1, 559, + 16, 549, 33, 542, 13, 538, 13, 13, 13, 13, + 13, 1, 2, 2, 2, 24, 9, 13, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 14, 33, + 14, 14, 14, 14, 14, 27, 530, 2, 37, 38, - 47, 23, 34, 34, 85, 43, 34, 50, 47, 9, - 12, 180, 12, 12, 12, 12, 12, 50, 34, 43, - 57, 12, 43, 176, 12, 28, 28, 28, 28, 28, - 67, 176, 67, 134, 35, 297, 134, 28, 35, 50, - 570, 35, 568, 12, 15, 15, 15, 15, 35, 15, - 15, 297, 15, 15, 15, 15, 15, 15, 15, 15, - 567, 15, 15, 15, 15, 15, 240, 15, 30, 30, - 240, 566, 30, 30, 30, 30, 30, 31, 31, 31, - 31, 31, 167, 355, 355, 31, 31, 31, 31, 31, - 31, 32, 71, 71, 51, 71, 48, 565, 32, 32, + 39, 14, 2, 40, 13, 21, 21, 21, 21, 21, + 22, 41, 22, 22, 22, 22, 22, 527, 526, 525, + 57, 523, 522, 22, 2, 37, 38, 39, 14, 2, + 40, 23, 516, 23, 23, 23, 23, 23, 41, 515, + 46, 514, 2, 12, 23, 12, 12, 12, 12, 12, + 22, 512, 52, 12, 501, 496, 12, 25, 25, 25, + 25, 25, 28, 28, 28, 28, 28, 46, 25, 53, + 54, 23, 42, 28, 56, 12, 495, 63, 42, 52, + 12, 30, 30, 12, 480, 30, 30, 30, 30, 30, + 60, 60, 60, 60, 60, 25, 53, 54, 464, 42, - 32, 32, 32, 51, 51, 167, 167, 167, 563, 51, - 32, 36, 48, 36, 48, 36, 49, 48, 110, 36, - 49, 371, 110, 319, 36, 371, 110, 49, 36, 319, - 36, 36, 48, 49, 36, 36, 475, 475, 562, 49, - 55, 60, 60, 60, 60, 60, 561, 55, 55, 55, - 55, 55, 61, 61, 61, 61, 61, 107, 384, 55, - 384, 478, 107, 467, 560, 478, 559, 558, 556, 107, - 261, 261, 261, 261, 261, 384, 467, 384, 261, 261, - 261, 261, 261, 261, 577, 577, 577, 579, 579, 580, - 580, 581, 581, 555, 554, 552, 550, 549, 548, 546, + 28, 56, 12, 15, 63, 42, 458, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 31, 31, 31, 31, 31, 43, + 32, 31, 31, 31, 31, 31, 31, 32, 32, 32, + 32, 32, 449, 43, 448, 444, 43, 64, 32, 34, - 545, 542, 539, 538, 537, 533, 531, 530, 529, 528, - 527, 526, 525, 523, 522, 521, 520, 517, 516, 515, - 514, 513, 512, 511, 510, 509, 507, 505, 504, 503, - 501, 500, 499, 498, 497, 496, 495, 493, 491, 490, - 489, 488, 487, 484, 482, 481, 480, 477, 476, 474, - 473, 472, 466, 465, 464, 460, 458, 456, 455, 454, - 453, 452, 449, 448, 446, 444, 443, 442, 441, 438, - 437, 436, 435, 434, 433, 432, 431, 429, 428, 427, - 426, 425, 424, 423, 422, 421, 420, 419, 418, 416, - 415, 411, 410, 409, 408, 407, 406, 404, 403, 402, + 34, 50, 65, 34, 66, 438, 43, 433, 31, 31, + 31, 31, 31, 31, 35, 34, 44, 428, 35, 45, + 43, 35, 44, 43, 64, 32, 34, 34, 35, 65, + 34, 66, 50, 427, 47, 45, 47, 50, 45, 426, + 68, 35, 34, 44, 47, 35, 45, 421, 35, 44, + 61, 61, 61, 61, 61, 35, 36, 48, 36, 50, + 36, 47, 45, 47, 36, 45, 67, 68, 67, 36, + 69, 47, 48, 36, 48, 36, 36, 48, 420, 36, + 36, 70, 419, 36, 416, 36, 411, 36, 404, 73, + 403, 36, 48, 67, 49, 67, 36, 69, 49, 48, - 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, - 389, 388, 387, 386, 385, 383, 382, 381, 380, 379, - 378, 377, 376, 375, 374, 373, 370, 369, 367, 366, - 365, 364, 363, 362, 360, 359, 358, 357, 354, 351, - 350, 348, 345, 344, 343, 342, 341, 340, 339, 338, - 336, 335, 334, 332, 331, 328, 327, 326, 325, 324, - 323, 321, 318, 317, 316, 315, 314, 313, 312, 311, - 310, 309, 308, 304, 302, 301, 300, 299, 298, 296, - 294, 293, 292, 289, 288, 287, 286, 285, 283, 281, - 280, 279, 278, 277, 275, 274, 273, 272, 271, 270, + 36, 48, 36, 36, 48, 49, 36, 36, 70, 51, + 74, 49, 71, 71, 75, 71, 73, 49, 51, 48, + 76, 49, 77, 51, 78, 49, 400, 398, 393, 392, + 367, 79, 49, 80, 81, 82, 83, 74, 49, 71, + 71, 75, 71, 84, 49, 51, 55, 76, 86, 77, + 51, 78, 85, 55, 55, 55, 55, 55, 79, 87, + 80, 81, 82, 83, 55, 88, 89, 90, 85, 91, + 84, 92, 93, 94, 95, 86, 96, 97, 98, 85, + 99, 98, 100, 101, 102, 103, 87, 104, 105, 106, + 108, 55, 88, 89, 90, 85, 91, 109, 92, 93, - 269, 268, 267, 266, 265, 264, 262, 260, 259, 258, - 257, 256, 255, 253, 252, 251, 250, 249, 248, 247, - 246, 244, 243, 242, 241, 239, 238, 237, 236, 235, - 234, 232, 231, 230, 229, 228, 227, 226, 225, 224, - 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, - 213, 212, 210, 209, 208, 207, 206, 204, 203, 202, - 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, - 191, 190, 189, 188, 187, 186, 185, 183, 182, 181, - 179, 178, 177, 175, 174, 173, 172, 171, 170, 169, - 168, 166, 165, 164, 163, 162, 161, 160, 159, 158, + 94, 95, 111, 96, 97, 98, 112, 99, 98, 100, + 101, 102, 103, 107, 104, 105, 106, 108, 107, 110, + 114, 115, 117, 110, 109, 107, 118, 110, 119, 111, + 122, 124, 125, 112, 126, 127, 128, 129, 130, 131, + 107, 132, 133, 366, 135, 107, 110, 114, 115, 117, + 110, 137, 107, 118, 110, 119, 139, 122, 124, 125, + 140, 126, 127, 128, 129, 130, 131, 134, 132, 133, + 134, 135, 141, 142, 143, 145, 146, 147, 137, 148, + 149, 150, 151, 139, 152, 153, 154, 140, 156, 157, + 158, 159, 155, 160, 134, 161, 162, 134, 163, 141, - 157, 156, 154, 153, 152, 151, 150, 149, 148, 147, - 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, - 135, 133, 132, 131, 130, 129, 128, 127, 126, 125, - 124, 122, 121, 119, 118, 117, 115, 114, 113, 112, - 111, 109, 108, 106, 105, 104, 103, 102, 101, 100, - 99, 97, 96, 95, 94, 93, 92, 91, 90, 89, - 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, - 77, 76, 75, 74, 73, 72, 70, 69, 68, 66, - 65, 64, 63, 56, 54, 53, 52, 46, 41, 40, - 39, 38, 37, 33, 24, 17, 16, 3, 576, 576, + 142, 143, 145, 146, 147, 155, 148, 149, 150, 151, + 164, 152, 153, 154, 166, 156, 157, 158, 159, 155, + 160, 167, 161, 162, 168, 163, 169, 170, 171, 172, + 173, 175, 155, 177, 176, 178, 179, 164, 180, 182, + 184, 166, 176, 185, 167, 167, 167, 186, 167, 187, + 180, 168, 189, 169, 170, 171, 172, 173, 175, 190, + 177, 176, 178, 179, 191, 180, 182, 184, 192, 176, + 185, 167, 167, 167, 186, 193, 187, 180, 194, 189, + 195, 196, 197, 199, 200, 201, 190, 202, 203, 206, + 207, 191, 208, 209, 210, 192, 213, 215, 216, 217, + 218, 219, 193, 222, 223, 194, 224, 195, 196, 197, + 199, 200, 201, 226, 202, 203, 206, 207, 227, 208, + 209, 210, 228, 213, 215, 216, 217, 218, 219, 229, + 222, 223, 230, 224, 231, 232, 235, 239, 240, 241, + 226, 242, 240, 243, 244, 227, 246, 247, 248, 228, + 249, 250, 252, 255, 256, 257, 229, 258, 259, 230, + 260, 231, 232, 235, 239, 240, 241, 262, 242, 240, + 243, 244, 365, 246, 247, 248, 264, 249, 250, 252, + 255, 256, 257, 265, 258, 259, 267, 260, 261, 261, + 261, 261, 261, 268, 262, 261, 261, 261, 261, 261, + + 261, 269, 271, 264, 272, 273, 274, 275, 277, 278, + 265, 279, 283, 267, 286, 287, 292, 293, 296, 298, + 268, 297, 261, 261, 261, 261, 261, 261, 269, 271, + 300, 272, 273, 274, 275, 277, 278, 297, 279, 283, + 301, 286, 287, 292, 293, 296, 298, 302, 297, 304, + 308, 309, 311, 312, 313, 315, 316, 300, 317, 318, + 319, 321, 323, 324, 297, 325, 319, 301, 326, 327, + 328, 331, 332, 334, 302, 335, 304, 308, 309, 311, + 312, 313, 315, 316, 339, 317, 318, 319, 321, 323, + 324, 340, 325, 319, 341, 326, 327, 328, 331, 332, + + 334, 342, 335, 343, 344, 345, 348, 350, 351, 354, + 358, 339, 359, 360, 362, 363, 364, 369, 340, 370, + 371, 341, 373, 371, 374, 375, 376, 377, 342, 378, + 343, 344, 345, 348, 350, 351, 354, 358, 379, 359, + 360, 362, 363, 364, 369, 380, 370, 381, 382, 373, + 371, 374, 375, 376, 377, 384, 378, 385, 386, 387, + 383, 383, 388, 389, 394, 379, 395, 396, 397, 399, + 401, 402, 380, 406, 381, 382, 383, 407, 383, 408, + 409, 410, 384, 415, 385, 386, 387, 418, 383, 388, + 389, 394, 422, 395, 396, 397, 399, 401, 402, 423, + + 406, 424, 425, 383, 407, 383, 408, 409, 410, 430, + 415, 431, 432, 434, 418, 435, 436, 437, 441, 422, + 442, 443, 446, 452, 453, 454, 423, 455, 424, 425, + 456, 460, 465, 466, 471, 472, 430, 473, 431, 432, + 434, 475, 435, 436, 437, 441, 476, 442, 443, 446, + 452, 453, 454, 467, 455, 477, 481, 456, 460, 465, + 466, 471, 472, 482, 473, 484, 467, 478, 475, 487, + 478, 488, 489, 476, 490, 491, 493, 497, 498, 499, + 467, 500, 477, 481, 503, 504, 505, 507, 509, 510, + 482, 511, 484, 467, 513, 517, 487, 478, 488, 489, + + 520, 490, 491, 493, 497, 498, 499, 521, 500, 528, + 529, 503, 504, 505, 507, 509, 510, 531, 511, 533, + 537, 513, 517, 539, 545, 546, 548, 520, 550, 552, + 554, 555, 556, 558, 521, 560, 528, 529, 561, 562, + 563, 566, 567, 571, 531, 357, 533, 537, 338, 336, + 539, 545, 546, 548, 314, 550, 552, 554, 555, 556, + 558, 310, 560, 299, 294, 561, 562, 563, 566, 567, + 571, 577, 577, 577, 579, 579, 580, 580, 581, 581, + 289, 288, 285, 281, 280, 270, 266, 253, 251, 238, + 237, 236, 234, 225, 221, 220, 214, 212, 204, 198, + + 188, 181, 174, 165, 144, 138, 121, 113, 72, 3, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, - 576, 576, 576, 576, 576 + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + 576, 576, 576 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int eggyy_flex_debug; +int eggyy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -728,9 +936,8 @@ static char *yy_last_accepting_cpos; #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +char *eggyytext; #line 1 "lexer.lxx" -#define INITIAL 0 /* // Filename: lexer.l // Created by: drose (16Jan99) @@ -747,6 +954,7 @@ char *yytext; #include "pnotify.h" #include "lightMutex.h" #include "thread.h" +#include "pstrtod.h" #include @@ -1014,10 +1222,54 @@ eat_c_comment() { // accept() is called below as each piece is pulled off and // accepted by the lexer; it increments the current column number. INLINE void accept() { - col_number += yyleng; + col_number += eggyyleng; } -#line 1022 "lex.yy.c" +#line 1229 "lex.yy.c" + +#define INITIAL 0 + +#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. + */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int eggyylex_destroy (void ); + +int eggyyget_debug (void ); + +void eggyyset_debug (int debug_flag ); + +YY_EXTRA_TYPE eggyyget_extra (void ); + +void eggyyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *eggyyget_in (void ); + +void eggyyset_in (FILE * in_str ); + +FILE *eggyyget_out (void ); + +void eggyyset_out (FILE * out_str ); + +int eggyyget_leng (void ); + +char *eggyyget_text (void ); + +int eggyyget_lineno (void ); + +void eggyyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1025,65 +1277,30 @@ INLINE void accept() { #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int eggyywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int eggyywrap (void ); #endif #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 )); +static int yyinput (void ); #else -static int input YY_PROTO(( void )); -#endif +static int input (void ); #endif -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -1092,12 +1309,11 @@ 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(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( eggyytext, eggyyleng, 1, eggyyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1105,21 +1321,35 @@ 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 = '*'; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( eggyyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ + if ( c == EOF && ferror( eggyyin ) ) \ 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, eggyyin))==0 && ferror(eggyyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(eggyyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -1140,14 +1370,20 @@ 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 -/* Code executed at the beginning of each rule, after yytext and yyleng +extern int eggyylex (void); + +#define YY_DECL int eggyylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after eggyytext and eggyyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -1162,13 +1398,15 @@ YY_MALLOC_DECL #define YY_RULE_SETUP \ 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 294 "lexer.lxx" + +#line 295 "lexer.lxx" @@ -1179,53 +1417,55 @@ YY_DECL } -#line 1184 "lex.yy.c" +#line 1422 "lex.yy.c" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! eggyyin ) + eggyyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! eggyyout ) + eggyyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + eggyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + eggyy_create_buffer(eggyyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + eggyy_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; + /* Support of eggyytext. */ + *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_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1236,40 +1476,39 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 699 ); + while ( yy_base[yy_current_state] != 1211 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: +/* rule 1 can match eol */ YY_RULE_SETUP -#line 304 "lexer.lxx" +#line 305 "lexer.lxx" { // New line. Save a copy of the line so we can print it out for the // benefit of the user in case we get an error. - strncpy(current_line, yytext+1, max_error_width); + strncpy(current_line, eggyytext+1, max_error_width); current_line[max_error_width] = '\0'; line_number++; col_number=0; @@ -1281,7 +1520,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 318 "lexer.lxx" +#line 319 "lexer.lxx" { // Eat whitespace. accept(); @@ -1289,7 +1528,7 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 323 "lexer.lxx" +#line 324 "lexer.lxx" { // Eat C++-style comments. accept(); @@ -1297,7 +1536,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 328 "lexer.lxx" +#line 329 "lexer.lxx" { // Eat C-style comments. accept(); @@ -1306,7 +1545,7 @@ YY_RULE_SETUP YY_BREAK case 5: YY_RULE_SETUP -#line 334 "lexer.lxx" +#line 335 "lexer.lxx" { // Send curly braces as themselves. accept(); @@ -1315,7 +1554,7 @@ YY_RULE_SETUP YY_BREAK case 6: YY_RULE_SETUP -#line 342 "lexer.lxx" +#line 343 "lexer.lxx" { accept(); return ANIMPRELOAD; @@ -1323,7 +1562,7 @@ YY_RULE_SETUP YY_BREAK case 7: YY_RULE_SETUP -#line 346 "lexer.lxx" +#line 347 "lexer.lxx" { accept(); return BEZIERCURVE; @@ -1331,7 +1570,7 @@ YY_RULE_SETUP YY_BREAK case 8: YY_RULE_SETUP -#line 350 "lexer.lxx" +#line 351 "lexer.lxx" { accept(); return BFACE; @@ -1339,7 +1578,7 @@ YY_RULE_SETUP YY_BREAK case 9: YY_RULE_SETUP -#line 354 "lexer.lxx" +#line 355 "lexer.lxx" { accept(); return BILLBOARD; @@ -1347,7 +1586,7 @@ YY_RULE_SETUP YY_BREAK case 10: YY_RULE_SETUP -#line 358 "lexer.lxx" +#line 359 "lexer.lxx" { accept(); return BILLBOARDCENTER; @@ -1355,7 +1594,7 @@ YY_RULE_SETUP YY_BREAK case 11: YY_RULE_SETUP -#line 362 "lexer.lxx" +#line 363 "lexer.lxx" { accept(); return BINORMAL; @@ -1363,7 +1602,7 @@ YY_RULE_SETUP YY_BREAK case 12: YY_RULE_SETUP -#line 366 "lexer.lxx" +#line 367 "lexer.lxx" { accept(); return BUNDLE; @@ -1371,7 +1610,7 @@ YY_RULE_SETUP YY_BREAK case 13: YY_RULE_SETUP -#line 370 "lexer.lxx" +#line 371 "lexer.lxx" { accept(); return SCALAR; @@ -1379,7 +1618,7 @@ YY_RULE_SETUP YY_BREAK case 14: YY_RULE_SETUP -#line 374 "lexer.lxx" +#line 375 "lexer.lxx" { accept(); return CLOSED; @@ -1387,7 +1626,7 @@ YY_RULE_SETUP YY_BREAK case 15: YY_RULE_SETUP -#line 378 "lexer.lxx" +#line 379 "lexer.lxx" { accept(); return COLLIDE; @@ -1395,7 +1634,7 @@ YY_RULE_SETUP YY_BREAK case 16: YY_RULE_SETUP -#line 382 "lexer.lxx" +#line 383 "lexer.lxx" { accept(); return COMMENT; @@ -1403,7 +1642,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 386 "lexer.lxx" +#line 387 "lexer.lxx" { accept(); return COMPONENT; @@ -1411,7 +1650,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 390 "lexer.lxx" +#line 391 "lexer.lxx" { accept(); return COORDSYSTEM; @@ -1419,7 +1658,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 394 "lexer.lxx" +#line 395 "lexer.lxx" { accept(); return CV; @@ -1427,7 +1666,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 398 "lexer.lxx" +#line 399 "lexer.lxx" { accept(); return DART; @@ -1435,7 +1674,7 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 402 "lexer.lxx" +#line 403 "lexer.lxx" { accept(); return DNORMAL; @@ -1443,7 +1682,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 406 "lexer.lxx" +#line 407 "lexer.lxx" { accept(); return DRGBA; @@ -1451,7 +1690,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 410 "lexer.lxx" +#line 411 "lexer.lxx" { accept(); return DUV; @@ -1459,7 +1698,7 @@ YY_RULE_SETUP YY_BREAK case 24: YY_RULE_SETUP -#line 414 "lexer.lxx" +#line 415 "lexer.lxx" { accept(); return DXYZ; @@ -1467,7 +1706,7 @@ YY_RULE_SETUP YY_BREAK case 25: YY_RULE_SETUP -#line 418 "lexer.lxx" +#line 419 "lexer.lxx" { accept(); return DCS; @@ -1475,7 +1714,7 @@ YY_RULE_SETUP YY_BREAK case 26: YY_RULE_SETUP -#line 422 "lexer.lxx" +#line 423 "lexer.lxx" { accept(); return DISTANCE; @@ -1483,7 +1722,7 @@ YY_RULE_SETUP YY_BREAK case 27: YY_RULE_SETUP -#line 426 "lexer.lxx" +#line 427 "lexer.lxx" { accept(); return DTREF; @@ -1491,7 +1730,7 @@ YY_RULE_SETUP YY_BREAK case 28: YY_RULE_SETUP -#line 430 "lexer.lxx" +#line 431 "lexer.lxx" { accept(); return DYNAMICVERTEXPOOL; @@ -1499,7 +1738,7 @@ YY_RULE_SETUP YY_BREAK case 29: YY_RULE_SETUP -#line 434 "lexer.lxx" +#line 435 "lexer.lxx" { accept(); return EXTERNAL_FILE; @@ -1507,7 +1746,7 @@ YY_RULE_SETUP YY_BREAK case 30: YY_RULE_SETUP -#line 438 "lexer.lxx" +#line 439 "lexer.lxx" { accept(); return GROUP; @@ -1515,7 +1754,7 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -#line 442 "lexer.lxx" +#line 443 "lexer.lxx" { accept(); return DEFAULTPOSE; @@ -1523,7 +1762,7 @@ YY_RULE_SETUP YY_BREAK case 32: YY_RULE_SETUP -#line 446 "lexer.lxx" +#line 447 "lexer.lxx" { accept(); return JOINT; @@ -1531,7 +1770,7 @@ YY_RULE_SETUP YY_BREAK case 33: YY_RULE_SETUP -#line 450 "lexer.lxx" +#line 451 "lexer.lxx" { accept(); return KNOTS; @@ -1539,7 +1778,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 454 "lexer.lxx" +#line 455 "lexer.lxx" { accept(); return INCLUDE; @@ -1547,7 +1786,7 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 458 "lexer.lxx" +#line 459 "lexer.lxx" { accept(); return INSTANCE; @@ -1555,7 +1794,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 462 "lexer.lxx" +#line 463 "lexer.lxx" { accept(); return LINE; @@ -1563,7 +1802,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 466 "lexer.lxx" +#line 467 "lexer.lxx" { accept(); return LOOP; @@ -1571,7 +1810,7 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 470 "lexer.lxx" +#line 471 "lexer.lxx" { accept(); return MATERIAL; @@ -1579,7 +1818,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 474 "lexer.lxx" +#line 475 "lexer.lxx" { accept(); return MATRIX3; @@ -1587,7 +1826,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 478 "lexer.lxx" +#line 479 "lexer.lxx" { accept(); return MATRIX4; @@ -1595,7 +1834,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 482 "lexer.lxx" +#line 483 "lexer.lxx" { accept(); return MODEL; @@ -1603,7 +1842,7 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 486 "lexer.lxx" +#line 487 "lexer.lxx" { accept(); return MREF; @@ -1611,7 +1850,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 490 "lexer.lxx" +#line 491 "lexer.lxx" { accept(); return NORMAL; @@ -1619,7 +1858,7 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 494 "lexer.lxx" +#line 495 "lexer.lxx" { accept(); return NURBSCURVE; @@ -1627,7 +1866,7 @@ YY_RULE_SETUP YY_BREAK case 45: YY_RULE_SETUP -#line 498 "lexer.lxx" +#line 499 "lexer.lxx" { accept(); return NURBSSURFACE; @@ -1635,7 +1874,7 @@ YY_RULE_SETUP YY_BREAK case 46: YY_RULE_SETUP -#line 502 "lexer.lxx" +#line 503 "lexer.lxx" { accept(); return OBJECTTYPE; @@ -1643,7 +1882,7 @@ YY_RULE_SETUP YY_BREAK case 47: YY_RULE_SETUP -#line 506 "lexer.lxx" +#line 507 "lexer.lxx" { accept(); return ORDER; @@ -1651,7 +1890,7 @@ YY_RULE_SETUP YY_BREAK case 48: YY_RULE_SETUP -#line 510 "lexer.lxx" +#line 511 "lexer.lxx" { accept(); return OUTTANGENT; @@ -1659,7 +1898,7 @@ YY_RULE_SETUP YY_BREAK case 49: YY_RULE_SETUP -#line 514 "lexer.lxx" +#line 515 "lexer.lxx" { accept(); return POINTLIGHT; @@ -1667,7 +1906,7 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 518 "lexer.lxx" +#line 519 "lexer.lxx" { accept(); return POLYGON; @@ -1675,7 +1914,7 @@ YY_RULE_SETUP YY_BREAK case 51: YY_RULE_SETUP -#line 522 "lexer.lxx" +#line 523 "lexer.lxx" { accept(); return REF; @@ -1683,7 +1922,7 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 526 "lexer.lxx" +#line 527 "lexer.lxx" { accept(); return RGBA; @@ -1691,7 +1930,7 @@ YY_RULE_SETUP YY_BREAK case 53: YY_RULE_SETUP -#line 530 "lexer.lxx" +#line 531 "lexer.lxx" { accept(); return ROTATE; @@ -1699,7 +1938,7 @@ YY_RULE_SETUP YY_BREAK case 54: YY_RULE_SETUP -#line 534 "lexer.lxx" +#line 535 "lexer.lxx" { accept(); return ROTX; @@ -1707,7 +1946,7 @@ YY_RULE_SETUP YY_BREAK case 55: YY_RULE_SETUP -#line 538 "lexer.lxx" +#line 539 "lexer.lxx" { accept(); return ROTY; @@ -1715,7 +1954,7 @@ YY_RULE_SETUP YY_BREAK case 56: YY_RULE_SETUP -#line 542 "lexer.lxx" +#line 543 "lexer.lxx" { accept(); return ROTZ; @@ -1723,7 +1962,7 @@ YY_RULE_SETUP YY_BREAK case 57: YY_RULE_SETUP -#line 546 "lexer.lxx" +#line 547 "lexer.lxx" { accept(); return SANIM; @@ -1731,7 +1970,7 @@ YY_RULE_SETUP YY_BREAK case 58: YY_RULE_SETUP -#line 550 "lexer.lxx" +#line 551 "lexer.lxx" { accept(); return SCALAR; @@ -1739,7 +1978,7 @@ YY_RULE_SETUP YY_BREAK case 59: YY_RULE_SETUP -#line 554 "lexer.lxx" +#line 555 "lexer.lxx" { accept(); return SCALE; @@ -1747,7 +1986,7 @@ YY_RULE_SETUP YY_BREAK case 60: YY_RULE_SETUP -#line 558 "lexer.lxx" +#line 559 "lexer.lxx" { accept(); return SEQUENCE; @@ -1755,7 +1994,7 @@ YY_RULE_SETUP YY_BREAK case 61: YY_RULE_SETUP -#line 562 "lexer.lxx" +#line 563 "lexer.lxx" { accept(); return SHADING; @@ -1763,7 +2002,7 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 566 "lexer.lxx" +#line 567 "lexer.lxx" { accept(); return SWITCH; @@ -1771,7 +2010,7 @@ YY_RULE_SETUP YY_BREAK case 63: YY_RULE_SETUP -#line 570 "lexer.lxx" +#line 571 "lexer.lxx" { accept(); return SWITCHCONDITION; @@ -1779,7 +2018,7 @@ YY_RULE_SETUP YY_BREAK case 64: YY_RULE_SETUP -#line 574 "lexer.lxx" +#line 575 "lexer.lxx" { accept(); return TABLE; @@ -1787,7 +2026,7 @@ YY_RULE_SETUP YY_BREAK case 65: YY_RULE_SETUP -#line 578 "lexer.lxx" +#line 579 "lexer.lxx" { accept(); return TABLE_V; @@ -1795,7 +2034,7 @@ YY_RULE_SETUP YY_BREAK case 66: YY_RULE_SETUP -#line 582 "lexer.lxx" +#line 583 "lexer.lxx" { accept(); return TAG; @@ -1803,7 +2042,7 @@ YY_RULE_SETUP YY_BREAK case 67: YY_RULE_SETUP -#line 586 "lexer.lxx" +#line 587 "lexer.lxx" { accept(); return TANGENT; @@ -1811,7 +2050,7 @@ YY_RULE_SETUP YY_BREAK case 68: YY_RULE_SETUP -#line 590 "lexer.lxx" +#line 591 "lexer.lxx" { accept(); return TEXLIST; @@ -1819,7 +2058,7 @@ YY_RULE_SETUP YY_BREAK case 69: YY_RULE_SETUP -#line 594 "lexer.lxx" +#line 595 "lexer.lxx" { accept(); return TEXTURE; @@ -1827,7 +2066,7 @@ YY_RULE_SETUP YY_BREAK case 70: YY_RULE_SETUP -#line 598 "lexer.lxx" +#line 599 "lexer.lxx" { accept(); return TLENGTHS; @@ -1835,7 +2074,7 @@ YY_RULE_SETUP YY_BREAK case 71: YY_RULE_SETUP -#line 602 "lexer.lxx" +#line 603 "lexer.lxx" { accept(); return TRANSFORM; @@ -1843,7 +2082,7 @@ YY_RULE_SETUP YY_BREAK case 72: YY_RULE_SETUP -#line 606 "lexer.lxx" +#line 607 "lexer.lxx" { accept(); return TRANSLATE; @@ -1851,7 +2090,7 @@ YY_RULE_SETUP YY_BREAK case 73: YY_RULE_SETUP -#line 610 "lexer.lxx" +#line 611 "lexer.lxx" { accept(); return TREF; @@ -1859,7 +2098,7 @@ YY_RULE_SETUP YY_BREAK case 74: YY_RULE_SETUP -#line 614 "lexer.lxx" +#line 615 "lexer.lxx" { accept(); return TRIANGLEFAN; @@ -1867,7 +2106,7 @@ YY_RULE_SETUP YY_BREAK case 75: YY_RULE_SETUP -#line 618 "lexer.lxx" +#line 619 "lexer.lxx" { accept(); return TRIANGLESTRIP; @@ -1875,7 +2114,7 @@ YY_RULE_SETUP YY_BREAK case 76: YY_RULE_SETUP -#line 622 "lexer.lxx" +#line 623 "lexer.lxx" { accept(); return TRIM; @@ -1883,7 +2122,7 @@ YY_RULE_SETUP YY_BREAK case 77: YY_RULE_SETUP -#line 626 "lexer.lxx" +#line 627 "lexer.lxx" { accept(); return TXT; @@ -1891,7 +2130,7 @@ YY_RULE_SETUP YY_BREAK case 78: YY_RULE_SETUP -#line 630 "lexer.lxx" +#line 631 "lexer.lxx" { accept(); return UKNOTS; @@ -1899,7 +2138,7 @@ YY_RULE_SETUP YY_BREAK case 79: YY_RULE_SETUP -#line 634 "lexer.lxx" +#line 635 "lexer.lxx" { accept(); return UKNOTS; @@ -1907,7 +2146,7 @@ YY_RULE_SETUP YY_BREAK case 80: YY_RULE_SETUP -#line 638 "lexer.lxx" +#line 639 "lexer.lxx" { accept(); return UV; @@ -1915,7 +2154,7 @@ YY_RULE_SETUP YY_BREAK case 81: YY_RULE_SETUP -#line 642 "lexer.lxx" +#line 643 "lexer.lxx" { accept(); return VKNOTS; @@ -1923,7 +2162,7 @@ YY_RULE_SETUP YY_BREAK case 82: YY_RULE_SETUP -#line 646 "lexer.lxx" +#line 647 "lexer.lxx" { accept(); return VKNOTS; @@ -1931,7 +2170,7 @@ YY_RULE_SETUP YY_BREAK case 83: YY_RULE_SETUP -#line 650 "lexer.lxx" +#line 651 "lexer.lxx" { accept(); return VERTEX; @@ -1939,7 +2178,7 @@ YY_RULE_SETUP YY_BREAK case 84: YY_RULE_SETUP -#line 654 "lexer.lxx" +#line 655 "lexer.lxx" { accept(); return VERTEXANIM; @@ -1947,7 +2186,7 @@ YY_RULE_SETUP YY_BREAK case 85: YY_RULE_SETUP -#line 658 "lexer.lxx" +#line 659 "lexer.lxx" { accept(); return VERTEXPOOL; @@ -1955,7 +2194,7 @@ YY_RULE_SETUP YY_BREAK case 86: YY_RULE_SETUP -#line 662 "lexer.lxx" +#line 663 "lexer.lxx" { accept(); return VERTEXREF; @@ -1963,7 +2202,7 @@ YY_RULE_SETUP YY_BREAK case 87: YY_RULE_SETUP -#line 666 "lexer.lxx" +#line 667 "lexer.lxx" { accept(); return XFMANIM; @@ -1971,7 +2210,7 @@ YY_RULE_SETUP YY_BREAK case 88: YY_RULE_SETUP -#line 670 "lexer.lxx" +#line 671 "lexer.lxx" { accept(); return XFMSANIM; @@ -1979,96 +2218,96 @@ YY_RULE_SETUP YY_BREAK case 89: YY_RULE_SETUP -#line 677 "lexer.lxx" +#line 678 "lexer.lxx" { // An integer or floating-point number. accept(); - eggyylval._number = atof(eggyytext); - eggyylval._string = yytext; + eggyylval._number = patof(eggyytext); + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 90: YY_RULE_SETUP -#line 685 "lexer.lxx" +#line 686 "lexer.lxx" { // A hexadecimal integer number. accept(); - eggyylval._ulong = strtoul(yytext+2, NULL, 16); - eggyylval._string = yytext; + eggyylval._ulong = strtoul(eggyytext+2, NULL, 16); + eggyylval._string = eggyytext; return EGG_ULONG; } YY_BREAK case 91: YY_RULE_SETUP -#line 693 "lexer.lxx" +#line 694 "lexer.lxx" { // A binary integer number. accept(); - eggyylval._ulong = strtoul(yytext+2, NULL, 2); - eggyylval._string = yytext; + eggyylval._ulong = strtoul(eggyytext+2, NULL, 2); + eggyylval._string = eggyytext; return EGG_ULONG; } YY_BREAK case 92: YY_RULE_SETUP -#line 701 "lexer.lxx" +#line 702 "lexer.lxx" { // not-a-number. These sometimes show up in egg files accidentally. accept(); memset(&eggyylval._number, 0, sizeof(eggyylval._number)); - *(unsigned long *)&eggyylval._number = strtoul(yytext+3, NULL, 0); - eggyylval._string = yytext; + *(unsigned long *)&eggyylval._number = strtoul(eggyytext+3, NULL, 0); + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 93: YY_RULE_SETUP -#line 710 "lexer.lxx" +#line 711 "lexer.lxx" { // infinity. As above. accept(); eggyylval._number = HUGE_VAL; - eggyylval._string = yytext; + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 94: YY_RULE_SETUP -#line 718 "lexer.lxx" +#line 719 "lexer.lxx" { // minus infinity. As above. accept(); eggyylval._number = -HUGE_VAL; - eggyylval._string = yytext; + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 95: YY_RULE_SETUP -#line 726 "lexer.lxx" +#line 727 "lexer.lxx" { // infinity, on Win32. As above. accept(); eggyylval._number = HUGE_VAL; - eggyylval._string = yytext; + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 96: YY_RULE_SETUP -#line 734 "lexer.lxx" +#line 735 "lexer.lxx" { // minus infinity, on Win32. As above. accept(); eggyylval._number = -HUGE_VAL; - eggyylval._string = yytext; + eggyylval._string = eggyytext; return EGG_NUMBER; } YY_BREAK case 97: YY_RULE_SETUP -#line 743 "lexer.lxx" +#line 744 "lexer.lxx" { // Quoted string. accept(); @@ -2078,46 +2317,46 @@ YY_RULE_SETUP YY_BREAK case 98: YY_RULE_SETUP -#line 750 "lexer.lxx" +#line 751 "lexer.lxx" { // Unquoted string. accept(); - eggyylval._string = yytext; + eggyylval._string = eggyytext; return EGG_STRING; } YY_BREAK case 99: YY_RULE_SETUP -#line 756 "lexer.lxx" +#line 757 "lexer.lxx" ECHO; YY_BREAK -#line 2096 "lex.yy.c" +#line 2335 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + 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 + * just pointed eggyyin at a new source and called + * eggyylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = eggyyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -2127,13 +2366,13 @@ case YY_STATE_EOF(INITIAL): * 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 @@ -2146,41 +2385,41 @@ case YY_STATE_EOF(INITIAL): 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 ( eggyywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * yytext, we can now set up + * eggyytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -2188,30 +2427,30 @@ case YY_STATE_EOF(INITIAL): 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; @@ -2222,8 +2461,7 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of eggyylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -2232,21 +2470,20 @@ case YY_STATE_EOF(INITIAL): * 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. @@ -2266,34 +2503,30 @@ 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; + int 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; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -2306,8 +2539,7 @@ static int yy_get_next_buffer() 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 ); + eggyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -2317,35 +2549,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->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), (size_t) 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 ); + eggyyrestart(eggyyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -2353,32 +2585,39 @@ 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; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) eggyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } + (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_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; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -2390,30 +2629,23 @@ static yy_state_type yy_get_previous_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 char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -2425,80 +2657,73 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 576); return yy_is_jam ? 0 : yy_current_state; - } +} + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + /* undo effects of setting up eggyytext */ + *yy_cp = (yy_hold_char); - /* undo effects of setting up yytext */ - *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); - *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() @@ -2512,16 +2737,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + eggyyrestart(eggyyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( eggyywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -2531,172 +2756,169 @@ 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 eggyytext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** 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 eggyyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + eggyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + eggyy_create_buffer(eggyyin,YY_BUF_SIZE ); } + eggyy_init_buffer(YY_CURRENT_BUFFER,input_file ); + eggyy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void eggyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * eggyypop_buffer_state(); + * eggyypush_buffer_state(new_buffer); + */ + eggyyensure_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; + eggyy_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 + * EOF (eggyywrap()) processing, but the only time this flag + * is looked at is after eggyywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void eggyy_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; + eggyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** 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 eggyy_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) eggyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in eggyy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) eggyyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in eggyy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + eggyy_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 eggyy_create_buffer() + * + */ + void eggyy_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 ); + eggyyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + eggyyfree((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 eggyyrestart() or at EOF. + */ + static void eggyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -#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 - - - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + eggyy_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 - } + /* If b is the current buffer, then eggyy_init_buffer was _probably_ + * called from eggyyrestart() 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; +} -#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 ) +/** 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 eggyy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -2713,31 +2935,127 @@ 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 ) + eggyy_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 eggyypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + eggyyensure_buffer_stack(); + + /* This block is copied from eggyy_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 eggyy_switch_to_buffer. */ + eggyy_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 eggyypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + eggyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + eggyy_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 eggyyensure_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**)eggyyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in eggyyensure_buffer_stack()" ); + + 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 - { + /* 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**)eggyyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in eggyyensure_buffer_stack()" ); + + /* 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 eggyy_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) eggyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in eggyy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; @@ -2749,58 +3067,53 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + eggyy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to eggyylex() will + * scan from a @e copy of @a str. + * @param yystr 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 + * eggyy_scan_bytes() instead. + */ +YY_BUFFER_STATE eggyy_scan_string (yyconst char * yystr ) +{ + + return eggyy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to eggyylex() 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 eggyy_scan_bytes (yyconst char * yybytes, int _yybytes_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 ); + n = _yybytes_len + 2; + buf = (char *) eggyyalloc(n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in eggyy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = eggyy_scan_buffer(buf,n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in eggyy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -2808,78 +3121,17 @@ 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; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +} #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); - } - - +} /* Redefine yyless() so it works in section 3 code. */ @@ -2887,69 +3139,178 @@ char msg[]; #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; \ + /* Undo effects of setting up eggyytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + eggyytext[eggyyleng] = (yy_hold_char); \ + (yy_c_buf_p) = eggyytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + eggyyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int eggyyget_lineno (void) +{ + + return eggyylineno; +} + +/** Get the input stream. + * + */ +FILE *eggyyget_in (void) +{ + return eggyyin; +} + +/** Get the output stream. + * + */ +FILE *eggyyget_out (void) +{ + return eggyyout; +} + +/** Get the length of the current token. + * + */ +int eggyyget_leng (void) +{ + return eggyyleng; +} + +/** Get the current token. + * + */ + +char *eggyyget_text (void) +{ + return eggyytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void eggyyset_lineno (int line_number ) +{ + + eggyylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see eggyy_switch_to_buffer + */ +void eggyyset_in (FILE * in_str ) +{ + eggyyin = in_str ; +} + +void eggyyset_out (FILE * out_str ) +{ + eggyyout = out_str ; +} + +int eggyyget_debug (void) +{ + return eggyy_flex_debug; +} + +void eggyyset_debug (int bdebug ) +{ + eggyy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from eggyylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + eggyyin = stdin; + eggyyout = stdout; +#else + eggyyin = (FILE *) 0; + eggyyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * eggyylex_init() + */ + return 0; +} + +/* eggyylex_destroy is for both reentrant and non-reentrant scanners. */ +int eggyylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + eggyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + eggyypop_buffer_state(); + } + + /* Destroy the stack itself. */ + eggyyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * eggyylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *eggyyalloc (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 *eggyyrealloc (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 @@ -2958,23 +3319,13 @@ 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 eggyyfree (void * ptr ) +{ + free( (char *) ptr ); /* see eggyyrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 756 "lexer.lxx" +#define YYTABLES_NAME "yytables" + +#line 757 "lexer.lxx" diff --git a/panda/src/egg/lexer.lxx b/panda/src/egg/lexer.lxx index 92fa7b2f21..261a236987 100644 --- a/panda/src/egg/lexer.lxx +++ b/panda/src/egg/lexer.lxx @@ -15,6 +15,7 @@ #include "pnotify.h" #include "lightMutex.h" #include "thread.h" +#include "pstrtod.h" #include @@ -677,7 +678,7 @@ NUMERIC ([+-]?(([0-9]+[.]?)|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?) {NUMERIC} { // An integer or floating-point number. accept(); - eggyylval._number = atof(eggyytext); + eggyylval._number = patof(eggyytext); eggyylval._string = yytext; return EGG_NUMBER; } diff --git a/panda/src/egg/parser.cxx.prebuilt b/panda/src/egg/parser.cxx.prebuilt index 014b67c952..20e63137e6 100644 --- a/panda/src/egg/parser.cxx.prebuilt +++ b/panda/src/egg/parser.cxx.prebuilt @@ -1,104 +1,261 @@ +/* A Bison parser, made by GNU Bison 2.3. */ -/* A Bison parser, made from parser.yxx - by GNU Bison version 1.28 */ +/* Skeleton implementation for Bison's Yacc-like parsers in C -#define YYBISON 1 /* Identify Bison output. */ + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ #define yyparse eggyyparse -#define yylex eggyylex +#define yylex eggyylex #define yyerror eggyyerror -#define yylval eggyylval -#define yychar eggyychar +#define yylval eggyylval +#define yychar eggyychar #define yydebug eggyydebug #define yynerrs eggyynerrs -#define EGG_NUMBER 257 -#define EGG_ULONG 258 -#define EGG_STRING 259 -#define ANIMPRELOAD 260 -#define BEZIERCURVE 261 -#define BFACE 262 -#define BILLBOARD 263 -#define BILLBOARDCENTER 264 -#define BINORMAL 265 -#define BUNDLE 266 -#define CLOSED 267 -#define COLLIDE 268 -#define COMMENT 269 -#define COMPONENT 270 -#define COORDSYSTEM 271 -#define CV 272 -#define DART 273 -#define DNORMAL 274 -#define DRGBA 275 -#define DUV 276 -#define DXYZ 277 -#define DCS 278 -#define DISTANCE 279 -#define DTREF 280 -#define DYNAMICVERTEXPOOL 281 -#define EXTERNAL_FILE 282 -#define GROUP 283 -#define DEFAULTPOSE 284 -#define JOINT 285 -#define KNOTS 286 -#define INCLUDE 287 -#define INSTANCE 288 -#define LINE 289 -#define LOOP 290 -#define MATERIAL 291 -#define MATRIX3 292 -#define MATRIX4 293 -#define MODEL 294 -#define MREF 295 -#define NORMAL 296 -#define NURBSCURVE 297 -#define NURBSSURFACE 298 -#define OBJECTTYPE 299 -#define ORDER 300 -#define OUTTANGENT 301 -#define POINTLIGHT 302 -#define POLYGON 303 -#define REF 304 -#define RGBA 305 -#define ROTATE 306 -#define ROTX 307 -#define ROTY 308 -#define ROTZ 309 -#define SANIM 310 -#define SCALAR 311 -#define SCALE 312 -#define SEQUENCE 313 -#define SHADING 314 -#define SWITCH 315 -#define SWITCHCONDITION 316 -#define TABLE 317 -#define TABLE_V 318 -#define TAG 319 -#define TANGENT 320 -#define TEXLIST 321 -#define TEXTURE 322 -#define TLENGTHS 323 -#define TRANSFORM 324 -#define TRANSLATE 325 -#define TREF 326 -#define TRIANGLEFAN 327 -#define TRIANGLESTRIP 328 -#define TRIM 329 -#define TXT 330 -#define UKNOTS 331 -#define UV 332 -#define VKNOTS 333 -#define VERTEX 334 -#define VERTEXANIM 335 -#define VERTEXPOOL 336 -#define VERTEXREF 337 -#define XFMANIM 338 -#define XFMSANIM 339 -#define START_EGG 340 -#define START_GROUP_BODY 341 -#define START_TEXTURE_BODY 342 -#define START_PRIMITIVE_BODY 343 + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EGG_NUMBER = 258, + EGG_ULONG = 259, + EGG_STRING = 260, + ANIMPRELOAD = 261, + BEZIERCURVE = 262, + BFACE = 263, + BILLBOARD = 264, + BILLBOARDCENTER = 265, + BINORMAL = 266, + BUNDLE = 267, + CLOSED = 268, + COLLIDE = 269, + COMMENT = 270, + COMPONENT = 271, + COORDSYSTEM = 272, + CV = 273, + DART = 274, + DNORMAL = 275, + DRGBA = 276, + DUV = 277, + DXYZ = 278, + DCS = 279, + DISTANCE = 280, + DTREF = 281, + DYNAMICVERTEXPOOL = 282, + EXTERNAL_FILE = 283, + GROUP = 284, + DEFAULTPOSE = 285, + JOINT = 286, + KNOTS = 287, + INCLUDE = 288, + INSTANCE = 289, + LINE = 290, + LOOP = 291, + MATERIAL = 292, + MATRIX3 = 293, + MATRIX4 = 294, + MODEL = 295, + MREF = 296, + NORMAL = 297, + NURBSCURVE = 298, + NURBSSURFACE = 299, + OBJECTTYPE = 300, + ORDER = 301, + OUTTANGENT = 302, + POINTLIGHT = 303, + POLYGON = 304, + REF = 305, + RGBA = 306, + ROTATE = 307, + ROTX = 308, + ROTY = 309, + ROTZ = 310, + SANIM = 311, + SCALAR = 312, + SCALE = 313, + SEQUENCE = 314, + SHADING = 315, + SWITCH = 316, + SWITCHCONDITION = 317, + TABLE = 318, + TABLE_V = 319, + TAG = 320, + TANGENT = 321, + TEXLIST = 322, + TEXTURE = 323, + TLENGTHS = 324, + TRANSFORM = 325, + TRANSLATE = 326, + TREF = 327, + TRIANGLEFAN = 328, + TRIANGLESTRIP = 329, + TRIM = 330, + TXT = 331, + UKNOTS = 332, + UV = 333, + VKNOTS = 334, + VERTEX = 335, + VERTEXANIM = 336, + VERTEXPOOL = 337, + VERTEXREF = 338, + XFMANIM = 339, + XFMSANIM = 340, + START_EGG = 341, + START_GROUP_BODY = 342, + START_TEXTURE_BODY = 343, + START_PRIMITIVE_BODY = 344 + }; +#endif +/* Tokens. */ +#define EGG_NUMBER 258 +#define EGG_ULONG 259 +#define EGG_STRING 260 +#define ANIMPRELOAD 261 +#define BEZIERCURVE 262 +#define BFACE 263 +#define BILLBOARD 264 +#define BILLBOARDCENTER 265 +#define BINORMAL 266 +#define BUNDLE 267 +#define CLOSED 268 +#define COLLIDE 269 +#define COMMENT 270 +#define COMPONENT 271 +#define COORDSYSTEM 272 +#define CV 273 +#define DART 274 +#define DNORMAL 275 +#define DRGBA 276 +#define DUV 277 +#define DXYZ 278 +#define DCS 279 +#define DISTANCE 280 +#define DTREF 281 +#define DYNAMICVERTEXPOOL 282 +#define EXTERNAL_FILE 283 +#define GROUP 284 +#define DEFAULTPOSE 285 +#define JOINT 286 +#define KNOTS 287 +#define INCLUDE 288 +#define INSTANCE 289 +#define LINE 290 +#define LOOP 291 +#define MATERIAL 292 +#define MATRIX3 293 +#define MATRIX4 294 +#define MODEL 295 +#define MREF 296 +#define NORMAL 297 +#define NURBSCURVE 298 +#define NURBSSURFACE 299 +#define OBJECTTYPE 300 +#define ORDER 301 +#define OUTTANGENT 302 +#define POINTLIGHT 303 +#define POLYGON 304 +#define REF 305 +#define RGBA 306 +#define ROTATE 307 +#define ROTX 308 +#define ROTY 309 +#define ROTZ 310 +#define SANIM 311 +#define SCALAR 312 +#define SCALE 313 +#define SEQUENCE 314 +#define SHADING 315 +#define SWITCH 316 +#define SWITCHCONDITION 317 +#define TABLE 318 +#define TABLE_V 319 +#define TAG 320 +#define TANGENT 321 +#define TEXLIST 322 +#define TEXTURE 323 +#define TLENGTHS 324 +#define TRANSFORM 325 +#define TRANSLATE 326 +#define TREF 327 +#define TRIANGLEFAN 328 +#define TRIANGLESTRIP 329 +#define TRIM 330 +#define TXT 331 +#define UKNOTS 332 +#define UV 333 +#define VKNOTS 334 +#define VERTEX 335 +#define VERTEXANIM 336 +#define VERTEXPOOL 337 +#define VERTEXREF 338 +#define XFMANIM 339 +#define XFMSANIM 340 +#define START_EGG 341 +#define START_GROUP_BODY 342 +#define START_TEXTURE_BODY 343 +#define START_PRIMITIVE_BODY 344 + + + + +/* Copy the first part of user declarations. */ #line 6 "parser.yxx" @@ -249,1125 +406,1821 @@ egg_cleanup_parser() { groups.clear(); } -#include -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 #endif - - -#define YYFINAL 746 -#define YYFLAG -32768 -#define YYNTBASE 92 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 343 ? yytranslate[x] : 214) - -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 90, 2, 91, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 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, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 3, 6, 9, 12, 14, 17, 19, 21, 23, - 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, - 45, 47, 49, 51, 53, 58, 64, 65, 73, 75, - 82, 85, 86, 93, 95, 102, 108, 115, 116, 123, - 125, 128, 129, 135, 136, 143, 145, 148, 152, 157, - 158, 166, 172, 178, 187, 196, 199, 203, 211, 219, - 227, 236, 244, 253, 257, 266, 275, 280, 290, 300, - 301, 308, 309, 316, 317, 324, 326, 333, 339, 347, - 355, 361, 367, 373, 379, 385, 391, 397, 404, 410, - 413, 416, 419, 422, 428, 431, 433, 435, 438, 439, - 445, 446, 452, 454, 457, 460, 463, 466, 469, 472, - 475, 478, 481, 484, 487, 490, 496, 503, 508, 513, - 518, 523, 531, 537, 544, 549, 554, 556, 566, 571, - 573, 590, 600, 602, 609, 614, 626, 639, 640, 647, - 648, 655, 656, 663, 664, 671, 672, 679, 680, 687, - 688, 695, 697, 703, 709, 711, 712, 720, 726, 732, - 738, 741, 747, 753, 759, 766, 768, 774, 780, 786, - 789, 795, 801, 807, 813, 819, 825, 828, 834, 841, - 843, 849, 855, 861, 864, 870, 876, 882, 888, 894, - 901, 903, 905, 907, 911, 920, 929, 934, 944, 954, - 956, 965, 968, 970, 972, 974, 980, 982, 985, 987, - 989, 990, 997, 998, 1005, 1007, 1010, 1013, 1016, 1019, - 1022, 1023, 1030, 1032, 1039, 1045, 1046, 1053, 1055, 1062, - 1068, 1069, 1076, 1078, 1085, 1088, 1089, 1096, 1098, 1105, - 1107, 1110, 1112, 1115, 1117, 1119, 1121, 1123, 1125, 1127, - 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1145, 1147, - 1149, 1152, 1154, 1156, 1158, 1160, 1162, 1164, 1166 -}; - -static const short yyrhs[] = { 86, - 93, 0, 87, 121, 0, 88, 99, 0, 89, 162, - 0, 213, 0, 93, 94, 0, 95, 0, 96, 0, - 97, 0, 100, 0, 103, 0, 104, 0, 115, 0, - 117, 0, 119, 0, 147, 0, 149, 0, 151, 0, - 153, 0, 155, 0, 157, 0, 159, 0, 180, 0, - 194, 0, 17, 90, 205, 91, 0, 15, 204, 90, - 208, 91, 0, 0, 68, 203, 90, 205, 98, 99, - 91, 0, 213, 0, 99, 57, 203, 90, 211, 91, - 0, 99, 124, 0, 0, 37, 203, 90, 101, 102, - 91, 0, 213, 0, 102, 57, 203, 90, 211, 91, - 0, 28, 204, 90, 205, 91, 0, 207, 28, 204, - 90, 205, 91, 0, 0, 82, 203, 105, 90, 106, - 91, 0, 213, 0, 106, 107, 0, 0, 80, 108, - 90, 110, 91, 0, 0, 80, 212, 109, 90, 110, - 91, 0, 210, 0, 210, 210, 0, 210, 210, 210, - 0, 210, 210, 210, 210, 0, 0, 110, 78, 204, - 90, 111, 112, 91, 0, 110, 42, 90, 113, 91, - 0, 110, 51, 90, 114, 91, 0, 110, 23, 207, - 90, 210, 210, 210, 91, 0, 110, 23, 90, 207, - 210, 210, 210, 91, 0, 210, 210, 0, 210, 210, - 210, 0, 112, 66, 90, 210, 210, 210, 91, 0, - 112, 11, 90, 210, 210, 210, 91, 0, 112, 22, - 207, 90, 210, 210, 91, 0, 112, 22, 207, 90, - 210, 210, 210, 91, 0, 112, 22, 90, 207, 210, - 210, 91, 0, 112, 22, 90, 207, 210, 210, 210, - 91, 0, 210, 210, 210, 0, 113, 20, 207, 90, - 210, 210, 210, 91, 0, 113, 20, 90, 207, 210, - 210, 210, 91, 0, 210, 210, 210, 210, 0, 114, - 21, 207, 90, 210, 210, 210, 210, 91, 0, 114, - 21, 90, 207, 210, 210, 210, 210, 91, 0, 0, - 29, 204, 116, 90, 121, 91, 0, 0, 31, 204, - 118, 90, 121, 91, 0, 0, 34, 204, 120, 90, - 121, 91, 0, 213, 0, 121, 57, 203, 90, 211, - 91, 0, 121, 9, 90, 207, 91, 0, 121, 10, - 90, 210, 210, 210, 91, 0, 121, 14, 204, 90, - 122, 123, 91, 0, 121, 24, 90, 212, 91, 0, - 121, 24, 90, 5, 91, 0, 121, 19, 90, 212, - 91, 0, 121, 19, 90, 5, 91, 0, 121, 61, - 90, 212, 91, 0, 121, 45, 90, 205, 91, 0, - 121, 40, 90, 212, 91, 0, 121, 65, 204, 90, - 208, 91, 0, 121, 67, 90, 212, 91, 0, 121, - 124, 0, 121, 126, 0, 121, 143, 0, 121, 145, - 0, 121, 50, 90, 202, 91, 0, 121, 94, 0, - 207, 0, 213, 0, 123, 207, 0, 0, 70, 125, - 90, 128, 91, 0, 0, 30, 127, 90, 128, 91, - 0, 213, 0, 128, 129, 0, 128, 130, 0, 128, - 131, 0, 128, 132, 0, 128, 133, 0, 128, 134, - 0, 128, 135, 0, 128, 136, 0, 128, 137, 0, - 128, 138, 0, 128, 139, 0, 128, 141, 0, 71, - 90, 210, 210, 91, 0, 71, 90, 210, 210, 210, - 91, 0, 52, 90, 210, 91, 0, 53, 90, 210, - 91, 0, 54, 90, 210, 91, 0, 55, 90, 210, - 91, 0, 52, 90, 210, 210, 210, 210, 91, 0, - 58, 90, 210, 210, 91, 0, 58, 90, 210, 210, - 210, 91, 0, 58, 90, 210, 91, 0, 38, 90, - 140, 91, 0, 213, 0, 210, 210, 210, 210, 210, - 210, 210, 210, 210, 0, 39, 90, 142, 91, 0, - 213, 0, 210, 210, 210, 210, 210, 210, 210, 210, - 210, 210, 210, 210, 210, 210, 210, 210, 0, 83, - 90, 197, 144, 50, 90, 201, 91, 91, 0, 213, - 0, 144, 57, 203, 90, 211, 91, 0, 62, 90, - 146, 91, 0, 25, 90, 210, 210, 80, 90, 210, - 210, 210, 91, 91, 0, 25, 90, 210, 210, 210, - 80, 90, 210, 210, 210, 91, 91, 0, 0, 49, - 204, 148, 90, 162, 91, 0, 0, 73, 204, 150, - 90, 162, 91, 0, 0, 74, 204, 152, 90, 162, - 91, 0, 0, 48, 204, 154, 90, 162, 91, 0, - 0, 35, 204, 156, 90, 162, 91, 0, 0, 44, - 204, 158, 90, 164, 91, 0, 0, 43, 204, 160, - 90, 165, 91, 0, 213, 0, 161, 42, 90, 169, - 91, 0, 161, 51, 90, 170, 91, 0, 213, 0, - 0, 162, 16, 212, 90, 163, 161, 91, 0, 162, - 72, 90, 166, 91, 0, 162, 68, 90, 167, 91, - 0, 162, 41, 90, 168, 91, 0, 162, 172, 0, - 162, 42, 90, 169, 91, 0, 162, 51, 90, 170, - 91, 0, 162, 8, 90, 171, 91, 0, 162, 57, - 203, 90, 211, 91, 0, 213, 0, 164, 72, 90, - 166, 91, 0, 164, 68, 90, 167, 91, 0, 164, - 41, 90, 168, 91, 0, 164, 172, 0, 164, 42, - 90, 169, 91, 0, 164, 51, 90, 170, 91, 0, - 164, 8, 90, 171, 91, 0, 164, 46, 90, 173, - 91, 0, 164, 77, 90, 174, 91, 0, 164, 79, - 90, 175, 91, 0, 164, 159, 0, 164, 75, 90, - 176, 91, 0, 164, 57, 203, 90, 211, 91, 0, - 213, 0, 165, 72, 90, 166, 91, 0, 165, 68, - 90, 167, 91, 0, 165, 41, 90, 168, 91, 0, - 165, 172, 0, 165, 42, 90, 169, 91, 0, 165, - 51, 90, 170, 91, 0, 165, 8, 90, 171, 91, - 0, 165, 46, 90, 178, 91, 0, 165, 32, 90, - 179, 91, 0, 165, 57, 203, 90, 211, 91, 0, - 199, 0, 203, 0, 200, 0, 210, 210, 210, 0, - 169, 20, 207, 90, 210, 210, 210, 91, 0, 169, - 20, 90, 207, 210, 210, 210, 91, 0, 210, 210, - 210, 210, 0, 170, 21, 207, 90, 210, 210, 210, - 210, 91, 0, 170, 21, 90, 207, 210, 210, 210, - 210, 91, 0, 212, 0, 83, 90, 197, 50, 90, - 201, 91, 91, 0, 212, 212, 0, 198, 0, 198, - 0, 213, 0, 176, 36, 90, 177, 91, 0, 213, - 0, 177, 159, 0, 212, 0, 198, 0, 0, 63, - 204, 181, 90, 184, 91, 0, 0, 12, 204, 183, - 90, 184, 91, 0, 213, 0, 184, 180, 0, 184, - 182, 0, 184, 185, 0, 184, 188, 0, 184, 191, - 0, 0, 56, 204, 186, 90, 187, 91, 0, 213, - 0, 187, 57, 203, 90, 211, 91, 0, 187, 64, - 90, 198, 91, 0, 0, 84, 204, 189, 90, 190, - 91, 0, 213, 0, 190, 57, 203, 90, 211, 91, - 0, 190, 64, 90, 198, 91, 0, 0, 85, 204, - 192, 90, 193, 91, 0, 213, 0, 193, 57, 203, - 90, 211, 91, 0, 193, 185, 0, 0, 6, 204, - 195, 90, 196, 91, 0, 213, 0, 196, 57, 203, - 90, 211, 91, 0, 213, 0, 197, 212, 0, 213, - 0, 198, 210, 0, 203, 0, 203, 0, 203, 0, - 203, 0, 213, 0, 207, 0, 206, 0, 213, 0, - 207, 0, 213, 0, 207, 0, 3, 0, 4, 0, - 5, 0, 213, 0, 209, 0, 207, 0, 209, 207, - 0, 3, 0, 4, 0, 3, 0, 4, 0, 5, - 0, 3, 0, 4, 0, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 230, 232, 233, 234, 244, 246, 261, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 289, 312, 326, 340, 354, 356, - 688, 698, 711, 725, 727, 821, 829, 848, 873, 888, - 890, 900, 905, 912, 937, 957, 962, 966, 970, 974, - 985, 989, 990, 991, 999, 1017, 1022, 1026, 1034, 1042, - 1050, 1058, 1066, 1083, 1088, 1096, 1113, 1118, 1126, 1143, - 1149, 1168, 1175, 1189, 1196, 1214, 1216, 1346, 1358, 1363, - 1370, 1376, 1389, 1396, 1409, 1415, 1421, 1427, 1432, 1438, - 1439, 1440, 1441, 1442, 1451, 1464, 1494, 1496, 1517, 1523, - 1533, 1543, 1554, 1556, 1557, 1558, 1559, 1560, 1561, 1562, - 1563, 1564, 1565, 1566, 1567, 1570, 1577, 1584, 1591, 1598, - 1605, 1612, 1619, 1626, 1633, 1640, 1644, 1646, 1657, 1661, - 1663, 1684, 1717, 1722, 1746, 1758, 1764, 1780, 1785, 1799, - 1804, 1818, 1823, 1837, 1842, 1856, 1861, 1875, 1880, 1894, - 1899, 1914, 1916, 1917, 1927, 1929, 1943, 1950, 1951, 1952, - 1953, 1954, 1955, 1956, 1957, 2029, 2031, 2032, 2033, 2034, - 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2047, 2048, 2111, - 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, - 2190, 2207, 2247, 2264, 2269, 2277, 2294, 2299, 2307, 2324, - 2340, 2371, 2389, 2409, 2429, 2435, 2445, 2452, 2470, 2486, - 2507, 2514, 2530, 2537, 2551, 2553, 2557, 2561, 2565, 2569, - 2583, 2589, 2604, 2606, 2618, 2631, 2637, 2652, 2654, 2671, - 2684, 2690, 2705, 2707, 2722, 2736, 2742, 2757, 2759, 2782, - 2787, 2800, 2805, 2818, 2839, 2860, 2885, 2906, 2912, 2923, - 2935, 2941, 2951, 2956, 2969, 2974, 2978, 2990, 2995, 3010, - 3015, 3028, 3030, 3044, 3051, 3057, 3073, 3082, 3088 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","EGG_NUMBER", -"EGG_ULONG","EGG_STRING","ANIMPRELOAD","BEZIERCURVE","BFACE","BILLBOARD","BILLBOARDCENTER", -"BINORMAL","BUNDLE","CLOSED","COLLIDE","COMMENT","COMPONENT","COORDSYSTEM","CV", -"DART","DNORMAL","DRGBA","DUV","DXYZ","DCS","DISTANCE","DTREF","DYNAMICVERTEXPOOL", -"EXTERNAL_FILE","GROUP","DEFAULTPOSE","JOINT","KNOTS","INCLUDE","INSTANCE","LINE", -"LOOP","MATERIAL","MATRIX3","MATRIX4","MODEL","MREF","NORMAL","NURBSCURVE","NURBSSURFACE", -"OBJECTTYPE","ORDER","OUTTANGENT","POINTLIGHT","POLYGON","REF","RGBA","ROTATE", -"ROTX","ROTY","ROTZ","SANIM","SCALAR","SCALE","SEQUENCE","SHADING","SWITCH", -"SWITCHCONDITION","TABLE","TABLE_V","TAG","TANGENT","TEXLIST","TEXTURE","TLENGTHS", -"TRANSFORM","TRANSLATE","TREF","TRIANGLEFAN","TRIANGLESTRIP","TRIM","TXT","UKNOTS", -"UV","VKNOTS","VERTEX","VERTEXANIM","VERTEXPOOL","VERTEXREF","XFMANIM","XFMSANIM", -"START_EGG","START_GROUP_BODY","START_TEXTURE_BODY","START_PRIMITIVE_BODY","'{'", -"'}'","grammar","egg","node","coordsystem","comment","texture","@1","texture_body", -"material","@2","material_body","external_reference","vertex_pool","@3","vertex_pool_body", -"vertex","@4","@5","vertex_body","@6","vertex_uv_body","vertex_normal_body", -"vertex_color_body","group","@7","joint","@8","instance","@9","group_body","cs_type", -"collide_flags","transform","@10","default_pose","@11","transform_body","translate2d", -"translate3d","rotate2d","rotx","roty","rotz","rotate3d","scale2d","scale3d", -"uniform_scale","matrix3","matrix3_body","matrix4","matrix4_body","group_vertex_ref", -"group_vertex_membership","switchcondition","switchcondition_body","polygon", -"@12","trianglefan","@13","trianglestrip","@14","point_light","@15","line","@16", -"nurbs_surface","@17","nurbs_curve","@18","primitive_component_body","primitive_body", -"@19","nurbs_surface_body","nurbs_curve_body","primitive_tref_body","primitive_texture_body", -"primitive_material_body","primitive_normal_body","primitive_color_body","primitive_bface_body", -"primitive_vertex_ref","nurbs_surface_order_body","nurbs_surface_uknots_body", -"nurbs_surface_vknots_body","nurbs_surface_trim_body","nurbs_surface_trim_loop_body", -"nurbs_curve_order_body","nurbs_curve_knots_body","table","@20","bundle","@21", -"table_body","sanim","@22","sanim_body","xfmanim","@23","xfmanim_body","xfm_s_anim", -"@24","xfm_s_anim_body","anim_preload","@25","anim_preload_body","integer_list", -"real_list","texture_name","material_name","vertex_pool_name","group_name","required_name", -"optional_name","required_string","optional_string","string","repeated_string", -"repeated_string_body","real","real_or_string","integer","empty", NULL -}; -#endif - -static const short yyr1[] = { 0, - 92, 92, 92, 92, 93, 93, 94, 94, 94, 94, - 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, - 94, 94, 94, 94, 95, 96, 98, 97, 99, 99, - 99, 101, 100, 102, 102, 103, 103, 105, 104, 106, - 106, 108, 107, 109, 107, 110, 110, 110, 110, 111, - 110, 110, 110, 110, 110, 112, 112, 112, 112, 112, - 112, 112, 112, 113, 113, 113, 114, 114, 114, 116, - 115, 118, 117, 120, 119, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 121, 121, 121, 122, 123, 123, 125, 124, - 127, 126, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 140, 141, 142, - 142, 143, 144, 144, 145, 146, 146, 148, 147, 150, - 149, 152, 151, 154, 153, 156, 155, 158, 157, 160, - 159, 161, 161, 161, 162, 163, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, - 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 166, 167, 168, 169, 169, 169, 170, 170, 170, 171, - 172, 173, 174, 175, 176, 176, 177, 177, 178, 179, - 181, 180, 183, 182, 184, 184, 184, 184, 184, 184, - 186, 185, 187, 187, 187, 189, 188, 190, 190, 190, - 192, 191, 193, 193, 193, 195, 194, 196, 196, 197, - 197, 198, 198, 199, 200, 201, 202, 203, 203, 204, - 205, 205, 206, 206, 207, 207, 207, 208, 208, 209, - 209, 210, 210, 211, 211, 211, 212, 212, 213 -}; - -static const short yyr2[] = { 0, - 2, 2, 2, 2, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 5, 0, 7, 1, 6, - 2, 0, 6, 1, 6, 5, 6, 0, 6, 1, - 2, 0, 5, 0, 6, 1, 2, 3, 4, 0, - 7, 5, 5, 8, 8, 2, 3, 7, 7, 7, - 8, 7, 8, 3, 8, 8, 4, 9, 9, 0, - 6, 0, 6, 0, 6, 1, 6, 5, 7, 7, - 5, 5, 5, 5, 5, 5, 5, 6, 5, 2, - 2, 2, 2, 5, 2, 1, 1, 2, 0, 5, - 0, 5, 1, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 5, 6, 4, 4, 4, - 4, 7, 5, 6, 4, 4, 1, 9, 4, 1, - 16, 9, 1, 6, 4, 11, 12, 0, 6, 0, - 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, - 6, 1, 5, 5, 1, 0, 7, 5, 5, 5, - 2, 5, 5, 5, 6, 1, 5, 5, 5, 2, - 5, 5, 5, 5, 5, 5, 2, 5, 6, 1, - 5, 5, 5, 2, 5, 5, 5, 5, 5, 6, - 1, 1, 1, 3, 8, 8, 4, 9, 9, 1, - 8, 2, 1, 1, 1, 5, 1, 2, 1, 1, - 0, 6, 0, 6, 1, 2, 2, 2, 2, 2, - 0, 6, 1, 6, 5, 0, 6, 1, 6, 5, - 0, 6, 1, 6, 2, 0, 6, 1, 6, 1, - 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 0 -}; - -static const short yydefact[] = { 0, - 269, 269, 269, 269, 1, 5, 2, 76, 3, 29, - 4, 155, 255, 256, 257, 269, 269, 0, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - 269, 269, 269, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 0, 0, 0, 269, 0, 0, 101, 0, - 0, 0, 269, 0, 0, 269, 0, 99, 0, 95, - 90, 91, 92, 93, 269, 31, 0, 0, 0, 0, - 0, 269, 0, 0, 0, 161, 236, 250, 254, 253, - 0, 269, 0, 70, 72, 74, 146, 0, 249, 248, - 150, 148, 144, 138, 211, 0, 140, 142, 38, 269, - 0, 0, 0, 0, 0, 0, 0, 269, 269, 0, - 0, 0, 0, 0, 0, 269, 0, 0, 267, 268, - 0, 269, 0, 0, 0, 269, 269, 269, 0, 269, - 0, 252, 251, 269, 0, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 269, 0, 0, 0, 0, 0, - 262, 263, 0, 0, 0, 0, 0, 0, 269, 0, - 0, 0, 247, 0, 0, 0, 0, 269, 0, 269, - 269, 240, 0, 0, 200, 156, 0, 193, 245, 0, - 0, 0, 0, 0, 0, 192, 0, 191, 244, 0, - 269, 260, 0, 259, 258, 25, 0, 269, 269, 269, - 269, 269, 269, 269, 269, 269, 269, 27, 269, 269, - 269, 269, 78, 0, 269, 96, 84, 83, 82, 81, - 0, 103, 87, 86, 94, 264, 265, 266, 0, 85, - 0, 135, 0, 89, 0, 0, 241, 133, 0, 164, - 269, 160, 0, 162, 0, 0, 163, 0, 0, 159, - 158, 0, 0, 238, 26, 261, 36, 0, 0, 0, - 0, 0, 34, 0, 180, 0, 166, 0, 0, 0, - 215, 269, 0, 0, 0, 40, 0, 0, 0, 97, - 0, 0, 0, 0, 0, 0, 0, 0, 102, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 77, 0, 88, 100, 0, 269, 30, 0, 152, - 0, 0, 194, 0, 0, 0, 165, 269, 269, 237, - 71, 73, 75, 147, 269, 33, 0, 0, 0, 0, - 0, 0, 269, 0, 0, 151, 184, 0, 0, 0, - 0, 0, 269, 0, 0, 0, 0, 0, 149, 177, - 170, 145, 139, 269, 269, 269, 269, 212, 216, 217, - 218, 219, 220, 0, 141, 143, 42, 39, 41, 37, - 79, 80, 98, 269, 269, 0, 0, 0, 0, 0, - 0, 0, 269, 0, 0, 0, 157, 0, 0, 0, - 0, 197, 0, 246, 0, 0, 0, 269, 269, 0, - 0, 0, 0, 269, 269, 0, 269, 0, 0, 0, - 0, 269, 269, 269, 269, 269, 213, 221, 226, 231, - 28, 0, 44, 0, 0, 127, 0, 0, 130, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 210, 242, 0, 0, 0, 209, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 205, 0, 203, 0, 204, 0, 0, 0, 0, 0, - 0, 126, 0, 129, 0, 118, 0, 119, 120, 121, - 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 201, 0, 0, 187, 189, 243, 183, - 185, 188, 186, 0, 182, 181, 173, 169, 171, 174, - 202, 172, 0, 168, 167, 0, 178, 175, 176, 269, - 269, 269, 269, 0, 46, 0, 0, 0, 0, 123, - 0, 116, 0, 0, 0, 132, 134, 153, 154, 0, - 0, 0, 0, 239, 35, 190, 179, 269, 0, 0, - 223, 0, 228, 0, 233, 0, 0, 0, 269, 43, - 47, 0, 0, 0, 0, 124, 117, 0, 0, 196, - 195, 0, 0, 0, 207, 214, 269, 0, 222, 269, - 0, 227, 269, 232, 235, 0, 0, 0, 0, 0, - 48, 45, 0, 0, 122, 0, 0, 199, 198, 206, - 208, 0, 269, 0, 269, 0, 0, 0, 0, 0, - 0, 0, 50, 49, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 52, 0, 0, 53, - 0, 0, 0, 0, 136, 0, 0, 225, 0, 230, - 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, - 0, 0, 0, 137, 224, 229, 234, 0, 0, 0, - 0, 0, 0, 67, 0, 0, 0, 51, 56, 128, - 0, 55, 54, 0, 0, 0, 0, 0, 0, 0, - 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 66, 65, 0, 0, 0, 0, 0, 0, 0, - 69, 68, 59, 62, 0, 60, 0, 58, 0, 63, - 61, 0, 131, 0, 0, 0 -}; - -static const short yydefgoto[] = { 744, - 5, 70, 35, 36, 37, 282, 9, 38, 212, 272, - 39, 40, 158, 285, 379, 432, 491, 544, 652, 670, - 629, 631, 41, 145, 42, 146, 43, 147, 7, 225, - 289, 71, 125, 72, 116, 231, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 434, 311, 437, - 73, 246, 74, 177, 44, 153, 45, 156, 46, 157, - 47, 152, 48, 148, 49, 151, 50, 150, 319, 11, - 251, 276, 274, 197, 195, 187, 190, 192, 184, 86, - 474, 482, 484, 480, 594, 465, 460, 51, 154, 370, - 486, 280, 371, 487, 570, 372, 488, 572, 373, 489, - 574, 52, 139, 263, 181, 461, 198, 188, 403, 172, - 189, 87, 141, 88, 99, 203, 204, 519, 239, 185, - 100 -}; - -static const short yypact[] = { 166, --32768,-32768,-32768,-32768, 1039,-32768, 1363,-32768, 73,-32768, - 284,-32768,-32768,-32768,-32768, 253, 253, -65, 253, 253, - 253, 253, 253, 253, 253, 253, 253, 253, 253, 253, - 253, 253, 253,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 1, -55, 37, 253, 39, 104,-32768, 118, - 123, 136, 253, 148, 154, 253, 191,-32768, 195,-32768, --32768,-32768,-32768,-32768, 253,-32768, 197, 243, 206, 208, - 209, 253, 213, 214, 216,-32768,-32768,-32768,-32768,-32768, - 217, 253, 241,-32768,-32768,-32768,-32768, 242,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 244,-32768,-32768,-32768, 253, - 253, 287, 246, 306, 310, 248, 243, 253, 253, 249, - 243, 120, 250, 243, 254,-32768, 256, 243,-32768,-32768, - 257, 253, 287, 287, 258, 253, 253,-32768, 259, 253, - 19,-32768,-32768, 253, 261, 263, 264, 265,-32768, 267, - 268, 273, 274, 275, 253, 278, 279, 282, 283, 45, --32768,-32768, 287, 253, 63, 74, 140, 144,-32768, 149, - 252, 288,-32768, 319, 290, 292, 293, 253, 294,-32768, - 243,-32768, 319, 296,-32768,-32768, 307,-32768,-32768, 27, - 287, -11, 287, 319, 308,-32768, 309,-32768,-32768, 111, --32768,-32768, 316, 253,-32768,-32768, 317,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, 253,-32768, 287,-32768,-32768,-32768,-32768,-32768,-32768, - 556,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 318,-32768, - 287,-32768, 320,-32768, 757, 162,-32768,-32768, 322,-32768, --32768,-32768, 79,-32768, 287, 85,-32768, 287, 324,-32768, --32768, 327, 92,-32768,-32768,-32768,-32768, 958, 1147, 1280, - 329, 143,-32768, 229,-32768, 150,-32768, 419, 421, 158, --32768,-32768, 731, 736, 43,-32768, 328, 330, 53,-32768, - 333, 335, 336, 338, 340, 341, 342, 343,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 287,-32768,-32768, 344, 253,-32768, 77,-32768, - 253, 346,-32768, 253, 348, 287,-32768, 253, 253,-32768, --32768,-32768,-32768,-32768, 253,-32768, 350, 351, 353, 355, - 356, 357, 253, 360, 361,-32768,-32768, 362, 363, 375, - 377, 379, 253, 381, 383, 384, 385, 387,-32768,-32768, --32768,-32768,-32768, 253, 253, 253, 253,-32768,-32768,-32768, --32768,-32768,-32768, 133,-32768,-32768, 243,-32768,-32768,-32768, --32768,-32768,-32768, 287, 287, 287, 287, 287, 287, 287, - 287, 46, 253, 389, 390, 391,-32768, 287, 287, 287, - 287,-32768, 392,-32768, 394, 395, 243,-32768, 253, 287, - 243, 287, 396, 253, 253, 243, 253, 287, 243, 287, - 398, 253, 253,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, 400,-32768, 401, 287,-32768, 404, 287,-32768, 50, - 405, 407, 409, 56, 287, 413, 96, 414, 319, 287, - 287, 287, 287, 287, 287, 418, 319, 319, 420, 422, - 287,-32768, 427, 42, 428,-32768, 20, 319, 429, 430, - 431, 432, 51, 433, 243, 55, 319, 434, 435, 72, --32768, 436, 287, 437, 287, 439, 440, 441, 442, 287, - 443,-32768, 287,-32768, 287,-32768, 287,-32768,-32768,-32768, --32768, 60, 62, 287, 444, 445, 446, 66, 64, 287, - 287, 287, 287,-32768, 448, 449,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 450,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 451,-32768,-32768, 453,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 188, 287, 287, 287, 287, 287,-32768, - 454,-32768, 455, 287, 287,-32768,-32768,-32768,-32768, 457, - 463, 287, 287,-32768,-32768,-32768,-32768,-32768, 204, 141, --32768, 145,-32768, 129,-32768, 88, 465, 466, 253,-32768, - 287, 227, 287, 287, 469,-32768,-32768, 287, 287,-32768, --32768, 470, 471, 61,-32768,-32768, 253, 467,-32768, 253, - 473,-32768, 253,-32768,-32768, 253, 474, 287, 287, 475, - 287,-32768, 287, 287,-32768, 477, 287,-32768,-32768,-32768, --32768, 479,-32768, 480,-32768, 482, 287, 287, 83, 287, - 86, 287,-32768,-32768, 287, 287, 484, 485, 319, 65, - 319, 69, 319, 287, 287, 91,-32768, 287, 94,-32768, - 287, 287, 287, 287,-32768, 487, 488,-32768, 489,-32768, - 490, 287, 287, 253, 483,-32768, 253, 492, 287, 98, - 287, 287, 287,-32768,-32768,-32768,-32768, 493, 495, 287, - 287, 287, 287,-32768, 501, 97, 507,-32768, 287,-32768, - 287,-32768,-32768, 287, 287, 287, 287, 287, 253, 508, - 287,-32768, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 509, 511, 287, 287, 287, 287, 287, 287, - 287,-32768,-32768, 512, 513, 515, 71, 75, 516, 287, --32768,-32768,-32768,-32768, 525,-32768, 528,-32768, 287,-32768, --32768, 287,-32768, 182, 374,-32768 -}; - -static const short yypgoto[] = {-32768, --32768, 378,-32768,-32768,-32768,-32768, 128,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768, -213,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 119,-32768, --32768, -8,-32768,-32768,-32768, 238,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768, -273,-32768,-32768, 57, --32768,-32768,-32768, -298, -234, -194, -278, -241, -403, -152, --32768,-32768,-32768,-32768,-32768,-32768,-32768, -275,-32768,-32768, --32768, -58, -39,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768, 461, -419,-32768,-32768, 190,-32768, - 514, 11, -74,-32768, -5, 447,-32768, 4, -175, -69, - 734 -}; - - -#define YYLAST 1446 - - -static const short yytable[] = { 53, - 76, 53, 360, 459, 369, 483, 485, 249, 131, 256, - 89, 89, 471, 89, 89, 89, 89, 89, 259, 89, - 89, 89, 89, 89, 92, 89, 89, 91, 110, 93, - 94, 95, 96, 97, 111, 101, 102, 103, 104, 105, - 256, 107, 108, 171, 166, 168, 253, 170, 161, 162, - 89, 175, 161, 162, 179, 13, 14, 15, 161, 162, - 89, 253, 161, 162, 161, 162, 113, 161, 162, 207, - 253, 161, 162, 161, 162, 256, 123, 161, 162, 257, - 218, 13, 14, 15, 256, 253, 142, 13, 14, 15, - 13, 14, 15, 13, 14, 15, 13, 14, 15, 13, - 14, 15, 646, 25, 89, 160, 649, 536, 685, 206, - 523, 247, 142, 129, 130, 163, 470, 254, 395, 686, - 159, 347, 377, 361, 479, 446, 112, 396, 114, 75, - 247, 464, 521, 378, 202, 223, 191, 193, 142, 473, - 496, 529, 68, 382, 176, 532, 501, 287, 329, 142, - 550, 620, 552, 227, 559, 658, 558, 348, 226, 660, - 262, 734, 537, 687, 228, 736, 224, 397, 321, 364, - 467, 508, 202, 647, 324, 505, 650, 606, 476, 469, - 664, 745, 330, 667, 365, 603, 699, 478, 688, 75, - 349, 350, 25, 115, 255, 351, 258, 597, 266, 335, - 352, 600, 68, 640, 598, 642, 353, 117, 601, 509, - 576, 316, 118, 365, 463, 364, 142, 354, 317, 604, - 29, 355, 472, 431, 356, 119, 357, 288, 358, 577, - 229, 599, 85, 336, 230, 602, 337, 121, 578, 233, - 359, 366, 367, 122, 313, 129, 130, 322, 368, 576, - 325, 1, 2, 3, 4, 13, 14, 15, 323, 365, - 338, 326, 53, 53, 53, 579, 29, 271, 577, 339, - 340, 278, 279, 507, 341, 283, 284, 578, 580, 342, - 124, 515, 516, 383, 126, 343, 128, 366, 367, 161, - 162, 77, 524, 369, 596, 132, 344, 133, 134, 78, - 345, 533, 136, 137, 579, 138, 140, 433, 129, 130, - 165, 85, 129, 130, 167, 398, 392, 612, 400, 346, - 621, 236, 237, 238, 79, 80, 268, 269, 270, 402, - 144, 149, 582, 155, 81, 164, 77, 169, 174, 178, - 82, 466, 234, 180, 78, 183, 186, 194, 201, 475, - 208, 83, 209, 210, 211, 84, 213, 214, 89, 89, - 89, 89, 215, 216, 217, 76, 85, 219, 220, 79, - 80, 221, 222, 746, 427, 428, 429, 430, 235, 81, - 240, 241, 34, 242, 244, 82, 250, 435, 438, 440, - 441, 442, 443, 444, 445, 447, 83, 252, 260, 261, - 84, 452, 453, 454, 455, 531, 265, 267, 312, 374, - 314, 85, 318, 191, 327, 193, 328, 245, 380, 334, - 381, 191, 384, 193, 385, 386, 77, 387, 77, 388, - 389, 390, 391, 393, 78, 399, 78, 401, 493, 407, - 408, 495, 409, 497, 410, 411, 412, 502, 503, 414, - 415, 416, 417, 191, 193, 510, 511, 512, 513, 79, - 80, 79, 80, 657, 418, 659, 419, 661, 420, 81, - 422, 81, 423, 424, 425, 82, 426, 82, 449, 450, - 451, 569, 456, 457, 458, 468, 83, 477, 83, 490, - 84, 492, 84, 545, 494, 498, 547, 499, 548, 500, - 549, 85, 504, 85, 506, 551, 553, 554, 514, 362, - 517, 363, 518, 560, 561, 562, 563, 520, 522, 525, - 526, 527, 528, 530, 534, 535, 538, 539, 540, 541, - 542, 543, 546, 555, 605, 556, 557, 98, 564, 565, - 566, 567, 568, 106, 586, 587, 109, 590, 581, 545, - 583, 584, 585, 591, 608, 609, 623, 588, 589, 615, - 618, 619, 625, 628, 633, 592, 593, 637, 639, 641, - 607, 643, 681, 89, 655, 656, 120, 674, 675, 676, - 677, 683, 448, 692, 611, 693, 613, 614, 127, 610, - 698, 616, 617, 291, 292, 135, 701, 710, 200, 722, - 627, 723, 731, 732, 0, 733, 738, 293, 294, 295, - 296, 630, 632, 297, 634, 740, 635, 636, 741, 0, - 638, 0, 0, 0, 243, 0, 298, 0, 0, 0, - 644, 645, 173, 648, 0, 651, 0, 0, 653, 654, - 665, 0, 0, 668, 0, 0, 299, 662, 663, 196, - 199, 666, 0, 0, 669, 671, 672, 673, 680, 0, - 0, 682, 0, 0, 0, 678, 679, 0, 0, 0, - 0, 0, 684, 0, 689, 690, 691, 0, 0, 0, - 700, 0, 0, 694, 695, 696, 697, 0, 0, 0, - 0, 0, 702, 709, 703, 0, 0, 704, 705, 706, - 707, 708, 0, 0, 711, 0, 712, 713, 714, 715, - 716, 717, 718, 719, 720, 721, 0, 0, 724, 725, - 726, 727, 728, 729, 730, 0, 0, 0, 0, 0, - 735, 737, 0, 739, 6, 8, 10, 12, 77, 0, - 0, 0, 742, 77, 0, 743, 78, 0, 0, 90, - 90, 78, 90, 90, 90, 90, 90, 0, 90, 90, - 90, 90, 90, 0, 90, 90, 0, 0, 0, 0, - 0, 79, 80, 0, 0, 0, 79, 80, 0, 0, - 0, 81, 0, 0, 0, 0, 81, 82, 0, 90, - 0, 0, 82, 0, 291, 292, 0, 0, 83, 90, - 0, 0, 84, 83, 0, 0, 0, 84, 293, 294, - 295, 296, 0, 85, 297, 0, 0, 0, 85, 0, - 0, 375, 0, 0, 0, 143, 376, 298, 0, 0, - 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 404, 405, 90, 0, 0, 0, 315, 406, 0, - 0, 143, 0, 0, 0, 0, 413, 0, 0, 182, - 0, 0, 0, 0, 0, 0, 421, 0, 0, 0, - 0, 182, 0, 205, 0, 0, 0, 143, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 232, 0, 0, 0, 404, 0, 0, 0, - 0, 205, 0, 232, 248, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 196, 199, 0, - 0, 0, 0, 0, 264, 196, 199, 0, 0, 0, - 0, 8, 8, 8, 12, 273, 275, 277, 12, 12, - 281, 0, 12, 12, 286, 143, 0, 0, 290, 0, - 13, 14, 15, 16, 0, 0, 54, 55, 0, 0, - 0, 56, 17, 0, 18, 0, 57, 0, 0, 0, - 0, 58, 0, 0, 320, 19, 20, 59, 21, 0, - 0, 22, 23, 0, 24, 0, 0, 60, 0, 0, - 25, 26, 61, 0, 0, 27, 28, 62, 0, 0, - 0, 0, 0, 0, 63, 10, 0, 0, 64, 65, - 29, 0, 66, 0, 67, 30, 0, 68, 0, 0, - 31, 32, 0, 0, 0, 0, 0, 0, 0, 33, - 69, 13, 14, 15, 16, 0, 0, 0, 331, 0, - 0, 0, 0, 17, 0, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 19, 20, 0, 21, - 0, 0, 22, 23, 0, 24, 0, 0, 0, 0, - 0, 25, 26, 0, 0, 0, 27, 28, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 90, 90, 90, - 90, 29, 0, 0, 0, 0, 30, 0, 0, 0, - 622, 31, 32, 624, 0, 0, 626, 436, 439, 0, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 462, 0, 0, 0, 0, 0, 0, 0, 13, - 14, 15, 16, 0, 0, 54, 55, 481, 462, 462, - 56, 17, 0, 18, 0, 57, 0, 0, 0, 0, - 58, 0, 0, 0, 19, 20, 59, 21, 0, 0, - 22, 23, 0, 24, 0, 0, 60, 0, 0, 25, - 26, 61, 0, 0, 27, 28, 62, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 64, 65, 29, - 0, 66, 0, 67, 30, 0, 68, 0, 0, 31, - 32, 0, 0, 0, 0, 0, 0, 0, 33, 69, - 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 281, 571, 573, 575, 0, 0, 0, - 0, 0, 13, 14, 15, 16, 0, 0, 54, 55, - 0, 0, 0, 56, 17, 0, 18, 0, 57, 0, - 0, 595, 0, 58, 0, 0, 0, 19, 20, 59, - 21, 0, 90, 22, 23, 0, 24, 0, 0, 60, - 0, 0, 25, 26, 61, 0, 0, 27, 28, 62, - 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, - 64, 65, 29, 0, 66, 0, 67, 30, 0, 68, - 0, 0, 31, 32, 0, 0, 462, 0, 462, 0, - 0, 33, 69, 0, 0, 13, 14, 15, 16, 0, - 333, 54, 55, 0, 0, 0, 56, 17, 0, 18, - 0, 57, 0, 0, 0, 0, 58, 0, 0, 0, - 19, 20, 59, 21, 0, 0, 22, 23, 0, 24, - 0, 0, 60, 0, 0, 25, 26, 61, 0, 0, - 27, 28, 62, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 64, 65, 29, 0, 66, 0, 67, - 30, 0, 68, 0, 0, 31, 32, 0, 0, 0, - 0, 0, 0, 0, 33, 69 -}; - -static const short yycheck[] = { 5, - 9, 7, 276, 407, 280, 425, 426, 183, 78, 21, - 16, 17, 416, 19, 20, 21, 22, 23, 194, 25, - 26, 27, 28, 29, 90, 31, 32, 17, 28, 19, - 20, 21, 22, 23, 90, 25, 26, 27, 28, 29, - 21, 31, 32, 118, 114, 115, 20, 117, 3, 4, - 56, 121, 3, 4, 124, 3, 4, 5, 3, 4, - 66, 20, 3, 4, 3, 4, 56, 3, 4, 144, - 20, 3, 4, 3, 4, 21, 66, 3, 4, 91, - 155, 3, 4, 5, 21, 20, 92, 3, 4, 5, - 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, - 4, 5, 20, 43, 110, 111, 21, 36, 11, 91, - 91, 181, 118, 3, 4, 112, 415, 91, 42, 22, - 110, 274, 80, 276, 423, 80, 90, 51, 90, 57, - 200, 410, 91, 91, 140, 91, 133, 134, 144, 418, - 91, 91, 70, 91, 25, 91, 91, 222, 57, 155, - 91, 91, 91, 91, 91, 91, 91, 8, 164, 91, - 50, 91, 91, 66, 91, 91, 163, 91, 90, 12, - 412, 450, 178, 91, 90, 80, 91, 90, 420, 414, - 90, 0, 91, 90, 56, 57, 90, 422, 91, 57, - 41, 42, 43, 90, 191, 46, 193, 57, 204, 57, - 51, 57, 70, 623, 64, 625, 57, 90, 64, 451, - 23, 50, 90, 56, 409, 12, 222, 68, 57, 91, - 63, 72, 417, 91, 75, 90, 77, 224, 79, 42, - 91, 91, 83, 91, 91, 91, 8, 90, 51, 91, - 91, 84, 85, 90, 241, 3, 4, 253, 91, 23, - 256, 86, 87, 88, 89, 3, 4, 5, 255, 56, - 32, 258, 268, 269, 270, 78, 63, 211, 42, 41, - 42, 215, 216, 449, 46, 219, 220, 51, 91, 51, - 90, 457, 458, 289, 90, 57, 90, 84, 85, 3, - 4, 8, 468, 569, 91, 90, 68, 90, 90, 16, - 72, 477, 90, 90, 78, 90, 90, 377, 3, 4, - 5, 83, 3, 4, 5, 321, 313, 91, 324, 91, - 594, 3, 4, 5, 41, 42, 208, 209, 210, 326, - 90, 90, 546, 90, 51, 90, 8, 90, 90, 90, - 57, 411, 91, 90, 16, 90, 90, 90, 90, 419, - 90, 68, 90, 90, 90, 72, 90, 90, 364, 365, - 366, 367, 90, 90, 90, 374, 83, 90, 90, 41, - 42, 90, 90, 0, 364, 365, 366, 367, 91, 51, - 91, 90, 5, 91, 91, 57, 91, 384, 385, 386, - 387, 388, 389, 390, 391, 392, 68, 91, 91, 91, - 72, 398, 399, 400, 401, 475, 91, 91, 91, 282, - 91, 83, 91, 410, 91, 412, 90, 180, 91, 91, - 91, 418, 90, 420, 90, 90, 8, 90, 8, 90, - 90, 90, 90, 90, 16, 90, 16, 90, 435, 90, - 90, 438, 90, 440, 90, 90, 90, 444, 445, 90, - 90, 90, 90, 450, 451, 452, 453, 454, 455, 41, - 42, 41, 42, 639, 90, 641, 90, 643, 90, 51, - 90, 51, 90, 90, 90, 57, 90, 57, 90, 90, - 90, 540, 91, 90, 90, 90, 68, 90, 68, 90, - 72, 91, 72, 490, 91, 91, 493, 91, 495, 91, - 497, 83, 90, 83, 91, 502, 503, 504, 91, 91, - 91, 91, 91, 510, 511, 512, 513, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 90, 90, - 90, 90, 90, 90, 574, 91, 91, 24, 91, 91, - 91, 91, 90, 30, 91, 91, 33, 91, 545, 546, - 547, 548, 549, 91, 90, 90, 90, 554, 555, 91, - 91, 91, 90, 90, 90, 562, 563, 91, 90, 90, - 576, 90, 90, 579, 91, 91, 63, 91, 91, 91, - 91, 90, 393, 91, 581, 91, 583, 584, 75, 579, - 90, 588, 589, 38, 39, 82, 90, 90, 138, 91, - 606, 91, 91, 91, -1, 91, 91, 52, 53, 54, - 55, 608, 609, 58, 611, 91, 613, 614, 91, -1, - 617, -1, -1, -1, 178, -1, 71, -1, -1, -1, - 627, 628, 119, 630, -1, 632, -1, -1, 635, 636, - 646, -1, -1, 649, -1, -1, 91, 644, 645, 136, - 137, 648, -1, -1, 651, 652, 653, 654, 664, -1, - -1, 667, -1, -1, -1, 662, 663, -1, -1, -1, - -1, -1, 669, -1, 671, 672, 673, -1, -1, -1, - 686, -1, -1, 680, 681, 682, 683, -1, -1, -1, - -1, -1, 689, 699, 691, -1, -1, 694, 695, 696, - 697, 698, -1, -1, 701, -1, 703, 704, 705, 706, - 707, 708, 709, 710, 711, 712, -1, -1, 715, 716, - 717, 718, 719, 720, 721, -1, -1, -1, -1, -1, - 727, 728, -1, 730, 1, 2, 3, 4, 8, -1, - -1, -1, 739, 8, -1, 742, 16, -1, -1, 16, - 17, 16, 19, 20, 21, 22, 23, -1, 25, 26, - 27, 28, 29, -1, 31, 32, -1, -1, -1, -1, - -1, 41, 42, -1, -1, -1, 41, 42, -1, -1, - -1, 51, -1, -1, -1, -1, 51, 57, -1, 56, - -1, -1, 57, -1, 38, 39, -1, -1, 68, 66, - -1, -1, 72, 68, -1, -1, -1, 72, 52, 53, - 54, 55, -1, 83, 58, -1, -1, -1, 83, -1, - -1, 91, -1, -1, -1, 92, 91, 71, -1, -1, - 317, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 328, 329, 110, -1, -1, -1, 91, 335, -1, - -1, 118, -1, -1, -1, -1, 343, -1, -1, 126, - -1, -1, -1, -1, -1, -1, 353, -1, -1, -1, - -1, 138, -1, 140, -1, -1, -1, 144, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 155, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 169, -1, -1, -1, 393, -1, -1, -1, - -1, 178, -1, 180, 181, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 414, 415, -1, - -1, -1, -1, -1, 201, 422, 423, -1, -1, -1, - -1, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, -1, 219, 220, 221, 222, -1, -1, 225, -1, - 3, 4, 5, 6, -1, -1, 9, 10, -1, -1, - -1, 14, 15, -1, 17, -1, 19, -1, -1, -1, - -1, 24, -1, -1, 251, 28, 29, 30, 31, -1, - -1, 34, 35, -1, 37, -1, -1, 40, -1, -1, - 43, 44, 45, -1, -1, 48, 49, 50, -1, -1, - -1, -1, -1, -1, 57, 282, -1, -1, 61, 62, - 63, -1, 65, -1, 67, 68, -1, 70, -1, -1, - 73, 74, -1, -1, -1, -1, -1, -1, -1, 82, - 83, 3, 4, 5, 6, -1, -1, -1, 91, -1, - -1, -1, -1, 15, -1, 17, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 28, 29, -1, 31, - -1, -1, 34, 35, -1, 37, -1, -1, -1, -1, - -1, 43, 44, -1, -1, -1, 48, 49, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 364, 365, 366, - 367, 63, -1, -1, -1, -1, 68, -1, -1, -1, - 597, 73, 74, 600, -1, -1, 603, 384, 385, -1, - 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 408, -1, -1, -1, -1, -1, -1, -1, 3, - 4, 5, 6, -1, -1, 9, 10, 424, 425, 426, - 14, 15, -1, 17, -1, 19, -1, -1, -1, -1, - 24, -1, -1, -1, 28, 29, 30, 31, -1, -1, - 34, 35, -1, 37, -1, -1, 40, -1, -1, 43, - 44, 45, -1, -1, 48, 49, 50, -1, -1, -1, - -1, -1, -1, 57, -1, -1, -1, 61, 62, 63, - -1, 65, -1, 67, 68, -1, 70, -1, -1, 73, - 74, -1, -1, -1, -1, -1, -1, -1, 82, 83, - -1, -1, -1, -1, -1, -1, -1, 91, -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, 540, 541, 542, 543, -1, -1, -1, - -1, -1, 3, 4, 5, 6, -1, -1, 9, 10, - -1, -1, -1, 14, 15, -1, 17, -1, 19, -1, - -1, 568, -1, 24, -1, -1, -1, 28, 29, 30, - 31, -1, 579, 34, 35, -1, 37, -1, -1, 40, - -1, -1, 43, 44, 45, -1, -1, 48, 49, 50, - -1, -1, -1, -1, -1, -1, 57, -1, -1, -1, - 61, 62, 63, -1, 65, -1, 67, 68, -1, 70, - -1, -1, 73, 74, -1, -1, 623, -1, 625, -1, - -1, 82, 83, -1, -1, 3, 4, 5, 6, -1, - 91, 9, 10, -1, -1, -1, 14, 15, -1, 17, - -1, 19, -1, -1, -1, -1, 24, -1, -1, -1, - 28, 29, 30, 31, -1, -1, 34, 35, -1, 37, - -1, -1, 40, -1, -1, 43, 44, 45, -1, -1, - 48, 49, 50, -1, -1, -1, -1, -1, -1, 57, - -1, -1, -1, 61, 62, 63, -1, 65, -1, 67, - 68, -1, 70, -1, -1, 73, 74, -1, -1, -1, - -1, -1, -1, -1, 82, 83 -}; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison.simple" -/* This file comes from bison-1.28. */ - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -#ifndef YYSTACK_USE_ALLOCA -#ifdef alloca -#define YYSTACK_USE_ALLOCA -#else /* alloca not defined */ -#ifdef __GNUC__ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) -#define YYSTACK_USE_ALLOCA -#include -#else /* not sparc */ -/* We think this test detects Watcom and Microsoft C. */ -/* This used to test MSDOS, but that is a bad idea - since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ -#include -#endif -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -/* I don't know what this was needed for, but it pollutes the namespace. - So I turned it off. rms, 2 May 1997. */ -/* #include */ - #pragma alloca -#define YYSTACK_USE_ALLOCA -#else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc */ -#endif /* not GNU C */ -#endif /* alloca not defined */ -#endif /* YYSTACK_USE_ALLOCA not defined */ - -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 #else -#define YYSTACK_ALLOC malloc +# define YYERROR_VERBOSE 0 #endif -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 443 "y.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 14 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 1358 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 92 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 123 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 270 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 746 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 344 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 90, 2, 91, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 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, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 6, 9, 12, 15, 17, 20, 22, + 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 48, 50, 52, 54, 56, 61, 67, 68, + 76, 78, 85, 88, 89, 96, 98, 105, 111, 118, + 119, 126, 128, 131, 132, 138, 139, 146, 148, 151, + 155, 160, 161, 169, 175, 181, 190, 199, 202, 206, + 214, 222, 230, 239, 247, 256, 260, 269, 278, 283, + 293, 303, 304, 311, 312, 319, 320, 327, 329, 336, + 342, 350, 358, 364, 370, 376, 382, 388, 394, 400, + 407, 413, 416, 419, 422, 425, 431, 434, 436, 438, + 441, 442, 448, 449, 455, 457, 460, 463, 466, 469, + 472, 475, 478, 481, 484, 487, 490, 493, 499, 506, + 511, 516, 521, 526, 534, 540, 547, 552, 557, 559, + 569, 574, 576, 593, 603, 605, 612, 617, 629, 642, + 643, 650, 651, 658, 659, 666, 667, 674, 675, 682, + 683, 690, 691, 698, 700, 706, 712, 714, 715, 723, + 729, 735, 741, 744, 750, 756, 762, 769, 771, 777, + 783, 789, 792, 798, 804, 810, 816, 822, 828, 831, + 837, 844, 846, 852, 858, 864, 867, 873, 879, 885, + 891, 897, 904, 906, 908, 910, 914, 923, 932, 937, + 947, 957, 959, 968, 971, 973, 975, 977, 983, 985, + 988, 990, 992, 993, 1000, 1001, 1008, 1010, 1013, 1016, + 1019, 1022, 1025, 1026, 1033, 1035, 1042, 1048, 1049, 1056, + 1058, 1065, 1071, 1072, 1079, 1081, 1088, 1091, 1092, 1099, + 1101, 1108, 1110, 1113, 1115, 1118, 1120, 1122, 1124, 1126, + 1128, 1130, 1132, 1134, 1136, 1138, 1140, 1142, 1144, 1146, + 1148, 1150, 1152, 1155, 1157, 1159, 1161, 1163, 1165, 1167, + 1169 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 93, 0, -1, 86, 94, -1, 87, 122, -1, 88, + 100, -1, 89, 163, -1, 214, -1, 94, 95, -1, + 96, -1, 97, -1, 98, -1, 101, -1, 104, -1, + 105, -1, 116, -1, 118, -1, 120, -1, 148, -1, + 150, -1, 152, -1, 154, -1, 156, -1, 158, -1, + 160, -1, 181, -1, 195, -1, 17, 90, 206, 91, + -1, 15, 205, 90, 209, 91, -1, -1, 68, 204, + 90, 206, 99, 100, 91, -1, 214, -1, 100, 57, + 204, 90, 212, 91, -1, 100, 125, -1, -1, 37, + 204, 90, 102, 103, 91, -1, 214, -1, 103, 57, + 204, 90, 212, 91, -1, 28, 205, 90, 206, 91, + -1, 208, 28, 205, 90, 206, 91, -1, -1, 82, + 204, 106, 90, 107, 91, -1, 214, -1, 107, 108, + -1, -1, 80, 109, 90, 111, 91, -1, -1, 80, + 213, 110, 90, 111, 91, -1, 211, -1, 211, 211, + -1, 211, 211, 211, -1, 211, 211, 211, 211, -1, + -1, 111, 78, 205, 90, 112, 113, 91, -1, 111, + 42, 90, 114, 91, -1, 111, 51, 90, 115, 91, + -1, 111, 23, 208, 90, 211, 211, 211, 91, -1, + 111, 23, 90, 208, 211, 211, 211, 91, -1, 211, + 211, -1, 211, 211, 211, -1, 113, 66, 90, 211, + 211, 211, 91, -1, 113, 11, 90, 211, 211, 211, + 91, -1, 113, 22, 208, 90, 211, 211, 91, -1, + 113, 22, 208, 90, 211, 211, 211, 91, -1, 113, + 22, 90, 208, 211, 211, 91, -1, 113, 22, 90, + 208, 211, 211, 211, 91, -1, 211, 211, 211, -1, + 114, 20, 208, 90, 211, 211, 211, 91, -1, 114, + 20, 90, 208, 211, 211, 211, 91, -1, 211, 211, + 211, 211, -1, 115, 21, 208, 90, 211, 211, 211, + 211, 91, -1, 115, 21, 90, 208, 211, 211, 211, + 211, 91, -1, -1, 29, 205, 117, 90, 122, 91, + -1, -1, 31, 205, 119, 90, 122, 91, -1, -1, + 34, 205, 121, 90, 122, 91, -1, 214, -1, 122, + 57, 204, 90, 212, 91, -1, 122, 9, 90, 208, + 91, -1, 122, 10, 90, 211, 211, 211, 91, -1, + 122, 14, 205, 90, 123, 124, 91, -1, 122, 24, + 90, 213, 91, -1, 122, 24, 90, 5, 91, -1, + 122, 19, 90, 213, 91, -1, 122, 19, 90, 5, + 91, -1, 122, 61, 90, 213, 91, -1, 122, 45, + 90, 206, 91, -1, 122, 40, 90, 213, 91, -1, + 122, 65, 205, 90, 209, 91, -1, 122, 67, 90, + 213, 91, -1, 122, 125, -1, 122, 127, -1, 122, + 144, -1, 122, 146, -1, 122, 50, 90, 203, 91, + -1, 122, 95, -1, 208, -1, 214, -1, 124, 208, + -1, -1, 70, 126, 90, 129, 91, -1, -1, 30, + 128, 90, 129, 91, -1, 214, -1, 129, 130, -1, + 129, 131, -1, 129, 132, -1, 129, 133, -1, 129, + 134, -1, 129, 135, -1, 129, 136, -1, 129, 137, + -1, 129, 138, -1, 129, 139, -1, 129, 140, -1, + 129, 142, -1, 71, 90, 211, 211, 91, -1, 71, + 90, 211, 211, 211, 91, -1, 52, 90, 211, 91, + -1, 53, 90, 211, 91, -1, 54, 90, 211, 91, + -1, 55, 90, 211, 91, -1, 52, 90, 211, 211, + 211, 211, 91, -1, 58, 90, 211, 211, 91, -1, + 58, 90, 211, 211, 211, 91, -1, 58, 90, 211, + 91, -1, 38, 90, 141, 91, -1, 214, -1, 211, + 211, 211, 211, 211, 211, 211, 211, 211, -1, 39, + 90, 143, 91, -1, 214, -1, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, -1, 83, 90, 198, 145, 50, 90, 202, + 91, 91, -1, 214, -1, 145, 57, 204, 90, 212, + 91, -1, 62, 90, 147, 91, -1, 25, 90, 211, + 211, 80, 90, 211, 211, 211, 91, 91, -1, 25, + 90, 211, 211, 211, 80, 90, 211, 211, 211, 91, + 91, -1, -1, 49, 205, 149, 90, 163, 91, -1, + -1, 73, 205, 151, 90, 163, 91, -1, -1, 74, + 205, 153, 90, 163, 91, -1, -1, 48, 205, 155, + 90, 163, 91, -1, -1, 35, 205, 157, 90, 163, + 91, -1, -1, 44, 205, 159, 90, 165, 91, -1, + -1, 43, 205, 161, 90, 166, 91, -1, 214, -1, + 162, 42, 90, 170, 91, -1, 162, 51, 90, 171, + 91, -1, 214, -1, -1, 163, 16, 213, 90, 164, + 162, 91, -1, 163, 72, 90, 167, 91, -1, 163, + 68, 90, 168, 91, -1, 163, 41, 90, 169, 91, + -1, 163, 173, -1, 163, 42, 90, 170, 91, -1, + 163, 51, 90, 171, 91, -1, 163, 8, 90, 172, + 91, -1, 163, 57, 204, 90, 212, 91, -1, 214, + -1, 165, 72, 90, 167, 91, -1, 165, 68, 90, + 168, 91, -1, 165, 41, 90, 169, 91, -1, 165, + 173, -1, 165, 42, 90, 170, 91, -1, 165, 51, + 90, 171, 91, -1, 165, 8, 90, 172, 91, -1, + 165, 46, 90, 174, 91, -1, 165, 77, 90, 175, + 91, -1, 165, 79, 90, 176, 91, -1, 165, 160, + -1, 165, 75, 90, 177, 91, -1, 165, 57, 204, + 90, 212, 91, -1, 214, -1, 166, 72, 90, 167, + 91, -1, 166, 68, 90, 168, 91, -1, 166, 41, + 90, 169, 91, -1, 166, 173, -1, 166, 42, 90, + 170, 91, -1, 166, 51, 90, 171, 91, -1, 166, + 8, 90, 172, 91, -1, 166, 46, 90, 179, 91, + -1, 166, 32, 90, 180, 91, -1, 166, 57, 204, + 90, 212, 91, -1, 200, -1, 204, -1, 201, -1, + 211, 211, 211, -1, 170, 20, 208, 90, 211, 211, + 211, 91, -1, 170, 20, 90, 208, 211, 211, 211, + 91, -1, 211, 211, 211, 211, -1, 171, 21, 208, + 90, 211, 211, 211, 211, 91, -1, 171, 21, 90, + 208, 211, 211, 211, 211, 91, -1, 213, -1, 83, + 90, 198, 50, 90, 202, 91, 91, -1, 213, 213, + -1, 199, -1, 199, -1, 214, -1, 177, 36, 90, + 178, 91, -1, 214, -1, 178, 160, -1, 213, -1, + 199, -1, -1, 63, 205, 182, 90, 185, 91, -1, + -1, 12, 205, 184, 90, 185, 91, -1, 214, -1, + 185, 181, -1, 185, 183, -1, 185, 186, -1, 185, + 189, -1, 185, 192, -1, -1, 56, 205, 187, 90, + 188, 91, -1, 214, -1, 188, 57, 204, 90, 212, + 91, -1, 188, 64, 90, 199, 91, -1, -1, 84, + 205, 190, 90, 191, 91, -1, 214, -1, 191, 57, + 204, 90, 212, 91, -1, 191, 64, 90, 199, 91, + -1, -1, 85, 205, 193, 90, 194, 91, -1, 214, + -1, 194, 57, 204, 90, 212, 91, -1, 194, 186, + -1, -1, 6, 205, 196, 90, 197, 91, -1, 214, + -1, 197, 57, 204, 90, 212, 91, -1, 214, -1, + 198, 213, -1, 214, -1, 199, 211, -1, 204, -1, + 204, -1, 204, -1, 204, -1, 214, -1, 208, -1, + 207, -1, 214, -1, 208, -1, 214, -1, 208, -1, + 3, -1, 4, -1, 5, -1, 214, -1, 210, -1, + 208, -1, 210, 208, -1, 3, -1, 4, -1, 3, + -1, 4, -1, 5, -1, 3, -1, 4, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 231, 231, 232, 233, 234, 245, 246, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 290, 313, 328, 327, + 355, 356, 688, 700, 699, 726, 727, 822, 829, 850, + 849, 889, 890, 902, 901, 913, 912, 958, 962, 966, + 970, 975, 974, 989, 990, 991, 999, 1018, 1022, 1026, + 1034, 1042, 1050, 1058, 1066, 1084, 1088, 1096, 1114, 1118, + 1126, 1145, 1144, 1170, 1169, 1191, 1190, 1215, 1216, 1346, + 1358, 1363, 1370, 1376, 1389, 1396, 1409, 1415, 1421, 1427, + 1432, 1438, 1439, 1440, 1441, 1442, 1451, 1465, 1495, 1496, + 1519, 1518, 1535, 1534, 1555, 1556, 1557, 1558, 1559, 1560, + 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1571, 1578, 1585, + 1592, 1599, 1606, 1613, 1620, 1627, 1634, 1641, 1645, 1646, + 1658, 1662, 1663, 1685, 1718, 1722, 1747, 1759, 1764, 1782, + 1781, 1801, 1800, 1820, 1819, 1839, 1838, 1858, 1857, 1877, + 1876, 1896, 1895, 1915, 1916, 1917, 1928, 1930, 1929, 1950, + 1951, 1952, 1953, 1954, 1955, 1956, 1957, 2030, 2031, 2032, + 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2047, + 2048, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, + 2121, 2122, 2191, 2208, 2248, 2265, 2269, 2277, 2295, 2299, + 2307, 2325, 2341, 2372, 2390, 2410, 2430, 2435, 2446, 2452, + 2471, 2487, 2509, 2508, 2532, 2531, 2552, 2553, 2557, 2561, + 2565, 2569, 2585, 2584, 2605, 2606, 2618, 2633, 2632, 2653, + 2654, 2671, 2686, 2685, 2706, 2707, 2722, 2738, 2737, 2758, + 2759, 2783, 2787, 2801, 2805, 2819, 2840, 2861, 2886, 2907, + 2912, 2924, 2936, 2941, 2952, 2956, 2970, 2974, 2978, 2991, + 2995, 3011, 3015, 3029, 3030, 3045, 3051, 3057, 3074, 3082, + 3088 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "EGG_NUMBER", "EGG_ULONG", "EGG_STRING", + "ANIMPRELOAD", "BEZIERCURVE", "BFACE", "BILLBOARD", "BILLBOARDCENTER", + "BINORMAL", "BUNDLE", "CLOSED", "COLLIDE", "COMMENT", "COMPONENT", + "COORDSYSTEM", "CV", "DART", "DNORMAL", "DRGBA", "DUV", "DXYZ", "DCS", + "DISTANCE", "DTREF", "DYNAMICVERTEXPOOL", "EXTERNAL_FILE", "GROUP", + "DEFAULTPOSE", "JOINT", "KNOTS", "INCLUDE", "INSTANCE", "LINE", "LOOP", + "MATERIAL", "MATRIX3", "MATRIX4", "MODEL", "MREF", "NORMAL", + "NURBSCURVE", "NURBSSURFACE", "OBJECTTYPE", "ORDER", "OUTTANGENT", + "POINTLIGHT", "POLYGON", "REF", "RGBA", "ROTATE", "ROTX", "ROTY", "ROTZ", + "SANIM", "SCALAR", "SCALE", "SEQUENCE", "SHADING", "SWITCH", + "SWITCHCONDITION", "TABLE", "TABLE_V", "TAG", "TANGENT", "TEXLIST", + "TEXTURE", "TLENGTHS", "TRANSFORM", "TRANSLATE", "TREF", "TRIANGLEFAN", + "TRIANGLESTRIP", "TRIM", "TXT", "UKNOTS", "UV", "VKNOTS", "VERTEX", + "VERTEXANIM", "VERTEXPOOL", "VERTEXREF", "XFMANIM", "XFMSANIM", + "START_EGG", "START_GROUP_BODY", "START_TEXTURE_BODY", + "START_PRIMITIVE_BODY", "'{'", "'}'", "$accept", "grammar", "egg", + "node", "coordsystem", "comment", "texture", "@1", "texture_body", + "material", "@2", "material_body", "external_reference", "vertex_pool", + "@3", "vertex_pool_body", "vertex", "@4", "@5", "vertex_body", "@6", + "vertex_uv_body", "vertex_normal_body", "vertex_color_body", "group", + "@7", "joint", "@8", "instance", "@9", "group_body", "cs_type", + "collide_flags", "transform", "@10", "default_pose", "@11", + "transform_body", "translate2d", "translate3d", "rotate2d", "rotx", + "roty", "rotz", "rotate3d", "scale2d", "scale3d", "uniform_scale", + "matrix3", "matrix3_body", "matrix4", "matrix4_body", "group_vertex_ref", + "group_vertex_membership", "switchcondition", "switchcondition_body", + "polygon", "@12", "trianglefan", "@13", "trianglestrip", "@14", + "point_light", "@15", "line", "@16", "nurbs_surface", "@17", + "nurbs_curve", "@18", "primitive_component_body", "primitive_body", + "@19", "nurbs_surface_body", "nurbs_curve_body", "primitive_tref_body", + "primitive_texture_body", "primitive_material_body", + "primitive_normal_body", "primitive_color_body", "primitive_bface_body", + "primitive_vertex_ref", "nurbs_surface_order_body", + "nurbs_surface_uknots_body", "nurbs_surface_vknots_body", + "nurbs_surface_trim_body", "nurbs_surface_trim_loop_body", + "nurbs_curve_order_body", "nurbs_curve_knots_body", "table", "@20", + "bundle", "@21", "table_body", "sanim", "@22", "sanim_body", "xfmanim", + "@23", "xfmanim_body", "xfm_s_anim", "@24", "xfm_s_anim_body", + "anim_preload", "@25", "anim_preload_body", "integer_list", "real_list", + "texture_name", "material_name", "vertex_pool_name", "group_name", + "required_name", "optional_name", "required_string", "optional_string", + "string", "repeated_string", "repeated_string_body", "real", + "real_or_string", "integer", "empty", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 123, 125 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 92, 93, 93, 93, 93, 94, 94, 95, 95, + 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 95, 95, 95, 95, 96, 97, 99, 98, + 100, 100, 100, 102, 101, 103, 103, 104, 104, 106, + 105, 107, 107, 109, 108, 110, 108, 111, 111, 111, + 111, 112, 111, 111, 111, 111, 111, 113, 113, 113, + 113, 113, 113, 113, 113, 114, 114, 114, 115, 115, + 115, 117, 116, 119, 118, 121, 120, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 123, 124, 124, + 126, 125, 128, 127, 129, 129, 129, 129, 129, 129, + 129, 129, 129, 129, 129, 129, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 141, + 142, 143, 143, 144, 145, 145, 146, 147, 147, 149, + 148, 151, 150, 153, 152, 155, 154, 157, 156, 159, + 158, 161, 160, 162, 162, 162, 163, 164, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, + 165, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 167, 168, 169, 170, 170, 170, 171, 171, + 171, 172, 173, 174, 175, 176, 177, 177, 178, 178, + 179, 180, 182, 181, 184, 183, 185, 185, 185, 185, + 185, 185, 187, 186, 188, 188, 188, 190, 189, 191, + 191, 191, 193, 192, 194, 194, 194, 196, 195, 197, + 197, 198, 198, 199, 199, 200, 201, 202, 203, 204, + 204, 205, 206, 206, 207, 207, 208, 208, 208, 209, + 209, 210, 210, 211, 211, 212, 212, 212, 213, 213, + 214 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 2, 2, 2, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 4, 5, 0, 7, + 1, 6, 2, 0, 6, 1, 6, 5, 6, 0, + 6, 1, 2, 0, 5, 0, 6, 1, 2, 3, + 4, 0, 7, 5, 5, 8, 8, 2, 3, 7, + 7, 7, 8, 7, 8, 3, 8, 8, 4, 9, + 9, 0, 6, 0, 6, 0, 6, 1, 6, 5, + 7, 7, 5, 5, 5, 5, 5, 5, 5, 6, + 5, 2, 2, 2, 2, 5, 2, 1, 1, 2, + 0, 5, 0, 5, 1, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 5, 6, 4, + 4, 4, 4, 7, 5, 6, 4, 4, 1, 9, + 4, 1, 16, 9, 1, 6, 4, 11, 12, 0, + 6, 0, 6, 0, 6, 0, 6, 0, 6, 0, + 6, 0, 6, 1, 5, 5, 1, 0, 7, 5, + 5, 5, 2, 5, 5, 5, 6, 1, 5, 5, + 5, 2, 5, 5, 5, 5, 5, 5, 2, 5, + 6, 1, 5, 5, 5, 2, 5, 5, 5, 5, + 5, 6, 1, 1, 1, 3, 8, 8, 4, 9, + 9, 1, 8, 2, 1, 1, 1, 5, 1, 2, + 1, 1, 0, 6, 0, 6, 1, 2, 2, 2, + 2, 2, 0, 6, 1, 6, 5, 0, 6, 1, + 6, 5, 0, 6, 1, 6, 2, 0, 6, 1, + 6, 1, 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 0 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 0, 270, 270, 270, 270, 0, 2, 6, 3, 77, + 4, 30, 5, 156, 1, 256, 257, 258, 270, 270, + 0, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 0, 0, 0, 270, 0, + 0, 102, 0, 0, 0, 270, 0, 0, 270, 0, + 100, 0, 96, 91, 92, 93, 94, 270, 32, 0, + 0, 0, 0, 0, 270, 0, 0, 0, 162, 237, + 251, 255, 254, 0, 270, 0, 71, 73, 75, 147, + 0, 250, 249, 151, 149, 145, 139, 212, 0, 141, + 143, 39, 270, 0, 0, 0, 0, 0, 0, 0, + 270, 270, 0, 0, 0, 0, 0, 0, 270, 0, + 0, 268, 269, 0, 270, 0, 0, 0, 270, 270, + 270, 0, 270, 0, 253, 252, 270, 0, 0, 0, + 0, 33, 0, 0, 0, 0, 0, 270, 0, 0, + 0, 0, 0, 263, 264, 0, 0, 0, 0, 0, + 0, 270, 0, 0, 0, 248, 0, 0, 0, 0, + 270, 0, 270, 270, 241, 0, 0, 201, 157, 0, + 194, 246, 0, 0, 0, 0, 0, 0, 193, 0, + 192, 245, 0, 270, 261, 0, 260, 259, 26, 0, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 28, 270, 270, 270, 270, 79, 0, 270, 97, 85, + 84, 83, 82, 0, 104, 88, 87, 95, 265, 266, + 267, 0, 86, 0, 136, 0, 90, 0, 0, 242, + 134, 0, 165, 270, 161, 0, 163, 0, 0, 164, + 0, 0, 160, 159, 0, 0, 239, 27, 262, 37, + 0, 0, 0, 0, 0, 35, 0, 181, 0, 167, + 0, 0, 0, 216, 270, 0, 0, 0, 41, 0, + 0, 0, 98, 0, 0, 0, 0, 0, 0, 0, + 0, 103, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 78, 0, 89, 101, 0, 270, + 31, 0, 153, 0, 0, 195, 0, 0, 0, 166, + 270, 270, 238, 72, 74, 76, 148, 270, 34, 0, + 0, 0, 0, 0, 0, 270, 0, 0, 152, 185, + 0, 0, 0, 0, 0, 270, 0, 0, 0, 0, + 0, 150, 178, 171, 146, 140, 270, 270, 270, 270, + 213, 217, 218, 219, 220, 221, 0, 142, 144, 43, + 40, 42, 38, 80, 81, 99, 270, 270, 0, 0, + 0, 0, 0, 0, 0, 270, 0, 0, 0, 158, + 0, 0, 0, 0, 198, 0, 247, 0, 0, 0, + 270, 270, 0, 0, 0, 0, 270, 270, 0, 270, + 0, 0, 0, 0, 270, 270, 270, 270, 270, 214, + 222, 227, 232, 29, 0, 45, 0, 0, 128, 0, + 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 211, 243, 0, 0, 0, 210, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 206, 0, 204, 0, 205, 0, 0, + 0, 0, 0, 0, 127, 0, 130, 0, 119, 0, + 120, 121, 122, 126, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 202, 0, 0, 188, + 190, 244, 184, 186, 189, 187, 0, 183, 182, 174, + 170, 172, 175, 203, 173, 0, 169, 168, 0, 179, + 176, 177, 270, 270, 270, 270, 0, 47, 0, 0, + 0, 0, 124, 0, 117, 0, 0, 0, 133, 135, + 154, 155, 0, 0, 0, 0, 240, 36, 191, 180, + 270, 0, 0, 224, 0, 229, 0, 234, 0, 0, + 0, 270, 44, 48, 0, 0, 0, 0, 125, 118, + 0, 0, 197, 196, 0, 0, 0, 208, 215, 270, + 0, 223, 270, 0, 228, 270, 233, 236, 0, 0, + 0, 0, 0, 49, 46, 0, 0, 123, 0, 0, + 200, 199, 207, 209, 0, 270, 0, 270, 0, 0, + 0, 0, 0, 0, 0, 51, 50, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, + 0, 0, 54, 0, 0, 0, 0, 137, 0, 0, + 226, 0, 231, 0, 0, 0, 0, 0, 65, 0, + 0, 0, 0, 0, 0, 0, 138, 225, 230, 235, + 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, + 52, 57, 129, 0, 56, 55, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 66, 0, 0, 0, 0, + 0, 0, 0, 70, 69, 60, 63, 0, 61, 0, + 59, 0, 64, 62, 0, 132 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 5, 6, 72, 37, 38, 39, 284, 10, 40, + 214, 274, 41, 42, 160, 287, 381, 434, 493, 546, + 654, 672, 631, 633, 43, 147, 44, 148, 45, 149, + 8, 227, 291, 73, 127, 74, 118, 233, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 436, + 313, 439, 75, 248, 76, 179, 46, 155, 47, 158, + 48, 159, 49, 154, 50, 150, 51, 153, 52, 152, + 321, 12, 253, 278, 276, 199, 197, 189, 192, 194, + 186, 88, 476, 484, 486, 482, 596, 467, 462, 53, + 156, 372, 488, 282, 373, 489, 572, 374, 490, 574, + 375, 491, 576, 54, 141, 265, 183, 463, 200, 190, + 405, 174, 191, 89, 143, 90, 101, 205, 206, 521, + 241, 187, 102 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -423 +static const yytype_int16 yypact[] = +{ + 270, -423, -423, -423, -423, 11, 759, -423, 1275, -423, + 167, -423, 272, -423, -423, -423, -423, -423, 274, 274, + -76, 274, 274, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 274, 274, -423, -423, -423, -423, + -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, + -423, -423, -423, -423, -423, -2, -60, -54, 274, 14, + 35, -423, 40, 45, 81, 274, 92, 95, 274, 101, + -423, 137, -423, -423, -423, -423, -423, 274, -423, 158, + 232, 161, 168, 169, 274, 171, 178, 184, -423, -423, + -423, -423, -423, 191, 274, 196, -423, -423, -423, -423, + 197, -423, -423, -423, -423, -423, -423, -423, 201, -423, + -423, -423, 274, 274, 240, 209, 303, 365, 210, 232, + 274, 274, 212, 232, 119, 220, 232, 222, -423, 225, + 232, -423, -423, 226, 274, 240, 240, 229, 274, 274, + -423, 234, 274, 55, -423, -423, 274, 235, 237, 242, + 245, -423, 246, 249, 252, 262, 275, 274, 284, 285, + 290, 298, 62, -423, -423, 240, 274, 64, 124, 163, + 166, -423, 181, 198, 239, -423, 380, 273, 318, 319, + 274, 320, -423, 232, -423, 380, 321, -423, -423, 323, + -423, -423, 28, 240, 21, 240, 380, 325, -423, 327, + -423, -423, 112, -423, -423, 328, 274, -423, -423, 329, + -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, + -423, -423, -423, -423, 274, -423, 240, -423, -423, -423, + -423, -423, -423, 295, -423, -423, -423, -423, -423, -423, + -423, 333, -423, 240, -423, 335, -423, 771, 182, -423, + -423, 336, -423, -423, -423, 76, -423, 240, 80, -423, + 240, 338, -423, -423, 341, 110, -423, -423, -423, -423, + 953, 1101, 1176, 254, 156, -423, 199, -423, 151, -423, + 330, 420, 125, -423, -423, 422, 555, 38, -423, 342, + 343, 54, -423, 345, 347, 349, 351, 352, 354, 356, + 357, -423, -423, -423, -423, -423, -423, -423, -423, -423, + -423, -423, -423, -423, -423, 240, -423, -423, 358, 274, + -423, 99, -423, 274, 361, -423, 274, 362, 240, -423, + 274, 274, -423, -423, -423, -423, -423, 274, -423, 363, + 364, 376, 378, 382, 384, 274, 385, 388, -423, -423, + 392, 393, 396, 399, 401, 274, 407, 409, 411, 414, + 416, -423, -423, -423, -423, -423, 274, 274, 274, 274, + -423, -423, -423, -423, -423, -423, 147, -423, -423, 232, + -423, -423, -423, -423, -423, -423, 240, 240, 240, 240, + 240, 240, 240, 240, 47, 274, 424, 429, 430, -423, + 240, 240, 240, 240, -423, 379, -423, 431, 432, 232, + -423, 274, 240, 232, 240, 433, 274, 274, 232, 274, + 240, 232, 240, 434, 274, 274, -423, -423, -423, -423, + -423, -423, -423, -423, 435, -423, 419, 240, -423, 421, + 240, -423, 4, 436, 437, 438, 51, 240, 440, 451, + 441, 380, 240, 240, 240, 240, 240, 240, 442, 380, + 380, 443, 444, 240, -423, 445, 43, 446, -423, 56, + 380, 448, 449, 450, 452, 52, 453, 232, 65, 380, + 455, 456, 74, -423, 457, 240, 458, 240, 465, 466, + 467, 468, 240, 471, -423, 240, -423, 240, -423, 240, + -423, -423, -423, -423, 57, 61, 240, 472, 473, 474, + 67, 84, 240, 240, 240, 240, -423, 475, 478, -423, + -423, -423, -423, -423, -423, -423, 479, -423, -423, -423, + -423, -423, -423, -423, -423, 482, -423, -423, 484, -423, + -423, -423, -423, -423, -423, -423, 250, 240, 240, 240, + 240, 240, -423, 485, -423, 486, 240, 240, -423, -423, + -423, -423, 487, 488, 240, 240, -423, -423, -423, -423, + -423, 213, 120, -423, 142, -423, 164, -423, 86, 490, + 491, 274, -423, 240, 331, 240, 240, 492, -423, -423, + 240, 240, -423, -423, 493, 494, 78, -423, -423, 274, + 497, -423, 274, 500, -423, 274, -423, -423, 274, 502, + 240, 240, 505, 240, -423, 240, 240, -423, 507, 240, + -423, -423, -423, -423, 511, -423, 513, -423, 514, 240, + 240, 82, 240, 87, 240, -423, -423, 240, 240, 516, + 517, 380, 63, 380, 66, 380, 240, 240, 89, -423, + 240, 93, -423, 240, 240, 240, 240, -423, 518, 519, + -423, 520, -423, 524, 240, 240, 274, 515, -423, 274, + 527, 240, 98, 240, 240, 240, -423, -423, -423, -423, + 529, 530, 240, 240, 240, 240, -423, 534, 96, 535, + -423, 240, -423, 240, -423, -423, 240, 240, 240, 240, + 240, 274, 536, 240, -423, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 537, 538, 240, 240, 240, + 240, 240, 240, 240, -423, -423, 539, 540, 543, 70, + 72, 545, 240, -423, -423, -423, -423, 548, -423, 552, + -423, 240, -423, -423, 240, -423 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -423, -423, -423, 426, -423, -423, -423, -423, 258, -423, + -423, -423, -423, -423, -423, -423, -423, -423, -423, 100, + -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, + 189, -423, -423, -9, -423, -423, -423, 462, -423, -423, + -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, + -423, -423, -423, -423, -423, -423, -423, -423, -423, -423, + -423, -423, -423, -423, -423, -423, -423, -423, -275, -423, + -423, 263, -423, -423, -423, -314, -293, -224, -240, -200, + -285, -150, -423, -423, -423, -423, -423, -423, -423, -278, + -423, -423, -423, 105, 75, -423, -423, -423, -423, -423, + -423, -423, -423, -423, -423, -423, 512, -422, -423, -423, + 259, -423, 461, 10, -75, -423, -6, 481, -423, 3, + -176, -70, 727 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint16 yytable[] = +{ + 55, 78, 55, 362, 371, 485, 487, 163, 164, 251, + 133, 14, 91, 91, 94, 91, 91, 91, 91, 91, + 261, 91, 91, 91, 91, 91, 112, 91, 91, 93, + 113, 95, 96, 97, 98, 99, 114, 103, 104, 105, + 106, 107, 258, 109, 110, 173, 168, 170, 255, 172, + 163, 164, 91, 177, 163, 164, 181, 15, 16, 17, + 163, 164, 91, 255, 163, 164, 163, 164, 115, 163, + 164, 209, 255, 163, 164, 163, 164, 258, 125, 15, + 16, 17, 220, 15, 16, 17, 258, 255, 144, 15, + 16, 17, 15, 16, 17, 498, 15, 16, 17, 15, + 16, 17, 648, 472, 116, 258, 91, 162, 651, 687, + 538, 481, 259, 249, 144, 131, 132, 165, 379, 256, + 688, 27, 161, 471, 461, 117, 349, 448, 363, 380, + 119, 480, 249, 473, 523, 120, 204, 366, 193, 195, + 144, 397, 503, 531, 178, 384, 208, 525, 552, 289, + 398, 144, 554, 225, 660, 229, 534, 662, 560, 350, + 228, 736, 264, 738, 689, 539, 323, 331, 226, 622, + 326, 121, 466, 649, 204, 561, 608, 599, 652, 666, + 475, 367, 123, 669, 600, 124, 701, 465, 31, 690, + 399, 126, 351, 352, 27, 474, 257, 353, 260, 602, + 268, 332, 354, 642, 77, 644, 603, 339, 355, 368, + 369, 601, 510, 337, 469, 230, 370, 70, 144, 356, + 367, 605, 478, 357, 77, 366, 358, 128, 359, 290, + 360, 340, 318, 604, 87, 131, 132, 70, 433, 319, + 341, 342, 361, 163, 164, 343, 315, 338, 130, 324, + 344, 134, 327, 511, 231, 606, 345, 232, 135, 136, + 325, 138, 79, 328, 55, 55, 55, 346, 139, 367, + 80, 347, 235, 578, 140, 509, 31, 15, 16, 17, + 79, 142, 87, 517, 518, 385, 146, 151, 80, 236, + 348, 157, 579, 371, 526, 81, 82, 368, 369, 166, + 171, 580, 176, 535, 598, 83, 131, 132, 167, 435, + 180, 84, 182, 81, 82, 185, 188, 400, 394, 196, + 402, 623, 85, 83, 203, 210, 86, 211, 581, 84, + 237, 404, 212, 293, 294, 213, 215, 87, 79, 216, + 85, 582, 217, 468, 86, 336, 80, 295, 296, 297, + 298, 477, 218, 299, 578, 87, 1, 2, 3, 4, + 91, 91, 91, 91, 242, 219, 300, 78, 131, 132, + 169, 81, 82, 579, 221, 222, 429, 430, 431, 432, + 223, 83, 580, 238, 239, 240, 301, 84, 224, 437, + 440, 442, 443, 444, 445, 446, 447, 449, 85, 270, + 271, 272, 86, 454, 455, 456, 457, 533, 243, 581, + 244, 246, 252, 87, 254, 193, 262, 195, 263, 267, + 269, 364, 614, 193, 314, 195, 316, 320, 79, 329, + 79, 330, 36, 382, 383, 386, 80, 387, 80, 388, + 495, 389, 390, 497, 391, 499, 392, 393, 395, 504, + 505, 401, 403, 409, 410, 193, 195, 512, 513, 514, + 515, 81, 82, 81, 82, 659, 411, 661, 412, 663, + 458, 83, 413, 83, 414, 416, 273, 84, 417, 84, + 280, 281, 418, 419, 285, 286, 420, 100, 85, 421, + 85, 422, 86, 108, 86, 547, 111, 424, 549, 425, + 550, 426, 551, 87, 427, 87, 428, 553, 555, 556, + 494, 365, 496, 377, 451, 562, 563, 564, 565, 452, + 453, 459, 460, 470, 479, 492, 122, 500, 501, 502, + 506, 507, 508, 516, 519, 520, 522, 524, 129, 527, + 528, 529, 376, 530, 532, 137, 536, 537, 540, 541, + 583, 547, 585, 586, 587, 542, 543, 544, 545, 590, + 591, 548, 557, 79, 558, 559, 566, 594, 595, 567, + 568, 80, 609, 569, 570, 91, 588, 589, 592, 593, + 610, 611, 175, 617, 620, 621, 613, 625, 615, 616, + 627, 612, 630, 618, 619, 635, 81, 82, 639, 198, + 201, 641, 629, 643, 645, 683, 83, 657, 658, 676, + 677, 678, 84, 632, 634, 679, 636, 685, 637, 638, + 694, 695, 640, 85, 700, 703, 712, 86, 724, 725, + 733, 734, 646, 647, 735, 650, 740, 653, 87, 742, + 655, 656, 667, 743, 247, 670, 378, 571, 584, 664, + 665, 607, 202, 668, 450, 0, 671, 673, 674, 675, + 682, 245, 0, 684, 0, 0, 0, 680, 681, 0, + 0, 0, 0, 0, 686, 0, 691, 692, 693, 0, + 0, 0, 702, 0, 0, 696, 697, 698, 699, 0, + 0, 0, 0, 0, 704, 711, 705, 0, 0, 706, + 707, 708, 709, 710, 0, 0, 713, 0, 714, 715, + 716, 717, 718, 719, 720, 721, 722, 723, 0, 0, + 726, 727, 728, 729, 730, 731, 732, 0, 7, 9, + 11, 13, 737, 739, 0, 741, 0, 0, 0, 0, + 0, 0, 0, 0, 744, 92, 92, 745, 92, 92, + 92, 92, 92, 0, 92, 92, 92, 92, 92, 0, + 92, 92, 15, 16, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 19, 0, 20, 0, 0, 0, + 396, 0, 0, 0, 0, 92, 0, 21, 22, 0, + 23, 406, 407, 24, 25, 92, 26, 0, 408, 0, + 0, 0, 27, 28, 0, 0, 415, 29, 30, 293, + 294, 0, 0, 0, 0, 0, 423, 0, 0, 0, + 0, 145, 31, 295, 296, 297, 298, 32, 0, 299, + 0, 0, 33, 34, 0, 0, 0, 0, 0, 92, + 0, 35, 300, 0, 0, 0, 0, 145, 0, 0, + 0, 0, 0, 0, 0, 184, 406, 0, 0, 0, + 0, 0, 317, 0, 0, 0, 0, 184, 0, 207, + 0, 0, 0, 145, 0, 0, 0, 198, 201, 0, + 0, 0, 0, 0, 145, 198, 201, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, + 0, 0, 0, 0, 0, 0, 0, 207, 0, 234, + 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 266, 0, 0, 0, 0, 0, 0, 9, 9, 9, + 13, 275, 277, 279, 13, 13, 283, 0, 13, 13, + 288, 145, 0, 0, 292, 0, 15, 16, 17, 18, + 0, 0, 56, 57, 0, 0, 0, 58, 19, 0, + 20, 0, 59, 0, 0, 0, 0, 60, 0, 0, + 322, 21, 22, 61, 23, 0, 0, 24, 25, 0, + 26, 0, 0, 62, 0, 0, 27, 28, 63, 0, + 0, 29, 30, 64, 0, 0, 0, 0, 0, 0, + 65, 11, 0, 0, 66, 67, 31, 0, 68, 0, + 69, 32, 0, 70, 0, 0, 33, 34, 0, 0, + 0, 0, 0, 0, 0, 35, 71, 0, 0, 0, + 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 624, 0, 0, 626, 0, 0, 628, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 92, 92, 92, 92, 0, 0, 0, + 0, 0, 0, 0, 15, 16, 17, 18, 0, 0, + 56, 57, 0, 438, 441, 58, 19, 0, 20, 0, + 59, 0, 0, 0, 0, 60, 0, 0, 0, 21, + 22, 61, 23, 0, 0, 24, 25, 464, 26, 0, + 0, 62, 0, 0, 27, 28, 63, 0, 0, 29, + 30, 64, 0, 483, 464, 464, 0, 0, 65, 0, + 0, 0, 66, 67, 31, 0, 68, 0, 69, 32, + 0, 70, 0, 0, 33, 34, 0, 0, 0, 15, + 16, 17, 18, 35, 71, 56, 57, 0, 0, 0, + 58, 19, 334, 20, 0, 59, 0, 0, 0, 0, + 60, 0, 0, 0, 21, 22, 61, 23, 0, 0, + 24, 25, 0, 26, 0, 0, 62, 0, 0, 27, + 28, 63, 0, 0, 29, 30, 64, 0, 0, 0, + 0, 0, 0, 65, 0, 0, 0, 66, 67, 31, + 0, 68, 0, 69, 32, 0, 70, 0, 0, 33, + 34, 0, 0, 0, 0, 0, 0, 0, 35, 71, + 0, 0, 0, 0, 0, 0, 0, 335, 0, 283, + 573, 575, 577, 0, 0, 0, 0, 0, 15, 16, + 17, 18, 0, 0, 56, 57, 0, 0, 0, 58, + 19, 0, 20, 0, 59, 0, 0, 597, 0, 60, + 0, 0, 0, 21, 22, 61, 23, 0, 92, 24, + 25, 0, 26, 0, 0, 62, 0, 0, 27, 28, + 63, 0, 0, 29, 30, 64, 0, 0, 0, 0, + 0, 0, 65, 0, 0, 0, 66, 67, 31, 0, + 68, 0, 69, 32, 0, 70, 0, 0, 33, 34, + 0, 0, 464, 0, 464, 0, 0, 35, 71 +}; + +static const yytype_int16 yycheck[] = +{ + 6, 10, 8, 278, 282, 427, 428, 3, 4, 185, + 80, 0, 18, 19, 90, 21, 22, 23, 24, 25, + 196, 27, 28, 29, 30, 31, 28, 33, 34, 19, + 90, 21, 22, 23, 24, 25, 90, 27, 28, 29, + 30, 31, 21, 33, 34, 120, 116, 117, 20, 119, + 3, 4, 58, 123, 3, 4, 126, 3, 4, 5, + 3, 4, 68, 20, 3, 4, 3, 4, 58, 3, + 4, 146, 20, 3, 4, 3, 4, 21, 68, 3, + 4, 5, 157, 3, 4, 5, 21, 20, 94, 3, + 4, 5, 3, 4, 5, 91, 3, 4, 5, 3, + 4, 5, 20, 417, 90, 21, 112, 113, 21, 11, + 36, 425, 91, 183, 120, 3, 4, 114, 80, 91, + 22, 43, 112, 416, 409, 90, 276, 80, 278, 91, + 90, 424, 202, 418, 91, 90, 142, 12, 135, 136, + 146, 42, 91, 91, 25, 91, 91, 91, 91, 224, + 51, 157, 91, 91, 91, 91, 91, 91, 91, 8, + 166, 91, 50, 91, 66, 91, 90, 57, 165, 91, + 90, 90, 412, 91, 180, 91, 90, 57, 91, 90, + 420, 56, 90, 90, 64, 90, 90, 411, 63, 91, + 91, 90, 41, 42, 43, 419, 193, 46, 195, 57, + 206, 91, 51, 625, 57, 627, 64, 8, 57, 84, + 85, 91, 452, 57, 414, 91, 91, 70, 224, 68, + 56, 57, 422, 72, 57, 12, 75, 90, 77, 226, + 79, 32, 50, 91, 83, 3, 4, 70, 91, 57, + 41, 42, 91, 3, 4, 46, 243, 91, 90, 255, + 51, 90, 258, 453, 91, 91, 57, 91, 90, 90, + 257, 90, 8, 260, 270, 271, 272, 68, 90, 56, + 16, 72, 91, 23, 90, 451, 63, 3, 4, 5, + 8, 90, 83, 459, 460, 291, 90, 90, 16, 91, + 91, 90, 42, 571, 470, 41, 42, 84, 85, 90, + 90, 51, 90, 479, 91, 51, 3, 4, 5, 379, + 90, 57, 90, 41, 42, 90, 90, 323, 315, 90, + 326, 596, 68, 51, 90, 90, 72, 90, 78, 57, + 91, 328, 90, 38, 39, 90, 90, 83, 8, 90, + 68, 91, 90, 413, 72, 91, 16, 52, 53, 54, + 55, 421, 90, 58, 23, 83, 86, 87, 88, 89, + 366, 367, 368, 369, 91, 90, 71, 376, 3, 4, + 5, 41, 42, 42, 90, 90, 366, 367, 368, 369, + 90, 51, 51, 3, 4, 5, 91, 57, 90, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 68, 210, + 211, 212, 72, 400, 401, 402, 403, 477, 90, 78, + 91, 91, 91, 83, 91, 412, 91, 414, 91, 91, + 91, 91, 91, 420, 91, 422, 91, 91, 8, 91, + 8, 90, 6, 91, 91, 90, 16, 90, 16, 90, + 437, 90, 90, 440, 90, 442, 90, 90, 90, 446, + 447, 90, 90, 90, 90, 452, 453, 454, 455, 456, + 457, 41, 42, 41, 42, 641, 90, 643, 90, 645, + 91, 51, 90, 51, 90, 90, 213, 57, 90, 57, + 217, 218, 90, 90, 221, 222, 90, 26, 68, 90, + 68, 90, 72, 32, 72, 492, 35, 90, 495, 90, + 497, 90, 499, 83, 90, 83, 90, 504, 505, 506, + 91, 91, 91, 91, 90, 512, 513, 514, 515, 90, + 90, 90, 90, 90, 90, 90, 65, 91, 91, 91, + 90, 80, 91, 91, 91, 91, 91, 91, 77, 91, + 91, 91, 284, 91, 91, 84, 91, 91, 91, 91, + 547, 548, 549, 550, 551, 90, 90, 90, 90, 556, + 557, 90, 90, 8, 91, 91, 91, 564, 565, 91, + 91, 16, 578, 91, 90, 581, 91, 91, 91, 91, + 90, 90, 121, 91, 91, 91, 583, 90, 585, 586, + 90, 581, 90, 590, 591, 90, 41, 42, 91, 138, + 139, 90, 608, 90, 90, 90, 51, 91, 91, 91, + 91, 91, 57, 610, 611, 91, 613, 90, 615, 616, + 91, 91, 619, 68, 90, 90, 90, 72, 91, 91, + 91, 91, 629, 630, 91, 632, 91, 634, 83, 91, + 637, 638, 648, 91, 182, 651, 91, 542, 548, 646, + 647, 576, 140, 650, 395, -1, 653, 654, 655, 656, + 666, 180, -1, 669, -1, -1, -1, 664, 665, -1, + -1, -1, -1, -1, 671, -1, 673, 674, 675, -1, + -1, -1, 688, -1, -1, 682, 683, 684, 685, -1, + -1, -1, -1, -1, 691, 701, 693, -1, -1, 696, + 697, 698, 699, 700, -1, -1, 703, -1, 705, 706, + 707, 708, 709, 710, 711, 712, 713, 714, -1, -1, + 717, 718, 719, 720, 721, 722, 723, -1, 1, 2, + 3, 4, 729, 730, -1, 732, -1, -1, -1, -1, + -1, -1, -1, -1, 741, 18, 19, 744, 21, 22, + 23, 24, 25, -1, 27, 28, 29, 30, 31, -1, + 33, 34, 3, 4, 5, 6, -1, -1, -1, -1, + -1, -1, -1, -1, 15, -1, 17, -1, -1, -1, + 319, -1, -1, -1, -1, 58, -1, 28, 29, -1, + 31, 330, 331, 34, 35, 68, 37, -1, 337, -1, + -1, -1, 43, 44, -1, -1, 345, 48, 49, 38, + 39, -1, -1, -1, -1, -1, 355, -1, -1, -1, + -1, 94, 63, 52, 53, 54, 55, 68, -1, 58, + -1, -1, 73, 74, -1, -1, -1, -1, -1, 112, + -1, 82, 71, -1, -1, -1, -1, 120, -1, -1, + -1, -1, -1, -1, -1, 128, 395, -1, -1, -1, + -1, -1, 91, -1, -1, -1, -1, 140, -1, 142, + -1, -1, -1, 146, -1, -1, -1, 416, 417, -1, + -1, -1, -1, -1, 157, 424, 425, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 171, -1, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 203, -1, -1, -1, -1, -1, -1, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, -1, 221, 222, + 223, 224, -1, -1, 227, -1, 3, 4, 5, 6, + -1, -1, 9, 10, -1, -1, -1, 14, 15, -1, + 17, -1, 19, -1, -1, -1, -1, 24, -1, -1, + 253, 28, 29, 30, 31, -1, -1, 34, 35, -1, + 37, -1, -1, 40, -1, -1, 43, 44, 45, -1, + -1, 48, 49, 50, -1, -1, -1, -1, -1, -1, + 57, 284, -1, -1, 61, 62, 63, -1, 65, -1, + 67, 68, -1, 70, -1, -1, 73, 74, -1, -1, + -1, -1, -1, -1, -1, 82, 83, -1, -1, -1, + -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 599, -1, -1, 602, -1, -1, 605, -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, 366, 367, 368, 369, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, -1, -1, + 9, 10, -1, 386, 387, 14, 15, -1, 17, -1, + 19, -1, -1, -1, -1, 24, -1, -1, -1, 28, + 29, 30, 31, -1, -1, 34, 35, 410, 37, -1, + -1, 40, -1, -1, 43, 44, 45, -1, -1, 48, + 49, 50, -1, 426, 427, 428, -1, -1, 57, -1, + -1, -1, 61, 62, 63, -1, 65, -1, 67, 68, + -1, 70, -1, -1, 73, 74, -1, -1, -1, 3, + 4, 5, 6, 82, 83, 9, 10, -1, -1, -1, + 14, 15, 91, 17, -1, 19, -1, -1, -1, -1, + 24, -1, -1, -1, 28, 29, 30, 31, -1, -1, + 34, 35, -1, 37, -1, -1, 40, -1, -1, 43, + 44, 45, -1, -1, 48, 49, 50, -1, -1, -1, + -1, -1, -1, 57, -1, -1, -1, 61, 62, 63, + -1, 65, -1, 67, 68, -1, 70, -1, -1, 73, + 74, -1, -1, -1, -1, -1, -1, -1, 82, 83, + -1, -1, -1, -1, -1, -1, -1, 91, -1, 542, + 543, 544, 545, -1, -1, -1, -1, -1, 3, 4, + 5, 6, -1, -1, 9, 10, -1, -1, -1, 14, + 15, -1, 17, -1, 19, -1, -1, 570, -1, 24, + -1, -1, -1, 28, 29, 30, 31, -1, 581, 34, + 35, -1, 37, -1, -1, 40, -1, -1, 43, 44, + 45, -1, -1, 48, 49, 50, -1, -1, -1, -1, + -1, -1, 57, -1, -1, -1, 61, 62, 63, -1, + 65, -1, 67, 68, -1, 70, -1, -1, 73, 74, + -1, -1, 625, -1, 627, -1, -1, 82, 83 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 86, 87, 88, 89, 93, 94, 214, 122, 214, + 100, 214, 163, 214, 0, 3, 4, 5, 6, 15, + 17, 28, 29, 31, 34, 35, 37, 43, 44, 48, + 49, 63, 68, 73, 74, 82, 95, 96, 97, 98, + 101, 104, 105, 116, 118, 120, 148, 150, 152, 154, + 156, 158, 160, 181, 195, 208, 9, 10, 14, 19, + 24, 30, 40, 45, 50, 57, 61, 62, 65, 67, + 70, 83, 95, 125, 127, 144, 146, 57, 125, 8, + 16, 41, 42, 51, 57, 68, 72, 83, 173, 205, + 207, 208, 214, 205, 90, 205, 205, 205, 205, 205, + 204, 208, 214, 205, 205, 205, 205, 205, 204, 205, + 205, 204, 28, 90, 90, 205, 90, 90, 128, 90, + 90, 90, 204, 90, 90, 205, 90, 126, 90, 204, + 90, 3, 4, 213, 90, 90, 90, 204, 90, 90, + 90, 196, 90, 206, 208, 214, 90, 117, 119, 121, + 157, 90, 161, 159, 155, 149, 182, 90, 151, 153, + 106, 205, 208, 3, 4, 211, 90, 5, 213, 5, + 213, 90, 213, 206, 203, 204, 90, 213, 25, 147, + 90, 213, 90, 198, 214, 90, 172, 213, 90, 169, + 201, 204, 170, 211, 171, 211, 90, 168, 204, 167, + 200, 204, 198, 90, 208, 209, 210, 214, 91, 206, + 90, 90, 90, 90, 102, 90, 90, 90, 90, 90, + 206, 90, 90, 90, 90, 91, 211, 123, 208, 91, + 91, 91, 91, 129, 214, 91, 91, 91, 3, 4, + 5, 212, 91, 90, 91, 209, 91, 129, 145, 213, + 214, 212, 91, 164, 91, 20, 91, 211, 21, 91, + 211, 212, 91, 91, 50, 197, 214, 91, 208, 91, + 122, 122, 122, 163, 103, 214, 166, 214, 165, 214, + 163, 163, 185, 214, 99, 163, 163, 107, 214, 206, + 211, 124, 214, 38, 39, 52, 53, 54, 55, 58, + 71, 91, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 142, 91, 211, 91, 91, 50, 57, + 91, 162, 214, 90, 208, 211, 90, 208, 211, 91, + 90, 57, 91, 91, 91, 91, 91, 57, 91, 8, + 32, 41, 42, 46, 51, 57, 68, 72, 91, 173, + 8, 41, 42, 46, 51, 57, 68, 72, 75, 77, + 79, 91, 160, 173, 91, 91, 12, 56, 84, 85, + 91, 181, 183, 186, 189, 192, 100, 91, 91, 80, + 91, 108, 91, 91, 91, 208, 90, 90, 90, 90, + 90, 90, 90, 90, 211, 90, 204, 42, 51, 91, + 208, 90, 208, 90, 211, 202, 204, 204, 204, 90, + 90, 90, 90, 90, 90, 204, 90, 90, 90, 90, + 90, 90, 90, 204, 90, 90, 90, 90, 90, 205, + 205, 205, 205, 91, 109, 213, 141, 211, 214, 143, + 211, 214, 211, 211, 211, 211, 211, 211, 80, 211, + 202, 90, 90, 90, 211, 211, 211, 211, 91, 90, + 90, 172, 180, 199, 214, 169, 170, 179, 213, 171, + 90, 168, 167, 172, 169, 170, 174, 213, 171, 90, + 168, 167, 177, 214, 175, 199, 176, 199, 184, 187, + 190, 193, 90, 110, 91, 211, 91, 211, 91, 211, + 91, 91, 91, 91, 211, 211, 90, 80, 91, 212, + 170, 171, 211, 211, 211, 211, 91, 212, 212, 91, + 91, 211, 91, 91, 91, 91, 212, 91, 91, 91, + 91, 91, 91, 213, 91, 212, 91, 91, 36, 91, + 91, 91, 90, 90, 90, 90, 111, 211, 90, 211, + 211, 211, 91, 211, 91, 211, 211, 90, 91, 91, + 91, 91, 211, 211, 211, 211, 91, 91, 91, 91, + 90, 185, 188, 214, 191, 214, 194, 214, 23, 42, + 51, 78, 91, 211, 111, 211, 211, 211, 91, 91, + 211, 211, 91, 91, 211, 211, 178, 214, 91, 57, + 64, 91, 57, 64, 91, 57, 91, 186, 90, 208, + 90, 90, 205, 211, 91, 211, 211, 91, 211, 211, + 91, 91, 91, 160, 204, 90, 204, 90, 204, 208, + 90, 114, 211, 115, 211, 90, 211, 211, 211, 91, + 211, 90, 199, 90, 199, 90, 211, 211, 20, 91, + 211, 21, 91, 211, 112, 211, 211, 91, 91, 212, + 91, 212, 91, 212, 211, 211, 90, 208, 211, 90, + 208, 211, 113, 211, 211, 211, 91, 91, 91, 91, + 211, 211, 208, 90, 208, 90, 211, 11, 22, 66, + 91, 211, 211, 211, 91, 91, 211, 211, 211, 211, + 90, 90, 208, 90, 211, 211, 211, 211, 211, 211, + 211, 208, 90, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 91, 91, 211, 211, 211, 211, + 211, 211, 211, 91, 91, 91, 91, 211, 91, 211, + 91, 211, 91, 91, 211, 211 +}; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 +#define YYEMPTY (-2) #define YYEOF 0 + #define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ + #define YYFAIL goto yyerrlab + #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ + +#define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -#define YYLEX yylex() + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif -#ifdef YYPURE -#ifdef YYLSP_NEEDED + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +# define YYLEX yylex (YYLEX_PARAM) #else -#define YYLEX yylex(&yylval, &yylloc) +# define YYLEX yylex () #endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else -#define YYLEX yylex(&yylval) +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif -#endif /* not YYLSP_NEEDED */ +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); -/* If nonreentrant, generate the variables here */ + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} -#ifndef YYPURE +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; #endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} -/* YYINITDEPTH indicates the initial size of the parser's stacks */ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif + -/* Define __yy_memcpy. Note that the size argument - should be passed with type unsigned int, because that is what the non-GCC - definitions require. With GCC, __builtin_memcpy takes an arg - of type size_t, but it can handle unsigned int. */ -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus +#if YYERROR_VERBOSE -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) -{ - register char *t = to; - register char *f = from; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -#line 217 "/usr/share/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#ifdef __cplusplus -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* not __cplusplus */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* not YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -#ifdef YYPARSE_PARAM -int yyparse (void *); +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) #else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus int yyparse (void); -#endif -#endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) #else -#define YYPOPSTACK (yyvsp--, yyssp--) +int yyparse (); #endif +#endif /* ! YYPARSE_PARAM */ - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + #endif #endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; yyerrstatus = 0; yynerrs = 0; @@ -1378,255 +2231,202 @@ yyparse(YYPARSE_PARAM_ARG) so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss - 1; + yyssp = yyss; yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: + goto yysetstate; - *++yyssp = yystate; +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; - if (yyssp >= yyss + yystacksize - 1) + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 2; - } + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; -#ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); -#endif + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif #endif /* no yyoverflow */ - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - if (yyssp >= yyss + yystacksize - 1) + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; - yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ +/*-----------. +| yybackup. | +`-----------*/ +yybackup: - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ + /* Not known => get a look-ahead token if don't already have one. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif + YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) + if (yyn <= 0) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the token being shifted unless it is eof. */ + /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; -/* Do the default action for the current state. */ -yydefault: +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; + goto yyreduce; -/* Do a reduction. yyn is the number of a rule to reduce with. */ + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ yyreduce: + /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ -#if YYDEBUG != 0 - if (yydebug) + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 6: + case 7: #line 247 "parser.yxx" -{ + { assert(!egg_stack.empty()); - DCAST(EggData, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 25: + DCAST(EggData, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 26: #line 291 "parser.yxx" -{ - string strval = yyvsp[-1]._string; + { + string strval = (yyvsp[(3) - (4)]._string); EggCoordinateSystem *cs = new EggCoordinateSystem; CoordinateSystem f = parse_coordinate_system_string(strval); @@ -1635,20 +2435,22 @@ case 25: } else { cs->set_value(f); } - yyval._egg = cs; -; - break;} -case 26: + (yyval._egg) = cs; +} + break; + + case 27: #line 314 "parser.yxx" -{ - yyval._egg = new EggComment(yyvsp[-3]._string, yyvsp[-1]._string); -; - break;} -case 27: + { + (yyval._egg) = new EggComment((yyvsp[(2) - (5)]._string), (yyvsp[(4) - (5)]._string)); +} + break; + + case 28: #line 328 "parser.yxx" -{ - string tref_name = yyvsp[-2]._string; - Filename filename = yyvsp[0]._string; + { + string tref_name = (yyvsp[(2) - (4)]._string); + Filename filename = (yyvsp[(4) - (4)]._string); EggTexture *texture = new EggTexture(tref_name, filename); if (textures.find(tref_name) != textures.end()) { @@ -1657,22 +2459,24 @@ case 27: textures[tref_name] = texture; egg_stack.push_back(texture); -; - break;} -case 28: +} + break; + + case 29: #line 341 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 30: +} + break; + + case 31: #line 357 "parser.yxx" -{ + { EggTexture *texture = DCAST(EggTexture, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "type") == 0) { EggTexture::TextureType tt = EggTexture::string_texture_type(strval); @@ -1998,12 +2802,13 @@ case 30: } else { eggyywarning("Unsupported texture scalar: " + name); } -; - break;} -case 32: +} + break; + + case 33: #line 700 "parser.yxx" -{ - string mref_name = yyvsp[-1]._string; + { + string mref_name = (yyvsp[(2) - (3)]._string); EggMaterial *material = new EggMaterial(mref_name); if (materials.find(mref_name) != materials.end()) { @@ -2012,21 +2817,23 @@ case 32: materials[mref_name] = material; egg_stack.push_back(material); -; - break;} -case 33: +} + break; + + case 34: #line 712 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 35: +} + break; + + case 36: #line 728 "parser.yxx" -{ + { EggMaterial *material = DCAST(EggMaterial, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); if (cmp_nocase_uh(name, "diffr") == 0) { Colorf diff = material->get_diff(); @@ -2105,33 +2912,36 @@ case 35: } else { eggyywarning("Unsupported material scalar: " + name); } -; - break;} -case 36: +} + break; + + case 37: #line 823 "parser.yxx" -{ - string node_name = yyvsp[-3]._string; - Filename filename = yyvsp[-1]._string; + { + string node_name = (yyvsp[(2) - (5)]._string); + Filename filename = (yyvsp[(4) - (5)]._string); EggExternalReference *ref = new EggExternalReference(node_name, filename); - yyval._egg = ref; -; - break;} -case 37: + (yyval._egg) = ref; +} + break; + + case 38: #line 830 "parser.yxx" -{ - if (cmp_nocase_uh(yyvsp[-5]._string, "group") != 0) { + { + if (cmp_nocase_uh((yyvsp[(1) - (6)]._string), "group") != 0) { eggyyerror("keyword 'group' expected"); } - string node_name = yyvsp[-3]._string; - Filename filename = yyvsp[-1]._string; + string node_name = (yyvsp[(3) - (6)]._string); + Filename filename = (yyvsp[(5) - (6)]._string); EggExternalReference *ref = new EggExternalReference(node_name, filename); - yyval._egg = ref; -; - break;} -case 38: + (yyval._egg) = ref; +} + break; + + case 39: #line 850 "parser.yxx" -{ - string name = yyvsp[0]._string; + { + string name = (yyvsp[(2) - (2)]._string); EggVertexPool *pool = NULL; VertexPools::const_iterator vpi = vertex_pools.find(name); @@ -2152,34 +2962,38 @@ case 38: } egg_stack.push_back(pool); -; - break;} -case 39: +} + break; + + case 40: #line 874 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 42: +} + break; + + case 43: #line 902 "parser.yxx" -{ + { egg_stack.push_back(new EggVertex); -; - break;} -case 43: +} + break; + + case 44: #line 906 "parser.yxx" -{ + { PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back()); egg_stack.pop_back(); DCAST(EggVertexPool, egg_stack.back())->add_vertex(vtx); -; - break;} -case 44: +} + break; + + case 45: #line 913 "parser.yxx" -{ - vertex_index = (int)yyvsp[0]._number; + { + vertex_index = (int)(yyvsp[(2) - (2)]._number); EggVertexPool *pool = DCAST(EggVertexPool, egg_stack.back()); if (vertex_index < 0) { @@ -2201,11 +3015,12 @@ case 44: // go ahead and parse the vertex. We just won't save it. egg_stack.push_back(new EggVertex); -; - break;} -case 45: +} + break; + + case 46: #line 938 "parser.yxx" -{ + { PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back()); egg_stack.pop_back(); @@ -2213,256 +3028,285 @@ case 45: if (vertex_index != -1) { pool->add_vertex(vtx, vertex_index); } -; - break;} -case 46: +} + break; + + case 47: #line 959 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_pos(yyvsp[0]._number); -; - break;} -case 47: + { + DCAST(EggVertex, egg_stack.back())->set_pos((yyvsp[(1) - (1)]._number)); +} + break; + + case 48: #line 963 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_pos(LPoint2d(yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 48: + { + DCAST(EggVertex, egg_stack.back())->set_pos(LPoint2d((yyvsp[(1) - (2)]._number), (yyvsp[(2) - (2)]._number))); +} + break; + + case 49: #line 967 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_pos(LPoint3d(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 49: + { + DCAST(EggVertex, egg_stack.back())->set_pos(LPoint3d((yyvsp[(1) - (3)]._number), (yyvsp[(2) - (3)]._number), (yyvsp[(3) - (3)]._number))); +} + break; + + case 50: #line 971 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_pos(LPoint4d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 50: + { + DCAST(EggVertex, egg_stack.back())->set_pos(LPoint4d((yyvsp[(1) - (4)]._number), (yyvsp[(2) - (4)]._number), (yyvsp[(3) - (4)]._number), (yyvsp[(4) - (4)]._number))); +} + break; + + case 51: #line 975 "parser.yxx" -{ + { EggVertex *vertex = DCAST(EggVertex, egg_stack.back()); - EggVertexUV *uv = new EggVertexUV(yyvsp[-1]._string, TexCoordd::zero()); + EggVertexUV *uv = new EggVertexUV((yyvsp[(3) - (4)]._string), TexCoordd::zero()); egg_stack.push_back(uv); - if (vertex->has_uv(yyvsp[-1]._string)) { - eggyywarning("Ignoring repeated UV name " + yyvsp[-1]._string); + if (vertex->has_uv((yyvsp[(3) - (4)]._string))) { + eggyywarning("Ignoring repeated UV name " + (yyvsp[(3) - (4)]._string)); } else { vertex->set_uv_obj(uv); } -; - break;} -case 51: +} + break; + + case 52: #line 986 "parser.yxx" -{ + { egg_stack.pop_back(); -; - break;} -case 54: +} + break; + + case 55: #line 992 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs. - insert(EggMorphVertex(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphVertex((yyvsp[(3) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (8)]._string)); } -; - break;} -case 55: +} + break; + + case 56: #line 1000 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs. - insert(EggMorphVertex(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphVertex((yyvsp[(4) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (8)]._string)); } -; - break;} -case 56: +} + break; + + case 57: #line 1019 "parser.yxx" -{ - DCAST(EggVertexUV, egg_stack.back())->set_uv(TexCoordd(yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 57: + { + DCAST(EggVertexUV, egg_stack.back())->set_uv(TexCoordd((yyvsp[(1) - (2)]._number), (yyvsp[(2) - (2)]._number))); +} + break; + + case 58: #line 1023 "parser.yxx" -{ - DCAST(EggVertexUV, egg_stack.back())->set_uvw(LVecBase3d(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 58: + { + DCAST(EggVertexUV, egg_stack.back())->set_uvw(LVecBase3d((yyvsp[(1) - (3)]._number), (yyvsp[(2) - (3)]._number), (yyvsp[(3) - (3)]._number))); +} + break; + + case 59: #line 1027 "parser.yxx" -{ + { if (DCAST(EggVertexUV, egg_stack.back())->has_tangent()) { eggyywarning("Ignoring repeated tangent"); } else { - DCAST(EggVertexUV, egg_stack.back())->set_tangent(Normald(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); + DCAST(EggVertexUV, egg_stack.back())->set_tangent(Normald((yyvsp[(4) - (7)]._number), (yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number))); } -; - break;} -case 59: +} + break; + + case 60: #line 1035 "parser.yxx" -{ + { if (DCAST(EggVertexUV, egg_stack.back())->has_binormal()) { eggyywarning("Ignoring repeated binormal"); } else { - DCAST(EggVertexUV, egg_stack.back())->set_binormal(Normald(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); + DCAST(EggVertexUV, egg_stack.back())->set_binormal(Normald((yyvsp[(4) - (7)]._number), (yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number))); } -; - break;} -case 60: +} + break; + + case 61: #line 1043 "parser.yxx" -{ + { bool inserted = DCAST(EggVertexUV, egg_stack.back())->_duvs. - insert(EggMorphTexCoord(yyvsp[-4]._string, LVector3d(yyvsp[-2]._number, yyvsp[-1]._number, 0.0))).second; + insert(EggMorphTexCoord((yyvsp[(3) - (7)]._string), LVector3d((yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number), 0.0))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (7)]._string)); } -; - break;} -case 61: +} + break; + + case 62: #line 1051 "parser.yxx" -{ + { bool inserted = DCAST(EggVertexUV, egg_stack.back())->_duvs. - insert(EggMorphTexCoord(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphTexCoord((yyvsp[(3) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (8)]._string)); } -; - break;} -case 62: +} + break; + + case 63: #line 1059 "parser.yxx" -{ + { bool inserted = DCAST(EggVertexUV, egg_stack.back())->_duvs. - insert(EggMorphTexCoord(yyvsp[-3]._string, LVector3d(yyvsp[-2]._number, yyvsp[-1]._number, 0.0))).second; + insert(EggMorphTexCoord((yyvsp[(4) - (7)]._string), LVector3d((yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number), 0.0))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-3]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (7)]._string)); } -; - break;} -case 63: +} + break; + + case 64: #line 1067 "parser.yxx" -{ + { bool inserted = DCAST(EggVertexUV, egg_stack.back())->_duvs. - insert(EggMorphTexCoord(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphTexCoord((yyvsp[(4) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (8)]._string)); } -; - break;} -case 64: +} + break; + + case 65: #line 1085 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 65: + { + DCAST(EggVertex, egg_stack.back())->set_normal(Normald((yyvsp[(1) - (3)]._number), (yyvsp[(2) - (3)]._number), (yyvsp[(3) - (3)]._number))); +} + break; + + case 66: #line 1089 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals. - insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphNormal((yyvsp[(3) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (8)]._string)); } -; - break;} -case 66: +} + break; + + case 67: #line 1097 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals. - insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphNormal((yyvsp[(4) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (8)]._string)); } -; - break;} -case 67: +} + break; + + case 68: #line 1115 "parser.yxx" -{ - DCAST(EggVertex, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 68: + { + DCAST(EggVertex, egg_stack.back())->set_color(Colorf((yyvsp[(1) - (4)]._number), (yyvsp[(2) - (4)]._number), (yyvsp[(3) - (4)]._number), (yyvsp[(4) - (4)]._number))); +} + break; + + case 69: #line 1119 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas. - insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphColor((yyvsp[(3) - (9)]._string), LVector4f((yyvsp[(5) - (9)]._number), (yyvsp[(6) - (9)]._number), (yyvsp[(7) - (9)]._number), (yyvsp[(8) - (9)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (9)]._string)); } -; - break;} -case 69: +} + break; + + case 70: #line 1127 "parser.yxx" -{ + { bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas. - insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphColor((yyvsp[(4) - (9)]._string), LVector4f((yyvsp[(5) - (9)]._number), (yyvsp[(6) - (9)]._number), (yyvsp[(7) - (9)]._number), (yyvsp[(8) - (9)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (9)]._string)); } -; - break;} -case 70: +} + break; + + case 71: #line 1145 "parser.yxx" -{ - EggGroup *group = new EggGroup(yyvsp[0]._string); + { + EggGroup *group = new EggGroup((yyvsp[(2) - (2)]._string)); egg_stack.push_back(group); -; - break;} -case 71: +} + break; + + case 72: #line 1150 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - yyval._egg = group; + (yyval._egg) = group; egg_stack.pop_back(); if (group->has_name()) { groups[group->get_name()] = group; } Thread::consider_yield(); -; - break;} -case 72: +} + break; + + case 73: #line 1170 "parser.yxx" -{ - EggGroup *group = new EggGroup(yyvsp[0]._string); + { + EggGroup *group = new EggGroup((yyvsp[(2) - (2)]._string)); group->set_group_type(EggGroup::GT_joint); egg_stack.push_back(group); -; - break;} -case 73: +} + break; + + case 74: #line 1176 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 74: +} + break; + + case 75: #line 1191 "parser.yxx" -{ - EggGroup *group = new EggGroup(yyvsp[0]._string); + { + EggGroup *group = new EggGroup((yyvsp[(2) - (2)]._string)); group->set_group_type(EggGroup::GT_instance); egg_stack.push_back(group); -; - break;} -case 75: +} + break; + + case 76: #line 1197 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - yyval._egg = group; + (yyval._egg) = group; egg_stack.pop_back(); if (group->has_name()) { groups[group->get_name()] = group; } -; - break;} -case 77: +} + break; + + case 78: #line 1217 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - unsigned long ulong_value = yyvsp[-1]._ulong; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + unsigned long ulong_value = (yyvsp[(5) - (6)]._ulong); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "fps") == 0) { group->set_switch_fps(value); @@ -2585,13 +3429,14 @@ case 77: } else { eggyywarning("Unknown group scalar " + name); } -; - break;} -case 78: +} + break; + + case 79: #line 1347 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string strval = yyvsp[-1]._string; + string strval = (yyvsp[(4) - (5)]._string); EggGroup::BillboardType f = EggGroup::string_billboard_type(strval); if (f == EggGroup::BT_none) { @@ -2599,38 +3444,42 @@ case 78: } else { group->set_billboard_type(f); } -; - break;} -case 79: +} + break; + + case 80: #line 1359 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - group->set_billboard_center(LPoint3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 80: + group->set_billboard_center(LPoint3d((yyvsp[(4) - (7)]._number), (yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number))); +} + break; + + case 81: #line 1364 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string name = yyvsp[-4]._string; + string name = (yyvsp[(3) - (7)]._string); group->set_collision_name(name); -; - break;} -case 81: +} + break; + + case 82: #line 1371 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - int value = (int)yyvsp[-1]._number; + int value = (int)(yyvsp[(4) - (5)]._number); group->set_dcs_type(value!=0 ? EggGroup::DC_default : EggGroup::DC_none); -; - break;} -case 82: +} + break; + + case 83: #line 1377 "parser.yxx" -{ + { // The special flavor of DCS, with { sync } or { nosync }. EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string strval = yyvsp[-1]._string; + string strval = (yyvsp[(4) - (5)]._string); EggGroup::DCSType f = EggGroup::string_dcs_type(strval); if (f == EggGroup::DC_unspecified) { @@ -2638,23 +3487,25 @@ case 82: } else { group->set_dcs_type(f); } -; - break;} -case 83: +} + break; + + case 84: #line 1390 "parser.yxx" -{ + { // The traditional flavor of DART, with { 0 } or { 1 }. EggGroup *group = DCAST(EggGroup, egg_stack.back()); - int value = (int)yyvsp[-1]._number; + int value = (int)(yyvsp[(4) - (5)]._number); group->set_dart_type(value!=0 ? EggGroup::DT_default : EggGroup::DT_none); -; - break;} -case 84: +} + break; + + case 85: #line 1397 "parser.yxx" -{ + { // The special flavor of DART, with { sync } or { nosync }. EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string strval = yyvsp[-1]._string; + string strval = (yyvsp[(4) - (5)]._string); EggGroup::DartType f = EggGroup::string_dart_type(strval); if (f == EggGroup::DT_none) { @@ -2662,69 +3513,77 @@ case 84: } else { group->set_dart_type(f); } -; - break;} -case 85: +} + break; + + case 86: #line 1410 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - int value = (int)yyvsp[-1]._number; + int value = (int)(yyvsp[(4) - (5)]._number); group->set_switch_flag(value!=0); -; - break;} -case 86: +} + break; + + case 87: #line 1416 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string type = yyvsp[-1]._string; + string type = (yyvsp[(4) - (5)]._string); group->add_object_type(type); -; - break;} -case 87: +} + break; + + case 88: #line 1422 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - int value = (int)yyvsp[-1]._number; + int value = (int)(yyvsp[(4) - (5)]._number); group->set_model_flag(value!=0); -; - break;} -case 88: +} + break; + + case 89: #line 1428 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - group->set_tag(yyvsp[-3]._string, yyvsp[-1]._string); -; - break;} -case 89: + group->set_tag((yyvsp[(3) - (6)]._string), (yyvsp[(5) - (6)]._string)); +} + break; + + case 90: #line 1433 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - int value = (int)yyvsp[-1]._number; + int value = (int)(yyvsp[(4) - (5)]._number); group->set_texlist_flag(value!=0); -; - break;} -case 94: +} + break; + + case 95: #line 1443 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); if (group->get_group_type() != EggGroup::GT_instance) { eggyyerror(" valid only within "); - } else if (yyvsp[-1]._egg != (EggObject *)NULL) { - group->add_group_ref(DCAST(EggGroup, yyvsp[-1]._egg)); + } else if ((yyvsp[(4) - (5)]._egg) != (EggObject *)NULL) { + group->add_group_ref(DCAST(EggGroup, (yyvsp[(4) - (5)]._egg))); } -; - break;} -case 95: +} + break; + + case 96: #line 1452 "parser.yxx" -{ - DCAST(EggGroup, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 96: + { + DCAST(EggGroup, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 97: #line 1466 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string strval = yyvsp[0]._string; + string strval = (yyvsp[(1) - (1)]._string); EggGroup::CollisionSolidType f = EggGroup::string_cs_type(strval); if (f == EggGroup::CST_none) { @@ -2740,13 +3599,14 @@ case 96: group->set_cs_type(f); } } -; - break;} -case 98: +} + break; + + case 99: #line 1497 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - string strval = yyvsp[0]._string; + string strval = (yyvsp[(2) - (2)]._string); EggGroup::CollideFlags f = EggGroup::string_collide_flags(strval); if (f == EggGroup::CF_none) { @@ -2754,113 +3614,128 @@ case 98: } else { group->set_collide_flags(group->get_collide_flags() | f); } -; - break;} -case 99: +} + break; + + case 100: #line 1519 "parser.yxx" -{ + { egg_top_transform = egg_stack.back()->as_transform(); egg_top_transform->clear_transform(); -; - break;} -case 101: +} + break; + + case 102: #line 1535 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); if (group->get_group_type() != EggGroup::GT_joint) { eggyywarning("Unexpected outside of "); } egg_top_transform = &group->modify_default_pose(); egg_top_transform->clear_transform(); -; - break;} -case 116: +} + break; + + case 117: #line 1572 "parser.yxx" -{ - egg_top_transform->add_translate2d(LVector2d(yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 117: + { + egg_top_transform->add_translate2d(LVector2d((yyvsp[(3) - (5)]._number), (yyvsp[(4) - (5)]._number))); +} + break; + + case 118: #line 1579 "parser.yxx" -{ - egg_top_transform->add_translate3d(LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 118: + { + egg_top_transform->add_translate3d(LVector3d((yyvsp[(3) - (6)]._number), (yyvsp[(4) - (6)]._number), (yyvsp[(5) - (6)]._number))); +} + break; + + case 119: #line 1586 "parser.yxx" -{ - egg_top_transform->add_rotate2d(yyvsp[-1]._number); -; - break;} -case 119: + { + egg_top_transform->add_rotate2d((yyvsp[(3) - (4)]._number)); +} + break; + + case 120: #line 1593 "parser.yxx" -{ - egg_top_transform->add_rotx(yyvsp[-1]._number); -; - break;} -case 120: + { + egg_top_transform->add_rotx((yyvsp[(3) - (4)]._number)); +} + break; + + case 121: #line 1600 "parser.yxx" -{ - egg_top_transform->add_roty(yyvsp[-1]._number); -; - break;} -case 121: + { + egg_top_transform->add_roty((yyvsp[(3) - (4)]._number)); +} + break; + + case 122: #line 1607 "parser.yxx" -{ - egg_top_transform->add_rotz(yyvsp[-1]._number); -; - break;} -case 122: + { + egg_top_transform->add_rotz((yyvsp[(3) - (4)]._number)); +} + break; + + case 123: #line 1614 "parser.yxx" -{ - egg_top_transform->add_rotate3d(yyvsp[-4]._number, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 123: + { + egg_top_transform->add_rotate3d((yyvsp[(3) - (7)]._number), LVector3d((yyvsp[(4) - (7)]._number), (yyvsp[(5) - (7)]._number), (yyvsp[(6) - (7)]._number))); +} + break; + + case 124: #line 1621 "parser.yxx" -{ - egg_top_transform->add_scale2d(LVecBase2d(yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 124: + { + egg_top_transform->add_scale2d(LVecBase2d((yyvsp[(3) - (5)]._number), (yyvsp[(4) - (5)]._number))); +} + break; + + case 125: #line 1628 "parser.yxx" -{ - egg_top_transform->add_scale3d(LVecBase3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number)); -; - break;} -case 125: + { + egg_top_transform->add_scale3d(LVecBase3d((yyvsp[(3) - (6)]._number), (yyvsp[(4) - (6)]._number), (yyvsp[(5) - (6)]._number))); +} + break; + + case 126: #line 1635 "parser.yxx" -{ - egg_top_transform->add_uniform_scale(yyvsp[-1]._number); -; - break;} -case 128: + { + egg_top_transform->add_uniform_scale((yyvsp[(3) - (4)]._number)); +} + break; + + case 129: #line 1649 "parser.yxx" -{ + { egg_top_transform->add_matrix3 - (LMatrix3d(yyvsp[-8]._number, yyvsp[-7]._number, yyvsp[-6]._number, - yyvsp[-5]._number, yyvsp[-4]._number, yyvsp[-3]._number, - yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 131: + (LMatrix3d((yyvsp[(1) - (9)]._number), (yyvsp[(2) - (9)]._number), (yyvsp[(3) - (9)]._number), + (yyvsp[(4) - (9)]._number), (yyvsp[(5) - (9)]._number), (yyvsp[(6) - (9)]._number), + (yyvsp[(7) - (9)]._number), (yyvsp[(8) - (9)]._number), (yyvsp[(9) - (9)]._number))); +} + break; + + case 132: #line 1667 "parser.yxx" -{ + { egg_top_transform->add_matrix4 - (LMatrix4d(yyvsp[-15]._number, yyvsp[-14]._number, yyvsp[-13]._number, yyvsp[-12]._number, - yyvsp[-11]._number, yyvsp[-10]._number, yyvsp[-9]._number, yyvsp[-8]._number, - yyvsp[-7]._number, yyvsp[-6]._number, yyvsp[-5]._number, yyvsp[-4]._number, - yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 132: + (LMatrix4d((yyvsp[(1) - (16)]._number), (yyvsp[(2) - (16)]._number), (yyvsp[(3) - (16)]._number), (yyvsp[(4) - (16)]._number), + (yyvsp[(5) - (16)]._number), (yyvsp[(6) - (16)]._number), (yyvsp[(7) - (16)]._number), (yyvsp[(8) - (16)]._number), + (yyvsp[(9) - (16)]._number), (yyvsp[(10) - (16)]._number), (yyvsp[(11) - (16)]._number), (yyvsp[(12) - (16)]._number), + (yyvsp[(13) - (16)]._number), (yyvsp[(14) - (16)]._number), (yyvsp[(15) - (16)]._number), (yyvsp[(16) - (16)]._number))); +} + break; + + case 133: #line 1686 "parser.yxx" -{ - if (yyvsp[-2]._egg != (EggVertexPool *)NULL) { - EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg); + { + if ((yyvsp[(7) - (9)]._egg) != (EggVertexPool *)NULL) { + EggVertexPool *pool = DCAST(EggVertexPool, (yyvsp[(7) - (9)]._egg)); EggGroup *group = DCAST(EggGroup, egg_stack.back()); - PTA_double nums = yyvsp[-6]._number_list; - double membership = yyvsp[-5]._number; + PTA_double nums = (yyvsp[(3) - (9)]._number_list); + double membership = (yyvsp[(4) - (9)]._number); for (int i = 0; i < (int)nums.size(); i++) { int index = (int)nums[i]; @@ -2875,20 +3750,22 @@ case 132: } } } -; - break;} -case 133: +} + break; + + case 134: #line 1719 "parser.yxx" -{ - yyval._number = 1.0; -; - break;} -case 134: + { + (yyval._number) = 1.0; +} + break; + + case 135: #line 1723 "parser.yxx" -{ - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - double result = yyvsp[-5]._number; + { + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + double result = (yyvsp[(1) - (6)]._number); if (cmp_nocase_uh(name, "membership") == 0) { result = value; @@ -2896,146 +3773,165 @@ case 134: eggyywarning("Unknown group vertex scalar " + name); } - yyval._number = result; -; - break;} -case 136: + (yyval._number) = result; +} + break; + + case 137: #line 1760 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - group->set_lod(EggSwitchConditionDistance(yyvsp[-8]._number, yyvsp[-7]._number, LPoint3d(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number))); -; - break;} -case 137: + group->set_lod(EggSwitchConditionDistance((yyvsp[(3) - (11)]._number), (yyvsp[(4) - (11)]._number), LPoint3d((yyvsp[(7) - (11)]._number), (yyvsp[(8) - (11)]._number), (yyvsp[(9) - (11)]._number)))); +} + break; + + case 138: #line 1765 "parser.yxx" -{ + { EggGroup *group = DCAST(EggGroup, egg_stack.back()); - group->set_lod(EggSwitchConditionDistance(yyvsp[-9]._number, yyvsp[-8]._number, LPoint3d(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number), yyvsp[-7]._number)); -; - break;} -case 138: + group->set_lod(EggSwitchConditionDistance((yyvsp[(3) - (12)]._number), (yyvsp[(4) - (12)]._number), LPoint3d((yyvsp[(8) - (12)]._number), (yyvsp[(9) - (12)]._number), (yyvsp[(10) - (12)]._number)), (yyvsp[(5) - (12)]._number))); +} + break; + + case 139: #line 1782 "parser.yxx" -{ - egg_stack.push_back(new EggPolygon(yyvsp[0]._string)); -; - break;} -case 139: + { + egg_stack.push_back(new EggPolygon((yyvsp[(2) - (2)]._string))); +} + break; + + case 140: #line 1786 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 140: +} + break; + + case 141: #line 1801 "parser.yxx" -{ - egg_stack.push_back(new EggTriangleFan(yyvsp[0]._string)); -; - break;} -case 141: + { + egg_stack.push_back(new EggTriangleFan((yyvsp[(2) - (2)]._string))); +} + break; + + case 142: #line 1805 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 142: +} + break; + + case 143: #line 1820 "parser.yxx" -{ - egg_stack.push_back(new EggTriangleStrip(yyvsp[0]._string)); -; - break;} -case 143: + { + egg_stack.push_back(new EggTriangleStrip((yyvsp[(2) - (2)]._string))); +} + break; + + case 144: #line 1824 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 144: +} + break; + + case 145: #line 1839 "parser.yxx" -{ - egg_stack.push_back(new EggPoint(yyvsp[0]._string)); -; - break;} -case 145: + { + egg_stack.push_back(new EggPoint((yyvsp[(2) - (2)]._string))); +} + break; + + case 146: #line 1843 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 146: +} + break; + + case 147: #line 1858 "parser.yxx" -{ - egg_stack.push_back(new EggLine(yyvsp[0]._string)); -; - break;} -case 147: + { + egg_stack.push_back(new EggLine((yyvsp[(2) - (2)]._string))); +} + break; + + case 148: #line 1862 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 148: +} + break; + + case 149: #line 1877 "parser.yxx" -{ - egg_stack.push_back(new EggNurbsSurface(yyvsp[0]._string)); -; - break;} -case 149: + { + egg_stack.push_back(new EggNurbsSurface((yyvsp[(2) - (2)]._string))); +} + break; + + case 150: #line 1881 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 150: +} + break; + + case 151: #line 1896 "parser.yxx" -{ - egg_stack.push_back(new EggNurbsCurve(yyvsp[0]._string)); -; - break;} -case 151: + { + egg_stack.push_back(new EggNurbsCurve((yyvsp[(2) - (2)]._string))); +} + break; + + case 152: #line 1900 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 156: +} + break; + + case 157: #line 1930 "parser.yxx" -{ + { if (!egg_stack.back()->is_of_type(EggCompositePrimitive::get_class_type())) { eggyyerror("Not a composite primitive; components are not allowed here."); } else { PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, egg_stack.back()); - if (yyvsp[-1]._number < 0 || yyvsp[-1]._number >= comp->get_num_components()) { + if ((yyvsp[(3) - (4)]._number) < 0 || (yyvsp[(3) - (4)]._number) >= comp->get_num_components()) { eggyyerror("Invalid component number"); } } // We temporarily add an EggPolygon to the stack, just to receive // the component attributes. egg_stack.push_back(new EggPolygon); -; - break;} -case 157: +} + break; + + case 158: #line 1944 "parser.yxx" -{ + { PT(EggPrimitive) prim = DCAST(EggPrimitive, egg_stack.back()); egg_stack.pop_back(); PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, egg_stack.back()); - comp->set_component((int)yyvsp[-4]._number, prim); -; - break;} -case 165: + comp->set_component((int)(yyvsp[(3) - (7)]._number), prim); +} + break; + + case 166: #line 1958 "parser.yxx" -{ + { EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "alpha") == 0) { EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval); @@ -3092,23 +3988,25 @@ case 165: } else { eggyywarning("Unknown scalar " + name); } -; - break;} -case 177: +} + break; + + case 178: #line 2042 "parser.yxx" -{ - EggNurbsCurve *curve = DCAST(EggNurbsCurve, yyvsp[0]._egg); + { + EggNurbsCurve *curve = DCAST(EggNurbsCurve, (yyvsp[(2) - (2)]._egg)); EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); nurbs->_curves_on_surface.push_back(curve); -; - break;} -case 179: +} + break; + + case 180: #line 2049 "parser.yxx" -{ + { EggNurbsSurface *primitive = DCAST(EggNurbsSurface, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "alpha") == 0) { EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval); @@ -3155,15 +4053,16 @@ case 179: } else { eggyywarning("Unknown scalar " + name); } -; - break;} -case 190: +} + break; + + case 191: #line 2123 "parser.yxx" -{ + { EggNurbsCurve *primitive = DCAST(EggNurbsCurve, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "alpha") == 0) { EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval); @@ -3216,24 +4115,26 @@ case 190: } else { eggyywarning("Unknown scalar " + name); } -; - break;} -case 191: +} + break; + + case 192: #line 2192 "parser.yxx" -{ - if (yyvsp[0]._egg != (EggTexture *)NULL) { - EggTexture *texture = DCAST(EggTexture, yyvsp[0]._egg); + { + if ((yyvsp[(1) - (1)]._egg) != (EggTexture *)NULL) { + EggTexture *texture = DCAST(EggTexture, (yyvsp[(1) - (1)]._egg)); DCAST(EggPrimitive, egg_stack.back())->add_texture(texture); } -; - break;} -case 192: +} + break; + + case 193: #line 2209 "parser.yxx" -{ + { EggTexture *texture = NULL; // Defining a texture on-the-fly. - Filename filename = yyvsp[0]._string; + Filename filename = (yyvsp[(1) - (1)]._string); string tref_name = filename.get_basename(); Textures::iterator vpi = textures.find(tref_name); @@ -3257,84 +4158,93 @@ case 192: nassertr(texture != NULL, 0); DCAST(EggPrimitive, egg_stack.back())->add_texture(texture); -; - break;} -case 193: +} + break; + + case 194: #line 2249 "parser.yxx" -{ - if (yyvsp[0]._egg != (EggMaterial *)NULL) { - EggMaterial *material = DCAST(EggMaterial, yyvsp[0]._egg); + { + if ((yyvsp[(1) - (1)]._egg) != (EggMaterial *)NULL) { + EggMaterial *material = DCAST(EggMaterial, (yyvsp[(1) - (1)]._egg)); DCAST(EggPrimitive, egg_stack.back())->set_material(material); } -; - break;} -case 194: +} + break; + + case 195: #line 2266 "parser.yxx" -{ - DCAST(EggPrimitive, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 195: + { + DCAST(EggPrimitive, egg_stack.back())->set_normal(Normald((yyvsp[(1) - (3)]._number), (yyvsp[(2) - (3)]._number), (yyvsp[(3) - (3)]._number))); +} + break; + + case 196: #line 2270 "parser.yxx" -{ + { bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals. - insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphNormal((yyvsp[(3) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (8)]._string)); } -; - break;} -case 196: +} + break; + + case 197: #line 2278 "parser.yxx" -{ + { bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals. - insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphNormal((yyvsp[(4) - (8)]._string), LVector3d((yyvsp[(5) - (8)]._number), (yyvsp[(6) - (8)]._number), (yyvsp[(7) - (8)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (8)]._string)); } -; - break;} -case 197: +} + break; + + case 198: #line 2296 "parser.yxx" -{ - DCAST(EggPrimitive, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number)); -; - break;} -case 198: + { + DCAST(EggPrimitive, egg_stack.back())->set_color(Colorf((yyvsp[(1) - (4)]._number), (yyvsp[(2) - (4)]._number), (yyvsp[(3) - (4)]._number), (yyvsp[(4) - (4)]._number))); +} + break; + + case 199: #line 2300 "parser.yxx" -{ + { bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas. - insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphColor((yyvsp[(3) - (9)]._string), LVector4f((yyvsp[(5) - (9)]._number), (yyvsp[(6) - (9)]._number), (yyvsp[(7) - (9)]._number), (yyvsp[(8) - (9)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(3) - (9)]._string)); } -; - break;} -case 199: +} + break; + + case 200: #line 2308 "parser.yxx" -{ + { bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas. - insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second; + insert(EggMorphColor((yyvsp[(4) - (9)]._string), LVector4f((yyvsp[(5) - (9)]._number), (yyvsp[(6) - (9)]._number), (yyvsp[(7) - (9)]._number), (yyvsp[(8) - (9)]._number)))).second; if (!inserted) { - eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string); + eggyywarning("Ignoring repeated morph name " + (yyvsp[(4) - (9)]._string)); } -; - break;} -case 200: +} + break; + + case 201: #line 2326 "parser.yxx" -{ + { EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back()); - int value = (int)yyvsp[0]._number; + int value = (int)(yyvsp[(1) - (1)]._number); primitive->set_bface_flag(value!=0); -; - break;} -case 201: +} + break; + + case 202: #line 2342 "parser.yxx" -{ - if (yyvsp[-2]._egg != (EggVertexPool *)NULL) { - EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg); + { + if ((yyvsp[(6) - (8)]._egg) != (EggVertexPool *)NULL) { + EggVertexPool *pool = DCAST(EggVertexPool, (yyvsp[(6) - (8)]._egg)); EggPrimitive *prim = DCAST(EggPrimitive, egg_stack.back()); - PTA_double nums = yyvsp[-5]._number_list; + PTA_double nums = (yyvsp[(3) - (8)]._number_list); for (int i = 0; i < (int)nums.size(); i++) { int index = (int)nums[i]; @@ -3349,203 +4259,227 @@ case 201: } } } -; - break;} -case 202: +} + break; + + case 203: #line 2373 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); - int u_order = (int)yyvsp[-1]._number; - int v_order = (int)yyvsp[0]._number; + int u_order = (int)(yyvsp[(1) - (2)]._number); + int v_order = (int)(yyvsp[(2) - (2)]._number); nurbs->set_u_order(u_order); nurbs->set_v_order(v_order); -; - break;} -case 203: +} + break; + + case 204: #line 2391 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); - PTA_double nums = yyvsp[0]._number_list; + PTA_double nums = (yyvsp[(1) - (1)]._number_list); nurbs->set_num_u_knots(nums.size()); for (int i = 0; i < (int)nums.size(); i++) { nurbs->set_u_knot(i, nums[i]); } -; - break;} -case 204: +} + break; + + case 205: #line 2411 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); - PTA_double nums = yyvsp[0]._number_list; + PTA_double nums = (yyvsp[(1) - (1)]._number_list); nurbs->set_num_v_knots(nums.size()); for (int i = 0; i < (int)nums.size(); i++) { nurbs->set_v_knot(i, nums[i]); } -; - break;} -case 205: +} + break; + + case 206: #line 2431 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); nurbs->_trims.push_back(EggNurbsSurface::Trim()); -; - break;} -case 207: +} + break; + + case 208: #line 2447 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); nassertr(!nurbs->_trims.empty(), 0); nurbs->_trims.back().push_back(EggNurbsSurface::Loop()); -; - break;} -case 208: +} + break; + + case 209: #line 2453 "parser.yxx" -{ + { EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back()); nassertr(!nurbs->_trims.empty(), 0); nassertr(!nurbs->_trims.back().empty(), 0); - EggNurbsCurve *curve = DCAST(EggNurbsCurve, yyvsp[0]._egg); + EggNurbsCurve *curve = DCAST(EggNurbsCurve, (yyvsp[(2) - (2)]._egg)); nurbs->_trims.back().back().push_back(curve); -; - break;} -case 209: +} + break; + + case 210: #line 2472 "parser.yxx" -{ + { EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back()); - int order = (int)yyvsp[0]._number; + int order = (int)(yyvsp[(1) - (1)]._number); nurbs->set_order(order); -; - break;} -case 210: +} + break; + + case 211: #line 2488 "parser.yxx" -{ + { EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back()); - PTA_double nums = yyvsp[0]._number_list; + PTA_double nums = (yyvsp[(1) - (1)]._number_list); nurbs->set_num_knots(nums.size()); for (int i = 0; i < (int)nums.size(); i++) { nurbs->set_knot(i, nums[i]); } -; - break;} -case 211: +} + break; + + case 212: #line 2509 "parser.yxx" -{ - EggTable *table = new EggTable(yyvsp[0]._string); + { + EggTable *table = new EggTable((yyvsp[(2) - (2)]._string)); table->set_table_type(EggTable::TT_table); egg_stack.push_back(table); -; - break;} -case 212: +} + break; + + case 213: #line 2515 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); Thread::consider_yield(); -; - break;} -case 213: +} + break; + + case 214: #line 2532 "parser.yxx" -{ - EggTable *table = new EggTable(yyvsp[0]._string); + { + EggTable *table = new EggTable((yyvsp[(2) - (2)]._string)); table->set_table_type(EggTable::TT_bundle); egg_stack.push_back(table); -; - break;} -case 214: +} + break; + + case 215: #line 2538 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 216: +} + break; + + case 217: #line 2554 "parser.yxx" -{ - DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 217: + { + DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 218: #line 2558 "parser.yxx" -{ - DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 218: + { + DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 219: #line 2562 "parser.yxx" -{ - DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 219: + { + DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 220: #line 2566 "parser.yxx" -{ - DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 220: + { + DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 221: #line 2570 "parser.yxx" -{ - DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 221: + { + DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 222: #line 2585 "parser.yxx" -{ - EggSAnimData *anim_data = new EggSAnimData(yyvsp[0]._string); + { + EggSAnimData *anim_data = new EggSAnimData((yyvsp[(2) - (2)]._string)); egg_stack.push_back(anim_data); -; - break;} -case 222: +} + break; + + case 223: #line 2590 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 224: +} + break; + + case 225: #line 2607 "parser.yxx" -{ + { EggSAnimData *anim_data = DCAST(EggSAnimData, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); if (cmp_nocase_uh(name, "fps") == 0) { anim_data->set_fps(value); } else { eggyywarning("Unsupported S$Anim scalar: " + name); } -; - break;} -case 225: +} + break; + + case 226: #line 2619 "parser.yxx" -{ - DCAST(EggSAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list); -; - break;} -case 226: + { + DCAST(EggSAnimData, egg_stack.back())->set_data((yyvsp[(4) - (5)]._number_list)); +} + break; + + case 227: #line 2633 "parser.yxx" -{ - EggXfmAnimData *anim_data = new EggXfmAnimData(yyvsp[0]._string); + { + EggXfmAnimData *anim_data = new EggXfmAnimData((yyvsp[(2) - (2)]._string)); egg_stack.push_back(anim_data); -; - break;} -case 227: +} + break; + + case 228: #line 2638 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 229: +} + break; + + case 230: #line 2655 "parser.yxx" -{ + { EggXfmAnimData *anim_data = DCAST(EggXfmAnimData, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "fps") == 0) { anim_data->set_fps(value); @@ -3556,35 +4490,39 @@ case 229: } else { eggyywarning("Unsupported Xfm$Anim scalar: " + name); } -; - break;} -case 230: +} + break; + + case 231: #line 2672 "parser.yxx" -{ - DCAST(EggXfmAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list); -; - break;} -case 231: + { + DCAST(EggXfmAnimData, egg_stack.back())->set_data((yyvsp[(4) - (5)]._number_list)); +} + break; + + case 232: #line 2686 "parser.yxx" -{ - EggXfmSAnim *anim_group = new EggXfmSAnim(yyvsp[0]._string); + { + EggXfmSAnim *anim_group = new EggXfmSAnim((yyvsp[(2) - (2)]._string)); egg_stack.push_back(anim_group); -; - break;} -case 232: +} + break; + + case 233: #line 2691 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 234: +} + break; + + case 235: #line 2708 "parser.yxx" -{ + { EggXfmSAnim *anim_group = DCAST(EggXfmSAnim, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; - string strval = yyvsp[-1]._string; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); + string strval = (yyvsp[(5) - (6)]._string); if (cmp_nocase_uh(name, "fps") == 0) { anim_group->set_fps(value); @@ -3593,34 +4531,38 @@ case 234: } else { eggyywarning("Unsupported Xfm$Anim_S$ scalar: " + name); } -; - break;} -case 235: +} + break; + + case 236: #line 2723 "parser.yxx" -{ - DCAST(EggXfmSAnim, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg)); -; - break;} -case 236: + { + DCAST(EggXfmSAnim, egg_stack.back())->add_child(DCAST(EggNode, (yyvsp[(2) - (2)]._egg))); +} + break; + + case 237: #line 2738 "parser.yxx" -{ - EggAnimPreload *anim_preload = new EggAnimPreload(yyvsp[0]._string); + { + EggAnimPreload *anim_preload = new EggAnimPreload((yyvsp[(2) - (2)]._string)); egg_stack.push_back(anim_preload); -; - break;} -case 237: +} + break; + + case 238: #line 2743 "parser.yxx" -{ - yyval._egg = egg_stack.back(); + { + (yyval._egg) = egg_stack.back(); egg_stack.pop_back(); -; - break;} -case 239: +} + break; + + case 240: #line 2760 "parser.yxx" -{ + { EggAnimPreload *anim_preload = DCAST(EggAnimPreload, egg_stack.back()); - string name = yyvsp[-3]._string; - double value = yyvsp[-1]._number; + string name = (yyvsp[(3) - (6)]._string); + double value = (yyvsp[(5) - (6)]._number); if (cmp_nocase_uh(name, "fps") == 0) { anim_preload->set_fps(value); @@ -3629,62 +4571,69 @@ case 239: } else { eggyywarning("Unsupported AnimPreload scalar: " + name); } -; - break;} -case 240: +} + break; + + case 241: #line 2784 "parser.yxx" -{ - yyval._number_list = PTA_double::empty_array(0); -; - break;} -case 241: + { + (yyval._number_list) = PTA_double::empty_array(0); +} + break; + + case 242: #line 2788 "parser.yxx" -{ - yyval._number_list.push_back((double)yyvsp[0]._number); -; - break;} -case 242: + { + (yyval._number_list).push_back((double)(yyvsp[(2) - (2)]._number)); +} + break; + + case 243: #line 2802 "parser.yxx" -{ - yyval._number_list = PTA_double::empty_array(0); -; - break;} -case 243: + { + (yyval._number_list) = PTA_double::empty_array(0); +} + break; + + case 244: #line 2806 "parser.yxx" -{ - yyval._number_list.push_back(yyvsp[0]._number); -; - break;} -case 244: + { + (yyval._number_list).push_back((yyvsp[(2) - (2)]._number)); +} + break; + + case 245: #line 2820 "parser.yxx" -{ - string name = yyvsp[0]._string; + { + string name = (yyvsp[(1) - (1)]._string); Textures::iterator vpi = textures.find(name); if (vpi == textures.end()) { eggyyerror("Unknown texture " + name); - yyval._egg = PT(EggObject)(); + (yyval._egg) = PT(EggObject)(); } else { - yyval._egg = (*vpi).second; + (yyval._egg) = (*vpi).second; } -; - break;} -case 245: +} + break; + + case 246: #line 2841 "parser.yxx" -{ - string name = yyvsp[0]._string; + { + string name = (yyvsp[(1) - (1)]._string); Materials::iterator vpi = materials.find(name); if (vpi == materials.end()) { eggyyerror("Unknown material " + name); - yyval._egg = PT(EggObject)(); + (yyval._egg) = PT(EggObject)(); } else { - yyval._egg = (*vpi).second; + (yyval._egg) = (*vpi).second; } -; - break;} -case 246: +} + break; + + case 247: #line 2862 "parser.yxx" -{ - string name = yyvsp[0]._string; + { + string name = (yyvsp[(1) - (1)]._string); VertexPools::iterator vpi = vertex_pools.find(name); if (vpi == vertex_pools.end()) { // This will become a forward reference. @@ -3692,347 +4641,358 @@ case 246: // The egg syntax starts counting at 1 by convention. pool->set_highest_index(0); vertex_pools[name] = pool; - yyval._egg = pool; + (yyval._egg) = pool; } else { - yyval._egg = (*vpi).second; + (yyval._egg) = (*vpi).second; } -; - break;} -case 247: +} + break; + + case 248: #line 2887 "parser.yxx" -{ - string name = yyvsp[0]._string; + { + string name = (yyvsp[(1) - (1)]._string); Groups::iterator vpi = groups.find(name); if (vpi == groups.end()) { eggyyerror("Unknown group " + name); - yyval._egg = PT(EggObject)(); + (yyval._egg) = PT(EggObject)(); } else { - yyval._egg = (*vpi).second; + (yyval._egg) = (*vpi).second; } -; - break;} -case 248: -#line 2908 "parser.yxx" -{ - eggyyerror("Name required."); - yyval._string = ""; -; - break;} -case 251: -#line 2937 "parser.yxx" -{ - eggyyerror("String required."); - yyval._string = ""; -; - break;} -case 253: -#line 2953 "parser.yxx" -{ - yyval._string = ""; -; - break;} -case 255: -#line 2971 "parser.yxx" -{ - yyval._string = yyvsp[0]._string; -; - break;} -case 256: -#line 2975 "parser.yxx" -{ - yyval._string = yyvsp[0]._string; -; - break;} -case 258: -#line 2992 "parser.yxx" -{ - yyval._string = ""; -; - break;} -case 259: -#line 2996 "parser.yxx" -{ - yyval._string = yyvsp[0]._string; -; - break;} -case 260: -#line 3012 "parser.yxx" -{ - yyval._string = yyvsp[0]._string; -; - break;} -case 261: -#line 3016 "parser.yxx" -{ - yyval._string = yyvsp[-1]._string + "\n" + yyvsp[0]._string; -; - break;} -case 263: -#line 3031 "parser.yxx" -{ - yyval._number = yyvsp[0]._ulong; -; - break;} -case 264: -#line 3046 "parser.yxx" -{ - yyval._number = yyvsp[0]._number; - yyval._ulong = (unsigned long)yyvsp[0]._number; - yyval._string = yyvsp[0]._string; -; - break;} -case 265: -#line 3052 "parser.yxx" -{ - yyval._number = yyvsp[0]._ulong; - yyval._ulong = yyvsp[0]._ulong; - yyval._string = yyvsp[0]._string; -; - break;} -case 266: -#line 3058 "parser.yxx" -{ - yyval._number = 0.0; - yyval._ulong = 0; - yyval._string = yyvsp[0]._string; -; - break;} -case 267: -#line 3075 "parser.yxx" -{ - int i = (int)yyvsp[0]._number; - if ((double)i != yyvsp[0]._number) { - eggyywarning("Integer expected."); - yyval._number = (double)i; - } -; - break;} -case 268: -#line 3083 "parser.yxx" -{ - yyval._number = yyvsp[0]._ulong; -; - break;} } - /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif + break; -#if YYDEBUG != 0 - if (yydebug) + case 249: +#line 2908 "parser.yxx" { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); + eggyyerror("Name required."); + (yyval._string) = ""; +} + break; + + case 252: +#line 2937 "parser.yxx" + { + eggyyerror("String required."); + (yyval._string) = ""; +} + break; + + case 254: +#line 2953 "parser.yxx" + { + (yyval._string) = ""; +} + break; + + case 256: +#line 2971 "parser.yxx" + { + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 257: +#line 2975 "parser.yxx" + { + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 259: +#line 2992 "parser.yxx" + { + (yyval._string) = ""; +} + break; + + case 260: +#line 2996 "parser.yxx" + { + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 261: +#line 3012 "parser.yxx" + { + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 262: +#line 3016 "parser.yxx" + { + (yyval._string) = (yyvsp[(1) - (2)]._string) + "\n" + (yyvsp[(2) - (2)]._string); +} + break; + + case 264: +#line 3031 "parser.yxx" + { + (yyval._number) = (yyvsp[(1) - (1)]._ulong); +} + break; + + case 265: +#line 3046 "parser.yxx" + { + (yyval._number) = (yyvsp[(1) - (1)]._number); + (yyval._ulong) = (unsigned long)(yyvsp[(1) - (1)]._number); + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 266: +#line 3052 "parser.yxx" + { + (yyval._number) = (yyvsp[(1) - (1)]._ulong); + (yyval._ulong) = (yyvsp[(1) - (1)]._ulong); + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 267: +#line 3058 "parser.yxx" + { + (yyval._number) = 0.0; + (yyval._ulong) = 0; + (yyval._string) = (yyvsp[(1) - (1)]._string); +} + break; + + case 268: +#line 3075 "parser.yxx" + { + int i = (int)(yyvsp[(1) - (1)]._number); + if ((double)i != (yyvsp[(1) - (1)]._number)) { + eggyywarning("Integer expected."); + (yyval._number) = (double)i; + } +} + break; + + case 269: +#line 3083 "parser.yxx" + { + (yyval._number) = (yyvsp[(1) - (1)]._ulong); +} + break; + + +/* Line 1267 of yacc.c. */ +#line 4785 "y.tab.c" + default: break; } -#endif + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; -yyerrlab: /* here on detecting error */ - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ + if (yyerrstatus == 3) { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ - /* return failure if at end of input */ - if (yychar == YYEOF) + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) YYABORT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - yychar = YYEMPTY; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - if (yyn == YYFINAL) YYACCEPT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); -#endif - } - return 0; - yyabortlab: - /* YYABORT comes here. */ - if (yyfree_stacks) - { - free (yyss); - free (yyvs); -#ifdef YYLSP_NEEDED - free (yyls); +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ #endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); } - return 1; +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } -#line 3090 "parser.yxx" + + + diff --git a/panda/src/egg/parser.h.prebuilt b/panda/src/egg/parser.h.prebuilt index b191f2ee40..bcf13255df 100644 --- a/panda/src/egg/parser.h.prebuilt +++ b/panda/src/egg/parser.h.prebuilt @@ -1,90 +1,231 @@ -#define EGG_NUMBER 257 -#define EGG_ULONG 258 -#define EGG_STRING 259 -#define ANIMPRELOAD 260 -#define BEZIERCURVE 261 -#define BFACE 262 -#define BILLBOARD 263 -#define BILLBOARDCENTER 264 -#define BINORMAL 265 -#define BUNDLE 266 -#define CLOSED 267 -#define COLLIDE 268 -#define COMMENT 269 -#define COMPONENT 270 -#define COORDSYSTEM 271 -#define CV 272 -#define DART 273 -#define DNORMAL 274 -#define DRGBA 275 -#define DUV 276 -#define DXYZ 277 -#define DCS 278 -#define DISTANCE 279 -#define DTREF 280 -#define DYNAMICVERTEXPOOL 281 -#define EXTERNAL_FILE 282 -#define GROUP 283 -#define DEFAULTPOSE 284 -#define JOINT 285 -#define KNOTS 286 -#define INCLUDE 287 -#define INSTANCE 288 -#define LINE 289 -#define LOOP 290 -#define MATERIAL 291 -#define MATRIX3 292 -#define MATRIX4 293 -#define MODEL 294 -#define MREF 295 -#define NORMAL 296 -#define NURBSCURVE 297 -#define NURBSSURFACE 298 -#define OBJECTTYPE 299 -#define ORDER 300 -#define OUTTANGENT 301 -#define POINTLIGHT 302 -#define POLYGON 303 -#define REF 304 -#define RGBA 305 -#define ROTATE 306 -#define ROTX 307 -#define ROTY 308 -#define ROTZ 309 -#define SANIM 310 -#define SCALAR 311 -#define SCALE 312 -#define SEQUENCE 313 -#define SHADING 314 -#define SWITCH 315 -#define SWITCHCONDITION 316 -#define TABLE 317 -#define TABLE_V 318 -#define TAG 319 -#define TANGENT 320 -#define TEXLIST 321 -#define TEXTURE 322 -#define TLENGTHS 323 -#define TRANSFORM 324 -#define TRANSLATE 325 -#define TREF 326 -#define TRIANGLEFAN 327 -#define TRIANGLESTRIP 328 -#define TRIM 329 -#define TXT 330 -#define UKNOTS 331 -#define UV 332 -#define VKNOTS 333 -#define VERTEX 334 -#define VERTEXANIM 335 -#define VERTEXPOOL 336 -#define VERTEXREF 337 -#define XFMANIM 338 -#define XFMSANIM 339 -#define START_EGG 340 -#define START_GROUP_BODY 341 -#define START_TEXTURE_BODY 342 -#define START_PRIMITIVE_BODY 343 +/* A Bison parser, made by GNU Bison 2.3. */ +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EGG_NUMBER = 258, + EGG_ULONG = 259, + EGG_STRING = 260, + ANIMPRELOAD = 261, + BEZIERCURVE = 262, + BFACE = 263, + BILLBOARD = 264, + BILLBOARDCENTER = 265, + BINORMAL = 266, + BUNDLE = 267, + CLOSED = 268, + COLLIDE = 269, + COMMENT = 270, + COMPONENT = 271, + COORDSYSTEM = 272, + CV = 273, + DART = 274, + DNORMAL = 275, + DRGBA = 276, + DUV = 277, + DXYZ = 278, + DCS = 279, + DISTANCE = 280, + DTREF = 281, + DYNAMICVERTEXPOOL = 282, + EXTERNAL_FILE = 283, + GROUP = 284, + DEFAULTPOSE = 285, + JOINT = 286, + KNOTS = 287, + INCLUDE = 288, + INSTANCE = 289, + LINE = 290, + LOOP = 291, + MATERIAL = 292, + MATRIX3 = 293, + MATRIX4 = 294, + MODEL = 295, + MREF = 296, + NORMAL = 297, + NURBSCURVE = 298, + NURBSSURFACE = 299, + OBJECTTYPE = 300, + ORDER = 301, + OUTTANGENT = 302, + POINTLIGHT = 303, + POLYGON = 304, + REF = 305, + RGBA = 306, + ROTATE = 307, + ROTX = 308, + ROTY = 309, + ROTZ = 310, + SANIM = 311, + SCALAR = 312, + SCALE = 313, + SEQUENCE = 314, + SHADING = 315, + SWITCH = 316, + SWITCHCONDITION = 317, + TABLE = 318, + TABLE_V = 319, + TAG = 320, + TANGENT = 321, + TEXLIST = 322, + TEXTURE = 323, + TLENGTHS = 324, + TRANSFORM = 325, + TRANSLATE = 326, + TREF = 327, + TRIANGLEFAN = 328, + TRIANGLESTRIP = 329, + TRIM = 330, + TXT = 331, + UKNOTS = 332, + UV = 333, + VKNOTS = 334, + VERTEX = 335, + VERTEXANIM = 336, + VERTEXPOOL = 337, + VERTEXREF = 338, + XFMANIM = 339, + XFMSANIM = 340, + START_EGG = 341, + START_GROUP_BODY = 342, + START_TEXTURE_BODY = 343, + START_PRIMITIVE_BODY = 344 + }; +#endif +/* Tokens. */ +#define EGG_NUMBER 258 +#define EGG_ULONG 259 +#define EGG_STRING 260 +#define ANIMPRELOAD 261 +#define BEZIERCURVE 262 +#define BFACE 263 +#define BILLBOARD 264 +#define BILLBOARDCENTER 265 +#define BINORMAL 266 +#define BUNDLE 267 +#define CLOSED 268 +#define COLLIDE 269 +#define COMMENT 270 +#define COMPONENT 271 +#define COORDSYSTEM 272 +#define CV 273 +#define DART 274 +#define DNORMAL 275 +#define DRGBA 276 +#define DUV 277 +#define DXYZ 278 +#define DCS 279 +#define DISTANCE 280 +#define DTREF 281 +#define DYNAMICVERTEXPOOL 282 +#define EXTERNAL_FILE 283 +#define GROUP 284 +#define DEFAULTPOSE 285 +#define JOINT 286 +#define KNOTS 287 +#define INCLUDE 288 +#define INSTANCE 289 +#define LINE 290 +#define LOOP 291 +#define MATERIAL 292 +#define MATRIX3 293 +#define MATRIX4 294 +#define MODEL 295 +#define MREF 296 +#define NORMAL 297 +#define NURBSCURVE 298 +#define NURBSSURFACE 299 +#define OBJECTTYPE 300 +#define ORDER 301 +#define OUTTANGENT 302 +#define POINTLIGHT 303 +#define POLYGON 304 +#define REF 305 +#define RGBA 306 +#define ROTATE 307 +#define ROTX 308 +#define ROTY 309 +#define ROTZ 310 +#define SANIM 311 +#define SCALAR 312 +#define SCALE 313 +#define SEQUENCE 314 +#define SHADING 315 +#define SWITCH 316 +#define SWITCHCONDITION 317 +#define TABLE 318 +#define TABLE_V 319 +#define TAG 320 +#define TANGENT 321 +#define TEXLIST 322 +#define TEXTURE 323 +#define TLENGTHS 324 +#define TRANSFORM 325 +#define TRANSLATE 326 +#define TREF 327 +#define TRIANGLEFAN 328 +#define TRIANGLESTRIP 329 +#define TRIM 330 +#define TXT 331 +#define UKNOTS 332 +#define UV 333 +#define VKNOTS 334 +#define VERTEX 335 +#define VERTEXANIM 336 +#define VERTEXPOOL 337 +#define VERTEXREF 338 +#define XFMANIM 339 +#define XFMSANIM 340 +#define START_EGG 341 +#define START_GROUP_BODY 342 +#define START_TEXTURE_BODY 343 +#define START_PRIMITIVE_BODY 344 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif extern YYSTYPE eggyylval; + diff --git a/panda/src/linmath/test_math.cxx b/panda/src/linmath/test_math.cxx index 4b23c3a737..891bdc2bdb 100644 --- a/panda/src/linmath/test_math.cxx +++ b/panda/src/linmath/test_math.cxx @@ -15,6 +15,7 @@ #include "luse.h" #include "lmatrix.h" #include "compose_matrix.h" +#include "pstrtod.h" #include "pnotify.h" #include @@ -115,10 +116,10 @@ int main(int argc, char *argv[]) { LVecBase3f scale(1.0f, 1.0f, 1.0f); if (argc > 3) { - hpr.set(atof(argv[1]), atof(argv[2]), atof(argv[3])); + hpr.set(patof(argv[1]), patof(argv[2]), patof(argv[3])); } if (argc > 6) { - scale.set(atof(argv[4]), atof(argv[5]), atof(argv[6])); + scale.set(patof(argv[4]), patof(argv[5]), patof(argv[6])); } cerr << "< hpr = " << hpr << " scale = " << scale << "\n"; diff --git a/panda/src/net/datagram_ui.cxx b/panda/src/net/datagram_ui.cxx index d25215fcc8..9ca5bf3515 100644 --- a/panda/src/net/datagram_ui.cxx +++ b/panda/src/net/datagram_ui.cxx @@ -14,6 +14,7 @@ #include "datagram_ui.h" #include "datagramIterator.h" +#include "pstrtod.h" #include #include @@ -57,7 +58,7 @@ operator >> (istream &in, NetDatagram &datagram) { while (p < line.length() && isdigit(line[p])) { p++; } - double num = atof(line.substr(start, p - start).c_str()); + double num = patof(line.substr(start, p - start).c_str()); datagram.add_int8(DE_float64); datagram.add_float64(num); } else { diff --git a/panda/src/pipeline/test_diners.cxx b/panda/src/pipeline/test_diners.cxx index 1ffe559a8d..c29dc3eb02 100644 --- a/panda/src/pipeline/test_diners.cxx +++ b/panda/src/pipeline/test_diners.cxx @@ -23,6 +23,7 @@ #include "pointerTo.h" #include "referenceCount.h" #include "trueClock.h" +#include "pstrtod.h" #ifdef WIN32_VC // Under Windows, the rand() function seems to return a sequence @@ -133,7 +134,7 @@ main(int argc, char *argv[]) { double has_run_time = false; double run_time = 0.0; if (argc > 1) { - run_time = atof(argv[1]); + run_time = patof(argv[1]); cerr << "Running for " << run_time << " seconds\n"; has_run_time = true; } else { diff --git a/panda/src/putil/string_utils.cxx b/panda/src/putil/string_utils.cxx index e15c2ad31a..7a3bea8b4f 100644 --- a/panda/src/putil/string_utils.cxx +++ b/panda/src/putil/string_utils.cxx @@ -14,6 +14,7 @@ #include "string_utils.h" #include "textEncoder.h" +#include "pstrtod.h" #include @@ -370,7 +371,7 @@ double string_to_double(const string &str, string &tail) { const char *nptr = str.c_str(); char *endptr; - double result = strtod(nptr, &endptr); + double result = pstrtod(nptr, &endptr); tail = endptr; return result; } diff --git a/pandatool/src/vrml/vrmlLexer.cxx.prebuilt b/pandatool/src/vrml/vrmlLexer.cxx.prebuilt index 1b2e665a3a..9574f282f2 100644 --- a/pandatool/src/vrml/vrmlLexer.cxx.prebuilt +++ b/pandatool/src/vrml/vrmlLexer.cxx.prebuilt @@ -1,8 +1,13 @@ +#line 2 "lex.yy.c" + +#line 4 "lex.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + #define yy_create_buffer vrmlyy_create_buffer #define yy_delete_buffer vrmlyy_delete_buffer -#define yy_scan_buffer vrmlyy_scan_buffer -#define yy_scan_string vrmlyy_scan_string -#define yy_scan_bytes vrmlyy_scan_bytes #define yy_flex_debug vrmlyy_flex_debug #define yy_init_buffer vrmlyy_init_buffer #define yy_flush_buffer vrmlyy_flush_buffer @@ -11,75 +16,117 @@ #define yyin vrmlyyin #define yyleng vrmlyyleng #define yylex vrmlyylex +#define yylineno vrmlyylineno #define yyout vrmlyyout #define yyrestart vrmlyyrestart #define yytext vrmlyytext #define yywrap vrmlyywrap - -#line 20 "lex.yy.c" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ +#define yyalloc vrmlyyalloc +#define yyrealloc vrmlyyrealloc +#define yyfree vrmlyyfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#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 - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - +#include +#include #include -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS +/* end standard C headers. */ + +/* 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 + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#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 /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) -#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__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 @@ -94,71 +141,70 @@ * 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 vrmlyyrestart(vrmlyyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#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; +extern int vrmlyyleng; + +extern FILE *vrmlyyin, *vrmlyyout; #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; \ + /* Undo effects of setting up vrmlyytext. */ \ + 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_DO_BEFORE_ACTION; /* set up yytext again */ \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up vrmlyytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; +#define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -195,12 +241,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 @@ -210,99 +260,133 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. + * (via vrmlyyrestart()), so that the user can continue scanning by + * just pointing vrmlyyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 - }; -static YY_BUFFER_STATE yy_current_buffer = 0; + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* 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. */ +/* yy_hold_char holds the character lost when vrmlyytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +int vrmlyyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... +/* Flag which is used to allow vrmlyywrap()'s to do buffer switches + * instead of setting up a fresh vrmlyyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void vrmlyyrestart (FILE *input_file ); +void vrmlyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE vrmlyy_create_buffer (FILE *file,int size ); +void vrmlyy_delete_buffer (YY_BUFFER_STATE b ); +void vrmlyy_flush_buffer (YY_BUFFER_STATE b ); +void vrmlyypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void vrmlyypop_buffer_state (void ); -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 ) +static void vrmlyyensure_buffer_stack (void ); +static void vrmlyy_load_buffer_state (void ); +static void vrmlyy_init_buffer (YY_BUFFER_STATE b,FILE *file ); -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 )); +#define YY_FLUSH_BUFFER vrmlyy_flush_buffer(YY_CURRENT_BUFFER ) -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 * )); +YY_BUFFER_STATE vrmlyy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE vrmlyy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE vrmlyy_scan_bytes (yyconst char *bytes,int len ); -#define yy_new_buffer yy_create_buffer +void *vrmlyyalloc (yy_size_t ); +void *vrmlyyrealloc (void *,yy_size_t ); +void vrmlyyfree (void * ); + +#define yy_new_buffer vrmlyy_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 ){ \ + vrmlyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + vrmlyy_create_buffer(vrmlyyin,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 ){\ + vrmlyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + vrmlyy_create_buffer(vrmlyyin,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) typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +FILE *vrmlyyin = (FILE *) 0, *vrmlyyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int vrmlyylineno; + +int vrmlyylineno = 1; + +extern char *vrmlyytext; +#define yytext_ptr vrmlyytext + +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. + * corresponding action - sets up vrmlyytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + vrmlyyleng = (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 48 #define YY_END_OF_BUFFER 49 -static yyconst short int yy_accept[977] = +/* 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_accept[977] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -413,7 +497,7 @@ static yyconst short int yy_accept[977] = 1, 1, 1, 1, 1, 0 } ; -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, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -445,7 +529,7 @@ static yyconst int yy_ec[256] = 6, 6, 6, 6, 6 } ; -static yyconst int yy_meta[49] = +static yyconst flex_int32_t yy_meta[49] = { 0, 1, 2, 3, 2, 2, 4, 5, 6, 1, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, @@ -454,7 +538,7 @@ static yyconst int yy_meta[49] = 4, 4, 4, 4, 4, 4, 4, 4 } ; -static yyconst short int yy_base[1120] = +static yyconst flex_int16_t yy_base[1120] = { 0, 0, 7, 15, 0, 62, 90, 118, 0, 61, 74, 89, 102, 130, 136, 142, 148, 162, 169, 174, 181, @@ -581,7 +665,7 @@ static yyconst short int yy_base[1120] = 8559, 8567, 8575, 8583, 8591, 8599, 8607, 8615, 8623 } ; -static yyconst short int yy_def[1120] = +static yyconst flex_int16_t yy_def[1120] = { 0, 977, 977, 976, 3, 977, 977, 977, 7, 7, 7, 7, 7, 7, 7, 7, 7, 978, 978, 7, 7, @@ -708,7 +792,7 @@ static yyconst short int yy_def[1120] = 976, 976, 976, 976, 976, 976, 976, 976, 976 } ; -static yyconst short int yy_nxt[8681] = +static yyconst flex_int16_t yy_nxt[8681] = { 0, 976, 47, 48, 47, 47, 976, 463, 49, 47, 48, 47, 47, 131, 231, 49, 46, 47, 48, 47, 47, @@ -1666,7 +1750,7 @@ static yyconst short int yy_nxt[8681] = 976, 976, 976, 976, 976, 976, 976, 976, 976, 976 } ; -static yyconst short int yy_chk[8681] = +static yyconst flex_int16_t yy_chk[8681] = { 0, 0, 1, 1, 1, 1, 0, 1039, 1, 2, 2, 2, 2, 122, 122, 2, 3, 3, 3, 3, 3, @@ -2627,6 +2711,9 @@ static yyconst short int yy_chk[8681] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int vrmlyy_flex_debug; +int vrmlyy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -2634,9 +2721,8 @@ static char *yy_last_accepting_cpos; #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +char *vrmlyytext; #line 1 "vrmlLexer.lxx" -#define INITIAL 0 /* // Filename: vrmlLexer.lxx // Created by: drose (01Oct04) @@ -2666,6 +2752,7 @@ char *yytext; #include "vrmlNode.h" #include "vrmlParser.h" #include "pnotify.h" +#include "pstrtod.h" static int yyinput(void); // declared by flex. extern "C" int vrmlyywrap(); @@ -2794,49 +2881,28 @@ input_chars(char *buffer, int &result, int max_size) { #define YY_INPUT(buffer, result, max_size) input_chars(buffer, result, max_size) int extract_int() { - return strtol(yytext, NULL, 0); + return strtol(vrmlyytext, NULL, 0); } double extract_float() { - return atof(yytext); + return patof(vrmlyytext); } void extract_vec(double vec[], int num_elements) { - char *p = yytext; + char *p = vrmlyytext; for (int i = 0; i < num_elements; i++) { - vec[i] = strtod(p, &p); + vec[i] = pstrtod(p, &p); } } /* Normal state: parsing nodes. The initial start state is used */ /* only to recognize the VRML header. */ -#define NODE 1 /* Start tokens for all of the field types, */ /* except for MFNode and SFNode, which are almost completely handled */ /* by the parser: */ -#define SFB 2 -#define SFC 3 -#define SFF 4 -#define SFIMG 5 -#define SFI 6 -#define SFR 7 -#define SFS 8 -#define SFT 9 -#define SFV2 10 -#define SFV3 11 -#define MFC 12 -#define MFF 13 -#define MFI 14 -#define MFR 15 -#define MFS 16 -#define MFV2 17 -#define MFV3 18 -#define IN_SFS 19 -#define IN_MFS 20 -#define IN_SFIMG 21 /* Big hairy expression for floating point numbers: */ /* Ints are decimal or hex (0x##): */ @@ -2850,7 +2916,72 @@ void extract_vec(double vec[], int num_elements) { /* Legal other characters in an identifier */ /*idRestChar ([^\x00-\x20\x22\x23\x27\x2b-\x2e\x5b-\x5d\x7b\x7d])*/ /* Allow hyphen (0x2d) in identifiers. */ -#line 2855 "lex.yy.c" +#line 2920 "lex.yy.c" + +#define INITIAL 0 +#define NODE 1 +#define SFB 2 +#define SFC 3 +#define SFF 4 +#define SFIMG 5 +#define SFI 6 +#define SFR 7 +#define SFS 8 +#define SFT 9 +#define SFV2 10 +#define SFV3 11 +#define MFC 12 +#define MFF 13 +#define MFI 14 +#define MFR 15 +#define MFS 16 +#define MFV2 17 +#define MFV3 18 +#define IN_SFS 19 +#define IN_MFS 20 +#define IN_SFIMG 21 + +#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. + */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int vrmlyylex_destroy (void ); + +int vrmlyyget_debug (void ); + +void vrmlyyset_debug (int debug_flag ); + +YY_EXTRA_TYPE vrmlyyget_extra (void ); + +void vrmlyyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *vrmlyyget_in (void ); + +void vrmlyyset_in (FILE * in_str ); + +FILE *vrmlyyget_out (void ); + +void vrmlyyset_out (FILE * out_str ); + +int vrmlyyget_leng (void ); + +char *vrmlyyget_text (void ); + +int vrmlyyget_lineno (void ); + +void vrmlyyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -2858,65 +2989,30 @@ void extract_vec(double vec[], int num_elements) { #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int vrmlyywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int vrmlyywrap (void ); #endif #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 )); +static int yyinput (void ); #else -static int input YY_PROTO(( void )); -#endif +static int input (void ); #endif -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -2925,12 +3021,11 @@ 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(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( vrmlyytext, vrmlyyleng, 1, vrmlyyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -2938,21 +3033,35 @@ 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 = '*'; \ + int n; \ for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( vrmlyyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ + if ( c == EOF && ferror( vrmlyyin ) ) \ 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, vrmlyyin))==0 && ferror(vrmlyyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(vrmlyyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -2973,14 +3082,20 @@ 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 -/* Code executed at the beginning of each rule, after yytext and yyleng +extern int vrmlyylex (void); + +#define YY_DECL int vrmlyylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after vrmlyytext and vrmlyyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -2995,13 +3110,15 @@ YY_MALLOC_DECL #define YY_RULE_SETUP \ 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 = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; - -#line 209 "vrmlLexer.lxx" + +#line 210 "vrmlLexer.lxx" @@ -3049,53 +3166,55 @@ YY_DECL /* This is more complicated than they really need to be because */ /* I was ambitious and made the whitespace-matching rule aggressive */ -#line 3054 "lex.yy.c" +#line 3171 "lex.yy.c" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! vrmlyyin ) + vrmlyyin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! vrmlyyout ) + vrmlyyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + vrmlyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + vrmlyy_create_buffer(vrmlyyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + vrmlyy_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; + /* Support of vrmlyytext. */ + *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_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -3112,29 +3231,28 @@ yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: +/* rule 1 can match eol */ YY_RULE_SETUP -#line 256 "vrmlLexer.lxx" +#line 257 "vrmlLexer.lxx" { BEGIN NODE; } @@ -3144,70 +3262,70 @@ YY_RULE_SETUP /* or when parsing the contents of SFNode or MFNode fields. */ case 2: YY_RULE_SETUP -#line 263 "vrmlLexer.lxx" +#line 264 "vrmlLexer.lxx" { return PROTO; } YY_BREAK case 3: YY_RULE_SETUP -#line 264 "vrmlLexer.lxx" +#line 265 "vrmlLexer.lxx" { return EXTERNPROTO; } YY_BREAK case 4: YY_RULE_SETUP -#line 265 "vrmlLexer.lxx" +#line 266 "vrmlLexer.lxx" { return DEF; } YY_BREAK case 5: YY_RULE_SETUP -#line 266 "vrmlLexer.lxx" +#line 267 "vrmlLexer.lxx" { return USE; } YY_BREAK case 6: YY_RULE_SETUP -#line 267 "vrmlLexer.lxx" +#line 268 "vrmlLexer.lxx" { return TO; } YY_BREAK case 7: YY_RULE_SETUP -#line 268 "vrmlLexer.lxx" +#line 269 "vrmlLexer.lxx" { return IS; } YY_BREAK case 8: YY_RULE_SETUP -#line 269 "vrmlLexer.lxx" +#line 270 "vrmlLexer.lxx" { return ROUTE; } YY_BREAK case 9: YY_RULE_SETUP -#line 270 "vrmlLexer.lxx" +#line 271 "vrmlLexer.lxx" { return SFN_NULL; } YY_BREAK case 10: YY_RULE_SETUP -#line 271 "vrmlLexer.lxx" +#line 272 "vrmlLexer.lxx" { return EVENTIN; } YY_BREAK case 11: YY_RULE_SETUP -#line 272 "vrmlLexer.lxx" +#line 273 "vrmlLexer.lxx" { return EVENTOUT; } YY_BREAK case 12: YY_RULE_SETUP -#line 273 "vrmlLexer.lxx" +#line 274 "vrmlLexer.lxx" { return FIELD; } YY_BREAK case 13: YY_RULE_SETUP -#line 274 "vrmlLexer.lxx" +#line 275 "vrmlLexer.lxx" { return EXPOSEDFIELD; } YY_BREAK /* Legal identifiers: */ case 14: YY_RULE_SETUP -#line 277 "vrmlLexer.lxx" +#line 278 "vrmlLexer.lxx" { - vrmlyylval.string = strdup(yytext); + vrmlyylval.string = strdup(vrmlyytext); return IDENTIFIER; } YY_BREAK @@ -3217,16 +3335,16 @@ YY_RULE_SETUP will keep them sorted out. */ case 15: YY_RULE_SETUP -#line 285 "vrmlLexer.lxx" +#line 286 "vrmlLexer.lxx" { - vrmlyylval.string = strdup(yytext); + vrmlyylval.string = strdup(vrmlyytext); return IDENTIFIER; } YY_BREAK /* All fields may have an IS declaration: */ case 16: YY_RULE_SETUP -#line 291 "vrmlLexer.lxx" +#line 292 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3235,7 +3353,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 297 "vrmlLexer.lxx" +#line 298 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3247,7 +3365,7 @@ YY_RULE_SETUP /* share the same rules for open and closing brackets: */ case 18: YY_RULE_SETUP -#line 306 "vrmlLexer.lxx" +#line 307 "vrmlLexer.lxx" { if (parsing_mf) vrmlyyerror("Double ["); parsing_mf = 1; @@ -3256,7 +3374,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 312 "vrmlLexer.lxx" +#line 313 "vrmlLexer.lxx" { if (!parsing_mf) vrmlyyerror("Unmatched ]"); int fieldType = expectToken; @@ -3269,7 +3387,7 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 322 "vrmlLexer.lxx" +#line 323 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3279,7 +3397,7 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 329 "vrmlLexer.lxx" +#line 330 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3289,7 +3407,7 @@ YY_RULE_SETUP YY_BREAK case 22: YY_RULE_SETUP -#line 336 "vrmlLexer.lxx" +#line 337 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3299,7 +3417,7 @@ YY_RULE_SETUP YY_BREAK case 23: YY_RULE_SETUP -#line 343 "vrmlLexer.lxx" +#line 344 "vrmlLexer.lxx" { VrmlFieldValue v; v._sfint32 = extract_int(); @@ -3317,7 +3435,7 @@ YY_RULE_SETUP /* All the floating-point types are pretty similar: */ case 24: YY_RULE_SETUP -#line 358 "vrmlLexer.lxx" +#line 359 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3327,7 +3445,7 @@ YY_RULE_SETUP YY_BREAK case 25: YY_RULE_SETUP -#line 365 "vrmlLexer.lxx" +#line 366 "vrmlLexer.lxx" { VrmlFieldValue v; v._sffloat = extract_float(); @@ -3345,8 +3463,9 @@ YY_RULE_SETUP } YY_BREAK case 26: +/* rule 26 can match eol */ YY_RULE_SETUP -#line 381 "vrmlLexer.lxx" +#line 382 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3355,8 +3474,9 @@ YY_RULE_SETUP } YY_BREAK case 27: +/* rule 27 can match eol */ YY_RULE_SETUP -#line 388 "vrmlLexer.lxx" +#line 389 "vrmlLexer.lxx" { VrmlFieldValue v; extract_vec(v._sfvec, 2); @@ -3372,8 +3492,9 @@ YY_RULE_SETUP } YY_BREAK case 28: +/* rule 28 can match eol */ YY_RULE_SETUP -#line 402 "vrmlLexer.lxx" +#line 403 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3382,8 +3503,9 @@ YY_RULE_SETUP } YY_BREAK case 29: +/* rule 29 can match eol */ YY_RULE_SETUP -#line 409 "vrmlLexer.lxx" +#line 410 "vrmlLexer.lxx" { VrmlFieldValue v; extract_vec(v._sfvec, 3); @@ -3399,8 +3521,9 @@ YY_RULE_SETUP } YY_BREAK case 30: +/* rule 30 can match eol */ YY_RULE_SETUP -#line 423 "vrmlLexer.lxx" +#line 424 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3409,8 +3532,9 @@ YY_RULE_SETUP } YY_BREAK case 31: +/* rule 31 can match eol */ YY_RULE_SETUP -#line 430 "vrmlLexer.lxx" +#line 431 "vrmlLexer.lxx" { VrmlFieldValue v; extract_vec(v._sfvec, 4); @@ -3426,8 +3550,9 @@ YY_RULE_SETUP } YY_BREAK case 32: +/* rule 32 can match eol */ YY_RULE_SETUP -#line 444 "vrmlLexer.lxx" +#line 445 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3436,8 +3561,9 @@ YY_RULE_SETUP } YY_BREAK case 33: +/* rule 33 can match eol */ YY_RULE_SETUP -#line 451 "vrmlLexer.lxx" +#line 452 "vrmlLexer.lxx" { VrmlFieldValue v; extract_vec(v._sfvec, 3); @@ -3454,7 +3580,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 465 "vrmlLexer.lxx" +#line 466 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3465,7 +3591,7 @@ YY_RULE_SETUP /* SFString/MFString */ case 35: YY_RULE_SETUP -#line 473 "vrmlLexer.lxx" +#line 474 "vrmlLexer.lxx" { BEGIN IN_SFS; quoted_string = ""; @@ -3473,7 +3599,7 @@ YY_RULE_SETUP YY_BREAK case 36: YY_RULE_SETUP -#line 478 "vrmlLexer.lxx" +#line 479 "vrmlLexer.lxx" { BEGIN IN_MFS; quoted_string = ""; @@ -3482,7 +3608,7 @@ YY_RULE_SETUP /* Anything besides open-quote (or whitespace) is an error: */ case 37: YY_RULE_SETUP -#line 484 "vrmlLexer.lxx" +#line 485 "vrmlLexer.lxx" { vrmlyyerror("String missing open-quote"); BEGIN NODE; @@ -3494,7 +3620,7 @@ YY_RULE_SETUP /* Expect open-quote, open-bracket, or whitespace: */ case 38: YY_RULE_SETUP -#line 493 "vrmlLexer.lxx" +#line 494 "vrmlLexer.lxx" { vrmlyyerror("String missing open-quote"); BEGIN NODE; @@ -3505,7 +3631,7 @@ YY_RULE_SETUP /* Backslashed-quotes are OK: */ case 39: YY_RULE_SETUP -#line 501 "vrmlLexer.lxx" +#line 502 "vrmlLexer.lxx" { quoted_string += '"'; } @@ -3516,15 +3642,15 @@ YY_RULE_SETUP /* rule that applies to everything. */ case 40: YY_RULE_SETUP -#line 509 "vrmlLexer.lxx" +#line 510 "vrmlLexer.lxx" { - quoted_string += yytext; + quoted_string += vrmlyytext; } YY_BREAK /* Quote ends the string: */ case 41: YY_RULE_SETUP -#line 514 "vrmlLexer.lxx" +#line 515 "vrmlLexer.lxx" { BEGIN NODE; expectToken = 0; @@ -3534,7 +3660,7 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 521 "vrmlLexer.lxx" +#line 522 "vrmlLexer.lxx" { VrmlFieldValue v; v._sfstring = strdup(quoted_string.c_str()); @@ -3553,10 +3679,11 @@ YY_RULE_SETUP YY_BREAK /* SFImage: width height numComponents then width*height integers: */ case 43: +/* rule 43 can match eol */ YY_RULE_SETUP -#line 538 "vrmlLexer.lxx" +#line 539 "vrmlLexer.lxx" { int w, h; - sscanf(yytext, "%d %d", &w, &h); + sscanf(vrmlyytext, "%d %d", &w, &h); sfImageIntsExpected = 1+w*h; sfImageIntsParsed = 0; BEGIN IN_SFIMG; @@ -3564,7 +3691,7 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 544 "vrmlLexer.lxx" +#line 545 "vrmlLexer.lxx" { ++sfImageIntsParsed; if (sfImageIntsParsed == sfImageIntsExpected) { BEGIN NODE; expectToken = 0; return SFIMAGE; @@ -3574,18 +3701,19 @@ YY_RULE_SETUP /* Whitespace and catch-all rules apply to all start states: */ case 45: YY_RULE_SETUP -#line 551 "vrmlLexer.lxx" +#line 552 "vrmlLexer.lxx" ; YY_BREAK /* A newline is also whitespace, but we'll keep track of line number */ /* to report in errors: */ case 46: +/* rule 46 can match eol */ YY_RULE_SETUP -#line 555 "vrmlLexer.lxx" +#line 556 "vrmlLexer.lxx" { // Save a copy of the line so we can print it out for the benefit of // the user in case we get an error. - strncpy(current_line, yytext+1, max_error_width); + strncpy(current_line, vrmlyytext+1, max_error_width); current_line[max_error_width] = '\0'; line_number++; @@ -3598,17 +3726,17 @@ YY_RULE_SETUP /* the above: */ case 47: YY_RULE_SETUP -#line 569 "vrmlLexer.lxx" +#line 570 "vrmlLexer.lxx" { - return yytext[0]; + return vrmlyytext[0]; } YY_BREAK case 48: YY_RULE_SETUP -#line 573 "vrmlLexer.lxx" +#line 574 "vrmlLexer.lxx" ECHO; YY_BREAK -#line 3613 "lex.yy.c" +#line 3741 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(NODE): case YY_STATE_EOF(SFB): @@ -3636,26 +3764,26 @@ case YY_STATE_EOF(IN_SFIMG): 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 + * just pointed vrmlyyin at a new source and called + * vrmlyylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = vrmlyyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -3665,13 +3793,13 @@ case YY_STATE_EOF(IN_SFIMG): * 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 @@ -3684,41 +3812,41 @@ case YY_STATE_EOF(IN_SFIMG): 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 ( vrmlyywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * yytext, we can now set up + * vrmlyytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -3726,30 +3854,30 @@ case YY_STATE_EOF(IN_SFIMG): 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; @@ -3760,8 +3888,7 @@ case YY_STATE_EOF(IN_SFIMG): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of vrmlyylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -3770,21 +3897,20 @@ case YY_STATE_EOF(IN_SFIMG): * 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. @@ -3804,34 +3930,30 @@ 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; + int 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; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -3844,8 +3966,7 @@ static int yy_get_next_buffer() 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 ); + vrmlyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -3855,35 +3976,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->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), (size_t) 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 ); + vrmlyyrestart(vrmlyyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -3891,32 +4012,39 @@ 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; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) vrmlyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } + (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_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; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -3928,30 +4056,23 @@ static yy_state_type yy_get_previous_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 char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -3963,81 +4084,73 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 976); return yy_is_jam ? 0 : yy_current_state; - } +} + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + /* undo effects of setting up vrmlyytext */ + *yy_cp = (yy_hold_char); - /* undo effects of setting up yytext */ - *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; - } -#endif /* ifndef YY_NO_UNPUT */ - + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} #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); - *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() @@ -4051,16 +4164,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + vrmlyyrestart(vrmlyyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( vrmlyywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -4070,167 +4183,169 @@ 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 vrmlyytext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; - } -#endif /* YY_NO_INPUT */ +} +#endif /* ifndef YY_NO_INPUT */ -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); +/** 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 vrmlyyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + vrmlyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + vrmlyy_create_buffer(vrmlyyin,YY_BUF_SIZE ); } + vrmlyy_init_buffer(YY_CURRENT_BUFFER,input_file ); + vrmlyy_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 vrmlyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * vrmlyypop_buffer_state(); + * vrmlyypush_buffer_state(new_buffer); + */ + vrmlyyensure_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; + vrmlyy_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 + * EOF (vrmlyywrap()) processing, but the only time this flag + * is looked at is after vrmlyywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void vrmlyy_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; + vrmlyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** 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 vrmlyy_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) vrmlyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in vrmlyy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) vrmlyyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in vrmlyy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + vrmlyy_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 vrmlyy_create_buffer() + * + */ + void vrmlyy_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 ); + vrmlyyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + vrmlyyfree((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 vrmlyyrestart() or at EOF. + */ + static void vrmlyy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + vrmlyy_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 - } + /* If b is the current buffer, then vrmlyy_init_buffer was _probably_ + * called from vrmlyyrestart() 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; +} -#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 ) +/** 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 vrmlyy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -4247,31 +4362,127 @@ 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 ) + vrmlyy_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 vrmlyypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + vrmlyyensure_buffer_stack(); + + /* This block is copied from vrmlyy_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 vrmlyy_switch_to_buffer. */ + vrmlyy_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 vrmlyypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + vrmlyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + vrmlyy_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 vrmlyyensure_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**)vrmlyyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in vrmlyyensure_buffer_stack()" ); + + 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 - { + /* 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**)vrmlyyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in vrmlyyensure_buffer_stack()" ); + + /* 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 vrmlyy_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) vrmlyyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in vrmlyy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; @@ -4283,58 +4494,53 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + vrmlyy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to vrmlyylex() will + * scan from a @e copy of @a str. + * @param yystr 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 + * vrmlyy_scan_bytes() instead. + */ +YY_BUFFER_STATE vrmlyy_scan_string (yyconst char * yystr ) +{ + + return vrmlyy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to vrmlyylex() 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 vrmlyy_scan_bytes (yyconst char * yybytes, int _yybytes_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 ); + n = _yybytes_len + 2; + buf = (char *) vrmlyyalloc(n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in vrmlyy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = vrmlyy_scan_buffer(buf,n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in vrmlyy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -4342,78 +4548,17 @@ 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; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +} #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); - } - - +} /* Redefine yyless() so it works in section 3 code. */ @@ -4421,69 +4566,178 @@ char msg[]; #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; \ + /* Undo effects of setting up vrmlyytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + vrmlyytext[vrmlyyleng] = (yy_hold_char); \ + (yy_c_buf_p) = vrmlyytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + vrmlyyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int vrmlyyget_lineno (void) +{ + + return vrmlyylineno; +} + +/** Get the input stream. + * + */ +FILE *vrmlyyget_in (void) +{ + return vrmlyyin; +} + +/** Get the output stream. + * + */ +FILE *vrmlyyget_out (void) +{ + return vrmlyyout; +} + +/** Get the length of the current token. + * + */ +int vrmlyyget_leng (void) +{ + return vrmlyyleng; +} + +/** Get the current token. + * + */ + +char *vrmlyyget_text (void) +{ + return vrmlyytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void vrmlyyset_lineno (int line_number ) +{ + + vrmlyylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see vrmlyy_switch_to_buffer + */ +void vrmlyyset_in (FILE * in_str ) +{ + vrmlyyin = in_str ; +} + +void vrmlyyset_out (FILE * out_str ) +{ + vrmlyyout = out_str ; +} + +int vrmlyyget_debug (void) +{ + return vrmlyy_flex_debug; +} + +void vrmlyyset_debug (int bdebug ) +{ + vrmlyy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from vrmlyylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + vrmlyyin = stdin; + vrmlyyout = stdout; +#else + vrmlyyin = (FILE *) 0; + vrmlyyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * vrmlyylex_init() + */ + return 0; +} + +/* vrmlyylex_destroy is for both reentrant and non-reentrant scanners. */ +int vrmlyylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + vrmlyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + vrmlyypop_buffer_state(); + } + + /* Destroy the stack itself. */ + vrmlyyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * vrmlyylex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *vrmlyyalloc (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 *vrmlyyrealloc (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 @@ -4492,23 +4746,13 @@ 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 vrmlyyfree (void * ptr ) +{ + free( (char *) ptr ); /* see vrmlyyrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 573 "vrmlLexer.lxx" +#define YYTABLES_NAME "yytables" + +#line 574 "vrmlLexer.lxx" diff --git a/pandatool/src/vrml/vrmlLexer.lxx b/pandatool/src/vrml/vrmlLexer.lxx index a0b531f8e6..e51459198b 100644 --- a/pandatool/src/vrml/vrmlLexer.lxx +++ b/pandatool/src/vrml/vrmlLexer.lxx @@ -28,6 +28,7 @@ #include "vrmlNode.h" #include "vrmlParser.h" #include "pnotify.h" +#include "pstrtod.h" static int yyinput(void); // declared by flex. extern "C" int vrmlyywrap(); @@ -160,13 +161,13 @@ int extract_int() { } double extract_float() { - return atof(yytext); + return patof(yytext); } void extract_vec(double vec[], int num_elements) { char *p = yytext; for (int i = 0; i < num_elements; i++) { - vec[i] = strtod(p, &p); + vec[i] = pstrtod(p, &p); } } diff --git a/pandatool/src/vrml/vrmlParser.cxx.prebuilt b/pandatool/src/vrml/vrmlParser.cxx.prebuilt index e2f8e2de31..a84cdd3a89 100644 --- a/pandatool/src/vrml/vrmlParser.cxx.prebuilt +++ b/pandatool/src/vrml/vrmlParser.cxx.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 2.0. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,16 +17,24 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local @@ -36,6 +46,9 @@ /* Identify Bison output. */ #define YYBISON 1 +/* Bison version. */ +#define YYBISON_VERSION "2.3" + /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -95,6 +108,7 @@ MFNODE = 289 }; #endif +/* Tokens. */ #define IDENTIFIER 258 #define DEF 259 #define USE 260 @@ -239,18 +253,25 @@ vrml_cleanup_parser() { # define YYERROR_VERBOSE 0 #endif -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE #line 116 "vrmlParser.yxx" -typedef union YYSTYPE { +{ char *string; VrmlFieldValue fv; VrmlNode *node; MFArray *mfarray; SFNodeRef nodeRef; VrmlScene *scene; -} YYSTYPE; -/* Line 190 of yacc.c. */ -#line 254 "y.tab.c" +} +/* Line 193 of yacc.c. */ +#line 274 "y.tab.c" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -261,17 +282,94 @@ typedef union YYSTYPE { /* Copy the second part of user declarations. */ -/* Line 213 of yacc.c. */ -#line 266 "y.tab.c" +/* Line 216 of yacc.c. */ +#line 287 "y.tab.c" -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#ifdef short +# undef short +#endif -# ifndef YYFREE -# define YYFREE free +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int # endif -# ifndef YYMALLOC -# define YYMALLOC malloc +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif # endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -279,34 +377,76 @@ typedef union YYSTYPE { # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca # else # define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif # endif # endif # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif +# else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - short int yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -316,24 +456,24 @@ union yyalloc /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) && 1 < __GNUC__ +# if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ - register YYSIZE_T yyi; \ + YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ - while (0) + while (YYID (0)) # endif # endif @@ -351,39 +491,33 @@ union yyalloc yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ - while (0) + while (YYID (0)) #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short int yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ +/* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 126 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 40 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 26 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 70 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 125 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 289 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -419,7 +553,7 @@ static const unsigned char yytranslate[] = #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ -static const unsigned char yyprhs[] = +static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 6, 9, 12, 15, 17, 21, 24, 26, 28, 29, 39, 40, 41, 50, 51, 54, @@ -431,8 +565,8 @@ static const unsigned char yyprhs[] = 205 }; -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { 41, 0, -1, 42, -1, -1, 42, 43, -1, 42, 44, -1, 42, 56, -1, 57, -1, 4, 3, 57, @@ -458,7 +592,7 @@ static const yysigned_char yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 147, 147, 155, 158, 165, 166, 170, 176, 182, 191, 192, 196, 196, 202, 204, 202, 207, 209, 213, @@ -471,9 +605,9 @@ static const unsigned short int yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "IDENTIFIER", "DEF", "USE", "PROTO", @@ -494,7 +628,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short int yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, @@ -504,7 +638,7 @@ static const unsigned short int yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 40, 41, 42, 42, 42, 42, 43, 43, 43, 44, 44, 46, 45, 48, 49, 47, 50, 50, 51, @@ -517,7 +651,7 @@ static const unsigned char yyr1[] = }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = +static const yytype_uint8 yyr2[] = { 0, 2, 1, 0, 2, 2, 2, 1, 3, 2, 1, 1, 0, 9, 0, 0, 8, 0, 2, 3, @@ -532,7 +666,7 @@ static const unsigned char yyr2[] = /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ -static const unsigned char yydefact[] = +static const yytype_uint8 yydefact[] = { 3, 0, 2, 1, 32, 0, 0, 0, 0, 0, 4, 5, 10, 11, 6, 7, 0, 0, 9, 12, @@ -549,8 +683,8 @@ static const unsigned char yydefact[] = 13, 67, 70, 22, 24 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { -1, 1, 2, 10, 11, 12, 24, 13, 25, 92, 39, 51, 118, 119, 40, 57, 14, 15, 16, 27, @@ -560,7 +694,7 @@ static const yysigned_char yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -73 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -73, 2, 79, -73, -73, 0, 3, 4, 6, 11, -73, -73, -73, -73, -73, -73, -16, 26, -73, -73, @@ -578,7 +712,7 @@ static const yysigned_char yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -73, -73, 13, -65, 90, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, -73, 99, 101, -73, -73, @@ -590,7 +724,7 @@ static const yysigned_char yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 -static const unsigned char yytable[] = +static const yytype_uint8 yytable[] = { 96, 31, 3, 17, 7, 8, 18, 19, 9, 20, 32, 33, 34, 98, 21, 4, 5, 6, 7, 8, @@ -607,7 +741,7 @@ static const unsigned char yytable[] = 0, 0, 0, 0, 0, 0, 37 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 65, 3, 0, 3, 6, 7, 3, 3, 10, 3, 12, 13, 14, 78, 3, 3, 4, 5, 6, 7, @@ -626,7 +760,7 @@ static const yysigned_char yycheck[] = /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const unsigned char yystos[] = +static const yytype_uint8 yystos[] = { 0, 41, 42, 0, 3, 4, 5, 6, 7, 10, 43, 44, 45, 47, 56, 57, 58, 3, 3, 3, @@ -643,22 +777,6 @@ static const unsigned char yystos[] = 38, 36, 43, 63, 63 }; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) @@ -684,15 +802,15 @@ do \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { \ - yyerror ("syntax error: cannot back up");\ + { \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) #define YYTERROR 1 @@ -707,7 +825,7 @@ while (0) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (N) \ + if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -721,7 +839,7 @@ while (0) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (0) + while (YYID (0)) #endif @@ -730,11 +848,11 @@ while (0) we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif @@ -761,36 +879,96 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short int *bottom, short int *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short int *bottom; - short int *top; + yytype_int16 *bottom; + yytype_int16 *top; #endif { YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) + for (; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } @@ -799,37 +977,45 @@ yy_stack_print (bottom, top) do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ -} while (0) +} while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (int yyrule) +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void -yy_reduce_print (yyrule) +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; int yyrule; #endif { + int yynrhs = yyr2[yyrule]; int yyi; - unsigned int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -851,7 +1037,7 @@ int yydebug; if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH @@ -863,45 +1049,47 @@ int yydebug; #if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -911,53 +1099,171 @@ yystpcpy (yydest, yysrc) # endif # endif -#endif /* !YYERROR_VERBOSE */ +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else @@ -968,8 +1274,7 @@ yydestruct (yymsg, yytype, yyvaluep) YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; @@ -979,7 +1284,7 @@ yydestruct (yymsg, yytype, yyvaluep) { default: - break; + break; } } @@ -987,13 +1292,13 @@ yydestruct (yymsg, yytype, yyvaluep) /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); -# else +#else int yyparse (); -# endif +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); @@ -1018,14 +1323,18 @@ int yynerrs; `----------*/ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif #else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else @@ -1036,13 +1345,19 @@ yyparse () #endif { - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif /* Three stacks and their tools: `yyss': related to states, @@ -1053,18 +1368,18 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - register short int *yyssp; + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + YYSTYPE *yyvsp; -#define YYPOPSTACK (yyvsp--, yyssp--) +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) YYSIZE_T yystacksize = YYINITDEPTH; @@ -1073,9 +1388,9 @@ yyparse () YYSTYPE yyval; - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1092,9 +1407,6 @@ yyparse () yyssp = yyss; yyvsp = yyvs; - - yyvsp[0] = yylval; - goto yysetstate; /*------------------------------------------------------------. @@ -1102,8 +1414,7 @@ yyparse () `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: @@ -1116,18 +1427,18 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), @@ -1138,21 +1449,21 @@ yyparse () } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE - goto yyoverflowlab; + goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short int *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; + goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); @@ -1183,12 +1494,10 @@ yyparse () `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; @@ -1230,22 +1539,21 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1283,7 +1591,7 @@ yyreduce: case 2: #line 148 "vrmlParser.yxx" { - parsed_scene = (yyvsp[0].scene); + parsed_scene = (yyvsp[(1) - (1)].scene); } break; @@ -1298,16 +1606,16 @@ yyreduce: #line 159 "vrmlParser.yxx" { Declaration d; - d._node = (yyvsp[0].nodeRef); - (yyvsp[-1].scene)->push_back(d); - (yyval.scene) = (yyvsp[-1].scene); + d._node = (yyvsp[(2) - (2)].nodeRef); + (yyvsp[(1) - (2)].scene)->push_back(d); + (yyval.scene) = (yyvsp[(1) - (2)].scene); } break; case 7: #line 171 "vrmlParser.yxx" { - (yyval.nodeRef)._p = (yyvsp[0].node); + (yyval.nodeRef)._p = (yyvsp[(1) - (1)].node); (yyval.nodeRef)._type = SFNodeRef::T_unnamed; (yyval.nodeRef)._name = NULL; } @@ -1316,9 +1624,9 @@ yyreduce: case 8: #line 177 "vrmlParser.yxx" { - (yyval.nodeRef)._p = (yyvsp[0].node); + (yyval.nodeRef)._p = (yyvsp[(3) - (3)].node); (yyval.nodeRef)._type = SFNodeRef::T_def; - (yyval.nodeRef)._name = (yyvsp[-1].string); + (yyval.nodeRef)._name = (yyvsp[(2) - (3)].string); } break; @@ -1327,23 +1635,23 @@ yyreduce: { (yyval.nodeRef)._p = NULL; (yyval.nodeRef)._type = SFNodeRef::T_use; - (yyval.nodeRef)._name = (yyvsp[0].string); + (yyval.nodeRef)._name = (yyvsp[(2) - (2)].string); } break; case 12: #line 196 "vrmlParser.yxx" - { beginProto((yyvsp[0].string)); } + { beginProto((yyvsp[(2) - (2)].string)); } break; case 13: #line 198 "vrmlParser.yxx" - { endProto(); free((yyvsp[-7].string));} + { endProto(); free((yyvsp[(2) - (9)].string));} break; case 14: #line 202 "vrmlParser.yxx" - { beginProto((yyvsp[0].string)); } + { beginProto((yyvsp[(2) - (2)].string)); } break; case 15: @@ -1353,25 +1661,25 @@ yyreduce: case 16: #line 205 "vrmlParser.yxx" - { endProto(); free((yyvsp[-6].string)); } + { endProto(); free((yyvsp[(2) - (8)].string)); } break; case 19: #line 213 "vrmlParser.yxx" - { addEventIn((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addEventIn((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 20: #line 215 "vrmlParser.yxx" - { addEventOut((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addEventOut((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 21: #line 218 "vrmlParser.yxx" { - int type = fieldType((yyvsp[-1].string)); + int type = fieldType((yyvsp[(2) - (3)].string)); expect(type); } break; @@ -1379,16 +1687,16 @@ yyreduce: case 22: #line 223 "vrmlParser.yxx" { - addField((yyvsp[-3].string), (yyvsp[-2].string), &((yyvsp[0].fv))); - free((yyvsp[-3].string)); - free((yyvsp[-2].string)); + addField((yyvsp[(2) - (5)].string), (yyvsp[(3) - (5)].string), &((yyvsp[(5) - (5)].fv))); + free((yyvsp[(2) - (5)].string)); + free((yyvsp[(3) - (5)].string)); } break; case 23: #line 229 "vrmlParser.yxx" { - int type = fieldType((yyvsp[-1].string)); + int type = fieldType((yyvsp[(2) - (3)].string)); expect(type); } break; @@ -1396,100 +1704,100 @@ yyreduce: case 24: #line 234 "vrmlParser.yxx" { - addExposedField((yyvsp[-3].string), (yyvsp[-2].string), &((yyvsp[0].fv))); - free((yyvsp[-3].string)); - free((yyvsp[-2].string)); + addExposedField((yyvsp[(2) - (5)].string), (yyvsp[(3) - (5)].string), &((yyvsp[(5) - (5)].fv))); + free((yyvsp[(2) - (5)].string)); + free((yyvsp[(3) - (5)].string)); } break; case 27: #line 247 "vrmlParser.yxx" - { addEventIn((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addEventIn((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 28: #line 249 "vrmlParser.yxx" - { addEventOut((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addEventOut((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 29: #line 251 "vrmlParser.yxx" - { addField((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addField((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 30: #line 253 "vrmlParser.yxx" - { addExposedField((yyvsp[-1].string), (yyvsp[0].string)); - free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { addExposedField((yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); + free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 31: #line 259 "vrmlParser.yxx" - { free((yyvsp[-6].string)); free((yyvsp[-4].string)); free((yyvsp[-2].string)); free((yyvsp[0].string)); } + { free((yyvsp[(2) - (8)].string)); free((yyvsp[(4) - (8)].string)); free((yyvsp[(6) - (8)].string)); free((yyvsp[(8) - (8)].string)); } break; case 32: #line 263 "vrmlParser.yxx" - { enterNode((yyvsp[0].string)); } + { enterNode((yyvsp[(1) - (1)].string)); } break; case 33: #line 264 "vrmlParser.yxx" - { (yyval.node) = exitNode(); free((yyvsp[-4].string));} + { (yyval.node) = exitNode(); free((yyvsp[(1) - (5)].string));} break; case 36: #line 273 "vrmlParser.yxx" - { enterField((yyvsp[0].string)); } + { enterField((yyvsp[(1) - (1)].string)); } break; case 37: #line 275 "vrmlParser.yxx" { - storeField((yyvsp[0].fv)); + storeField((yyvsp[(3) - (3)].fv)); exitField(); - free((yyvsp[-2].string)); + free((yyvsp[(1) - (3)].string)); } break; case 40: #line 284 "vrmlParser.yxx" - { inScript(); free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { inScript(); free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 41: #line 285 "vrmlParser.yxx" - { inScript(); free((yyvsp[-1].string)); free((yyvsp[0].string)); } + { inScript(); free((yyvsp[(2) - (3)].string)); free((yyvsp[(3) - (3)].string)); } break; case 42: #line 286 "vrmlParser.yxx" { inScript(); - int type = fieldType((yyvsp[-1].string)); + int type = fieldType((yyvsp[(2) - (3)].string)); expect(type); } break; case 43: #line 289 "vrmlParser.yxx" - { free((yyvsp[-3].string)); free((yyvsp[-2].string)); } + { free((yyvsp[(2) - (5)].string)); free((yyvsp[(3) - (5)].string)); } break; case 44: #line 291 "vrmlParser.yxx" - { inScript(); free((yyvsp[-3].string)); free((yyvsp[-2].string)); free((yyvsp[0].string)); } + { inScript(); free((yyvsp[(2) - (5)].string)); free((yyvsp[(3) - (5)].string)); free((yyvsp[(5) - (5)].string)); } break; case 45: #line 293 "vrmlParser.yxx" - { inScript(); free((yyvsp[-3].string)); free((yyvsp[-2].string)); free((yyvsp[0].string)); } + { inScript(); free((yyvsp[(2) - (5)].string)); free((yyvsp[(3) - (5)].string)); free((yyvsp[(5) - (5)].string)); } break; case 63: #line 315 "vrmlParser.yxx" - { (yyval.fv)._sfnode = (yyvsp[0].nodeRef); } + { (yyval.fv)._sfnode = (yyvsp[(2) - (2)].nodeRef); } break; case 64: @@ -1503,18 +1811,18 @@ yyreduce: case 65: #line 322 "vrmlParser.yxx" - { (yyval.fv)._mf = (yyvsp[0].mfarray); } + { (yyval.fv)._mf = (yyvsp[(2) - (2)].mfarray); } break; case 66: #line 323 "vrmlParser.yxx" - { free((yyvsp[0].string)); } + { free((yyvsp[(2) - (2)].string)); } break; case 67: #line 328 "vrmlParser.yxx" { - (yyval.mfarray) = (yyvsp[-1].mfarray); + (yyval.mfarray) = (yyvsp[(2) - (3)].mfarray); } break; @@ -1523,7 +1831,7 @@ yyreduce: { (yyval.mfarray) = new MFArray; VrmlFieldValue v; - v._sfnode = (yyvsp[0].nodeRef); + v._sfnode = (yyvsp[(1) - (1)].nodeRef); (yyval.mfarray)->push_back(v); } break; @@ -1539,22 +1847,21 @@ yyreduce: #line 346 "vrmlParser.yxx" { VrmlFieldValue v; - v._sfnode = (yyvsp[0].nodeRef); - (yyvsp[-1].mfarray)->push_back(v); - (yyval.mfarray) = (yyvsp[-1].mfarray); + v._sfnode = (yyvsp[(2) - (2)].nodeRef); + (yyvsp[(1) - (2)].mfarray)->push_back(v); + (yyval.mfarray) = (yyvsp[(1) - (2)].mfarray); } break; +/* Line 1267 of yacc.c. */ +#line 1859 "y.tab.c" + default: break; } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); -/* Line 1037 of yacc.c. */ -#line 1553 "y.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1583,66 +1890,41 @@ yyerrlab: if (!yyerrstatus) { ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - const char* yyprefix; - char *yymsg; - int yyx; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 0; - - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); - yycount += 1; - if (yycount == 5) - { - yysize = 0; - break; - } - } - yysize += (sizeof ("syntax error, unexpected ") - + yystrlen (yytname[yytype])); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yyprefix = ", expecting "; - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - yyp = yystpcpy (yyp, yyprefix); - yyp = yystpcpy (yyp, yytname[yyx]); - yyprefix = " or "; - } - } - yyerror (yymsg); +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } @@ -1653,23 +1935,15 @@ yyerrlab: error, discard it. */ if (yychar <= YYEOF) - { - /* If at end of input, pop the error token, - then the rest of the stack, then return failure. */ + { + /* Return failure if at end of input. */ if (yychar == YYEOF) - for (;;) - { - - YYPOPSTACK; - if (yyssp == yyss) - YYABORT; - yydestruct ("Error: popping", - yystos[*yyssp], yyvsp); - } - } + YYABORT; + } else { - yydestruct ("Error: discarding", yytoken, &yylval); + yydestruct ("Error: discarding", + yytoken, &yylval); yychar = YYEMPTY; } } @@ -1684,15 +1958,17 @@ yyerrlab: `---------------------------------------------------*/ yyerrorlab: -#ifdef __GNUC__ - /* Pacify GCC when the user code never invokes YYERROR and the label - yyerrorlab therefore never appears in user code. */ - if (0) + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) goto yyerrorlab; -#endif -yyvsp -= yylen; - yyssp -= yylen; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; @@ -1722,8 +1998,9 @@ yyerrlab1: YYABORT; - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } @@ -1734,7 +2011,7 @@ yyerrlab1: *++yyvsp = yylval; - /* Shift the error token. */ + /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; @@ -1752,28 +2029,43 @@ yyacceptlab: | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: - yydestruct ("Error: discarding lookahead", - yytoken, &yylval); - yychar = YYEMPTY; yyresult = 1; goto yyreturn; #ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } diff --git a/pandatool/src/vrml/vrmlParser.h.prebuilt b/pandatool/src/vrml/vrmlParser.h.prebuilt index c8cc86fd5e..f891c97565 100644 --- a/pandatool/src/vrml/vrmlParser.h.prebuilt +++ b/pandatool/src/vrml/vrmlParser.h.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 2.0. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,13 +17,21 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE @@ -63,6 +73,7 @@ MFNODE = 289 }; #endif +/* Tokens. */ #define IDENTIFIER 258 #define DEF 259 #define USE 260 @@ -99,18 +110,20 @@ -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE #line 116 "vrmlParser.yxx" -typedef union YYSTYPE { +{ char *string; VrmlFieldValue fv; VrmlNode *node; MFArray *mfarray; SFNodeRef nodeRef; VrmlScene *scene; -} YYSTYPE; -/* Line 1318 of yacc.c. */ -#line 114 "y.tab.h" +} +/* Line 1529 of yacc.c. */ +#line 126 "y.tab.h" + YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -118,5 +131,3 @@ typedef union YYSTYPE { extern YYSTYPE vrmlyylval; - -