diff --git a/pandatool/src/xfile/standardTemplates.x b/pandatool/src/xfile/standardTemplates.x index 244fdb667d..20199a32e1 100755 --- a/pandatool/src/xfile/standardTemplates.x +++ b/pandatool/src/xfile/standardTemplates.x @@ -267,3 +267,8 @@ template SkinWeights { array FLOAT weights[nWeights]; Matrix4x4 matrixOffset; } + +template AnimTicksPerSecond { + <9E415A43-7BA6-4a73-8743-B73D47E88476> + DWORD AnimTicksPerSecond; +} diff --git a/pandatool/src/xfile/standardTemplates.x.c b/pandatool/src/xfile/standardTemplates.x.c index 7dd4bbbc10..7ef2f6adcb 100644 --- a/pandatool/src/xfile/standardTemplates.x.c +++ b/pandatool/src/xfile/standardTemplates.x.c @@ -497,8 +497,17 @@ const unsigned char standard_templates_data[] = { 0x69, 0x67, 0x68, 0x74, 0x73, 0x5d, 0x3b, 0x0a, 0x20, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x34, 0x78, 0x34, 0x20, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x3b, 0x0a, - 0x7d, 0x0a + 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x20, 0x41, 0x6e, 0x69, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x73, 0x50, + 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x7b, 0x0a, + 0x20, 0x3c, 0x39, 0x45, 0x34, 0x31, 0x35, 0x41, 0x34, 0x33, 0x2d, + 0x37, 0x42, 0x41, 0x36, 0x2d, 0x34, 0x61, 0x37, 0x33, 0x2d, 0x38, + 0x37, 0x34, 0x33, 0x2d, 0x42, 0x37, 0x33, 0x44, 0x34, 0x37, 0x45, + 0x38, 0x38, 0x34, 0x37, 0x36, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, + 0x52, 0x44, 0x20, 0x41, 0x6e, 0x69, 0x6d, 0x54, 0x69, 0x63, 0x6b, + 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x3b, + 0x0a, 0x7d, 0x20, 0x0a }; -const int standard_templates_data_len = 5403; +const int standard_templates_data_len = 5504; diff --git a/pandatool/src/xfile/standardTemplates.x.pz.c b/pandatool/src/xfile/standardTemplates.x.pz.c index c6789561fc..21743add83 100755 --- a/pandatool/src/xfile/standardTemplates.x.pz.c +++ b/pandatool/src/xfile/standardTemplates.x.pz.c @@ -6,172 +6,177 @@ */ const unsigned char standard_templates_data[] = { - 0x78, 0x9c, 0xa5, 0x58, 0x6b, 0x6f, 0xdb, 0x38, 0x16, 0xfd, 0x9e, - 0x5f, 0x41, 0x4c, 0x80, 0x6e, 0x67, 0x11, 0x65, 0xf5, 0x7e, 0x8c, - 0x3b, 0x05, 0x9c, 0x3a, 0x69, 0xbd, 0x93, 0x17, 0x6c, 0x37, 0xcd, - 0xc0, 0x08, 0x02, 0x4a, 0x24, 0x6d, 0xb6, 0xb2, 0xe4, 0x95, 0xe4, - 0xd4, 0xe9, 0xa2, 0xff, 0x7d, 0x2f, 0x49, 0x49, 0x96, 0xe4, 0x64, - 0x65, 0xa0, 0x41, 0x90, 0x98, 0xaf, 0x73, 0xcf, 0x3d, 0xbc, 0xbc, - 0xe4, 0xf5, 0x36, 0x65, 0x48, 0xb7, 0x74, 0xab, 0xd8, 0x16, 0x48, - 0xd7, 0x2d, 0xf3, 0xe8, 0xe8, 0x18, 0xcd, 0x96, 0x3c, 0x47, 0x8c, - 0xc7, 0x14, 0x45, 0x69, 0x52, 0x60, 0x9e, 0xe4, 0xa8, 0x58, 0x52, - 0x94, 0x17, 0x38, 0x21, 0x38, 0x23, 0xa8, 0xa0, 0xab, 0x75, 0x8c, - 0x0b, 0x8a, 0x08, 0x65, 0x3c, 0xe1, 0x05, 0x4f, 0x61, 0x06, 0x4b, - 0x33, 0x34, 0xe2, 0x19, 0x8d, 0x0a, 0x6b, 0x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, 0x0a, 0x56, 0xe1, 0x34, 0xb8, 0xaa, 0xae, + 0x9b, 0x4c, 0xb7, 0x18, 0x0e, 0x82, 0x43, 0x6c, 0x15, 0x55, 0x05, + 0x76, 0x93, 0x12, 0x7a, 0x23, 0x2e, 0xff, 0x8a, 0x56, 0x09, 0xda, + 0x61, 0xf3, 0xdc, 0xfe, 0x7a, 0xa2, 0x9c, 0xf4, 0xd8, 0x79, 0x0c, + 0xfe, 0x90, 0xdd, 0xad, 0xf1, 0x43, 0xc5, 0x26, 0x6b, 0xc2, 0x5b, + 0xc6, 0x72, 0x5a, 0x1c, 0x67, 0x79, 0x3f, 0x0a, 0xbf, 0xf3, 0x2d, + 0x59, 0xd0, 0x30, 0x4d, 0x64, 0x58, 0x79, 0x53, 0x53, 0xb3, 0x46, + 0xbc, 0x1c, 0x18, 0x8f, 0x6c, 0xc5, 0xc4, 0x8e, 0xa1, 0xb8, 0x0e, + 0x34, 0xc7, 0x8e, 0x31, 0x31, 0x9d, 0xa9, 0xeb, 0x9a, 0x8e, 0x5d, + 0x0b, 0x7c, 0x8c, 0x01, 0x36, 0xd0, 0xe0, 0x7f, 0x49, 0x95, 0x76, + 0xa7 }; -const int standard_templates_data_len = 1814; +const int standard_templates_data_len = 1860; diff --git a/pandatool/src/xfile/xLexer.cxx.prebuilt b/pandatool/src/xfile/xLexer.cxx.prebuilt index e1a71bd95d..6b1a3fb166 100644 --- a/pandatool/src/xfile/xLexer.cxx.prebuilt +++ b/pandatool/src/xfile/xLexer.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 xyy_create_buffer #define yy_delete_buffer xyy_delete_buffer -#define yy_scan_buffer xyy_scan_buffer -#define yy_scan_string xyy_scan_string -#define yy_scan_bytes xyy_scan_bytes #define yy_flex_debug xyy_flex_debug #define yy_init_buffer xyy_init_buffer #define yy_flush_buffer xyy_flush_buffer @@ -11,78 +16,117 @@ #define yyin xyyin #define yyleng xyyleng #define yylex xyylex +#define yylineno xyylineno #define yyout xyyout #define yyrestart xyyrestart #define yytext xyytext #define yywrap xyywrap - -#line 20 "lex.yy.c" -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ +#define yyalloc xyyalloc +#define yyrealloc xyyrealloc +#define yyfree xyyfree #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 xyyrestart(xyyin ) #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 xyyleng; + +extern FILE *xyyin, *xyyout; #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 xyytext. */ \ + 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 xyytext 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,146 +260,179 @@ 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 xyyrestart()), so that the user can continue scanning by + * just pointing xyyin 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 xyytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +int xyyleng; /* 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 xyywrap()'s to do buffer switches + * instead of setting up a fresh xyyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void xyyrestart (FILE *input_file ); +void xyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE xyy_create_buffer (FILE *file,int size ); +void xyy_delete_buffer (YY_BUFFER_STATE b ); +void xyy_flush_buffer (YY_BUFFER_STATE b ); +void xyypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void xyypop_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 xyyensure_buffer_stack (void ); +static void xyy_load_buffer_state (void ); +static void xyy_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 xyy_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 xyy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE xyy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE xyy_scan_bytes (yyconst char *bytes,int len ); -#define yy_new_buffer yy_create_buffer +void *xyyalloc (yy_size_t ); +void *xyyrealloc (void *,yy_size_t ); +void xyyfree (void * ); + +#define yy_new_buffer xyy_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 ){ \ + xyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + xyy_create_buffer(xyyin,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 ){\ + xyyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + xyy_create_buffer(xyyin,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) - -#define YY_USES_REJECT 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 *xyyin = (FILE *) 0, *xyyout = (FILE *) 0; + +typedef int yy_state_type; + +extern int xyylineno; + +int xyylineno = 1; + +extern char *xyytext; +#define yytext_ptr xyytext + +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 xyytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + xyyleng = (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 35 #define YY_END_OF_BUFFER 36 -static yyconst short int yy_acclist[194] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_acclist[200] = { 0, 36, 34, 35, 2, 34, 35, 1, 35, 30, 34, 35, 4, 34, 35, 34, 35, 10, 34, 35, 32, 34, 35, 9, 34, 35, 34, 35, 26, 34, 35, - 11, 34, 35, 31, 34, 35, 7, 34, 35, 8, + 11, 34, 35, 31, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, 34, 35, - 32, 34, 35, 32, 34, 35, 32, 34, 35, 32, + 32, 34, 35, 32, 34, 35, 7, 34, 35, 8, 34, 35, 5, 34, 35, 6, 34, 35, 1, 4, - 26, 32, 33, 26, 32, 32, 33, 3, 27,16412, - 26, 27,16412, 33, 26, 33, 32, 32, 32, 32, + 26, 32, 33, 32, 26, 32, 32, 33, 3, 27, + 16412, 26, 27,16412, 33, 26, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 33, 32, 33, 32, 33, 32, 33, 29, - 3, 27, 33, 33, 33, 33, 32, 32, 32, 32, + 32, 32, 32, 33, 32, 33, 32, 33, 32, 33, + 32, 32, 29, 3, 27, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 8220, 32, 13, 32, 14, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 25, 32, 29, 29, - 12, 32, 32, 32, 17, 32, 19, 32, 32, 32, - 24, 32, 32, 22, 32, 32, 32, 16, 32, 18, - 32, 20, 32, 32, 32, 29, 15, 32, 32, 23, - 32, 21, 32 + 32, 32, 32, 32, 8220, 32, 13, 32, 14, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 25, 32, 32, 32, 29, 29, 12, 32, 32, 32, + 17, 32, 19, 32, 32, 32, 24, 32, 32, 22, + 32, 32, 32, 16, 32, 18, 32, 20, 32, 32, + 32, 29, 15, 32, 32, 23, 32, 21, 32 } ; -static yyconst short int yy_accept[136] = +static yyconst flex_int16_t yy_accept[142] = { 0, 1, 1, 1, 2, 4, 7, 9, 12, 15, 17, 20, 23, 26, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, - 79, 80, 81, 81, 82, 84, 86, 88, 88, 89, - 91, 94, 95, 95, 96, 97, 98, 99, 100, 101, + 79, 80, 81, 81, 82, 84, 85, 87, 89, 89, + 90, 92, 95, 96, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 114, 116, 118, 120, 121, 121, 122, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 141, 141, - 141, 141, 141, 142, 143, 145, 147, 148, 149, 150, + 112, 113, 115, 117, 119, 121, 122, 123, 124, 124, + 125, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 145, 145, 145, 145, 145, 146, 147, 149, - 151, 152, 153, 154, 155, 156, 157, 159, 160, 161, - 163, 164, 165, 167, 169, 170, 171, 173, 174, 176, - 177, 177, 178, 180, 182, 184, 185, 186, 186, 187, - 189, 190, 192, 194, 194 + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 163, 164, 165, 166, 167, 169, 170, 171, 173, + 175, 176, 177, 179, 180, 182, 183, 183, 184, 186, + 188, 190, 191, 192, 192, 193, 195, 196, 198, 200, + 200 } ; -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, @@ -360,14 +440,14 @@ static yyconst int yy_ec[256] = 1, 5, 1, 6, 7, 1, 1, 1, 1, 1, 1, 1, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 14, 15, - 1, 1, 1, 1, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 18, 18, 28, 29, 30, 31, 32, - 18, 33, 34, 35, 36, 18, 37, 18, 38, 18, - 16, 1, 17, 1, 18, 1, 19, 20, 21, 22, + 1, 1, 1, 1, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, + 25, 31, 32, 33, 34, 25, 35, 25, 36, 25, + 37, 1, 38, 1, 25, 1, 39, 40, 41, 42, - 23, 24, 25, 26, 27, 18, 18, 28, 29, 30, - 31, 32, 18, 33, 34, 35, 36, 18, 37, 18, - 38, 18, 39, 1, 40, 1, 1, 1, 1, 1, + 43, 44, 45, 46, 47, 25, 25, 48, 49, 50, + 51, 52, 25, 53, 54, 55, 56, 25, 57, 25, + 58, 25, 59, 1, 60, 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, @@ -384,123 +464,166 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[41] = +static yyconst flex_int32_t yy_meta[61] = { 0, 1, 2, 3, 1, 2, 1, 1, 1, 2, 4, - 5, 1, 6, 2, 1, 1, 1, 4, 4, 4, - 4, 4, 6, 4, 4, 4, 4, 4, 4, 4, + 4, 1, 4, 2, 1, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1 } ; -static yyconst short int yy_base[146] = +static yyconst flex_int16_t yy_base[151] = { 0, - 0, 0, 234, 235, 235, 0, 235, 0, 30, 235, - 34, 220, 220, 46, 235, 235, 235, 235, 0, 198, - 192, 16, 15, 201, 27, 205, 33, 196, 235, 235, - 0, 0, 213, 56, 58, 70, 0, 53, 0, 83, - 220, 64, 76, 98, 0, 0, 191, 188, 203, 186, - 184, 188, 187, 180, 183, 184, 185, 187, 185, 178, - 77, 85, 0, 0, 111, 118, 0, 197, 94, 104, - 105, 0, 0, 190, 185, 174, 172, 182, 164, 174, - 161, 164, 155, 153, 163, 156, 147, 116, 150, 119, - 145, 131, 235, 119, 0, 0, 129, 126, 131, 117, + 0, 0, 225, 385, 385, 0, 385, 0, 50, 385, + 54, 209, 183, 64, 385, 385, 31, 32, 47, 47, + 0, 46, 64, 60, 67, 58, 385, 385, 385, 385, + 0, 0, 177, 109, 78, 173, 122, 0, 132, 0, + 145, 155, 102, 165, 178, 0, 0, 76, 83, 86, + 93, 105, 111, 115, 114, 120, 143, 149, 82, 153, + 150, 186, 0, 191, 0, 204, 214, 227, 197, 0, + 143, 237, 201, 0, 220, 0, 204, 201, 162, 214, + 209, 221, 237, 226, 232, 227, 229, 244, 243, 243, + 255, 171, 130, 253, 129, 273, 385, 233, 0, 0, - 117, 119, 120, 111, 105, 104, 0, 124, 0, 0, - 104, 100, 0, 0, 88, 81, 0, 82, 0, 72, - 133, 61, 0, 0, 0, 47, 55, 60, 146, 0, - 30, 0, 0, 235, 160, 166, 169, 174, 177, 180, - 183, 188, 194, 197, 200 + 246, 246, 254, 255, 258, 262, 273, 269, 266, 269, + 0, 117, 300, 316, 326, 0, 272, 281, 0, 0, + 284, 282, 0, 316, 0, 314, 334, 312, 0, 0, + 0, 283, 317, 97, 349, 0, 321, 0, 0, 385, + 369, 373, 96, 376, 92, 88, 82, 380, 77, 67 } ; -static yyconst short int yy_def[146] = +static yyconst flex_int16_t yy_def[151] = { 0, - 134, 1, 134, 134, 134, 135, 134, 136, 134, 134, - 137, 134, 134, 138, 134, 134, 134, 134, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 134, 134, - 135, 136, 134, 134, 140, 137, 141, 142, 143, 134, - 40, 144, 142, 138, 145, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 140, 140, 141, 141, 134, 134, 143, 134, 40, 144, - 144, 145, 145, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 134, 134, 134, - 134, 134, 134, 139, 139, 139, 139, 139, 139, 139, + 140, 1, 140, 140, 140, 141, 140, 142, 140, 140, + 143, 140, 140, 144, 140, 140, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 140, 140, 140, 140, + 141, 142, 140, 140, 146, 145, 143, 147, 140, 148, + 140, 140, 149, 140, 144, 150, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 146, 147, 146, 147, 145, 145, 140, 140, 148, + 140, 140, 149, 150, 149, 150, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 140, 140, 140, 140, 140, 140, 145, 145, 145, - 139, 139, 139, 139, 139, 139, 139, 142, 108, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 134, 139, 139, 139, 139, 139, 139, 134, 134, 139, - 139, 139, 139, 0, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 140, 140, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 140, 145, 145, 145, + 145, 145, 145, 140, 140, 145, 145, 145, 145, 0, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140 } ; -static yyconst short int yy_nxt[276] = +static yyconst flex_int16_t yy_nxt[446] = { 0, 4, 5, 6, 5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 19, 24, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 25, 26, 27, 28, 19, 29, 30, - 33, 49, 34, 35, 33, 51, 36, 40, 54, 50, - 41, 52, 133, 58, 40, 42, 43, 40, 44, 40, - 41, 55, 59, 56, 40, 38, 43, 61, 34, 40, - 62, 40, 129, 70, 41, 66, 71, 132, 40, 35, - 43, 131, 36, 40, 40, 130, 61, 40, 38, 62, - 68, 40, 68, 127, 61, 69, 40, 62, 66, 40, + 22, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 23, 24, 25, 26, 21, 27, 28, 17, 18, + 19, 20, 21, 22, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 23, 24, 25, 26, 21, 29, 30, + 33, 48, 34, 35, 36, 41, 37, 49, 42, 50, + 74, 54, 41, 43, 44, 52, 45, 41, 51, 58, + 76, 53, 55, 48, 59, 63, 61, 62, 63, 49, + 64, 65, 50, 54, 60, 47, 56, 52, 57, 38, - 126, 134, 41, 134, 93, 125, 40, 42, 43, 124, - 44, 40, 65, 70, 70, 65, 71, 71, 88, 65, - 88, 89, 123, 90, 65, 91, 89, 91, 90, 109, - 92, 90, 65, 122, 120, 65, 108, 119, 118, 65, - 128, 117, 128, 92, 65, 129, 121, 65, 116, 115, - 65, 114, 113, 112, 65, 111, 110, 92, 129, 65, - 31, 31, 108, 31, 31, 31, 32, 32, 107, 32, - 32, 32, 37, 37, 37, 45, 106, 45, 45, 45, - 46, 105, 46, 63, 104, 63, 64, 103, 64, 65, - 102, 101, 100, 65, 67, 67, 99, 67, 67, 67, + 51, 79, 58, 53, 88, 55, 77, 59, 61, 135, + 41, 73, 74, 42, 75, 78, 60, 41, 56, 44, + 57, 34, 41, 41, 79, 80, 42, 88, 77, 113, + 41, 35, 67, 68, 37, 41, 68, 78, 81, 82, + 68, 96, 114, 83, 39, 68, 41, 80, 84, 41, + 85, 69, 71, 41, 71, 72, 41, 72, 41, 42, + 81, 82, 71, 41, 71, 83, 68, 72, 41, 68, + 84, 86, 85, 68, 69, 87, 89, 39, 68, 41, + 90, 93, 42, 94, 69, 66, 41, 43, 44, 39, + 45, 41, 100, 86, 40, 62, 63, 87, 64, 89, - 72, 98, 72, 73, 97, 73, 96, 95, 94, 69, - 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, - 77, 76, 75, 74, 41, 38, 60, 57, 53, 48, - 47, 39, 38, 134, 3, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 62, 63, 90, 64, 95, 68, 95, 69, 68, 96, + 73, 74, 68, 75, 100, 68, 66, 68, 68, 98, + 99, 39, 68, 91, 140, 102, 66, 68, 68, 73, + 74, 68, 75, 91, 92, 68, 92, 93, 41, 94, + 68, 41, 98, 99, 101, 41, 91, 97, 102, 72, + 41, 103, 104, 140, 105, 106, 91, 107, 108, 109, + 110, 111, 95, 115, 112, 94, 101, 113, 116, 117, + 140, 118, 119, 103, 68, 104, 105, 68, 106, 107, + 108, 68, 109, 110, 111, 96, 68, 120, 121, 122, + 116, 123, 117, 118, 124, 119, 125, 126, 140, 128, + + 129, 68, 130, 131, 68, 140, 140, 140, 68, 120, + 121, 122, 113, 68, 123, 137, 124, 68, 125, 126, + 68, 128, 140, 129, 68, 130, 131, 68, 114, 68, + 68, 132, 133, 136, 68, 127, 138, 137, 114, 68, + 139, 134, 140, 134, 140, 127, 135, 140, 140, 140, + 68, 140, 140, 68, 132, 133, 136, 68, 127, 138, + 140, 135, 68, 139, 140, 140, 140, 140, 127, 31, + 31, 140, 31, 32, 32, 140, 32, 46, 140, 46, + 70, 70, 140, 70, 3, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140 } ; -static yyconst short int yy_chk[276] = +static yyconst flex_int16_t yy_chk[446] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 9, 22, 9, 11, 11, 23, 11, 14, 25, 22, - 14, 23, 131, 27, 14, 14, 14, 34, 14, 14, - 34, 25, 27, 25, 34, 38, 34, 35, 34, 34, - 35, 36, 128, 42, 36, 38, 42, 127, 36, 36, - 36, 126, 36, 36, 40, 122, 61, 40, 43, 61, - 40, 40, 40, 120, 62, 40, 40, 62, 43, 44, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 9, 17, 9, 11, 11, 14, 11, 18, 14, 19, + 150, 22, 14, 14, 14, 20, 14, 14, 19, 24, + 149, 20, 23, 17, 25, 147, 26, 35, 35, 18, + 35, 146, 19, 22, 25, 145, 23, 20, 23, 143, - 118, 69, 44, 69, 69, 116, 44, 44, 44, 115, - 44, 44, 65, 70, 71, 65, 70, 71, 65, 65, - 65, 65, 112, 65, 65, 66, 88, 66, 88, 90, - 66, 90, 92, 111, 106, 92, 108, 105, 104, 92, - 121, 103, 121, 92, 92, 121, 108, 129, 102, 101, - 129, 100, 99, 98, 129, 97, 94, 91, 129, 129, - 135, 135, 89, 135, 135, 135, 136, 136, 87, 136, - 136, 136, 137, 137, 137, 138, 86, 138, 138, 138, - 139, 85, 139, 140, 84, 140, 141, 83, 141, 142, - 82, 81, 80, 142, 143, 143, 79, 143, 143, 143, + 19, 50, 24, 20, 59, 23, 48, 25, 26, 134, + 34, 43, 43, 34, 43, 49, 25, 34, 23, 34, + 23, 34, 34, 37, 50, 51, 37, 59, 48, 112, + 37, 37, 37, 39, 37, 37, 39, 49, 52, 53, + 39, 95, 93, 54, 39, 39, 41, 51, 55, 41, + 56, 39, 41, 41, 41, 71, 42, 41, 41, 42, + 52, 53, 42, 42, 42, 54, 44, 42, 42, 44, + 55, 57, 56, 44, 39, 58, 60, 44, 44, 45, + 61, 92, 45, 92, 44, 36, 45, 45, 45, 33, + 45, 45, 79, 57, 13, 62, 62, 58, 62, 60, - 144, 78, 144, 145, 77, 145, 76, 75, 74, 68, - 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, - 50, 49, 48, 47, 41, 33, 28, 26, 24, 21, - 20, 13, 12, 3, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134 + 64, 64, 61, 64, 69, 66, 69, 44, 66, 69, + 73, 73, 66, 73, 79, 67, 66, 66, 67, 77, + 78, 12, 67, 66, 3, 81, 67, 67, 68, 75, + 75, 68, 75, 67, 68, 68, 68, 68, 72, 68, + 68, 72, 77, 78, 80, 72, 66, 72, 81, 72, + 72, 82, 83, 0, 84, 85, 67, 86, 87, 88, + 89, 90, 91, 94, 91, 94, 80, 91, 98, 101, + 0, 102, 103, 82, 96, 83, 84, 96, 85, 86, + 87, 96, 88, 89, 90, 96, 96, 104, 105, 106, + 98, 107, 101, 102, 108, 103, 109, 110, 0, 117, + + 118, 113, 121, 122, 113, 0, 0, 0, 113, 104, + 105, 106, 113, 113, 107, 132, 108, 114, 109, 110, + 114, 117, 0, 118, 114, 121, 122, 115, 114, 114, + 115, 124, 126, 128, 115, 114, 133, 132, 115, 115, + 137, 127, 0, 127, 0, 115, 127, 0, 0, 0, + 135, 0, 0, 135, 124, 126, 128, 135, 114, 133, + 0, 135, 135, 137, 0, 0, 0, 0, 115, 141, + 141, 0, 141, 142, 142, 0, 142, 144, 0, 144, + 148, 148, 0, 148, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, + 140, 140, 140, 140, 140 } ; -static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +extern int xyy_flex_debug; +int xyy_flex_debug = 0; + +static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; static char *yy_full_match; static int yy_lp; static int yy_looking_for_trail_begin = 0; @@ -510,20 +633,20 @@ static int *yy_full_state; #define YY_TRAILING_HEAD_MASK 0x4000 #define REJECT \ { \ -*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yy_full_match; /* restore poss. backed-over text */ \ -yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \ -yy_state_ptr = yy_full_state; /* restore orig. state */ \ -yy_current_state = *yy_state_ptr; /* restore curr. state */ \ -++yy_lp; \ +*yy_cp = (yy_hold_char); /* undo effects of setting up xyytext */ \ +yy_cp = (yy_full_match); /* restore poss. backed-over text */ \ +(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \ +(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \ +yy_current_state = *(yy_state_ptr); /* restore curr. state */ \ +++(yy_lp); \ goto find_rule; \ } + #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -char *yytext; +char *xyytext; #line 1 "xLexer.lxx" -#define INITIAL 0 /* // Filename: xLexer.lxx // Created by: drose (03Oct04) @@ -919,10 +1042,54 @@ scan_double_list(const string &text) { // accept() is called below as each piece is pulled off and // accepted by the lexer; it increments the current column number. inline void accept() { - x_col_number += yyleng; + x_col_number += xyyleng; } -#line 927 "lex.yy.c" +#line 1049 "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 xyylex_destroy (void ); + +int xyyget_debug (void ); + +void xyyset_debug (int debug_flag ); + +YY_EXTRA_TYPE xyyget_extra (void ); + +void xyyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *xyyget_in (void ); + +void xyyset_in (FILE * in_str ); + +FILE *xyyget_out (void ); + +void xyyset_out (FILE * out_str ); + +int xyyget_leng (void ); + +char *xyyget_text (void ); + +int xyyget_lineno (void ); + +void xyyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -930,65 +1097,30 @@ inline void accept() { #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int xyywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int xyywrap (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. */ @@ -997,12 +1129,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( xyytext, xyyleng, 1, xyyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1010,22 +1141,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 = '*'; \ + unsigned n; \ for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( xyyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ + if ( c == EOF && ferror( xyyin ) ) \ 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, xyyin))==0 && ferror(xyyin)) \ { \ if( errno != EINTR) \ { \ @@ -1033,9 +1165,11 @@ YY_MALLOC_DECL break; \ } \ errno=0; \ - clearerr(yyin); \ + clearerr(xyyin); \ } \ - } + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -1056,14 +1190,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 xyylex (void); + +#define YY_DECL int xyylex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after xyytext and xyyleng * have been set up. */ #ifndef YY_USER_ACTION @@ -1078,59 +1218,71 @@ 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 "xLexer.lxx" -#line 1095 "lex.yy.c" +#line 1237 "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 */ + /* Create the reject buffer large enough to save one state per allowed character. */ + if ( ! (yy_state_buf) ) + (yy_state_buf) = (yy_state_type *)xyyalloc(YY_STATE_BUF_SIZE ); + if ( ! (yy_state_buf) ) + YY_FATAL_ERROR( "out of dynamic memory in xyylex()" ); - if ( ! yyin ) - yyin = stdin; + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyout ) - yyout = stdout; + if ( ! xyyin ) + xyyin = stdin; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! xyyout ) + xyyout = stdout; - yy_load_buffer_state(); + if ( ! YY_CURRENT_BUFFER ) { + xyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + xyy_create_buffer(xyyin,YY_BUF_SIZE ); + } + + xyy_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 xyytext. */ + *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_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; + yy_current_state = (yy_start); + + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; + yy_match: do { @@ -1138,63 +1290,62 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 141 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; ++yy_cp; } - while ( yy_base[yy_current_state] != 235 ); + while ( yy_base[yy_current_state] != 385 ); yy_find_action: - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { - if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] ) { - yy_act = yy_acclist[yy_lp]; + yy_act = yy_acclist[(yy_lp)]; if ( yy_act & YY_TRAILING_HEAD_MASK || - yy_looking_for_trail_begin ) + (yy_looking_for_trail_begin) ) { - if ( yy_act == yy_looking_for_trail_begin ) + if ( yy_act == (yy_looking_for_trail_begin) ) { - yy_looking_for_trail_begin = 0; + (yy_looking_for_trail_begin) = 0; yy_act &= ~YY_TRAILING_HEAD_MASK; break; } } else if ( yy_act & YY_TRAILING_MASK ) { - yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; - yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; + (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK; + (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK; } else { - yy_full_match = yy_cp; - yy_full_state = yy_state_ptr; - yy_full_lp = yy_lp; + (yy_full_match) = yy_cp; + (yy_full_state) = (yy_state_ptr); + (yy_full_lp) = (yy_lp); break; } - ++yy_lp; + ++(yy_lp); goto find_rule; } --yy_cp; - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; + yy_current_state = *--(yy_state_ptr); + (yy_lp) = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 1: +/* rule 1 can match eol */ YY_RULE_SETUP #line 412 "xLexer.lxx" { @@ -1497,7 +1648,7 @@ YY_RULE_SETUP YY_BREAK case 34: YY_RULE_SETUP -#line 615 "xLexer.lxx" +#line 614 "xLexer.lxx" { // Any other character is invalid. accept(); @@ -1506,36 +1657,36 @@ YY_RULE_SETUP YY_BREAK case 35: YY_RULE_SETUP -#line 620 "xLexer.lxx" +#line 619 "xLexer.lxx" ECHO; YY_BREAK -#line 1514 "lex.yy.c" +#line 1665 "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 xyyin at a new source and called + * xyylex(). 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 = xyyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1545,13 +1696,13 @@ ECHO; * end-of-buffer state). Contrast this with the test * in input(). */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -1564,41 +1715,41 @@ ECHO; yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( xyywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * yytext, we can now set up + * xyytext, 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; @@ -1606,30 +1757,30 @@ ECHO; else { - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; @@ -1640,8 +1791,7 @@ ECHO; "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of xyylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1650,21 +1800,20 @@ ECHO; * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1684,86 +1833,52 @@ static int yy_get_next_buffer() /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + 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; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (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 ); + xyyrestart(xyyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1771,146 +1886,140 @@ 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 *) xyyrealloc((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; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; + (yy_state_ptr) = (yy_state_buf); + *(yy_state_ptr)++ = yy_current_state; - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 141 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - + register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 135 ) + if ( yy_current_state >= 141 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 134); + yy_is_jam = (yy_current_state == 140); if ( ! yy_is_jam ) - *yy_state_ptr++ = yy_current_state; + *(yy_state_ptr)++ = yy_current_state; 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 xyytext */ + *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() @@ -1924,16 +2033,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + xyyrestart(xyyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( xyywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1943,175 +2052,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 xyytext */ + (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 xyyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + xyyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + xyy_create_buffer(xyyin,YY_BUF_SIZE ); } + xyy_init_buffer(YY_CURRENT_BUFFER,input_file ); + xyy_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 xyy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * xyypop_buffer_state(); + * xyypush_buffer_state(new_buffer); + */ + xyyensure_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; + xyy_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 (xyywrap()) processing, but the only time this flag + * is looked at is after xyywrap() 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 xyy_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; + xyyin = 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 xyy_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) xyyalloc(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 xyy_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 *) xyyalloc(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 xyy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + xyy_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 xyy_create_buffer() + * + */ + void xyy_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 ); + xyyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + xyyfree((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 xyyrestart() or at EOF. + */ + static void xyy_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; + + xyy_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 xyy_init_buffer was _probably_ + * called from xyyrestart() 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 xyy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -2128,31 +2231,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 ) + xyy_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 xyypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + xyyensure_buffer_stack(); + + /* This block is copied from xyy_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 xyy_switch_to_buffer. */ + xyy_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 xyypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + xyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + xyy_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 xyyensure_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**)xyyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in xyyensure_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**)xyyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in xyyensure_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 xyy_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) xyyalloc(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 xyy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; @@ -2164,58 +2363,53 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + xyy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to xyylex() 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 + * xyy_scan_bytes() instead. + */ +YY_BUFFER_STATE xyy_scan_string (yyconst char * yystr ) +{ + + return xyy_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 xyylex() 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 xyy_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 *) xyyalloc(n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in xyy_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 = xyy_scan_buffer(buf,n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in xyy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -2223,78 +2417,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. */ @@ -2302,69 +2435,186 @@ 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 xyytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + xyytext[xyyleng] = (yy_hold_char); \ + (yy_c_buf_p) = xyytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + xyyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int xyyget_lineno (void) +{ + + return xyylineno; +} + +/** Get the input stream. + * + */ +FILE *xyyget_in (void) +{ + return xyyin; +} + +/** Get the output stream. + * + */ +FILE *xyyget_out (void) +{ + return xyyout; +} + +/** Get the length of the current token. + * + */ +int xyyget_leng (void) +{ + return xyyleng; +} + +/** Get the current token. + * + */ + +char *xyyget_text (void) +{ + return xyytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void xyyset_lineno (int line_number ) +{ + + xyylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see xyy_switch_to_buffer + */ +void xyyset_in (FILE * in_str ) +{ + xyyin = in_str ; +} + +void xyyset_out (FILE * out_str ) +{ + xyyout = out_str ; +} + +int xyyget_debug (void) +{ + return xyy_flex_debug; +} + +void xyyset_debug (int bdebug ) +{ + xyy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from xyylex_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; + + (yy_state_buf) = 0; + (yy_state_ptr) = 0; + (yy_full_match) = 0; + (yy_lp) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + xyyin = stdin; + xyyout = stdout; +#else + xyyin = (FILE *) 0; + xyyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * xyylex_init() + */ + return 0; +} + +/* xyylex_destroy is for both reentrant and non-reentrant scanners. */ +int xyylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + xyy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + xyypop_buffer_state(); + } + + /* Destroy the stack itself. */ + xyyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + xyyfree ( (yy_state_buf) ); + (yy_state_buf) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * xyylex() 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 *xyyalloc (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 *xyyrealloc (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 @@ -2373,23 +2623,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 xyyfree (void * ptr ) +{ + free( (char *) ptr ); /* see xyyrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 620 "xLexer.lxx" +#define YYTABLES_NAME "yytables" + +#line 619 "xLexer.lxx" diff --git a/pandatool/src/xfile/xParser.cxx.prebuilt b/pandatool/src/xfile/xParser.cxx.prebuilt index bd20108a89..58e962f50a 100644 --- a/pandatool/src/xfile/xParser.cxx.prebuilt +++ b/pandatool/src/xfile/xParser.cxx.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875b. */ +/* 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 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" @@ -45,8 +58,7 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ +/* Substitute the variable and function names. */ #define yyparse xyyparse #define yylex xyylex #define yyerror xyyerror @@ -95,6 +107,7 @@ TOKEN_ARRAY = 52 }; #endif +/* Tokens. */ #define TOKEN_NAME 1 #define TOKEN_STRING 2 #define TOKEN_INTEGER 3 @@ -188,7 +201,12 @@ x_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 int YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -200,49 +218,171 @@ typedef int YYSTYPE; /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ -#line 205 "y.tab.c" +/* Line 216 of yacc.c. */ +#line 223 "y.tab.c" -#if ! defined (yyoverflow) || YYERROR_VERBOSE +#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 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. */ -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca +# 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 -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca +# 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 -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free # endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (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 yyss; + yytype_int16 yyss; YYSTYPE yyvs; }; @@ -252,24 +392,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) + 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 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 @@ -287,39 +427,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 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 114 -/* YYNTOKENS -- Number of terminals. */ +/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 34 -/* YYNNTS -- Number of nonterminals. */ +/* YYNNTS -- Number of nonterminals. */ #define YYNNTS 35 -/* YYNRULES -- Number of rules. */ +/* YYNRULES -- Number of rules. */ #define YYNRULES 71 -/* YYNRULES -- Number of states. */ +/* YYNRULES -- Number of states. */ #define YYNSTATES 100 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 257 -#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, 3, 4, 5, 2, 6, 7, 8, 2, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, @@ -352,7 +486,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, 8, 11, 14, 15, 23, 28, 30, 32, 34, 36, 38, 40, 43, 45, 47, 49, @@ -364,8 +498,8 @@ static const unsigned char yyprhs[] = 178, 181 }; -/* 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[] = { 35, 0, -1, 68, -1, 35, 36, -1, 35, 59, -1, 35, 10, -1, -1, 20, 53, 9, 56, 37, @@ -389,40 +523,40 @@ static const yysigned_char yyrhs[] = }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = +static const yytype_uint16 yyrline[] = { 0, 108, 108, 109, 110, 111, 116, 115, 130, 131, 135, 136, 140, 144, 148, 149, 153, 154, 155, 159, 167, 171, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 231, 236, 249, 250, 254, 258, 262, 274, 277, 283, 292, 308, 312, 313, 317, 324, 328, - 332, 336, 340, 344, 349, 348, 374, 375, 379, 384, - 388, 394, 400, 406, 412, 416, 420, 424, 425, 429, - 438, 454 + 332, 336, 340, 344, 349, 348, 376, 377, 381, 386, + 390, 398, 406, 414, 420, 424, 428, 432, 433, 437, + 446, 462 }; #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", "TOKEN_NAME", "TOKEN_STRING", - "TOKEN_INTEGER", "TOKEN_GUID", "TOKEN_INTEGER_LIST", - "TOKEN_REALNUM_LIST", "TOKEN_OBRACE", "TOKEN_CBRACE", "TOKEN_OPAREN", - "TOKEN_CPAREN", "TOKEN_OBRACKET", "TOKEN_CBRACKET", "TOKEN_OANGLE", - "TOKEN_CANGLE", "TOKEN_DOT", "TOKEN_COMMA", "TOKEN_SEMICOLON", - "TOKEN_TEMPLATE", "TOKEN_WORD", "TOKEN_DWORD", "TOKEN_FLOAT", - "TOKEN_DOUBLE", "TOKEN_CHAR", "TOKEN_UCHAR", "TOKEN_SWORD", - "TOKEN_SDWORD", "TOKEN_VOID", "TOKEN_LPSTR", "TOKEN_UNICODE", - "TOKEN_CSTRING", "TOKEN_ARRAY", "$accept", "xfile", "template", "@1", - "template_parts", "template_members_part", "template_option_info", - "template_members_list", "template_members", "primitive", "array", - "template_reference", "primitive_type", "array_data_type", - "dimension_list", "dimension", "dimension_size", "template_option_list", - "template_option_part", "singleword_name", "multiword_name", - "optional_multiword_name", "class_id", "optional_class_id", "ellipsis", - "object", "@2", "data_parts_list", "data_part", "integer_list", + "$end", "error", "$undefined", "TOKEN_NAME", "TOKEN_STRING", + "TOKEN_INTEGER", "TOKEN_GUID", "TOKEN_INTEGER_LIST", + "TOKEN_REALNUM_LIST", "TOKEN_OBRACE", "TOKEN_CBRACE", "TOKEN_OPAREN", + "TOKEN_CPAREN", "TOKEN_OBRACKET", "TOKEN_CBRACKET", "TOKEN_OANGLE", + "TOKEN_CANGLE", "TOKEN_DOT", "TOKEN_COMMA", "TOKEN_SEMICOLON", + "TOKEN_TEMPLATE", "TOKEN_WORD", "TOKEN_DWORD", "TOKEN_FLOAT", + "TOKEN_DOUBLE", "TOKEN_CHAR", "TOKEN_UCHAR", "TOKEN_SWORD", + "TOKEN_SDWORD", "TOKEN_VOID", "TOKEN_LPSTR", "TOKEN_UNICODE", + "TOKEN_CSTRING", "TOKEN_ARRAY", "$accept", "xfile", "template", "@1", + "template_parts", "template_members_part", "template_option_info", + "template_members_list", "template_members", "primitive", "array", + "template_reference", "primitive_type", "array_data_type", + "dimension_list", "dimension", "dimension_size", "template_option_list", + "template_option_part", "singleword_name", "multiword_name", + "optional_multiword_name", "class_id", "optional_class_id", "ellipsis", + "object", "@2", "data_parts_list", "data_part", "integer_list", "realnum_list", "string", "list_separator", "data_reference", "empty", 0 }; #endif @@ -430,7 +564,7 @@ static const char *const yytname[] = # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ -static const unsigned short yytoknum[] = +static const yytype_uint16 yytoknum[] = { 0, 256, 257, 1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, @@ -440,7 +574,7 @@ static const unsigned short yytoknum[] = # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = +static const yytype_uint8 yyr1[] = { 0, 34, 35, 35, 35, 35, 37, 36, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 42, 43, @@ -453,7 +587,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, 2, 2, 2, 0, 7, 4, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, @@ -468,7 +602,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[] = { 71, 0, 2, 1, 44, 5, 0, 3, 71, 4, 0, 45, 49, 0, 48, 0, 46, 47, 54, 50, @@ -482,8 +616,8 @@ static const unsigned char yydefact[] = 20, 36, 0, 8, 41, 43, 70, 58, 37, 53 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { -1, 1, 7, 22, 38, 39, 77, 40, 41, 42, 43, 44, 45, 51, 73, 74, 88, 78, 79, 8, @@ -494,7 +628,7 @@ static const yysigned_char yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -48 -static const yysigned_char yypact[] = +static const yytype_int8 yypact[] = { -48, 8, -48, -48, -48, -48, 9, -48, 40, -48, 41, -48, 4, 42, -48, 43, -48, -48, -48, -48, @@ -509,7 +643,7 @@ static const yysigned_char yypact[] = }; /* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = +static const yytype_int8 yypgoto[] = { -48, -48, -48, -48, -48, -48, -48, -48, 17, -48, -48, -48, 28, -48, -48, -7, -48, -48, -8, -6, @@ -522,7 +656,7 @@ static const yysigned_char yypgoto[] = number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -12 -static const yysigned_char yytable[] = +static const yytype_int8 yytable[] = { 10, 23, 2, 71, 72, 75, 4, 16, 3, 17, 90, 4, 4, 11, 84, 87, 46, 4, 5, 16, @@ -538,7 +672,7 @@ static const yysigned_char yytable[] = 0, 0, 0, 63, 64 }; -static const yysigned_char yycheck[] = +static const yytype_int8 yycheck[] = { 6, 21, 0, 50, 13, 52, 3, 3, 0, 5, 19, 3, 3, 3, 61, 5, 22, 3, 10, 3, @@ -556,7 +690,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, 35, 68, 0, 3, 10, 20, 36, 53, 59, 53, 3, 54, 55, 68, 9, 3, 5, 9, 6, @@ -570,22 +704,6 @@ static const unsigned char yystos[] = 19, 49, 17, 14, 52, 56, 56, 10, 14, 17 }; -#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) @@ -593,7 +711,7 @@ static const unsigned char yystos[] = #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily @@ -611,30 +729,63 @@ 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 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* 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) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; +# 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 + +/* 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 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 @@ -655,42 +806,96 @@ while (0) do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} 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)) -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (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 (cinluded). | +| TOP (included). | `------------------------------------------------------------------*/ -#if defined (__STDC__) || defined (__cplusplus) +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (short *bottom, short *top) +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) #else static void yy_stack_print (bottom, top) - short *bottom; - short *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"); } @@ -699,45 +904,52 @@ 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. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -752,13 +964,9 @@ 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. */ -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -768,45 +976,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; @@ -816,70 +1026,192 @@ 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]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - 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 (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: - break; + break; } } @@ -887,13 +1219,13 @@ yydestruct (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 (); @@ -902,10 +1234,10 @@ int yyparse (); -/* The lookahead symbol. */ +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -918,14 +1250,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 @@ -936,13 +1272,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; - /* Lookahead token as an internal (translated) token number. */ + /* 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, @@ -953,18 +1295,18 @@ yyparse () to reallocate them elsewhere. */ /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *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; @@ -973,9 +1315,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")); @@ -999,8 +1341,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: @@ -1013,18 +1354,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 *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), @@ -1035,21 +1376,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 *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); @@ -1080,19 +1421,17 @@ yyparse () `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* 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 == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1107,7 +1446,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1127,22 +1466,21 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* 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; @@ -1180,8 +1518,8 @@ yyreduce: case 6: #line 116 "xParser.yxx" { - yyval.u.node = current_node; - XFileTemplate *templ = new XFileTemplate(x_file, yyvsp[-2].str, yyvsp[0].guid); + (yyval.u.node) = current_node; + XFileTemplate *templ = new XFileTemplate(x_file, (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].guid)); current_node->add_child(templ); current_node = templ; } @@ -1190,8 +1528,8 @@ yyreduce: case 7: #line 123 "xParser.yxx" { - yyval.u.node = current_node; - current_node = yyvsp[-2].u.node; + (yyval.u.node) = current_node; + current_node = (yyvsp[(5) - (7)].u.node); } break; @@ -1205,7 +1543,7 @@ yyreduce: case 19: #line 160 "xParser.yxx" { - current_data_def = new XFileDataDef(x_file, yyvsp[-1].str, yyvsp[-2].u.primitive_type); + current_data_def = new XFileDataDef(x_file, (yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].u.primitive_type)); current_node->add_child(current_data_def); } break; @@ -1213,11 +1551,11 @@ yyreduce: case 21: #line 172 "xParser.yxx" { - XFileTemplate *xtemplate = x_file->find_template(yyvsp[-2].str); + XFileTemplate *xtemplate = x_file->find_template((yyvsp[(1) - (3)].str)); if (xtemplate == (XFileTemplate *)NULL) { - yyerror("Unknown template: " + yyvsp[-2].str); + yyerror("Unknown template: " + (yyvsp[(1) - (3)].str)); } else { - current_data_def = new XFileDataDef(x_file, yyvsp[-1].str, XFileDataDef::T_template, xtemplate); + current_data_def = new XFileDataDef(x_file, (yyvsp[(2) - (3)].str), XFileDataDef::T_template, xtemplate); current_node->add_child(current_data_def); } } @@ -1226,84 +1564,84 @@ yyreduce: case 22: #line 185 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_word; + (yyval.u.primitive_type) = XFileDataDef::T_word; } break; case 23: #line 189 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_dword; + (yyval.u.primitive_type) = XFileDataDef::T_dword; } break; case 24: #line 193 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_float; + (yyval.u.primitive_type) = XFileDataDef::T_float; } break; case 25: #line 197 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_double; + (yyval.u.primitive_type) = XFileDataDef::T_double; } break; case 26: #line 201 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_char; + (yyval.u.primitive_type) = XFileDataDef::T_char; } break; case 27: #line 205 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_uchar; + (yyval.u.primitive_type) = XFileDataDef::T_uchar; } break; case 28: #line 209 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_sword; + (yyval.u.primitive_type) = XFileDataDef::T_sword; } break; case 29: #line 213 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_sdword; + (yyval.u.primitive_type) = XFileDataDef::T_sdword; } break; case 30: #line 217 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_string; + (yyval.u.primitive_type) = XFileDataDef::T_string; } break; case 31: #line 221 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_unicode; + (yyval.u.primitive_type) = XFileDataDef::T_unicode; } break; case 32: #line 225 "xParser.yxx" { - yyval.u.primitive_type = XFileDataDef::T_cstring; + (yyval.u.primitive_type) = XFileDataDef::T_cstring; } break; case 33: #line 232 "xParser.yxx" { - current_data_def = new XFileDataDef(x_file, yyvsp[0].str, yyvsp[-1].u.primitive_type); + current_data_def = new XFileDataDef(x_file, (yyvsp[(2) - (2)].str), (yyvsp[(1) - (2)].u.primitive_type)); current_node->add_child(current_data_def); } break; @@ -1311,11 +1649,11 @@ yyreduce: case 34: #line 237 "xParser.yxx" { - XFileTemplate *xtemplate = x_file->find_template(yyvsp[-1].str); + XFileTemplate *xtemplate = x_file->find_template((yyvsp[(1) - (2)].str)); if (xtemplate == (XFileTemplate *)NULL) { - yyerror("Unknown template: " + yyvsp[-1].str); + yyerror("Unknown template: " + (yyvsp[(1) - (2)].str)); } else { - current_data_def = new XFileDataDef(x_file, yyvsp[0].str, XFileDataDef::T_template, xtemplate); + current_data_def = new XFileDataDef(x_file, (yyvsp[(2) - (2)].str), XFileDataDef::T_template, xtemplate); current_node->add_child(current_data_def); } } @@ -1324,16 +1662,16 @@ yyreduce: case 38: #line 259 "xParser.yxx" { - current_data_def->add_array_def(XFileArrayDef(yyvsp[0].u.number)); + current_data_def->add_array_def(XFileArrayDef((yyvsp[(1) - (1)].u.number))); } break; case 39: #line 263 "xParser.yxx" { - XFileNode *data_def = current_node->find_child(yyvsp[0].str); + XFileNode *data_def = current_node->find_child((yyvsp[(1) - (1)].str)); if (data_def == (XFileNode *)NULL) { - yyerror("Unknown identifier: " + yyvsp[0].str); + yyerror("Unknown identifier: " + (yyvsp[(1) - (1)].str)); } else { current_data_def->add_array_def(XFileArrayDef(DCAST(XFileDataDef, data_def))); } @@ -1355,9 +1693,9 @@ yyreduce: case 42: #line 284 "xParser.yxx" { - XFileTemplate *xtemplate = x_file->find_template(yyvsp[0].str); + XFileTemplate *xtemplate = x_file->find_template((yyvsp[(1) - (1)].str)); if (xtemplate == (XFileTemplate *)NULL) { - yyerror("Unknown template: " + yyvsp[0].str); + yyerror("Unknown template: " + (yyvsp[(1) - (1)].str)); } else { DCAST(XFileTemplate, current_node)->add_option(xtemplate); } @@ -1367,13 +1705,13 @@ yyreduce: case 43: #line 293 "xParser.yxx" { - XFileTemplate *xtemplate = x_file->find_template(yyvsp[0].guid); + XFileTemplate *xtemplate = x_file->find_template((yyvsp[(2) - (2)].guid)); if (xtemplate == (XFileTemplate *)NULL) { - yyerror("Unknown template: " + yyvsp[-1].str); + yyerror("Unknown template: " + (yyvsp[(1) - (2)].str)); } else { - if (xtemplate->get_name() != yyvsp[-1].str) { + if (xtemplate->get_name() != (yyvsp[(1) - (2)].str)) { xyywarning("GUID identifies template " + xtemplate->get_name() + - ", not " + yyvsp[-1].str); + ", not " + (yyvsp[(1) - (2)].str)); } DCAST(XFileTemplate, current_node)->add_option(xtemplate); } @@ -1383,42 +1721,42 @@ yyreduce: case 46: #line 314 "xParser.yxx" { - yyval.str = yyvsp[-1].str + " " + yyvsp[0].str; + (yyval.str) = (yyvsp[(1) - (2)].str) + " " + (yyvsp[(2) - (2)].str); } break; case 47: #line 318 "xParser.yxx" { - yyval.str = yyvsp[-1].str + " " + yyvsp[0].str; + (yyval.str) = (yyvsp[(1) - (2)].str) + " " + (yyvsp[(2) - (2)].str); } break; case 48: #line 325 "xParser.yxx" { - yyval.str = string(); + (yyval.str) = string(); } break; case 51: #line 337 "xParser.yxx" { - yyval.guid = WindowsGuid(); + (yyval.guid) = WindowsGuid(); } break; case 54: #line 349 "xParser.yxx" { - XFileTemplate *xtemplate = x_file->find_template(yyvsp[-2].str); - yyval.u.node = current_node; + XFileTemplate *xtemplate = x_file->find_template((yyvsp[(1) - (3)].str)); + (yyval.u.node) = current_node; if (xtemplate == (XFileTemplate *)NULL) { - yyerror("Unknown template: " + yyvsp[-2].str); + yyerror("Unknown template: " + (yyvsp[(1) - (3)].str)); } else { XFileDataNodeTemplate *templ = - new XFileDataNodeTemplate(x_file, yyvsp[-1].str, xtemplate); + new XFileDataNodeTemplate(x_file, (yyvsp[(2) - (3)].str), xtemplate); current_node->add_child(templ); current_node = templ; } @@ -1428,102 +1766,109 @@ yyreduce: case 55: #line 363 "xParser.yxx" { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->finalize_parse_data(); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->finalize_parse_data(); + } - yyval.u.node = current_node; - current_node = yyvsp[-3].u.node; + (yyval.u.node) = current_node; + current_node = (yyvsp[(4) - (7)].u.node); } break; case 58: -#line 380 "xParser.yxx" +#line 382 "xParser.yxx" { // nested references should be added as children too. - current_node->add_child(yyvsp[-1].u.node); + current_node->add_child((yyvsp[(2) - (3)].u.node)); } break; case 59: -#line 385 "xParser.yxx" +#line 387 "xParser.yxx" { // nested objects are just quietly added as children. } break; case 60: -#line 389 "xParser.yxx" +#line 391 "xParser.yxx" { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_int(yyvsp[0].int_list); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_int((yyvsp[(1) - (1)].int_list)); + } } break; case 61: -#line 395 "xParser.yxx" +#line 399 "xParser.yxx" { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_double(yyvsp[0].double_list); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_double((yyvsp[(1) - (1)].double_list)); + } } break; case 62: -#line 401 "xParser.yxx" +#line 407 "xParser.yxx" { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_string(yyvsp[-1].str); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_string((yyvsp[(1) - (2)].str)); + } } break; case 63: -#line 407 "xParser.yxx" +#line 415 "xParser.yxx" { } break; case 69: -#line 430 "xParser.yxx" +#line 438 "xParser.yxx" { - XFileDataNodeTemplate *data_object = x_file->find_data_object(yyvsp[0].str); + XFileDataNodeTemplate *data_object = x_file->find_data_object((yyvsp[(1) - (1)].str)); if (data_object == (XFileDataObject *)NULL) { - yyerror("Unknown data_object: " + yyvsp[0].str); + yyerror("Unknown data_object: " + (yyvsp[(1) - (1)].str)); } - yyval.u.node = new XFileDataNodeReference(data_object); + (yyval.u.node) = new XFileDataNodeReference(data_object); } break; case 70: -#line 439 "xParser.yxx" +#line 447 "xParser.yxx" { - XFileDataNodeTemplate *data_object = x_file->find_data_object(yyvsp[0].guid); + XFileDataNodeTemplate *data_object = x_file->find_data_object((yyvsp[(2) - (2)].guid)); if (data_object == (XFileDataObject *)NULL) { - yyerror("Unknown data_object: " + yyvsp[-1].str); + yyerror("Unknown data_object: " + (yyvsp[(1) - (2)].str)); } else { - if (data_object->get_name() != yyvsp[-1].str) { + if (data_object->get_name() != (yyvsp[(1) - (2)].str)) { xyywarning("GUID identifies data_object " + data_object->get_name() + - ", not " + yyvsp[-1].str); + ", not " + (yyvsp[(1) - (2)].str)); } } - yyval.u.node = new XFileDataNodeReference(data_object); + (yyval.u.node) = new XFileDataNodeReference(data_object); } break; +/* Line 1267 of yacc.c. */ +#line 1866 "y.tab.c" + default: break; } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); -/* Line 999 of yacc.c. */ -#line 1522 "y.tab.c" - - yyvsp -= yylen; - yyssp -= yylen; - - + YYPOPSTACK (yylen); + yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1552,104 +1897,92 @@ 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 } if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* 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) - { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; - } - - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - + 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 lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ +/*---------------------------------------------------. +| 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. */ @@ -1671,22 +2004,23 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -1706,21 +2040,39 @@ yyabortlab: 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/xfile/xParser.h.prebuilt b/pandatool/src/xfile/xParser.h.prebuilt index 61bd289e29..897a5b3f30 100644 --- a/pandatool/src/xfile/xParser.h.prebuilt +++ b/pandatool/src/xfile/xParser.h.prebuilt @@ -1,7 +1,9 @@ -/* A Bison parser, made by GNU Bison 1.875b. */ +/* 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 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 @@ -62,6 +72,7 @@ TOKEN_ARRAY = 52 }; #endif +/* Tokens. */ #define TOKEN_NAME 1 #define TOKEN_STRING 2 #define TOKEN_INTEGER 3 @@ -97,7 +108,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 @@ -106,5 +117,3 @@ typedef int YYSTYPE; extern YYSTYPE xyylval; - - diff --git a/pandatool/src/xfile/xParser.yxx b/pandatool/src/xfile/xParser.yxx index 1d0fd53e8a..3d909962ea 100644 --- a/pandatool/src/xfile/xParser.yxx +++ b/pandatool/src/xfile/xParser.yxx @@ -361,9 +361,11 @@ object: } optional_class_id data_parts_list TOKEN_CBRACE { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->finalize_parse_data(); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->finalize_parse_data(); + } $$ = current_node; current_node = $4; @@ -387,21 +389,27 @@ data_part: } | integer_list { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_int($1); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_int($1); + } } | realnum_list { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_double($1); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_double($1); + } } | string list_separator { - XFileDataNodeTemplate *current_template = - DCAST(XFileDataNodeTemplate, current_node); - current_template->add_parse_string($1); + if (current_node->is_exact_type(XFileDataNodeTemplate::get_class_type())) { + XFileDataNodeTemplate *current_template = + DCAST(XFileDataNodeTemplate, current_node); + current_template->add_parse_string($1); + } } | list_separator { diff --git a/pandatool/src/xfileegg/xFileAnimationSet.cxx b/pandatool/src/xfileegg/xFileAnimationSet.cxx index 0f5eba5617..9bce47b3df 100644 --- a/pandatool/src/xfileegg/xFileAnimationSet.cxx +++ b/pandatool/src/xfileegg/xFileAnimationSet.cxx @@ -28,6 +28,7 @@ //////////////////////////////////////////////////////////////////// XFileAnimationSet:: XFileAnimationSet() { + _frame_rate = 0.0; } //////////////////////////////////////////////////////////////////// @@ -93,6 +94,9 @@ create_hierarchy(XFileToEggConverter *converter) { anim_table->add_data(joint->get_transform3d()); } anim_table->optimize(); + if (_frame_rate != 0.0) { + anim_table->set_fps(_frame_rate); + } } return true; diff --git a/pandatool/src/xfileegg/xFileAnimationSet.h b/pandatool/src/xfileegg/xFileAnimationSet.h index c3edfaf7cf..d85355f4b0 100644 --- a/pandatool/src/xfileegg/xFileAnimationSet.h +++ b/pandatool/src/xfileegg/xFileAnimationSet.h @@ -71,6 +71,9 @@ public: FrameData &create_frame_data(const string &joint_name); +public: + double _frame_rate; + private: void mirror_table(XFileToEggConverter *converter, EggGroup *model_node, EggTable *anim_node); diff --git a/pandatool/src/xfileegg/xFileToEggConverter.cxx b/pandatool/src/xfileegg/xFileToEggConverter.cxx index cfe412b9fe..e2982c3327 100644 --- a/pandatool/src/xfileegg/xFileToEggConverter.cxx +++ b/pandatool/src/xfileegg/xFileToEggConverter.cxx @@ -35,7 +35,7 @@ XFileToEggConverter:: XFileToEggConverter() { _make_char = false; - _frame_rate = 30.0; + _frame_rate = 0.0; _x_file = new XFile(true); _dart_node = NULL; } @@ -296,6 +296,8 @@ get_toplevel() { int num_objects = _x_file->get_num_objects(); int i; + _ticks_per_second = 4800; // X File default. + // First, make a pass through the toplevel objects and see if we // have frames and/or animation. _any_frames = false; @@ -360,6 +362,9 @@ convert_toplevel_object(XFileDataNode *obj, EggGroupNode *egg_parent) { return false; } + } else if (obj->is_standard_object("AnimTicksPerSecond")) { + _ticks_per_second = (*obj)[0].i(); + } else if (obj->is_standard_object("Mesh")) { // If there are any Frames at all in the file, then assume a Mesh // at the toplevel is just present to define a reference that will @@ -498,6 +503,9 @@ convert_animation_set(XFileDataNode *obj) { XFileAnimationSet *animation_set = new XFileAnimationSet(); animation_set->set_name(obj->get_name()); + _total_tick_deltas = 0; + _num_ticks = 0; + // Now walk through the children of the set; each one animates a // different joint. int num_objects = obj->get_num_objects(); @@ -507,6 +515,15 @@ convert_animation_set(XFileDataNode *obj) { } } + animation_set->_frame_rate = _frame_rate; + if (_num_ticks != 0 && _frame_rate == 0.0) { + // Compute the frame rate from the timing information. + double delta = (double)_total_tick_deltas / (double)_num_ticks; + if (delta != 0.0) { + animation_set->_frame_rate = (double)_ticks_per_second / delta; + } + } + _animation_sets.push_back(animation_set); return true; @@ -626,12 +643,22 @@ convert_animation_key(XFileDataNode *obj, const string &joint_name, const XFileDataObject &keys = (*obj)["keys"]; + int last_time = 0; for (int i = 0; i < keys.size(); i++) { - // We ignore the time value. It seems to be of questionable value - // anyway, being of all sorts of crazy scales; and Panda doesn't - // support timestamped keyframes anyway. Assume the x file was - // generated with one frame per frame of animation, and translate - // accordingly. + // The time value is problematic, since it allows x files to + // specify keyframes of arbitrary duration. Panda doesn't support + // this; all frames in Panda must be of a constant duration. + // Thus, we largely ignore the time value, but we take the average + // of all deltas as the duration. This will correctly handle .x + // files with uniform keyframes, at least. + + int this_time = keys[i]["time"].i(); + if (i != 0) { + int delta = this_time - last_time; + _total_tick_deltas += delta; + ++_num_ticks; + } + last_time = this_time; const XFileDataObject &values = keys[i]["tfkeys"]["values"]; if (!set_animation_frame(joint_name, table, i, key_type, values)) { diff --git a/pandatool/src/xfileegg/xFileToEggConverter.h b/pandatool/src/xfileegg/xFileToEggConverter.h index 2e0a91b106..2c3b9ec181 100644 --- a/pandatool/src/xfileegg/xFileToEggConverter.h +++ b/pandatool/src/xfileegg/xFileToEggConverter.h @@ -87,7 +87,7 @@ private: FrameData &table); bool set_animation_frame(const string &joint_name, FrameData &table, int frame, int key_type, - const XFileDataObject &values); + const XFileDataObject &values); bool convert_mesh(XFileDataNode *obj, EggGroupNode *egg_parent); bool create_polygons(); @@ -97,6 +97,9 @@ private: bool _any_frames; bool _any_animation; + int _ticks_per_second; + int _total_tick_deltas; + int _num_ticks; typedef pvector Meshes; Meshes _meshes; diff --git a/pandatool/src/xfileprogs/xFileToEgg.cxx b/pandatool/src/xfileprogs/xFileToEgg.cxx index 48c6eb2248..18bc458b25 100644 --- a/pandatool/src/xfileprogs/xFileToEgg.cxx +++ b/pandatool/src/xfileprogs/xFileToEgg.cxx @@ -51,10 +51,9 @@ XFileToEgg() : add_option ("fr", "fps", 0, - "Specify the frame rate of the resulting animation. The animation " - "tables should have one entry per frame, rather than one per " - "keyframe; the time component of the animation tables is ignored " - "and the frames are played sequentially at the specified frame rate.", + "Specify the frame rate of the resulting animation. If this is " + "omitted or 0, the frame rate is inferred from the file itself; but " + "note that the file must contain evenly-spaced keyframes.", &XFileToEgg::dispatch_double, NULL, &_frame_rate); add_option @@ -83,7 +82,7 @@ XFileToEgg() : "Specify the coordinate system of the input " + _format_name + " file. Normally, this is y-up-left."); - _frame_rate = 30.0; + _frame_rate = 0.0; _coordinate_system = CS_yup_left; }