diff --git a/Sources/Ecc/Parser.cpp b/Sources/Ecc/Parser.cpp index c328e48..c8935d7 100644 --- a/Sources/Ecc/Parser.cpp +++ b/Sources/Ecc/Parser.cpp @@ -1,110 +1,257 @@ +/* A Bison parser, made by GNU Bison 2.3. */ -/* A Bison parser, made from ecc/parser.y with Bison version GNU Bison version 1.24 - */ +/* Skeleton implementation for Bison's Yacc-like parsers in C -#define YYBISON 1 /* Identify Bison output. */ + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. -#define c_char 258 -#define c_int 259 -#define c_float 260 -#define c_bool 261 -#define c_string 262 -#define identifier 263 -#define cppblock 264 -#define k_while 265 -#define k_for 266 -#define k_if 267 -#define k_else 268 -#define k_enum 269 -#define k_switch 270 -#define k_case 271 -#define k_class 272 -#define k_do 273 -#define k_void 274 -#define k_const 275 -#define k_inline 276 -#define k_static 277 -#define k_virtual 278 -#define k_return 279 -#define k_autowait 280 -#define k_autocall 281 -#define k_waitevent 282 -#define k_event 283 -#define k_name 284 -#define k_thumbnail 285 -#define k_features 286 -#define k_uses 287 -#define k_export 288 -#define k_texture 289 -#define k_sound 290 -#define k_model 291 -#define k_properties 292 -#define k_components 293 -#define k_functions 294 -#define k_procedures 295 -#define k_wait 296 -#define k_on 297 -#define k_otherwise 298 -#define k_call 299 -#define k_jump 300 -#define k_stop 301 -#define k_resume 302 -#define k_pass 303 -#define k_CTString 304 -#define k_CTStringTrans 305 -#define k_CTFileName 306 -#define k_CTFileNameNoDep 307 -#define k_BOOL 308 -#define k_COLOR 309 -#define k_FLOAT 310 -#define k_INDEX 311 -#define k_RANGE 312 -#define k_CEntityPointer 313 -#define k_CModelObject 314 -#define k_CModelInstance 315 -#define k_CAnimObject 316 -#define k_CSoundObject 317 -#define k_CPlacement3D 318 -#define k_FLOATaabbox3D 319 -#define k_FLOATmatrix3D 320 -#define k_FLOATquat3D 321 -#define k_ANGLE 322 -#define k_FLOAT3D 323 -#define k_ANGLE3D 324 -#define k_FLOATplane3D 325 -#define k_ANIMATION 326 -#define k_ILLUMINATIONTYPE 327 -#define k_FLAGS 328 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -#line 1 "ecc/parser.y" + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + c_char = 258, + c_int = 259, + c_float = 260, + c_bool = 261, + c_string = 262, + identifier = 263, + cppblock = 264, + k_while = 265, + k_for = 266, + k_if = 267, + k_else = 268, + k_enum = 269, + k_switch = 270, + k_case = 271, + k_class = 272, + k_do = 273, + k_void = 274, + k_const = 275, + k_inline = 276, + k_static = 277, + k_virtual = 278, + k_return = 279, + k_autowait = 280, + k_autocall = 281, + k_waitevent = 282, + k_event = 283, + k_name = 284, + k_thumbnail = 285, + k_features = 286, + k_uses = 287, + k_export = 288, + k_texture = 289, + k_sound = 290, + k_model = 291, + k_properties = 292, + k_components = 293, + k_functions = 294, + k_procedures = 295, + k_wait = 296, + k_on = 297, + k_otherwise = 298, + k_call = 299, + k_jump = 300, + k_stop = 301, + k_resume = 302, + k_pass = 303, + k_CTString = 304, + k_CTStringTrans = 305, + k_CTFileName = 306, + k_CTFileNameNoDep = 307, + k_BOOL = 308, + k_COLOR = 309, + k_FLOAT = 310, + k_INDEX = 311, + k_RANGE = 312, + k_CEntityPointer = 313, + k_CModelObject = 314, + k_CModelInstance = 315, + k_CAnimObject = 316, + k_CSoundObject = 317, + k_CPlacement3D = 318, + k_FLOATaabbox3D = 319, + k_FLOATmatrix3D = 320, + k_FLOATquat3D = 321, + k_ANGLE = 322, + k_FLOAT3D = 323, + k_ANGLE3D = 324, + k_FLOATplane3D = 325, + k_ANIMATION = 326, + k_ILLUMINATIONTYPE = 327, + k_FLAGS = 328 + }; +#endif +/* Tokens. */ +#define c_char 258 +#define c_int 259 +#define c_float 260 +#define c_bool 261 +#define c_string 262 +#define identifier 263 +#define cppblock 264 +#define k_while 265 +#define k_for 266 +#define k_if 267 +#define k_else 268 +#define k_enum 269 +#define k_switch 270 +#define k_case 271 +#define k_class 272 +#define k_do 273 +#define k_void 274 +#define k_const 275 +#define k_inline 276 +#define k_static 277 +#define k_virtual 278 +#define k_return 279 +#define k_autowait 280 +#define k_autocall 281 +#define k_waitevent 282 +#define k_event 283 +#define k_name 284 +#define k_thumbnail 285 +#define k_features 286 +#define k_uses 287 +#define k_export 288 +#define k_texture 289 +#define k_sound 290 +#define k_model 291 +#define k_properties 292 +#define k_components 293 +#define k_functions 294 +#define k_procedures 295 +#define k_wait 296 +#define k_on 297 +#define k_otherwise 298 +#define k_call 299 +#define k_jump 300 +#define k_stop 301 +#define k_resume 302 +#define k_pass 303 +#define k_CTString 304 +#define k_CTStringTrans 305 +#define k_CTFileName 306 +#define k_CTFileNameNoDep 307 +#define k_BOOL 308 +#define k_COLOR 309 +#define k_FLOAT 310 +#define k_INDEX 311 +#define k_RANGE 312 +#define k_CEntityPointer 313 +#define k_CModelObject 314 +#define k_CModelInstance 315 +#define k_CAnimObject 316 +#define k_CSoundObject 317 +#define k_CPlacement3D 318 +#define k_FLOATaabbox3D 319 +#define k_FLOATmatrix3D 320 +#define k_FLOATquat3D 321 +#define k_ANGLE 322 +#define k_FLOAT3D 323 +#define k_ANGLE3D 324 +#define k_FLOATplane3D 325 +#define k_ANIMATION 326 +#define k_ILLUMINATIONTYPE 327 +#define k_FLAGS 328 + + + + +/* Copy the first part of user declarations. */ +#line 1 "./Ecc/Parser.y" // rcg10042001 Changed to specify Ecc directory... #include "Ecc/StdH.h" #include "Ecc/Main.h" -static char *_strCurrentClass; +// turn off over-helpful bit of bison... --ryan. +#ifdef __GNUC__ +#define __attribute__(x) +#endif + +#define YYINITDEPTH 1000 + +static const char *_strCurrentClass; static int _iCurrentClassID; -static char *_strCurrentBase; -static char *_strCurrentDescription; -static char *_strCurrentThumbnail; -static char *_strCurrentEnum; +static const char *_strCurrentBase; +static const char *_strCurrentDescription; +static const char *_strCurrentThumbnail; +static const char *_strCurrentEnum; static int _bClassIsExported = 0; -static char *_strCurrentPropertyID; -static char *_strCurrentPropertyIdentifier; -static char *_strCurrentPropertyPropertyType; -static char *_strCurrentPropertyEnumType; -static char *_strCurrentPropertyDataType; -static char *_strCurrentPropertyName; -static char *_strCurrentPropertyShortcut; -static char *_strCurrentPropertyColor; -static char *_strCurrentPropertyFlags; -static char *_strCurrentPropertyDefaultCode; +static const char *_strCurrentPropertyID; +static const char *_strCurrentPropertyIdentifier; +static const char *_strCurrentPropertyPropertyType; +static const char *_strCurrentPropertyEnumType; +static const char *_strCurrentPropertyDataType; +static const char *_strCurrentPropertyName; +static const char *_strCurrentPropertyShortcut; +static const char *_strCurrentPropertyColor; +static const char *_strCurrentPropertyFlags; +static const char *_strCurrentPropertyDefaultCode; -static char *_strCurrentComponentIdentifier; -static char *_strCurrentComponentType; -static char *_strCurrentComponentID; -static char *_strCurrentComponentFileName; +static const char *_strCurrentComponentIdentifier; +static const char *_strCurrentComponentType; +static const char *_strCurrentComponentID; +static const char *_strCurrentComponentFileName; static int _ctInProcedureHandler = 0; static char _strLastProcedureName[256]; @@ -124,7 +271,7 @@ static int _bInProcedure; // set if currently compiling a procedure static int _bInHandler; static int _bHasOtherwise; // set if current 'wait' block has an 'otherwise' statement -static char *_strCurrentEvent; +static const char *_strCurrentEvent; static int _bFeature_AbstractBaseClass; static int _bFeature_ImplementsOnInitClass; static int _bFeature_ImplementsOnEndClass; @@ -161,7 +308,7 @@ char *RemoveLineDirective(char *str) return str; } } -char *GetLineDirective(SType &st) +const char *GetLineDirective(SType &st) { char *str = st.strString; if (str[0]=='\n' && str[1]=='#' && str[2]=='l') { @@ -204,7 +351,7 @@ void CreateInternalHandlerFunction(char *strFunctionName, char *strID) void DeclareFeatureProperties(void) { if (_bFeature_CanBePredictable) { - fprintf(_fTables, " CEntityProperty(CEntityProperty::EPT_ENTITYPTR, NULL, (0x%08x<<8)+%s, offsetof(%s, %s), %s, %s, %s, %s),\n", + fprintf(_fTables, " CEntityProperty(CEntityProperty::EPT_ENTITYPTR, NULL, (0x%08x<<8)+%s, _offsetof(%s, %s), %s, %s, %s, %s),\n", _iCurrentClassID, "255", _strCurrentClass, @@ -221,1422 +368,2130 @@ void DeclareFeatureProperties(void) } } -#undef YYERROR_VERBOSE +#define YYERROR_VERBOSE 1 -#ifndef YYLTYPE -typedef - struct yyltype - { - int timestamp; - int first_line; - int first_column; - int last_line; - int last_column; - char *text; - } - yyltype; -#define YYLTYPE yyltype +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 #endif -#ifndef YYSTYPE -#define YYSTYPE int +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 #endif -#include -#ifndef __cplusplus -#ifndef __STDC__ -#define const +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 #endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -#define YYFINAL 490 -#define YYFLAG -32768 -#define YYNTBASE 98 +/* Copy the second part of user declarations. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 328 ? yytranslate[x] : 204) -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 89, 2, 2, 2, 92, 85, 2, 79, - 80, 84, 88, 77, 82, 96, 91, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 78, 74, 86, - 81, 87, 97, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 94, 2, 95, 93, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 75, 90, 76, 83, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73 -}; +/* Line 216 of yacc.c. */ +#line 407 "./Ecc/Parser.cpp" -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 1, 2, 3, 4, 5, 17, 18, 20, 21, - 24, 28, 29, 32, 35, 36, 45, 46, 48, 50, - 54, 58, 59, 68, 69, 71, 73, 77, 80, 81, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 126, - 128, 131, 132, 133, 138, 140, 144, 146, 147, 151, - 152, 155, 159, 161, 164, 166, 170, 171, 178, 180, - 182, 185, 188, 190, 192, 194, 196, 198, 200, 202, - 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, - 224, 226, 228, 230, 232, 234, 236, 237, 241, 242, - 244, 245, 250, 251, 256, 257, 260, 262, 264, 266, - 268, 270, 272, 277, 282, 285, 289, 291, 294, 296, - 300, 301, 306, 308, 310, 312, 314, 316, 318, 320, - 321, 324, 338, 339, 341, 342, 344, 345, 347, 348, - 350, 351, 353, 354, 356, 358, 360, 364, 367, 369, - 371, 373, 375, 378, 381, 384, 387, 390, 393, 396, - 399, 404, 405, 408, 409, 415, 416, 427, 428, 430, - 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, - 453, 455, 457, 459, 461, 463, 465, 467, 469, 471, - 473, 475, 477, 479, 481, 483, 485, 488, 491, 494, - 497, 500, 503, 506, 509, 512, 515, 518, 521, 524, - 527, 530, 533, 536, 539, 542, 545, 548, 551, 555, - 559, 563, 566, 568, 570, 572, 574, 576, 578, 580, - 582, 584, 586, 588, 590, 592, 594, 596, 598, 600, - 602, 604, 606, 608, 610, 612, 614, 616, 618, 620, - 622, 624, 626, 628, 630, 631, 634, 637, 645, 649, - 653, 658, 660, 662, 664, 666, 668, 670, 672, 674, - 676, 678, 680, 682, 684, 686, 688, 690, 698, 708, - 709, 718, 719, 730, 731, 744, 745, 752, 756, 762, - 763, 765, 774, 777, 781, 788, 795, 797, 798, 800, - 805, 808, 811, 814, 818, 819, 821, 831, 841, 842 -}; +#ifdef short +# undef short +#endif -static const short yyrhs[] = { -1, - 0, 0, 0, 0, 4, 99, 104, 100, 105, 101, - 107, 102, 104, 103, 118, 0, 0, 9, 0, 0, - 105, 106, 0, 32, 7, 74, 0, 0, 107, 108, - 0, 107, 113, 0, 0, 14, 8, 109, 75, 111, - 110, 76, 74, 0, 0, 77, 0, 112, 0, 111, - 77, 112, 0, 4, 8, 7, 0, 0, 28, 8, - 114, 75, 115, 110, 76, 74, 0, 0, 116, 0, - 117, 0, 115, 77, 117, 0, 167, 8, 0, 0, - 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 127, 8, 78, 8, 75, 29, 7, 74, 30, 7, - 74, 120, 128, 121, 37, 78, 135, 122, 132, 123, - 38, 78, 148, 124, 39, 78, 156, 125, 40, 78, - 168, 126, 76, 74, 0, 17, 0, 17, 33, 0, - 0, 0, 31, 129, 130, 74, 0, 131, 0, 130, - 77, 131, 0, 7, 0, 0, 75, 133, 76, 0, - 0, 133, 134, 0, 167, 8, 74, 0, 137, 0, - 136, 110, 0, 138, 0, 136, 77, 138, 0, 0, - 139, 141, 140, 142, 146, 145, 0, 4, 0, 8, - 0, 14, 8, 0, 73, 8, 0, 49, 0, 50, - 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, - 0, 56, 0, 57, 0, 58, 0, 59, 0, 60, - 0, 61, 0, 62, 0, 63, 0, 64, 0, 65, - 0, 66, 0, 67, 0, 69, 0, 68, 0, 70, - 0, 72, 0, 71, 0, 0, 7, 143, 144, 0, - 0, 3, 0, 0, 54, 79, 173, 80, 0, 0, - 31, 79, 173, 80, 0, 0, 81, 147, 0, 4, - 0, 5, 0, 6, 0, 3, 0, 7, 0, 8, - 0, 8, 79, 173, 80, 0, 174, 79, 173, 80, - 0, 82, 147, 0, 79, 173, 80, 0, 150, 0, - 149, 110, 0, 151, 0, 149, 77, 151, 0, 0, - 152, 155, 153, 154, 0, 4, 0, 8, 0, 7, - 0, 36, 0, 34, 0, 35, 0, 17, 0, 0, - 156, 157, 0, 159, 161, 166, 158, 8, 79, 163, - 80, 160, 75, 176, 76, 162, 0, 0, 83, 0, - 0, 33, 0, 0, 20, 0, 0, 23, 0, 0, - 74, 0, 0, 19, 0, 164, 0, 165, 0, 164, - 77, 165, 0, 167, 8, 0, 167, 0, 19, 0, - 174, 0, 8, 0, 14, 8, 0, 167, 84, 0, - 167, 85, 0, 19, 84, 0, 20, 167, 0, 21, - 167, 0, 22, 167, 0, 17, 167, 0, 8, 86, - 167, 87, 0, 0, 168, 170, 0, 0, 78, 8, - 78, 78, 8, 0, 0, 8, 79, 172, 80, 169, - 171, 75, 176, 76, 162, 0, 0, 8, 0, 8, - 8, 0, 4, 0, 5, 0, 6, 0, 3, 0, - 7, 0, 8, 0, 174, 0, 81, 0, 88, 0, - 82, 0, 86, 0, 87, 0, 89, 0, 90, 0, - 85, 0, 84, 0, 91, 0, 92, 0, 93, 0, - 94, 0, 95, 0, 78, 0, 77, 0, 96, 0, - 97, 0, 83, 0, 79, 80, 0, 88, 88, 0, - 82, 82, 0, 82, 87, 0, 78, 78, 0, 85, - 85, 0, 90, 90, 0, 93, 93, 0, 87, 87, - 0, 86, 86, 0, 81, 81, 0, 89, 81, 0, - 87, 81, 0, 86, 81, 0, 85, 81, 0, 90, - 81, 0, 93, 81, 0, 88, 81, 0, 82, 81, - 0, 91, 81, 0, 92, 81, 0, 84, 81, 0, - 87, 87, 81, 0, 86, 86, 81, 0, 79, 173, - 80, 0, 173, 173, 0, 49, 0, 50, 0, 51, - 0, 52, 0, 53, 0, 54, 0, 55, 0, 56, - 0, 57, 0, 58, 0, 59, 0, 60, 0, 61, - 0, 62, 0, 63, 0, 64, 0, 65, 0, 66, - 0, 67, 0, 71, 0, 72, 0, 69, 0, 68, - 0, 70, 0, 20, 0, 22, 0, 4, 0, 5, - 0, 6, 0, 3, 0, 7, 0, 8, 0, 0, - 176, 177, 0, 173, 74, 0, 15, 79, 173, 80, - 75, 176, 76, 0, 16, 175, 78, 0, 75, 176, - 76, 0, 173, 75, 176, 76, 0, 180, 0, 182, - 0, 184, 0, 178, 0, 179, 0, 186, 0, 188, - 0, 189, 0, 194, 0, 191, 0, 197, 0, 198, - 0, 199, 0, 200, 0, 193, 0, 74, 0, 12, - 79, 173, 80, 75, 176, 76, 0, 12, 79, 173, - 80, 75, 176, 76, 13, 177, 0, 0, 10, 79, - 173, 80, 181, 75, 176, 76, 0, 0, 18, 75, - 176, 76, 183, 10, 79, 173, 80, 74, 0, 0, - 11, 79, 173, 74, 173, 74, 173, 80, 185, 75, - 176, 76, 0, 0, 41, 192, 187, 75, 203, 76, - 0, 25, 192, 74, 0, 27, 192, 8, 190, 74, - 0, 0, 8, 0, 26, 196, 79, 195, 80, 8, - 190, 74, 0, 79, 80, 0, 79, 173, 80, 0, - 45, 196, 79, 195, 80, 74, 0, 44, 196, 79, - 195, 80, 74, 0, 173, 0, 0, 8, 0, 8, - 78, 78, 8, 0, 46, 74, 0, 47, 74, 0, - 48, 74, 0, 24, 201, 74, 0, 0, 173, 0, - 42, 79, 172, 80, 78, 75, 176, 76, 162, 0, - 43, 79, 172, 80, 78, 75, 176, 76, 162, 0, - 0, 203, 202, 0 -}; +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) #endif -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 246, 256, 259, 264, 265, 266, 276, 277, 281, 282, - 285, 294, 295, 296, 302, 307, 313, 313, 315, 316, - 320, 330, 345, 353, 354, 358, 359, 363, 373, 374, - 378, 379, 393, 398, 402, 403, 409, 412, 413, 478, - 479, 483, 484, 494, 497, 498, 501, 544, 545, 548, - 549, 552, 562, 569, 578, 579, 582, 586, 609, 610, - 613, 618, 623, 628, 633, 638, 643, 648, 653, 658, - 663, 668, 673, 678, 683, 688, 693, 698, 703, 708, - 713, 718, 723, 728, 733, 738, 746, 751, 756, 759, - 764, 767, 771, 774, 779, 801, 810, 810, 810, 810, - 810, 811, 812, 813, 814, 815, 822, 828, 836, 837, - 840, 844, 857, 858, 859, 862, 863, 864, 865, 872, - 873, 877, 896, 897, 901, 902, 912, 913, 916, 917, - 920, 921, 924, 925, 926, 929, 930, 933, 937, 938, - 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, - 952, 960, 961, 965, 966, 972, 1003, 1010, 1013, 1016, - 1022, 1022, 1022, 1022, 1022, 1023, 1024, 1025, 1025, 1025, - 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, 1025, - 1025, 1025, 1025, 1025, 1025, 1025, 1026, 1027, 1028, 1029, - 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, - 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, - 1050, 1051, 1054, 1054, 1054, 1054, 1055, 1055, 1055, 1055, - 1055, 1056, 1056, 1056, 1056, 1056, 1057, 1057, 1057, 1057, - 1057, 1057, 1057, 1058, 1058, 1058, 1059, 1060, 1063, 1063, - 1063, 1063, 1063, 1064, 1071, 1072, 1075, 1076, 1077, 1078, - 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, - 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1100, 1116, 1138, - 1142, 1163, 1168, 1189, 1193, 1206, 1214, 1240, 1264, 1289, - 1292, 1297, 1321, 1324, 1330, 1339, 1351, 1354, 1360, 1363, - 1369, 1375, 1380, 1385, 1399, 1400, 1404, 1413, 1423, 1424 +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 4 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 3393 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 98 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 107 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 301 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 490 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 328 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 89, 2, 2, 2, 92, 85, 2, + 79, 80, 84, 88, 77, 82, 96, 91, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 78, 74, + 86, 81, 87, 97, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 94, 2, 95, 93, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 75, 90, 76, 83, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73 }; -static const char * const yytname[] = { "$","error","$undefined.","c_char", -"c_int","c_float","c_bool","c_string","identifier","cppblock","k_while","k_for", -"k_if","k_else","k_enum","k_switch","k_case","k_class","k_do","k_void","k_const", -"k_inline","k_static","k_virtual","k_return","k_autowait","k_autocall","k_waitevent", -"k_event","k_name","k_thumbnail","k_features","k_uses","k_export","k_texture", -"k_sound","k_model","k_properties","k_components","k_functions","k_procedures", -"k_wait","k_on","k_otherwise","k_call","k_jump","k_stop","k_resume","k_pass", -"k_CTString","k_CTStringTrans","k_CTFileName","k_CTFileNameNoDep","k_BOOL","k_COLOR", -"k_FLOAT","k_INDEX","k_RANGE","k_CEntityPointer","k_CModelObject","k_CModelInstance", -"k_CAnimObject","k_CSoundObject","k_CPlacement3D","k_FLOATaabbox3D","k_FLOATmatrix3D", -"k_FLOATquat3D","k_ANGLE","k_FLOAT3D","k_ANGLE3D","k_FLOATplane3D","k_ANIMATION", -"k_ILLUMINATIONTYPE","k_FLAGS","';'","'{'","'}'","','","':'","'('","')'","'='", -"'-'","'~'","'*'","'&'","'<'","'>'","'+'","'!'","'|'","'/'","'%'","'^'","'['", -"']'","'.'","'?'","program","@1","@2","@3","@4","@5","opt_global_cppblock","uses_list", -"uses_statement","enum_and_event_declarations_list","enum_declaration","@6", -"opt_comma","enum_values_list","enum_value","event_declaration","@7","event_members_list", -"non_empty_event_members_list","event_member","opt_class_declaration","class_declaration", -"@8","@9","@10","@11","@12","@13","@14","class_optexport","opt_features","@15", -"features_list","feature","opt_internal_properties","internal_property_list", -"internal_property","property_declaration_list","nonempty_property_declaration_list", -"empty_property_declaration_list","property_declaration","property_id","property_identifier", -"property_type","property_wed_name_opt","property_shortcut_opt","property_color_opt", -"property_flags_opt","property_default_opt","property_default_expression","component_declaration_list", -"nonempty_component_declaration_list","empty_component_declaration_list","component_declaration", -"component_id","component_identifier","component_filename","component_type", -"function_list","function_implementation","opt_tilde","opt_export","opt_const", -"opt_virtual","opt_semicolon","parameters_list","non_void_parameters_list","parameter_declaration", -"return_type","any_type","procedure_list","opt_override","procedure_implementation", -"@16","event_specification","expression","type_keyword","case_constant_expression", -"statements","statement","statement_if","statement_if_else","statement_while", -"@17","statement_dowhile","@18","statement_for","@19","statement_wait","@20", -"statement_autowait","statement_waitevent","opt_eventvar","statement_autocall", -"wait_expression","statement_jump","statement_call","event_expression","jumptarget", -"statement_stop","statement_resume","statement_pass","statement_return","opt_expression", -"handler","handlers_list","" +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 4, 5, 6, 7, 8, 20, 21, + 23, 24, 27, 31, 32, 35, 38, 39, 48, 49, + 51, 53, 57, 61, 62, 71, 72, 74, 76, 80, + 83, 84, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 129, 131, 134, 135, 136, 141, 143, 147, 149, + 150, 154, 155, 158, 162, 164, 167, 169, 173, 174, + 181, 183, 185, 188, 191, 193, 195, 197, 199, 201, + 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, + 223, 225, 227, 229, 231, 233, 235, 237, 239, 240, + 244, 245, 247, 248, 253, 254, 259, 260, 263, 265, + 267, 269, 271, 273, 275, 280, 285, 288, 292, 294, + 297, 299, 303, 304, 309, 311, 313, 315, 317, 319, + 321, 323, 324, 327, 341, 342, 344, 345, 347, 348, + 350, 351, 353, 354, 356, 357, 359, 361, 363, 367, + 370, 372, 374, 376, 378, 381, 384, 387, 390, 393, + 396, 399, 402, 407, 408, 411, 412, 418, 419, 430, + 431, 433, 436, 438, 440, 442, 444, 446, 448, 450, + 452, 454, 456, 458, 460, 462, 464, 466, 468, 470, + 472, 474, 476, 478, 480, 482, 484, 486, 488, 491, + 494, 497, 500, 503, 506, 509, 512, 515, 518, 521, + 524, 527, 530, 533, 536, 539, 542, 545, 548, 551, + 554, 558, 562, 566, 569, 571, 573, 575, 577, 579, + 581, 583, 585, 587, 589, 591, 593, 595, 597, 599, + 601, 603, 605, 607, 609, 611, 613, 615, 617, 619, + 621, 623, 625, 627, 629, 631, 633, 634, 637, 640, + 648, 652, 656, 661, 663, 665, 667, 669, 671, 673, + 675, 677, 679, 681, 683, 685, 687, 689, 691, 693, + 701, 711, 712, 721, 722, 733, 734, 747, 748, 755, + 759, 765, 766, 768, 777, 780, 784, 791, 798, 800, + 801, 803, 808, 811, 814, 817, 821, 822, 824, 834, + 844, 845 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 99, 0, -1, -1, -1, -1, -1, -1, 4, 100, + 105, 101, 106, 102, 108, 103, 105, 104, 119, -1, + -1, 9, -1, -1, 106, 107, -1, 32, 7, 74, + -1, -1, 108, 109, -1, 108, 114, -1, -1, 14, + 8, 110, 75, 112, 111, 76, 74, -1, -1, 77, + -1, 113, -1, 112, 77, 113, -1, 4, 8, 7, + -1, -1, 28, 8, 115, 75, 116, 111, 76, 74, + -1, -1, 117, -1, 118, -1, 116, 77, 118, -1, + 168, 8, -1, -1, 120, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 128, 8, 78, 8, 75, 29, + 7, 74, 30, 7, 74, 121, 129, 122, 37, 78, + 136, 123, 133, 124, 38, 78, 149, 125, 39, 78, + 157, 126, 40, 78, 169, 127, 76, 74, -1, 17, + -1, 17, 33, -1, -1, -1, 31, 130, 131, 74, + -1, 132, -1, 131, 77, 132, -1, 7, -1, -1, + 75, 134, 76, -1, -1, 134, 135, -1, 168, 8, + 74, -1, 138, -1, 137, 111, -1, 139, -1, 137, + 77, 139, -1, -1, 140, 142, 141, 143, 147, 146, + -1, 4, -1, 8, -1, 14, 8, -1, 73, 8, + -1, 49, -1, 50, -1, 51, -1, 52, -1, 53, + -1, 54, -1, 55, -1, 56, -1, 57, -1, 58, + -1, 59, -1, 60, -1, 61, -1, 62, -1, 63, + -1, 64, -1, 65, -1, 66, -1, 67, -1, 69, + -1, 68, -1, 70, -1, 72, -1, 71, -1, -1, + 7, 144, 145, -1, -1, 3, -1, -1, 54, 79, + 174, 80, -1, -1, 31, 79, 174, 80, -1, -1, + 81, 148, -1, 4, -1, 5, -1, 6, -1, 3, + -1, 7, -1, 8, -1, 8, 79, 174, 80, -1, + 175, 79, 174, 80, -1, 82, 148, -1, 79, 174, + 80, -1, 151, -1, 150, 111, -1, 152, -1, 150, + 77, 152, -1, -1, 153, 156, 154, 155, -1, 4, + -1, 8, -1, 7, -1, 36, -1, 34, -1, 35, + -1, 17, -1, -1, 157, 158, -1, 160, 162, 167, + 159, 8, 79, 164, 80, 161, 75, 177, 76, 163, + -1, -1, 83, -1, -1, 33, -1, -1, 20, -1, + -1, 23, -1, -1, 74, -1, -1, 19, -1, 165, + -1, 166, -1, 165, 77, 166, -1, 168, 8, -1, + 168, -1, 19, -1, 175, -1, 8, -1, 14, 8, + -1, 168, 84, -1, 168, 85, -1, 19, 84, -1, + 20, 168, -1, 21, 168, -1, 22, 168, -1, 17, + 168, -1, 8, 86, 168, 87, -1, -1, 169, 171, + -1, -1, 78, 8, 78, 78, 8, -1, -1, 8, + 79, 173, 80, 170, 172, 75, 177, 76, 163, -1, + -1, 8, -1, 8, 8, -1, 4, -1, 5, -1, + 6, -1, 3, -1, 7, -1, 8, -1, 175, -1, + 81, -1, 88, -1, 82, -1, 86, -1, 87, -1, + 89, -1, 90, -1, 85, -1, 84, -1, 91, -1, + 92, -1, 93, -1, 94, -1, 95, -1, 78, -1, + 77, -1, 96, -1, 97, -1, 83, -1, 79, 80, + -1, 88, 88, -1, 82, 82, -1, 82, 87, -1, + 78, 78, -1, 85, 85, -1, 90, 90, -1, 93, + 93, -1, 87, 87, -1, 86, 86, -1, 81, 81, + -1, 89, 81, -1, 87, 81, -1, 86, 81, -1, + 85, 81, -1, 90, 81, -1, 93, 81, -1, 88, + 81, -1, 82, 81, -1, 91, 81, -1, 92, 81, + -1, 84, 81, -1, 87, 87, 81, -1, 86, 86, + 81, -1, 79, 174, 80, -1, 174, 174, -1, 49, + -1, 50, -1, 51, -1, 52, -1, 53, -1, 54, + -1, 55, -1, 56, -1, 57, -1, 58, -1, 59, + -1, 60, -1, 61, -1, 62, -1, 63, -1, 64, + -1, 65, -1, 66, -1, 67, -1, 71, -1, 72, + -1, 69, -1, 68, -1, 70, -1, 20, -1, 22, + -1, 4, -1, 5, -1, 6, -1, 3, -1, 7, + -1, 8, -1, -1, 177, 178, -1, 174, 74, -1, + 15, 79, 174, 80, 75, 177, 76, -1, 16, 176, + 78, -1, 75, 177, 76, -1, 174, 75, 177, 76, + -1, 181, -1, 183, -1, 185, -1, 179, -1, 180, + -1, 187, -1, 189, -1, 190, -1, 195, -1, 192, + -1, 198, -1, 199, -1, 200, -1, 201, -1, 194, + -1, 74, -1, 12, 79, 174, 80, 75, 177, 76, + -1, 12, 79, 174, 80, 75, 177, 76, 13, 178, + -1, -1, 10, 79, 174, 80, 182, 75, 177, 76, + -1, -1, 18, 75, 177, 76, 184, 10, 79, 174, + 80, 74, -1, -1, 11, 79, 174, 74, 174, 74, + 174, 80, 186, 75, 177, 76, -1, -1, 41, 193, + 188, 75, 204, 76, -1, 25, 193, 74, -1, 27, + 193, 8, 191, 74, -1, -1, 8, -1, 26, 197, + 79, 196, 80, 8, 191, 74, -1, 79, 80, -1, + 79, 174, 80, -1, 45, 197, 79, 196, 80, 74, + -1, 44, 197, 79, 196, 80, 74, -1, 174, -1, + -1, 8, -1, 8, 78, 78, 8, -1, 46, 74, + -1, 47, 74, -1, 48, 74, -1, 24, 202, 74, + -1, -1, 174, -1, 42, 79, 173, 80, 78, 75, + 177, 76, 163, -1, 43, 79, 173, 80, 78, 75, + 177, 76, 163, -1, -1, 204, 203, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 253, 253, 263, 266, 271, 272, 253, 282, 284, + 287, 289, 292, 300, 302, 303, 309, 309, 320, 320, + 322, 323, 327, 337, 337, 359, 361, 365, 366, 370, + 379, 381, 384, 388, 400, 405, 409, 410, 416, 419, + 386, 485, 486, 489, 491, 491, 504, 505, 508, 550, + 552, 554, 556, 559, 569, 576, 585, 586, 588, 593, + 616, 617, 620, 625, 630, 635, 640, 645, 650, 655, + 660, 665, 670, 675, 680, 685, 690, 695, 700, 705, + 710, 715, 720, 725, 730, 735, 740, 745, 753, 758, + 763, 766, 771, 774, 778, 781, 786, 808, 817, 817, + 817, 817, 817, 818, 819, 820, 821, 822, 829, 835, + 843, 844, 846, 851, 864, 865, 866, 869, 870, 871, + 872, 879, 880, 884, 903, 904, 908, 909, 919, 920, + 923, 924, 926, 928, 931, 932, 933, 936, 937, 940, + 944, 945, 949, 950, 951, 952, 953, 954, 955, 956, + 957, 958, 959, 967, 968, 972, 973, 979, 979, 1017, + 1020, 1023, 1029, 1029, 1029, 1029, 1029, 1030, 1031, 1032, + 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, + 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1033, 1034, + 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, + 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, + 1055, 1056, 1057, 1058, 1061, 1061, 1061, 1061, 1062, 1062, + 1062, 1062, 1062, 1063, 1063, 1063, 1063, 1063, 1064, 1064, + 1064, 1064, 1064, 1064, 1064, 1065, 1065, 1065, 1066, 1067, + 1070, 1070, 1070, 1070, 1070, 1071, 1078, 1079, 1082, 1083, + 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, + 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1107, + 1123, 1145, 1145, 1170, 1170, 1196, 1196, 1213, 1213, 1247, + 1271, 1296, 1299, 1304, 1328, 1331, 1337, 1346, 1358, 1361, + 1367, 1370, 1376, 1382, 1387, 1392, 1406, 1407, 1411, 1420, + 1430, 1431 }; #endif -static const short yyr1[] = { 0, - 99, 100, 101, 102, 103, 98, 104, 104, 105, 105, - 106, 107, 107, 107, 109, 108, 110, 110, 111, 111, - 112, 114, 113, 115, 115, 116, 116, 117, 118, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 119, 127, - 127, 128, 129, 128, 130, 130, 131, 132, 132, 133, - 133, 134, 135, 135, 136, 136, 137, 138, 139, 140, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 142, 142, 143, 143, - 144, 144, 145, 145, 146, 146, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 148, 148, 149, 149, - 150, 151, 152, 153, 154, 155, 155, 155, 155, 156, - 156, 157, 158, 158, 159, 159, 160, 160, 161, 161, - 162, 162, 163, 163, 163, 164, 164, 165, 166, 166, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 168, 168, 169, 169, 171, 170, 172, 172, 172, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, - 174, 174, 174, 174, 174, 174, 174, 174, 175, 175, - 175, 175, 175, 175, 176, 176, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 178, 179, 181, - 180, 183, 182, 185, 184, 187, 186, 188, 189, 190, - 190, 191, 192, 192, 193, 194, 195, 195, 196, 196, - 197, 198, 199, 200, 201, 201, 202, 202, 203, 203 +#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", "c_char", "c_int", "c_float", "c_bool", + "c_string", "identifier", "cppblock", "k_while", "k_for", "k_if", + "k_else", "k_enum", "k_switch", "k_case", "k_class", "k_do", "k_void", + "k_const", "k_inline", "k_static", "k_virtual", "k_return", "k_autowait", + "k_autocall", "k_waitevent", "k_event", "k_name", "k_thumbnail", + "k_features", "k_uses", "k_export", "k_texture", "k_sound", "k_model", + "k_properties", "k_components", "k_functions", "k_procedures", "k_wait", + "k_on", "k_otherwise", "k_call", "k_jump", "k_stop", "k_resume", + "k_pass", "k_CTString", "k_CTStringTrans", "k_CTFileName", + "k_CTFileNameNoDep", "k_BOOL", "k_COLOR", "k_FLOAT", "k_INDEX", + "k_RANGE", "k_CEntityPointer", "k_CModelObject", "k_CModelInstance", + "k_CAnimObject", "k_CSoundObject", "k_CPlacement3D", "k_FLOATaabbox3D", + "k_FLOATmatrix3D", "k_FLOATquat3D", "k_ANGLE", "k_FLOAT3D", "k_ANGLE3D", + "k_FLOATplane3D", "k_ANIMATION", "k_ILLUMINATIONTYPE", "k_FLAGS", "';'", + "'{'", "'}'", "','", "':'", "'('", "')'", "'='", "'-'", "'~'", "'*'", + "'&'", "'<'", "'>'", "'+'", "'!'", "'|'", "'/'", "'%'", "'^'", "'['", + "']'", "'.'", "'?'", "$accept", "program", "@1", "@2", "@3", "@4", "@5", + "opt_global_cppblock", "uses_list", "uses_statement", + "enum_and_event_declarations_list", "enum_declaration", "@6", + "opt_comma", "enum_values_list", "enum_value", "event_declaration", "@7", + "event_members_list", "non_empty_event_members_list", "event_member", + "opt_class_declaration", "class_declaration", "@8", "@9", "@10", "@11", + "@12", "@13", "@14", "class_optexport", "opt_features", "@15", + "features_list", "feature", "opt_internal_properties", + "internal_property_list", "internal_property", + "property_declaration_list", "nonempty_property_declaration_list", + "empty_property_declaration_list", "property_declaration", "property_id", + "property_identifier", "property_type", "property_wed_name_opt", + "property_shortcut_opt", "property_color_opt", "property_flags_opt", + "property_default_opt", "property_default_expression", + "component_declaration_list", "nonempty_component_declaration_list", + "empty_component_declaration_list", "component_declaration", + "component_id", "component_identifier", "component_filename", + "component_type", "function_list", "function_implementation", + "opt_tilde", "opt_export", "opt_const", "opt_virtual", "opt_semicolon", + "parameters_list", "non_void_parameters_list", "parameter_declaration", + "return_type", "any_type", "procedure_list", "opt_override", + "procedure_implementation", "@16", "event_specification", "expression", + "type_keyword", "case_constant_expression", "statements", "statement", + "statement_if", "statement_if_else", "statement_while", "@17", + "statement_dowhile", "@18", "statement_for", "@19", "statement_wait", + "@20", "statement_autowait", "statement_waitevent", "opt_eventvar", + "statement_autocall", "wait_expression", "statement_jump", + "statement_call", "event_expression", "jumptarget", "statement_stop", + "statement_resume", "statement_pass", "statement_return", + "opt_expression", "handler", "handlers_list", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 59, 123, 125, 44, 58, 40, + 41, 61, 45, 126, 42, 38, 60, 62, 43, 33, + 124, 47, 37, 94, 91, 93, 46, 63 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 98, 100, 101, 102, 103, 104, 99, 105, 105, + 106, 106, 107, 108, 108, 108, 110, 109, 111, 111, + 112, 112, 113, 115, 114, 116, 116, 117, 117, 118, + 119, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 120, 128, 128, 129, 130, 129, 131, 131, 132, 133, + 133, 134, 134, 135, 136, 136, 137, 137, 138, 139, + 140, 141, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 142, 142, 143, 143, + 144, 144, 145, 145, 146, 146, 147, 147, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 149, 149, + 150, 150, 151, 152, 153, 154, 155, 156, 156, 156, + 156, 157, 157, 158, 159, 159, 160, 160, 161, 161, + 162, 162, 163, 163, 164, 164, 164, 165, 165, 166, + 167, 167, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 169, 169, 170, 170, 172, 171, 173, + 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, + 176, 176, 176, 176, 176, 176, 177, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 179, + 180, 182, 181, 184, 183, 186, 185, 188, 187, 189, + 190, 191, 191, 192, 193, 193, 194, 195, 196, 196, + 197, 197, 198, 199, 200, 201, 202, 202, 203, 203, + 204, 204 }; -static const short yyr2[] = { 0, - 0, 0, 0, 0, 0, 11, 0, 1, 0, 2, - 3, 0, 2, 2, 0, 8, 0, 1, 1, 3, - 3, 0, 8, 0, 1, 1, 3, 2, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 1, - 2, 0, 0, 4, 1, 3, 1, 0, 3, 0, - 2, 3, 1, 2, 1, 3, 0, 6, 1, 1, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 3, 0, 1, - 0, 4, 0, 4, 0, 2, 1, 1, 1, 1, - 1, 1, 4, 4, 2, 3, 1, 2, 1, 3, - 0, 4, 1, 1, 1, 1, 1, 1, 1, 0, - 2, 13, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 1, 1, 3, 2, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, - 4, 0, 2, 0, 5, 0, 10, 0, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, - 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 2, 2, 7, 3, 3, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 7, 9, 0, - 8, 0, 10, 0, 12, 0, 6, 3, 5, 0, - 1, 8, 2, 3, 6, 6, 1, 0, 1, 4, - 2, 2, 2, 3, 0, 1, 9, 9, 0, 2 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 0, 0, 0, 0, 11, 0, 1, + 0, 2, 3, 0, 2, 2, 0, 8, 0, 1, + 1, 3, 3, 0, 8, 0, 1, 1, 3, 2, + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 1, 2, 0, 0, 4, 1, 3, 1, 0, + 3, 0, 2, 3, 1, 2, 1, 3, 0, 6, + 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, + 0, 1, 0, 4, 0, 4, 0, 2, 1, 1, + 1, 1, 1, 1, 4, 4, 2, 3, 1, 2, + 1, 3, 0, 4, 1, 1, 1, 1, 1, 1, + 1, 0, 2, 13, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 1, 1, 3, 2, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 4, 0, 2, 0, 5, 0, 10, 0, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 3, 3, 3, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 2, 2, 7, + 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, + 9, 0, 8, 0, 10, 0, 12, 0, 6, 3, + 5, 0, 1, 8, 2, 3, 6, 6, 1, 0, + 1, 4, 2, 2, 2, 3, 0, 1, 9, 9, + 0, 2 }; -static const short yydefact[] = { 0, - 1, 7, 8, 2, 9, 3, 0, 12, 10, 0, - 4, 11, 0, 0, 7, 13, 14, 15, 22, 5, - 0, 0, 29, 0, 24, 40, 6, 30, 0, 0, - 17, 19, 142, 0, 0, 0, 237, 0, 238, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 235, 234, - 236, 232, 233, 17, 25, 26, 0, 141, 41, 0, - 0, 18, 0, 0, 143, 150, 146, 147, 148, 149, - 18, 0, 28, 144, 145, 0, 21, 20, 0, 0, - 27, 0, 0, 16, 151, 23, 0, 0, 0, 0, - 0, 0, 32, 42, 43, 33, 0, 0, 47, 0, - 45, 0, 44, 0, 57, 46, 59, 34, 17, 53, - 55, 0, 48, 18, 54, 0, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 83, 82, 84, 86, 85, - 0, 0, 50, 35, 56, 61, 62, 60, 87, 0, - 0, 89, 95, 49, 51, 0, 0, 90, 91, 0, - 93, 0, 111, 0, 88, 100, 97, 98, 99, 101, - 102, 237, 238, 0, 0, 96, 0, 0, 58, 52, - 113, 36, 17, 107, 109, 0, 0, 0, 164, 161, - 162, 163, 165, 166, 183, 182, 0, 168, 170, 186, - 176, 175, 171, 172, 169, 173, 174, 177, 178, 179, - 180, 181, 184, 185, 0, 167, 105, 0, 0, 0, - 18, 108, 119, 117, 118, 116, 0, 0, 0, 191, - 187, 0, 197, 205, 189, 190, 208, 201, 192, 200, - 196, 199, 195, 204, 188, 198, 202, 193, 206, 207, - 203, 194, 106, 212, 0, 0, 0, 110, 114, 0, - 92, 103, 211, 210, 209, 104, 94, 120, 115, 112, - 125, 126, 0, 121, 129, 0, 130, 0, 152, 140, - 123, 139, 38, 124, 0, 0, 0, 153, 0, 158, - 0, 133, 159, 0, 39, 134, 0, 135, 136, 0, - 160, 154, 127, 0, 138, 0, 156, 128, 0, 137, - 0, 0, 245, 0, 245, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 295, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 267, 245, 131, 0, 246, 255, - 256, 252, 253, 254, 257, 258, 259, 261, 266, 260, - 262, 263, 264, 265, 155, 131, 0, 0, 0, 0, - 242, 239, 240, 241, 243, 244, 0, 245, 296, 0, - 0, 0, 289, 0, 0, 276, 0, 0, 291, 292, - 293, 0, 132, 122, 247, 245, 157, 0, 0, 0, - 0, 249, 0, 294, 283, 0, 278, 0, 288, 280, - 0, 288, 288, 250, 0, 270, 0, 0, 0, 272, - 284, 0, 287, 0, 281, 0, 299, 0, 0, 251, - 0, 0, 245, 245, 0, 290, 0, 279, 0, 0, - 0, 245, 0, 0, 0, 0, 280, 0, 0, 277, - 300, 286, 285, 0, 0, 268, 248, 0, 0, 158, - 158, 271, 274, 0, 0, 282, 0, 0, 0, 269, - 0, 0, 0, 245, 273, 0, 0, 0, 245, 245, - 275, 0, 0, 131, 131, 297, 298, 0, 0, 0 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 0, 2, 0, 8, 1, 9, 3, 10, 4, 0, + 13, 11, 0, 5, 12, 0, 0, 8, 14, 15, + 16, 23, 6, 0, 0, 30, 0, 25, 41, 7, + 31, 0, 0, 18, 20, 143, 0, 0, 0, 238, + 0, 239, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 236, 235, 237, 233, 234, 18, 26, 27, 0, + 142, 42, 0, 0, 19, 0, 0, 144, 151, 147, + 148, 149, 150, 19, 0, 29, 145, 146, 0, 22, + 21, 0, 0, 28, 0, 0, 17, 152, 24, 0, + 0, 0, 0, 0, 0, 33, 43, 44, 34, 0, + 0, 48, 0, 46, 0, 45, 0, 58, 47, 60, + 35, 18, 54, 56, 0, 49, 19, 55, 0, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 84, 83, + 85, 87, 86, 0, 0, 51, 36, 57, 62, 63, + 61, 88, 0, 0, 90, 96, 50, 52, 0, 0, + 91, 92, 0, 94, 0, 112, 0, 89, 101, 98, + 99, 100, 102, 103, 238, 239, 0, 0, 97, 0, + 0, 59, 53, 114, 37, 18, 108, 110, 0, 0, + 0, 165, 162, 163, 164, 166, 167, 184, 183, 0, + 169, 171, 187, 177, 176, 172, 173, 170, 174, 175, + 178, 179, 180, 181, 182, 185, 186, 0, 168, 106, + 0, 0, 0, 19, 109, 120, 118, 119, 117, 0, + 0, 0, 192, 188, 0, 198, 206, 190, 191, 209, + 202, 193, 201, 197, 200, 196, 205, 189, 199, 203, + 194, 207, 208, 204, 195, 107, 213, 0, 0, 0, + 111, 115, 0, 93, 104, 212, 211, 210, 105, 95, + 121, 116, 113, 126, 127, 0, 122, 130, 0, 131, + 0, 153, 141, 124, 140, 39, 125, 0, 0, 0, + 154, 0, 159, 0, 134, 160, 0, 40, 135, 0, + 136, 137, 0, 161, 155, 128, 0, 139, 0, 157, + 129, 0, 138, 0, 0, 246, 0, 246, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 268, 246, 132, + 0, 247, 256, 257, 253, 254, 255, 258, 259, 260, + 262, 267, 261, 263, 264, 265, 266, 156, 132, 0, + 0, 0, 0, 243, 240, 241, 242, 244, 245, 0, + 246, 297, 0, 0, 0, 290, 0, 0, 277, 0, + 0, 292, 293, 294, 0, 133, 123, 248, 246, 158, + 0, 0, 0, 0, 250, 0, 295, 284, 0, 279, + 0, 289, 281, 0, 289, 289, 251, 0, 271, 0, + 0, 0, 273, 285, 0, 288, 0, 282, 0, 300, + 0, 0, 252, 0, 0, 246, 246, 0, 291, 0, + 280, 0, 0, 0, 246, 0, 0, 0, 0, 281, + 0, 0, 278, 301, 287, 286, 0, 0, 269, 249, + 0, 0, 159, 159, 272, 275, 0, 0, 283, 0, + 0, 0, 270, 0, 0, 0, 246, 274, 0, 0, + 0, 246, 246, 276, 0, 0, 132, 132, 298, 299 }; -static const short yydefgoto[] = { 488, - 2, 5, 8, 15, 23, 4, 6, 9, 11, 16, - 21, 73, 31, 32, 17, 22, 64, 65, 66, 27, - 28, 104, 108, 123, 161, 230, 283, 297, 29, 106, - 107, 110, 111, 154, 160, 165, 118, 119, 120, 121, - 122, 159, 152, 163, 169, 175, 189, 171, 186, 192, - 193, 194, 195, 196, 270, 280, 237, 281, 284, 295, - 285, 319, 288, 394, 307, 308, 309, 291, 67, 293, - 317, 298, 322, 304, 264, 226, 377, 326, 349, 350, - 351, 352, 431, 353, 435, 354, 469, 355, 411, 356, - 357, 426, 358, 382, 359, 360, 424, 384, 361, 362, - 363, 364, 380, 451, 439 +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 2, 3, 7, 10, 17, 25, 6, 8, 11, + 13, 18, 23, 75, 33, 34, 19, 24, 66, 67, + 68, 29, 30, 106, 110, 125, 163, 232, 285, 299, + 31, 108, 109, 112, 113, 156, 162, 167, 120, 121, + 122, 123, 124, 161, 154, 165, 171, 177, 191, 173, + 188, 194, 195, 196, 197, 198, 272, 282, 239, 283, + 286, 297, 287, 321, 290, 396, 309, 310, 311, 293, + 69, 295, 319, 300, 324, 306, 266, 228, 379, 328, + 351, 352, 353, 354, 433, 355, 437, 356, 471, 357, + 413, 358, 359, 428, 360, 384, 361, 362, 426, 386, + 363, 364, 365, 366, 382, 453, 441 }; -static const short yypact[] = { -3, --32768, 0,-32768,-32768,-32768, -13, 44,-32768,-32768, -1, - -2,-32768, 102, 111, 0,-32768,-32768,-32768,-32768,-32768, - 50, 51, 113, 127, 3207, 99,-32768,-32768, 125, 126, - 58,-32768, 52, 129, 3207, 55, 3207, 3207, 3207,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 63,-32768,-32768, 17,-32768,-32768, 67, - 134, 127, 70, 3207,-32768, 15,-32768, 15, 15, 15, - 3207, 71,-32768,-32768,-32768, 140,-32768,-32768, 75, 22, --32768, 76, 79,-32768,-32768,-32768, 130, 148, 82, 131, - 153, 88,-32768, 132,-32768,-32768, 157, 128,-32768, -35, --32768, 89,-32768, 157, 162,-32768,-32768,-32768, 92,-32768, --32768, 3320, 95, 162,-32768, 163,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 164, 165,-32768,-32768,-32768,-32768,-32768,-32768, 167, 3142, - 137, 173, 96,-32768,-32768, 19, 100,-32768, 133, 26, - 149, 105, 177, 103,-32768,-32768,-32768,-32768,-32768,-32768, - 109,-32768,-32768, 3052, 26,-32768, 110, 112,-32768,-32768, --32768,-32768, 115,-32768,-32768, 18, 3052, 3052,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 116, 1532, 114, -21,-32768, - 117, -22, -31, -70, -45, 118, -43, 119, 120, -53, --32768,-32768,-32768,-32768, 1627,-32768,-32768, 3052, 3052, 151, - 177,-32768,-32768,-32768,-32768,-32768, 185, 1722, 1817,-32768, --32768, 1912,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 121,-32768, 122,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 3052, 2007, 2102, 135,-32768,-32768, 189, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 25,-32768, 166,-32768, 181, 136,-32768, 3231,-32768, 55, - 124, 15, 197,-32768, 201, 138, 139,-32768, 141, 202, - 142, 3296, 203, 143,-32768, 55, 144, 145,-32768, 29, --32768, 152, 192, 3207,-32768, 210,-32768,-32768, 146,-32768, - 154, 159,-32768, 158,-32768, 297, 218, 392, 156, 160, - 161, 168, 64, 169, 3052, 170, 219, 170, 170, 219, - 219, 171, 172, 174,-32768,-32768, 176, 1437,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768, 176, 3052, 3052, 3052, 3052, --32768,-32768,-32768,-32768,-32768,-32768, 175,-32768, 3052, 178, - 2197, 180, 179, 183, 229,-32768, 184, 186,-32768,-32768, --32768, 487,-32768,-32768,-32768,-32768,-32768, 2292, 2387, 2482, - 2577,-32768, 582,-32768,-32768, 2672,-32768, 188, 3052, 230, - 193, 3052, 3052,-32768, 677,-32768, 3052, 198, 200,-32768, --32768, 233, 3052, 187,-32768, 182,-32768, 196, 199,-32768, - 207, 2767,-32768,-32768, 232,-32768, 235,-32768, -27, 190, - 204,-32768, 3052, 772, 867, 205, 230, 208, 209,-32768, --32768,-32768,-32768, 962, 2862, 238,-32768, 3052, 212, 202, - 202,-32768,-32768, 1342, 2957,-32768, 211, 213, 214,-32768, - 216, 194, 217,-32768,-32768, 221, 231, 1057,-32768,-32768, --32768, 1152, 1247, 176, 176,-32768,-32768, 258, 277,-32768 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -359 +static const yytype_int16 yypact[] = +{ + -3, -359, 9, 10, -359, -359, -359, -359, 7, 35, + -359, -359, -23, -2, -359, 65, 102, 10, -359, -359, + -359, -359, -359, 44, 55, 114, 128, 3207, 100, -359, + -359, 126, 127, 60, -359, 52, 131, 3207, 56, 3207, + 3207, 3207, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -359, 68, -359, -359, 17, + -359, -359, 63, 139, 128, 71, 3207, -359, 15, -359, + 15, 15, 15, 3207, 72, -359, -359, -359, 141, -359, + -359, 76, 22, -359, 80, 81, -359, -359, -359, 130, + 148, 86, 132, 154, 89, -359, 133, -359, -359, 158, + 129, -359, 41, -359, 91, -359, 158, 163, -359, -359, + -359, 93, -359, -359, 3320, 96, 163, -359, 164, -359, + -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, 165, 166, -359, -359, -359, -359, -359, + -359, 168, 3142, 138, 174, 97, -359, -359, 19, 101, + -359, 134, 26, 149, 107, 178, 108, -359, -359, -359, + -359, -359, -359, 110, -359, -359, 3052, 26, -359, 111, + 112, -359, -359, -359, -359, 115, -359, -359, 18, 3052, + 3052, -359, -359, -359, -359, -359, -359, -359, 116, 1532, + 117, -21, -359, 118, -22, -31, -70, -45, 119, -43, + 120, 121, -53, -359, -359, -359, -359, 1627, -359, -359, + 3052, 3052, 156, 178, -359, -359, -359, -359, -359, 185, + 1722, 1817, -359, -359, 1912, -359, -359, -359, -359, -359, + -359, -359, -359, 122, -359, 123, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -359, 3052, 2007, 2102, 135, + -359, -359, 189, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, 25, -359, 167, -359, 182, 136, -359, + 3231, -359, 56, 137, 15, 198, -359, 201, 142, 140, + -359, 143, 202, 144, 3296, 203, 146, -359, 56, 147, + 153, -359, 29, -359, 145, 192, 3207, -359, 207, -359, + -359, 157, -359, 159, 160, -359, 161, -359, 297, 209, + 392, 155, 162, 169, 170, 64, 171, 3052, 172, 216, + 172, 172, 216, 216, 173, 176, 179, -359, -359, 180, + 1437, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -359, -359, -359, 180, 3052, + 3052, 3052, 3052, -359, -359, -359, -359, -359, -359, 184, + -359, 3052, 183, 2197, 190, 187, 177, 228, -359, 188, + 193, -359, -359, -359, 487, -359, -359, -359, -359, -359, + 2292, 2387, 2482, 2577, -359, 582, -359, -359, 2672, -359, + 195, 3052, 230, 191, 3052, 3052, -359, 677, -359, 3052, + 200, 204, -359, -359, 232, 3052, 196, -359, 194, -359, + 197, 206, -359, 208, 2767, -359, -359, 233, -359, 234, + -359, -27, 210, 213, -359, 3052, 772, 867, 199, 230, + 211, 212, -359, -359, -359, -359, 962, 2862, 231, -359, + 3052, 214, 202, 202, -359, -359, 1342, 2957, -359, 215, + 226, 217, -359, 219, 218, 236, -359, -359, 235, 241, + 1057, -359, -359, -359, 1152, 1247, 180, 180, -359, -359 }; -static const short yypgoto[] = {-32768, --32768,-32768,-32768,-32768,-32768, 268,-32768,-32768,-32768,-32768, --32768, -57,-32768, 220,-32768,-32768,-32768,-32768, 237,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 206,-32768,-32768,-32768,-32768,-32768,-32768, 215, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 147,-32768, --32768,-32768, 80,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, -356,-32768,-32768, -4,-32768, -33,-32768, --32768,-32768,-32768, -345, -184, -17,-32768, -322, -150,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -131,-32768, -221,-32768,-32768, -291, -217,-32768,-32768, --32768,-32768,-32768,-32768,-32768 +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -359, -359, -359, -359, -359, -359, -359, 246, -359, -359, + -359, -359, -359, -59, -359, 237, -359, -359, -359, -359, + 175, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -359, 220, -359, -359, -359, -359, -359, + -359, 205, -359, -359, -359, -359, -359, -359, -359, -359, + 58, -359, -359, -359, 49, -359, -359, -359, -359, -359, + -359, -359, -359, -359, -359, -358, -359, -359, -64, -359, + -35, -359, -359, -359, -359, -346, -186, -19, -359, -324, + -177, -359, -359, -359, -359, -359, -359, -359, -359, -359, + -359, -359, -359, -131, -359, -219, -359, -359, -291, -217, + -359, -359, -359, -359, -359, -359, -359 }; - -#define YYLAST 3393 - - -static const short yytable[] = { 225, - 1, 76, 328, 78, 79, 80, 82, 68, 3, 397, - 252, 13, 238, 239, 448, 449, 253, 68, 7, 68, - 68, 68, 242, 392, 83, 14, 172, 261, 176, 177, - 178, 179, 180, 181, 233, 254, 315, 257, 113, 262, - 90, 114, 255, 265, 266, 182, 258, 183, 450, 250, - 10, 234, 235, 236, 251, 403, 68, 282, 248, 244, - 245, 125, 249, 68, -37, 246, 371, 372, 373, 374, - 375, 376, 12, 415, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 84, 85, - 84, 85, 84, 85, 184, 84, 85, 185, 95, 18, - 444, 445, 84, 85, 467, 468, 385, 386, 19, 454, - 428, 429, 387, 388, 24, 25, 166, 486, 487, 26, - 30, 69, 70, 71, 72, 232, 75, 74, 77, 81, - 87, 348, 68, 348, 86, 89, 92, 93, 94, 96, - 379, 478, 187, 97, 99, 100, 482, 483, 98, 102, - 101, 103, 105, 109, 112, 117, 115, 187, 124, 153, - 156, 157, 158, 162, 167, 168, 170, 173, 190, 188, - 191, 197, 398, 399, 400, 401, 174, 198, 228, 267, - 229, 231, 269, 240, 243, 279, 406, 247, 256, 259, - 260, 274, 275, 287, 296, 286, 294, 348, 299, 303, - 311, 318, 278, 289, 301, 305, 300, 321, 348, 302, - 323, 314, 312, 313, 423, 365, 383, 423, 423, 316, - 348, 324, 432, 325, 367, 327, 410, 425, 368, 369, - 436, 446, 447, 378, 389, 390, 370, 391, 381, 393, - 464, 404, 402, 407, 292, 438, 408, 489, 455, 348, - 348, 409, 412, 452, 413, 422, 437, 427, 310, 348, - 68, 476, 433, 465, 434, 440, 490, 453, 441, 348, - 310, 442, 20, 458, 68, 466, 460, 461, 474, 475, - 472, 88, 473, 348, 477, 479, 68, 348, 348, 199, - 200, 201, 202, 203, 204, 480, 329, 330, 331, 320, - 268, 332, 333, 470, 334, 459, 182, 91, 183, 116, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 227, 0, 0, 0, 0, 0, 339, 155, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 347, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 366, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 329, 330, 331, 0, - 0, 332, 333, 0, 334, 0, 182, 0, 183, 0, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 414, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 420, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 329, 330, 331, 0, - 0, 332, 333, 0, 334, 0, 182, 0, 183, 0, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 430, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 456, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 329, 330, 331, 0, - 0, 332, 333, 0, 334, 0, 182, 0, 183, 0, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 457, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 462, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 329, 330, 331, 0, - 0, 332, 333, 0, 334, 0, 182, 0, 183, 0, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 481, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 484, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 329, 330, 331, 0, - 0, 332, 333, 0, 334, 0, 182, 0, 183, 0, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, - 340, 341, 342, 343, 344, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 345, 346, 485, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 329, 330, 331, 0, 0, 332, 333, 0, 334, - 0, 182, 0, 183, 0, 335, 336, 337, 338, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 0, 0, 340, 341, 342, 343, 344, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 345, 346, 0, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 395, 396, 0, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 241, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 263, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 271, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 272, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 273, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 276, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 277, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 405, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 416, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 417, 0, 0, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 418, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 419, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 421, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 443, 0, 0, 205, 206, 207, 0, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 463, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 199, - 200, 201, 202, 203, 204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 182, 0, 183, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, - 0, 0, 0, 205, 206, 207, 471, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 199, 200, 201, 202, 203, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 182, 0, 183, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 0, 0, 0, 0, 205, 206, - 207, 0, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 33, - 0, 0, 0, 0, 0, 34, 0, 0, 35, 0, - 36, 37, 38, 39, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 33, 0, 0, 164, 0, 0, - 34, 0, 0, 35, 0, 36, 37, 38, 39, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 0, 34, 0, 0, 35, 0, 290, - 37, 38, 39, 0, 0, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 33, 0, 0, 0, 0, 0, 34, - 0, 0, 35, 0, 306, 37, 38, 39, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 126, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -39 +static const yytype_int16 yytable[] = +{ + 227, 1, 78, 330, 80, 81, 82, 84, 70, 4, + 399, 254, 15, 240, 241, 450, 451, 255, 70, 5, + 70, 70, 70, 244, 394, 85, 16, 174, 263, 178, + 179, 180, 181, 182, 183, 235, 256, 317, 259, 9, + 264, 92, 12, 257, 267, 268, 184, 260, 185, 452, + 252, 14, 236, 237, 238, 253, 405, 70, 284, 250, + 246, 247, 127, 251, 70, -38, 248, 373, 374, 375, + 376, 377, 378, 20, 417, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 86, + 87, 86, 87, 86, 87, 186, 86, 87, 187, 97, + 21, 446, 447, 86, 87, 115, 469, 470, 116, 26, + 456, 387, 388, 430, 431, 389, 390, 168, 488, 489, + 27, 28, 32, 71, 72, 73, 234, 74, 76, 77, + 79, 88, 350, 70, 350, 83, 89, 91, 94, 95, + 96, 381, 480, 189, 98, 101, 99, 484, 485, 100, + 102, 104, 103, 105, 107, 111, 114, 119, 189, 117, + 126, 155, 158, 159, 160, 164, 169, 170, 172, 175, + 190, 192, 193, 400, 401, 402, 403, 199, 176, 200, + 230, 231, 233, 271, 242, 269, 281, 408, 245, 249, + 258, 261, 262, 276, 277, 289, 298, 288, 350, 301, + 305, 313, 320, 280, 291, 323, 303, 367, 307, 350, + 296, 302, 304, 318, 385, 425, 314, 315, 425, 425, + 316, 350, 325, 434, 369, 327, 412, 326, 427, 329, + 438, 370, 449, 448, 466, 229, 380, 391, 371, 372, + 392, 383, 322, 393, 395, 294, 411, 406, 93, 457, + 350, 350, 404, 22, 409, 410, 429, 414, 440, 312, + 350, 70, 415, 424, 467, 435, 439, 442, 460, 436, + 350, 312, 270, 444, 454, 70, 443, 455, 468, 472, + 462, 463, 476, 477, 350, 474, 478, 70, 350, 350, + 201, 202, 203, 204, 205, 206, 475, 331, 332, 333, + 481, 90, 334, 335, 479, 336, 482, 184, 461, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 157, 0, 0, 0, 0, 118, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 349, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 368, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 331, 332, 333, + 0, 0, 334, 335, 0, 336, 0, 184, 0, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 416, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 422, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 331, 332, 333, + 0, 0, 334, 335, 0, 336, 0, 184, 0, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 432, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 458, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 331, 332, 333, + 0, 0, 334, 335, 0, 336, 0, 184, 0, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 459, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 464, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 331, 332, 333, + 0, 0, 334, 335, 0, 336, 0, 184, 0, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 483, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 486, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 331, 332, 333, + 0, 0, 334, 335, 0, 336, 0, 184, 0, 185, + 0, 337, 338, 339, 340, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 341, 0, + 0, 342, 343, 344, 345, 346, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 347, 348, 487, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 331, 332, 333, 0, 0, 334, 335, 0, + 336, 0, 184, 0, 185, 0, 337, 338, 339, 340, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 341, 0, 0, 342, 343, 344, 345, + 346, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 347, 348, 0, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 397, 398, 0, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 243, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 265, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 273, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 274, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 275, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 278, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 279, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 407, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 418, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 419, 0, 0, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 420, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 421, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 423, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 445, 0, 0, 207, 208, 209, 0, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 465, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 201, 202, 203, 204, 205, 206, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 184, 0, 185, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 0, 0, 0, 0, 207, 208, 209, 473, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 201, 202, 203, 204, 205, + 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 184, 0, 185, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 0, 0, 0, 0, 207, + 208, 209, 0, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 35, 0, 0, 0, 0, 0, 36, 0, 0, 37, + 0, 38, 39, 40, 41, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 35, 0, 0, 166, 0, + 0, 36, 0, 0, 37, 0, 38, 39, 40, 41, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, + 0, 0, 0, 0, 0, 36, 0, 0, 37, 0, + 292, 39, 40, 41, 0, 0, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 35, 0, 0, 0, 0, 0, + 36, 0, 0, 37, 0, 308, 39, 40, 41, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153 }; -static const short yycheck[] = { 184, - 4, 35, 325, 37, 38, 39, 64, 25, 9, 366, - 81, 14, 197, 198, 42, 43, 87, 35, 32, 37, - 38, 39, 207, 346, 8, 28, 8, 81, 3, 4, - 5, 6, 7, 8, 17, 81, 8, 81, 74, 93, - 74, 77, 88, 228, 229, 20, 90, 22, 76, 81, - 7, 34, 35, 36, 86, 378, 74, 33, 81, 81, - 82, 119, 85, 81, 40, 87, 3, 4, 5, 6, - 7, 8, 74, 396, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 84, 85, - 84, 85, 84, 85, 79, 84, 85, 82, 87, 8, - 433, 434, 84, 85, 460, 461, 338, 339, 8, 442, - 412, 413, 340, 341, 75, 75, 160, 484, 485, 17, - 4, 33, 8, 8, 77, 193, 8, 86, 84, 77, - 7, 326, 160, 328, 78, 76, 76, 8, 74, 74, - 335, 474, 170, 75, 7, 74, 479, 480, 29, 7, - 30, 74, 31, 7, 37, 4, 78, 185, 77, 75, - 8, 8, 8, 7, 38, 3, 81, 78, 74, 31, - 4, 79, 367, 368, 369, 370, 54, 79, 79, 39, - 79, 77, 8, 78, 81, 7, 381, 81, 81, 81, - 81, 81, 81, 23, 8, 40, 83, 392, 8, 8, - 8, 20, 78, 78, 76, 74, 79, 8, 403, 79, - 75, 77, 80, 80, 409, 8, 8, 412, 413, 78, - 415, 78, 417, 75, 79, 78, 8, 8, 79, 79, - 8, 10, 8, 75, 74, 74, 79, 74, 79, 74, - 13, 74, 78, 74, 288, 74, 78, 0, 443, 444, - 445, 79, 79, 74, 79, 78, 80, 75, 302, 454, - 288, 78, 75, 458, 75, 80, 0, 74, 80, 464, - 314, 75, 15, 79, 302, 74, 79, 79, 75, 74, - 80, 72, 80, 478, 78, 75, 314, 482, 483, 3, - 4, 5, 6, 7, 8, 75, 10, 11, 12, 314, - 231, 15, 16, 464, 18, 447, 20, 81, 22, 114, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, 185, -1, -1, -1, -1, -1, 41, 124, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, 10, 11, 12, -1, - -1, 15, 16, -1, 18, -1, 20, -1, 22, -1, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, 10, 11, 12, -1, - -1, 15, 16, -1, 18, -1, 20, -1, 22, -1, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, 10, 11, 12, -1, - -1, 15, 16, -1, 18, -1, 20, -1, 22, -1, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, 10, 11, 12, -1, - -1, 15, 16, -1, 18, -1, 20, -1, 22, -1, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, 10, 11, 12, -1, - -1, 15, 16, -1, 18, -1, 20, -1, 22, -1, - 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, -1, -1, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, 76, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, 10, 11, 12, -1, -1, 15, 16, -1, 18, - -1, 20, -1, 22, -1, 24, 25, 26, 27, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, -1, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, 74, 75, -1, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, 75, -1, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, -1, -1, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - 74, -1, -1, 77, 78, 79, -1, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 3, - 4, 5, 6, 7, 8, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 3, 4, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, -1, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, -1, -1, -1, -1, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 8, - -1, -1, -1, -1, -1, 14, -1, -1, 17, -1, - 19, 20, 21, 22, -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, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 8, -1, -1, 76, -1, -1, - 14, -1, -1, 17, -1, 19, 20, 21, 22, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, - -1, -1, -1, -1, 14, -1, -1, 17, -1, 19, - 20, 21, 22, -1, -1, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 8, -1, -1, -1, -1, -1, 14, - -1, -1, 17, -1, 19, 20, 21, 22, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 14, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73 +static const yytype_int16 yycheck[] = +{ + 186, 4, 37, 327, 39, 40, 41, 66, 27, 0, + 368, 81, 14, 199, 200, 42, 43, 87, 37, 9, + 39, 40, 41, 209, 348, 8, 28, 8, 81, 3, + 4, 5, 6, 7, 8, 17, 81, 8, 81, 32, + 93, 76, 7, 88, 230, 231, 20, 90, 22, 76, + 81, 74, 34, 35, 36, 86, 380, 76, 33, 81, + 81, 82, 121, 85, 83, 40, 87, 3, 4, 5, + 6, 7, 8, 8, 398, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 84, + 85, 84, 85, 84, 85, 79, 84, 85, 82, 87, + 8, 435, 436, 84, 85, 74, 462, 463, 77, 75, + 444, 340, 341, 414, 415, 342, 343, 162, 486, 487, + 75, 17, 4, 33, 8, 8, 195, 77, 86, 8, + 84, 78, 328, 162, 330, 77, 7, 76, 76, 8, + 74, 337, 476, 172, 74, 7, 75, 481, 482, 29, + 74, 7, 30, 74, 31, 7, 37, 4, 187, 78, + 77, 75, 8, 8, 8, 7, 38, 3, 81, 78, + 31, 74, 4, 369, 370, 371, 372, 79, 54, 79, + 79, 79, 77, 8, 78, 39, 7, 383, 81, 81, + 81, 81, 81, 81, 81, 23, 8, 40, 394, 8, + 8, 8, 20, 78, 78, 8, 76, 8, 74, 405, + 83, 79, 79, 78, 8, 411, 80, 80, 414, 415, + 77, 417, 75, 419, 79, 75, 8, 78, 8, 78, + 8, 79, 8, 10, 13, 187, 75, 74, 79, 79, + 74, 79, 316, 74, 74, 290, 79, 74, 83, 445, + 446, 447, 78, 17, 74, 78, 75, 79, 74, 304, + 456, 290, 79, 78, 460, 75, 80, 80, 79, 75, + 466, 316, 233, 75, 74, 304, 80, 74, 74, 466, + 79, 79, 75, 74, 480, 80, 78, 316, 484, 485, + 3, 4, 5, 6, 7, 8, 80, 10, 11, 12, + 75, 74, 15, 16, 78, 18, 75, 20, 449, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, 126, -1, -1, -1, -1, 116, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, + -1, -1, 15, 16, -1, 18, -1, 20, -1, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, + -1, -1, 15, 16, -1, 18, -1, 20, -1, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, + -1, -1, 15, 16, -1, 18, -1, 20, -1, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, + -1, -1, 15, 16, -1, 18, -1, 20, -1, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, + -1, -1, 15, 16, -1, 18, -1, 20, -1, 22, + -1, 24, 25, 26, 27, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 41, -1, + -1, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, 76, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, 10, 11, 12, -1, -1, 15, 16, -1, + 18, -1, 20, -1, 22, -1, 24, 25, 26, 27, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 41, -1, -1, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, 74, 75, -1, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, 75, -1, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, -1, -1, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, 74, -1, -1, 77, 78, 79, -1, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 3, 4, 5, 6, 7, 8, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 20, -1, 22, + -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, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + -1, -1, -1, -1, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 3, 4, 5, 6, 7, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 20, -1, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, -1, -1, -1, -1, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 8, -1, -1, -1, -1, -1, 14, -1, -1, 17, + -1, 19, 20, 21, 22, -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, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 8, -1, -1, 76, -1, + -1, 14, -1, -1, 17, -1, 19, 20, 21, 22, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, + -1, -1, -1, -1, -1, 14, -1, -1, 17, -1, + 19, 20, 21, 22, -1, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 8, -1, -1, -1, -1, -1, + 14, -1, -1, 17, -1, 19, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 14, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73 }; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "bison.simple" -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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. */ - -#undef YYERROR_VERBOSE -#ifndef alloca -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#include -#else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) -#include -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -#include - #pragma alloca -#else /* not MSDOS, __TURBOC__, or _AIX */ -#ifdef __hpux -#ifdef __cplusplus -extern "C" { -void *alloca (unsigned int); +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 4, 99, 100, 0, 9, 105, 101, 106, 32, + 102, 107, 7, 108, 74, 14, 28, 103, 109, 114, + 8, 8, 105, 110, 115, 104, 75, 75, 17, 119, + 120, 128, 4, 112, 113, 8, 14, 17, 19, 20, + 21, 22, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 116, 117, 118, 168, + 175, 33, 8, 8, 77, 111, 86, 8, 168, 84, + 168, 168, 168, 77, 111, 8, 84, 85, 78, 7, + 113, 76, 168, 118, 76, 8, 74, 87, 74, 75, + 29, 7, 74, 30, 7, 74, 121, 31, 129, 130, + 122, 7, 131, 132, 37, 74, 77, 78, 132, 4, + 136, 137, 138, 139, 140, 123, 77, 111, 14, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 142, 75, 133, 139, 8, 8, + 8, 141, 134, 124, 7, 143, 76, 135, 168, 38, + 3, 144, 81, 147, 8, 78, 54, 145, 3, 4, + 5, 6, 7, 8, 20, 22, 79, 82, 148, 175, + 31, 146, 74, 4, 149, 150, 151, 152, 153, 79, + 79, 3, 4, 5, 6, 7, 8, 77, 78, 79, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 174, 175, 148, + 79, 79, 125, 77, 111, 17, 34, 35, 36, 156, + 174, 174, 78, 80, 174, 81, 81, 82, 87, 81, + 81, 85, 81, 86, 81, 87, 81, 88, 81, 81, + 90, 81, 81, 81, 93, 80, 174, 174, 174, 39, + 152, 8, 154, 80, 80, 80, 81, 81, 80, 80, + 78, 7, 155, 157, 33, 126, 158, 160, 40, 23, + 162, 78, 19, 167, 168, 169, 83, 159, 8, 127, + 171, 8, 79, 76, 79, 8, 173, 74, 19, 164, + 165, 166, 168, 8, 80, 80, 77, 8, 78, 170, + 20, 161, 166, 8, 172, 75, 78, 75, 177, 78, + 177, 10, 11, 12, 15, 16, 18, 24, 25, 26, + 27, 41, 44, 45, 46, 47, 48, 74, 75, 76, + 174, 178, 179, 180, 181, 183, 185, 187, 189, 190, + 192, 194, 195, 198, 199, 200, 201, 8, 76, 79, + 79, 79, 79, 3, 4, 5, 6, 7, 8, 176, + 75, 174, 202, 79, 193, 8, 197, 193, 193, 197, + 197, 74, 74, 74, 177, 74, 163, 74, 75, 163, + 174, 174, 174, 174, 78, 177, 74, 80, 174, 74, + 78, 79, 8, 188, 79, 79, 76, 177, 80, 74, + 80, 80, 76, 80, 78, 174, 196, 8, 191, 75, + 196, 196, 76, 182, 174, 75, 75, 184, 8, 80, + 74, 204, 80, 80, 75, 74, 177, 177, 10, 8, + 42, 43, 76, 203, 74, 74, 177, 174, 76, 76, + 79, 191, 79, 79, 76, 80, 13, 174, 74, 173, + 173, 186, 178, 80, 80, 80, 75, 74, 78, 78, + 177, 75, 75, 76, 177, 177, 76, 76, 163, 163 }; -#else /* not __cplusplus */ -void *alloca (); -#endif /* not __cplusplus */ -#endif /* __hpux */ -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc. */ -#endif /* not GNU C. */ -#endif /* alloca not defined. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 +#define YYEMPTY (-2) #define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ + #define YYFAIL goto yyerrlab + #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ + +#define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -#define YYLEX yylex() + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif -#ifdef YYPURE -#ifdef YYLSP_NEEDED + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +# define YYLEX yylex (YYLEX_PARAM) #else -#define YYLEX yylex(&yylval, &yylloc) +# define YYLEX yylex () #endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else -#define YYLEX yylex(&yylval) +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif -#endif /* not YYLSP_NEEDED */ +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); -/* If nonreentrant, generate the variables here */ + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} -#ifndef YYPURE +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; #endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} -/* YYINITDEPTH indicates the initial size of the parser's stacks */ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (from, to, count) - char *from; - char *to; - int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *from, char *to, int count) -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} +#if YYERROR_VERBOSE +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; #endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; #endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ -#line 192 "bison.simple" -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); #else -#define YYPARSE_PARAM -#define YYPARSE_PARAM_DECL +int yyparse (); #endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int -yyparse(YYPARSE_PARAM) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +yyparse (void *YYPARSE_PARAM) #else -#define YYPOPSTACK (yyvsp--, yyssp--) +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; #endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () - int yystacksize = YYINITDEPTH; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; #endif #endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; yyerrstatus = 0; yynerrs = 0; @@ -1647,234 +2502,194 @@ yyparse(YYPARSE_PARAM) so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss - 1; + yyssp = yyss; yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: + goto yysetstate; - *++yyssp = yystate; +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; - if (yyssp >= yyss + yystacksize - 1) + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - return 2; - } + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; - yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); -#endif + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif #endif /* no yyoverflow */ - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - if (yyssp >= yyss + yystacksize - 1) + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; - yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ +/*-----------. +| yybackup. | +`-----------*/ +yybackup: - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ + /* Not known => get a look-ahead token if don't already have one. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif + YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) + if (yyn <= 0) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the token being shifted unless it is eof. */ + /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; -/* Do the default action for the current state. */ -yydefault: +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; + goto yyreduce; -/* Do a reduction. yyn is the number of a rule to reduce with. */ + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ yyreduce: + /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ -#if YYDEBUG != 0 - if (yydebug) + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 1: -#line 246 "ecc/parser.y" -{ - int iID = atoi(yyvsp[0].strString); + case 2: +#line 253 "./Ecc/Parser.y" + { + int iID = atoi((yyvsp[(1) - (1)]).strString); if(iID>32767) { yyerror("Maximum allowed id for entity source file is 32767"); } @@ -1883,80 +2698,91 @@ case 1: fprintf(_fDeclaration, "#ifndef _%s_INCLUDED\n", _strFileNameBaseIdentifier); fprintf(_fDeclaration, "#define _%s_INCLUDED 1\n", _strFileNameBaseIdentifier); - ; - break;} -case 2: -#line 256 "ecc/parser.y" -{ + ;} + break; + + case 3: +#line 263 "./Ecc/Parser.y" + { //fprintf(_fImplementation, "\n#undef DECL_DLL\n#define DECL_DLL _declspec(dllimport)\n"); - ; - break;} -case 3: -#line 259 "ecc/parser.y" -{ + ;} + break; + + case 4: +#line 266 "./Ecc/Parser.y" + { //fprintf(_fImplementation, "\n#undef DECL_DLL\n#define DECL_DLL _declspec(dllexport)\n"); fprintf(_fImplementation, "#include <%s.h>\n", _strFileNameBase); fprintf(_fImplementation, "#include <%s_tables.h>\n", _strFileNameBase); - ; - break;} -case 4: -#line 264 "ecc/parser.y" -{ - ; - break;} -case 5: -#line 265 "ecc/parser.y" -{ - ; - break;} -case 6: -#line 266 "ecc/parser.y" -{ + ;} + break; + + case 5: +#line 271 "./Ecc/Parser.y" + { + ;} + break; + + case 6: +#line 272 "./Ecc/Parser.y" + { + ;} + break; + + case 7: +#line 273 "./Ecc/Parser.y" + { fprintf(_fDeclaration, "#endif // _%s_INCLUDED\n", _strFileNameBaseIdentifier); - ; - break;} -case 8: -#line 277 "ecc/parser.y" -{ fprintf(_fImplementation, "%s\n", yyvsp[0].strString); ; - break;} -case 11: -#line 285 "ecc/parser.y" -{ - char *strUsedFileName = strdup(yyvsp[-1].strString); + ;} + break; + + case 9: +#line 284 "./Ecc/Parser.y" + { fprintf(_fImplementation, "%s\n", (yyvsp[(1) - (1)]).strString); ;} + break; + + case 12: +#line 292 "./Ecc/Parser.y" + { + char *strUsedFileName = strdup((yyvsp[(2) - (3)]).strString); strUsedFileName[strlen(strUsedFileName)-1] = 0; fprintf(_fDeclaration, "#include <%s.h>\n", strUsedFileName+1); - ; - break;} -case 15: -#line 302 "ecc/parser.y" -{ - _strCurrentEnum = yyvsp[0].strString; + ;} + break; + + case 16: +#line 309 "./Ecc/Parser.y" + { + _strCurrentEnum = (yyvsp[(2) - (2)]).strString; fprintf(_fTables, "EP_ENUMBEG(%s)\n", _strCurrentEnum ); fprintf(_fDeclaration, "extern DECL_DLL CEntityPropertyEnumType %s_enum;\n", _strCurrentEnum ); fprintf(_fDeclaration, "enum %s {\n", _strCurrentEnum ); - ; - break;} -case 16: -#line 307 "ecc/parser.y" -{ + ;} + break; + + case 17: +#line 314 "./Ecc/Parser.y" + { fprintf(_fTables, "EP_ENUMEND(%s);\n\n", _strCurrentEnum); fprintf(_fDeclaration, "};\n"); fprintf(_fDeclaration, "DECL_DLL inline void ClearToDefault(%s &e) { e = (%s)0; } ;\n", _strCurrentEnum, _strCurrentEnum); - ; - break;} -case 21: -#line 320 "ecc/parser.y" -{ - fprintf(_fTables, " EP_ENUMVALUE(%s, %s),\n", yyvsp[-1].strString, yyvsp[0].strString); - fprintf(_fDeclaration, " %s = %s,\n", yyvsp[-1].strString, yyvsp[-2].strString); - ; - break;} -case 22: -#line 330 "ecc/parser.y" -{ - _strCurrentEvent = yyvsp[0].strString; + ;} + break; + + case 22: +#line 327 "./Ecc/Parser.y" + { + fprintf(_fTables, " EP_ENUMVALUE(%s, %s),\n", (yyvsp[(2) - (3)]).strString, (yyvsp[(3) - (3)]).strString); + fprintf(_fDeclaration, " %s = %s,\n", (yyvsp[(2) - (3)]).strString, (yyvsp[(1) - (3)]).strString); + ;} + break; + + case 23: +#line 337 "./Ecc/Parser.y" + { + _strCurrentEvent = (yyvsp[(2) - (2)]).strString; int iID = CreateID(); fprintf(_fDeclaration, "#define EVENTCODE_%s 0x%08x\n", _strCurrentEvent, iID); fprintf(_fDeclaration, "class DECL_DLL %s : public CEntityEvent {\npublic:\n", @@ -1970,86 +2796,96 @@ case 22: _strCurrentEvent, _strCurrentEvent); fprintf(_fImplementation, "%s::%s() : CEntityEvent(EVENTCODE_%s) {;\n", _strCurrentEvent, _strCurrentEvent, _strCurrentEvent); - ; - break;} -case 23: -#line 345 "ecc/parser.y" -{ + ;} + break; + + case 24: +#line 352 "./Ecc/Parser.y" + { fprintf(_fImplementation, "};\n"); fprintf(_fDeclaration, "};\n"); fprintf(_fDeclaration, "DECL_DLL inline void ClearToDefault(%s &e) { e = %s(); } ;\n", _strCurrentEvent, _strCurrentEvent); - ; - break;} -case 28: -#line 363 "ecc/parser.y" -{ - fprintf(_fDeclaration, "%s %s;\n", yyvsp[-1].strString, yyvsp[0].strString); - fprintf(_fImplementation, " ClearToDefault(%s);\n", yyvsp[0].strString); - ; - break;} -case 32: -#line 381 "ecc/parser.y" -{ - _strCurrentClass = yyvsp[-9].strString; - _strCurrentBase = yyvsp[-7].strString; - _strCurrentDescription = yyvsp[-4].strString; - _strCurrentThumbnail = yyvsp[-1].strString; + ;} + break; + + case 29: +#line 370 "./Ecc/Parser.y" + { + fprintf(_fDeclaration, "%s %s;\n", (yyvsp[(1) - (2)]).strString, (yyvsp[(2) - (2)]).strString); + fprintf(_fImplementation, " ClearToDefault(%s);\n", (yyvsp[(2) - (2)]).strString); + ;} + break; + + case 33: +#line 388 "./Ecc/Parser.y" + { + _strCurrentClass = (yyvsp[(2) - (11)]).strString; + _strCurrentBase = (yyvsp[(4) - (11)]).strString; + _strCurrentDescription = (yyvsp[(7) - (11)]).strString; + _strCurrentThumbnail = (yyvsp[(10) - (11)]).strString; fprintf(_fTables, "#define ENTITYCLASS %s\n\n", _strCurrentClass); fprintf(_fDeclaration, "extern \"C\" DECL_DLL CDLLEntityClass %s_DLLClass;\n", _strCurrentClass); fprintf(_fDeclaration, "%s %s : public %s {\npublic:\n", - yyvsp[-10].strString, _strCurrentClass, _strCurrentBase); + (yyvsp[(1) - (11)]).strString, _strCurrentClass, _strCurrentBase); - ; - break;} -case 33: -#line 393 "ecc/parser.y" -{ + ;} + break; + + case 34: +#line 400 "./Ecc/Parser.y" + { fprintf(_fDeclaration, " %s virtual void SetDefaultProperties(void);\n", _bClassIsExported?"":"DECL_DLL"); fprintf(_fImplementation, "void %s::SetDefaultProperties(void) {\n", _strCurrentClass); fprintf(_fTables, "CEntityProperty %s_properties[] = {\n", _strCurrentClass); - ; - break;} -case 34: -#line 398 "ecc/parser.y" -{ + ;} + break; + + case 35: +#line 405 "./Ecc/Parser.y" + { fprintf(_fImplementation, " %s::SetDefaultProperties();\n}\n", _strCurrentBase); fprintf(_fTables, "CEntityComponent %s_components[] = {\n", _strCurrentClass); - ; - break;} -case 35: -#line 402 "ecc/parser.y" -{ - ; - break;} -case 36: -#line 403 "ecc/parser.y" -{ + ;} + break; + + case 36: +#line 409 "./Ecc/Parser.y" + { + ;} + break; + + case 37: +#line 410 "./Ecc/Parser.y" + { _bTrackLineInformation = 1; fprintf(_fTables, "CEventHandlerEntry %s_handlers[] = {\n", _strCurrentClass); _bInProcedure = 0; _bInHandler = 0; - ; - break;} -case 37: -#line 409 "ecc/parser.y" -{ + ;} + break; + + case 38: +#line 416 "./Ecc/Parser.y" + { _bInProcedure = 1; - ; - break;} -case 38: -#line 412 "ecc/parser.y" -{ - ; - break;} -case 39: -#line 413 "ecc/parser.y" -{ + ;} + break; + + case 39: +#line 419 "./Ecc/Parser.y" + { + ;} + break; + + case 40: +#line 420 "./Ecc/Parser.y" + { fprintf(_fTables, "};\n#define %s_handlersct ARRAYCOUNT(%s_handlers)\n", _strCurrentClass, _strCurrentClass); fprintf(_fTables, "\n"); @@ -2110,19 +2946,22 @@ case 39: fprintf(_fTables, "DECLARE_CTFILENAME(_fnm%s_tbn, %s);\n", _strCurrentClass, _strCurrentThumbnail); fprintf(_fDeclaration, "};\n"); - ; - break;} -case 40: -#line 478 "ecc/parser.y" -{ yyval = yyvsp[0]; _bClassIsExported = 0; ; - break;} -case 41: -#line 479 "ecc/parser.y" -{ yyval = yyvsp[-1]+" DECL_DLL "; _bClassIsExported = 1; ; - break;} -case 43: -#line 484 "ecc/parser.y" -{ + ;} + break; + + case 41: +#line 485 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (1)]); _bClassIsExported = 0; ;} + break; + + case 42: +#line 486 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (2)])+" DECL_DLL "; _bClassIsExported = 1; ;} + break; + + case 44: +#line 491 "./Ecc/Parser.y" + { _bFeature_ImplementsOnWorldInit = 0; _bFeature_ImplementsOnWorldEnd = 0; _bFeature_ImplementsOnWorldTick = 0; @@ -2132,81 +2971,86 @@ case 43: _bFeature_ImplementsOnPrecache = 0; _bFeature_AbstractBaseClass = 0; _bFeature_CanBePredictable = 0; - ; - break;} -case 47: -#line 501 "ecc/parser.y" -{ - if (strcmp(yyvsp[0].strString, "\"AbstractBaseClass\"")==0) { + ;} + break; + + case 48: +#line 508 "./Ecc/Parser.y" + { + if (strcmp((yyvsp[(1) - (1)]).strString, "\"AbstractBaseClass\"")==0) { _bFeature_AbstractBaseClass = 1; - } else if (strcmp(yyvsp[0].strString, "\"IsTargetable\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"IsTargetable\"")==0) { fprintf(_fDeclaration, "virtual BOOL IsTargetable(void) const { return TRUE; };\n"); - } else if (strcmp(yyvsp[0].strString, "\"IsImportant\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"IsImportant\"")==0) { fprintf(_fDeclaration, "virtual BOOL IsImportant(void) const { return TRUE; };\n"); - } else if (strcmp(yyvsp[0].strString, "\"HasName\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"HasName\"")==0) { fprintf(_fDeclaration, "virtual const CTString &GetName(void) const { return m_strName; };\n"); - } else if (strcmp(yyvsp[0].strString, "\"CanBePredictable\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"CanBePredictable\"")==0) { fprintf(_fDeclaration, "virtual CEntity *GetPredictionPair(void) { return m_penPrediction; };\n"); fprintf(_fDeclaration, "virtual void SetPredictionPair(CEntity *penPair) { m_penPrediction = penPair; };\n"); _bFeature_CanBePredictable = 1; - } else if (strcmp(yyvsp[0].strString, "\"HasDescription\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"HasDescription\"")==0) { fprintf(_fDeclaration, "virtual const CTString &GetDescription(void) const { return m_strDescription; };\n"); - } else if (strcmp(yyvsp[0].strString, "\"HasTarget\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"HasTarget\"")==0) { fprintf(_fDeclaration, "virtual CEntity *GetTarget(void) const { return m_penTarget; };\n"); - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnInitClass\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnInitClass\"")==0) { _bFeature_ImplementsOnInitClass = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnEndClass\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnEndClass\"")==0) { _bFeature_ImplementsOnEndClass = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnPrecache\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnPrecache\"")==0) { _bFeature_ImplementsOnPrecache = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnWorldInit\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnWorldInit\"")==0) { _bFeature_ImplementsOnWorldInit = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnWorldEnd\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnWorldEnd\"")==0) { _bFeature_ImplementsOnWorldEnd = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnWorldTick\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnWorldTick\"")==0) { _bFeature_ImplementsOnWorldTick = 1; - } else if (strcmp(yyvsp[0].strString, "\"ImplementsOnWorldRender\"")==0) { + } else if (strcmp((yyvsp[(1) - (1)]).strString, "\"ImplementsOnWorldRender\"")==0) { _bFeature_ImplementsOnWorldRender = 1; } else { - yyerror((SType("Unknown feature: ")+yyvsp[0]).strString); + yyerror((SType("Unknown feature: ")+(yyvsp[(1) - (1)])).strString); } - ; - break;} -case 52: -#line 552 "ecc/parser.y" -{ - fprintf(_fDeclaration, "%s %s;\n", yyvsp[-2].strString, yyvsp[-1].strString); - ; - break;} -case 53: -#line 562 "ecc/parser.y" -{ + ;} + break; + + case 53: +#line 559 "./Ecc/Parser.y" + { + fprintf(_fDeclaration, "%s %s;\n", (yyvsp[(1) - (3)]).strString, (yyvsp[(2) - (3)]).strString); + ;} + break; + + case 54: +#line 569 "./Ecc/Parser.y" + { DeclareFeatureProperties(); // this won't work, but at least it will generate an error!!!! fprintf(_fTables, " CEntityProperty()\n};\n"); fprintf(_fTables, "#define %s_propertiesct 0\n", _strCurrentClass); fprintf(_fTables, "\n"); fprintf(_fTables, "\n"); - ; - break;} -case 54: -#line 569 "ecc/parser.y" -{ + ;} + break; + + case 55: +#line 576 "./Ecc/Parser.y" + { DeclareFeatureProperties(); fprintf(_fTables, "};\n"); fprintf(_fTables, "#define %s_propertiesct ARRAYCOUNT(%s_properties)\n", _strCurrentClass, _strCurrentClass); fprintf(_fTables, "\n"); - ; - break;} -case 58: -#line 586 "ecc/parser.y" -{ - fprintf(_fTables, " CEntityProperty(%s, %s, (0x%08x<<8)+%s, offsetof(%s, %s), %s, %s, %s, %s),\n", + ;} + break; + + case 59: +#line 593 "./Ecc/Parser.y" + { + fprintf(_fTables, " CEntityProperty(%s, %s, (0x%08x<<8)+%s, _offsetof(%s, %s), %s, %s, %s, %s),\n", _strCurrentPropertyPropertyType, _strCurrentPropertyEnumType, _iCurrentClassID, @@ -2225,277 +3069,314 @@ case 58: if (strlen(_strCurrentPropertyDefaultCode)>0) { fprintf(_fImplementation, " %s\n", _strCurrentPropertyDefaultCode); } - ; - break;} -case 59: -#line 609 "ecc/parser.y" -{ _strCurrentPropertyID = yyvsp[0].strString; ; - break;} -case 60: -#line 610 "ecc/parser.y" -{ _strCurrentPropertyIdentifier = yyvsp[0].strString; ; - break;} -case 61: -#line 613 "ecc/parser.y" -{ + ;} + break; + + case 60: +#line 616 "./Ecc/Parser.y" + { _strCurrentPropertyID = (yyvsp[(1) - (1)]).strString; ;} + break; + + case 61: +#line 617 "./Ecc/Parser.y" + { _strCurrentPropertyIdentifier = (yyvsp[(1) - (1)]).strString; ;} + break; + + case 62: +#line 620 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ENUM"; - _strCurrentPropertyEnumType = (SType("&")+yyvsp[0]+"_enum").strString; - _strCurrentPropertyDataType = (SType("enum ")+yyvsp[0].strString).strString; - ; - break;} -case 62: -#line 618 "ecc/parser.y" -{ + _strCurrentPropertyEnumType = (SType("&")+(yyvsp[(2) - (2)])+"_enum").strString; + _strCurrentPropertyDataType = (SType("enum ")+(yyvsp[(2) - (2)]).strString).strString; + ;} + break; + + case 63: +#line 625 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLAGS"; - _strCurrentPropertyEnumType = (SType("&")+yyvsp[0]+"_enum").strString; + _strCurrentPropertyEnumType = (SType("&")+(yyvsp[(2) - (2)])+"_enum").strString; _strCurrentPropertyDataType = "ULONG"; - ; - break;} -case 63: -#line 623 "ecc/parser.y" -{ + ;} + break; + + case 64: +#line 630 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_STRING"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CTString"; - ; - break;} -case 64: -#line 628 "ecc/parser.y" -{ + ;} + break; + + case 65: +#line 635 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_STRINGTRANS"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CTStringTrans"; - ; - break;} -case 65: -#line 633 "ecc/parser.y" -{ + ;} + break; + + case 66: +#line 640 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FILENAME"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CTFileName"; - ; - break;} -case 66: -#line 638 "ecc/parser.y" -{ + ;} + break; + + case 67: +#line 645 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FILENAMENODEP"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CTFileNameNoDep"; - ; - break;} -case 67: -#line 643 "ecc/parser.y" -{ + ;} + break; + + case 68: +#line 650 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_BOOL"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "BOOL"; - ; - break;} -case 68: -#line 648 "ecc/parser.y" -{ + ;} + break; + + case 69: +#line 655 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_COLOR"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "COLOR"; - ; - break;} -case 69: -#line 653 "ecc/parser.y" -{ + ;} + break; + + case 70: +#line 660 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOAT"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOAT"; - ; - break;} -case 70: -#line 658 "ecc/parser.y" -{ + ;} + break; + + case 71: +#line 665 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_INDEX"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "INDEX"; - ; - break;} -case 71: -#line 663 "ecc/parser.y" -{ + ;} + break; + + case 72: +#line 670 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_RANGE"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "RANGE"; - ; - break;} -case 72: -#line 668 "ecc/parser.y" -{ + ;} + break; + + case 73: +#line 675 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ENTITYPTR"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CEntityPointer"; - ; - break;} -case 73: -#line 673 "ecc/parser.y" -{ + ;} + break; + + case 74: +#line 680 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_MODELOBJECT"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CModelObject"; - ; - break;} -case 74: -#line 678 "ecc/parser.y" -{ + ;} + break; + + case 75: +#line 685 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_MODELINSTANCE"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CModelInstance"; - ; - break;} -case 75: -#line 683 "ecc/parser.y" -{ + ;} + break; + + case 76: +#line 690 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ANIMOBJECT"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CAnimObject"; - ; - break;} -case 76: -#line 688 "ecc/parser.y" -{ + ;} + break; + + case 77: +#line 695 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_SOUNDOBJECT"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CSoundObject"; - ; - break;} -case 77: -#line 693 "ecc/parser.y" -{ + ;} + break; + + case 78: +#line 700 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_PLACEMENT3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "CPlacement3D"; - ; - break;} -case 78: -#line 698 "ecc/parser.y" -{ + ;} + break; + + case 79: +#line 705 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOATAABBOX3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOATaabbox3D"; - ; - break;} -case 79: -#line 703 "ecc/parser.y" -{ + ;} + break; + + case 80: +#line 710 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOATMATRIX3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOATmatrix3D"; - ; - break;} -case 80: -#line 708 "ecc/parser.y" -{ + ;} + break; + + case 81: +#line 715 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOATQUAT3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOATquat3D"; - ; - break;} -case 81: -#line 713 "ecc/parser.y" -{ + ;} + break; + + case 82: +#line 720 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ANGLE"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "ANGLE"; - ; - break;} -case 82: -#line 718 "ecc/parser.y" -{ + ;} + break; + + case 83: +#line 725 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ANGLE3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "ANGLE3D"; - ; - break;} -case 83: -#line 723 "ecc/parser.y" -{ + ;} + break; + + case 84: +#line 730 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOAT3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOAT3D"; - ; - break;} -case 84: -#line 728 "ecc/parser.y" -{ + ;} + break; + + case 85: +#line 735 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_FLOATplane3D"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "FLOATplane3D"; - ; - break;} -case 85: -#line 733 "ecc/parser.y" -{ + ;} + break; + + case 86: +#line 740 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ILLUMINATIONTYPE"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "ILLUMINATIONTYPE"; - ; - break;} -case 86: -#line 738 "ecc/parser.y" -{ + ;} + break; + + case 87: +#line 745 "./Ecc/Parser.y" + { _strCurrentPropertyPropertyType = "CEntityProperty::EPT_ANIMATION"; _strCurrentPropertyEnumType = "NULL"; _strCurrentPropertyDataType = "ANIMATION"; - ; - break;} -case 87: -#line 746 "ecc/parser.y" -{ + ;} + break; + + case 88: +#line 753 "./Ecc/Parser.y" + { _strCurrentPropertyName = "\"\""; _strCurrentPropertyShortcut = "0"; _strCurrentPropertyColor = "0"; // this won't be rendered anyway - ; - break;} -case 88: -#line 751 "ecc/parser.y" -{ - _strCurrentPropertyName = yyvsp[-2].strString; - ; - break;} -case 89: -#line 756 "ecc/parser.y" -{ + ;} + break; + + case 89: +#line 758 "./Ecc/Parser.y" + { + _strCurrentPropertyName = (yyvsp[(1) - (3)]).strString; + ;} + break; + + case 90: +#line 763 "./Ecc/Parser.y" + { _strCurrentPropertyShortcut = "0"; - ; - break;} -case 90: -#line 759 "ecc/parser.y" -{ - _strCurrentPropertyShortcut = yyvsp[0].strString; - ; - break;} -case 91: -#line 764 "ecc/parser.y" -{ + ;} + break; + + case 91: +#line 766 "./Ecc/Parser.y" + { + _strCurrentPropertyShortcut = (yyvsp[(1) - (1)]).strString; + ;} + break; + + case 92: +#line 771 "./Ecc/Parser.y" + { _strCurrentPropertyColor = "0x7F0000FFUL"; // dark red - ; - break;} -case 92: -#line 767 "ecc/parser.y" -{ - _strCurrentPropertyColor = yyvsp[-1].strString; - ; - break;} -case 93: -#line 771 "ecc/parser.y" -{ + ;} + break; + + case 93: +#line 774 "./Ecc/Parser.y" + { + _strCurrentPropertyColor = (yyvsp[(3) - (4)]).strString; + ;} + break; + + case 94: +#line 778 "./Ecc/Parser.y" + { _strCurrentPropertyFlags = "0"; // dark red - ; - break;} -case 94: -#line 774 "ecc/parser.y" -{ - _strCurrentPropertyFlags = yyvsp[-1].strString; - ; - break;} -case 95: -#line 779 "ecc/parser.y" -{ + ;} + break; + + case 95: +#line 781 "./Ecc/Parser.y" + { + _strCurrentPropertyFlags = (yyvsp[(3) - (4)]).strString; + ;} + break; + + case 96: +#line 786 "./Ecc/Parser.y" + { if (strcmp(_strCurrentPropertyDataType,"CEntityPointer")==0) { _strCurrentPropertyDefaultCode = (SType(_strCurrentPropertyIdentifier)+" = NULL;").strString; } else if (strcmp(_strCurrentPropertyDataType,"CModelObject")==0) { @@ -2516,59 +3397,68 @@ case 95: yyerror("this kind of property must have default value"); _strCurrentPropertyDefaultCode = ""; } - ; - break;} -case 96: -#line 801 "ecc/parser.y" -{ + ;} + break; + + case 97: +#line 808 "./Ecc/Parser.y" + { if (strcmp(_strCurrentPropertyDataType,"CEntityPointer")==0) { yyerror("CEntityPointer type properties always default to NULL"); } else { - _strCurrentPropertyDefaultCode = (SType(_strCurrentPropertyIdentifier)+" = "+yyvsp[0].strString+";").strString; + _strCurrentPropertyDefaultCode = (SType(_strCurrentPropertyIdentifier)+" = "+(yyvsp[(2) - (2)]).strString+";").strString; } - ; - break;} -case 102: -#line 811 "ecc/parser.y" -{yyval = yyvsp[0] + " ";; - break;} -case 103: -#line 812 "ecc/parser.y" -{yyval = yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 104: -#line 813 "ecc/parser.y" -{yyval = yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 105: -#line 814 "ecc/parser.y" -{yyval = yyvsp[-1]+yyvsp[0];; - break;} -case 106: -#line 815 "ecc/parser.y" -{yyval = yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 107: -#line 822 "ecc/parser.y" -{ + ;} + break; + + case 103: +#line 818 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (1)]) + " ";;} + break; + + case 104: +#line 819 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (4)])+(yyvsp[(2) - (4)])+(yyvsp[(3) - (4)])+(yyvsp[(4) - (4)]);;} + break; + + case 105: +#line 820 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (4)])+(yyvsp[(2) - (4)])+(yyvsp[(3) - (4)])+(yyvsp[(4) - (4)]);;} + break; + + case 106: +#line 821 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 107: +#line 822 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 108: +#line 829 "./Ecc/Parser.y" + { fprintf(_fTables, " CEntityComponent()\n};\n"); fprintf(_fTables, "#define %s_componentsct 0\n", _strCurrentClass); fprintf(_fTables, "\n"); fprintf(_fTables, "\n"); - ; - break;} -case 108: -#line 828 "ecc/parser.y" -{ + ;} + break; + + case 109: +#line 835 "./Ecc/Parser.y" + { fprintf(_fTables, "};\n"); fprintf(_fTables, "#define %s_componentsct ARRAYCOUNT(%s_components)\n", _strCurrentClass, _strCurrentClass); fprintf(_fTables, "\n"); - ; - break;} -case 112: -#line 844 "ecc/parser.y" -{ + ;} + break; + + case 113: +#line 851 "./Ecc/Parser.y" + { fprintf(_fTables, "#define %s ((0x%08x<<8)+%s)\n", _strCurrentComponentIdentifier, _iCurrentClassID, @@ -2578,51 +3468,61 @@ case 112: _strCurrentComponentIdentifier, "EF","NM", _strCurrentComponentFileName); - ; - break;} -case 113: -#line 857 "ecc/parser.y" -{ _strCurrentComponentID = yyvsp[0].strString; ; - break;} -case 114: -#line 858 "ecc/parser.y" -{ _strCurrentComponentIdentifier = yyvsp[0].strString; ; - break;} -case 115: -#line 859 "ecc/parser.y" -{ _strCurrentComponentFileName = yyvsp[0].strString; ; - break;} -case 116: -#line 862 "ecc/parser.y" -{ _strCurrentComponentType = "ECT_MODEL"; ; - break;} -case 117: -#line 863 "ecc/parser.y" -{ _strCurrentComponentType = "ECT_TEXTURE"; ; - break;} -case 118: -#line 864 "ecc/parser.y" -{ _strCurrentComponentType = "ECT_SOUND"; ; - break;} -case 119: -#line 865 "ecc/parser.y" -{ _strCurrentComponentType = "ECT_CLASS"; ; - break;} -case 120: -#line 872 "ecc/parser.y" -{ yyval = "";; - break;} -case 121: -#line 873 "ecc/parser.y" -{yyval = yyvsp[-1]+yyvsp[0];; - break;} -case 122: -#line 878 "ecc/parser.y" -{ - char *strReturnType = yyvsp[-10].strString; - char *strFunctionHeader = (yyvsp[-9]+yyvsp[-8]+yyvsp[-7]+yyvsp[-6]+yyvsp[-5]+yyvsp[-4]).strString; - char *strFunctionBody = (yyvsp[-3]+yyvsp[-2]+yyvsp[-1]).strString; - if (strcmp(yyvsp[-8].strString, _strCurrentClass)==0) { + ;} + break; + + case 114: +#line 864 "./Ecc/Parser.y" + { _strCurrentComponentID = (yyvsp[(1) - (1)]).strString; ;} + break; + + case 115: +#line 865 "./Ecc/Parser.y" + { _strCurrentComponentIdentifier = (yyvsp[(1) - (1)]).strString; ;} + break; + + case 116: +#line 866 "./Ecc/Parser.y" + { _strCurrentComponentFileName = (yyvsp[(1) - (1)]).strString; ;} + break; + + case 117: +#line 869 "./Ecc/Parser.y" + { _strCurrentComponentType = "ECT_MODEL"; ;} + break; + + case 118: +#line 870 "./Ecc/Parser.y" + { _strCurrentComponentType = "ECT_TEXTURE"; ;} + break; + + case 119: +#line 871 "./Ecc/Parser.y" + { _strCurrentComponentType = "ECT_SOUND"; ;} + break; + + case 120: +#line 872 "./Ecc/Parser.y" + { _strCurrentComponentType = "ECT_CLASS"; ;} + break; + + case 121: +#line 879 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 122: +#line 880 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 123: +#line 885 "./Ecc/Parser.y" + { + const char *strReturnType = (yyvsp[(3) - (13)]).strString; + const char *strFunctionHeader = ((yyvsp[(4) - (13)])+(yyvsp[(5) - (13)])+(yyvsp[(6) - (13)])+(yyvsp[(7) - (13)])+(yyvsp[(8) - (13)])+(yyvsp[(9) - (13)])).strString; + const char *strFunctionBody = ((yyvsp[(10) - (13)])+(yyvsp[(11) - (13)])+(yyvsp[(12) - (13)])).strString; + if (strcmp((yyvsp[(5) - (13)]).strString, _strCurrentClass)==0) { if (strcmp(strReturnType+strlen(strReturnType)-4, "void")==0 ) { strReturnType = ""; } else { @@ -2630,122 +3530,147 @@ case 122: } } fprintf(_fDeclaration, " %s %s %s %s;\n", - yyvsp[-12].strString, yyvsp[-11].strString, strReturnType, strFunctionHeader); + (yyvsp[(1) - (13)]).strString, (yyvsp[(2) - (13)]).strString, strReturnType, strFunctionHeader); fprintf(_fImplementation, " %s %s::%s %s\n", strReturnType, _strCurrentClass, strFunctionHeader, strFunctionBody); - ; - break;} -case 123: -#line 896 "ecc/parser.y" -{ yyval = "";; - break;} -case 124: -#line 897 "ecc/parser.y" -{ yyval = " ~ "; ; - break;} -case 125: -#line 901 "ecc/parser.y" -{ yyval = "";; - break;} -case 126: -#line 902 "ecc/parser.y" -{ + ;} + break; + + case 124: +#line 903 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 125: +#line 904 "./Ecc/Parser.y" + { (yyval) = " ~ "; ;} + break; + + case 126: +#line 908 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 127: +#line 909 "./Ecc/Parser.y" + { if (_bClassIsExported) { - yyval = ""; + (yyval) = ""; } else { - yyval = " DECL_DLL "; + (yyval) = " DECL_DLL "; } - ; - break;} -case 127: -#line 912 "ecc/parser.y" -{ yyval = "";; - break;} -case 128: -#line 913 "ecc/parser.y" -{ yyval = yyvsp[0]; ; - break;} -case 129: -#line 916 "ecc/parser.y" -{ yyval = "";; - break;} -case 130: -#line 917 "ecc/parser.y" -{ yyval = yyvsp[0]; ; - break;} -case 133: -#line 924 "ecc/parser.y" -{ yyval = "";; - break;} -case 137: -#line 930 "ecc/parser.y" -{yyval = yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 138: -#line 933 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 143: -#line 944 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 144: -#line 945 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 145: -#line 946 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 146: -#line 947 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 147: -#line 948 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 148: -#line 949 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 149: -#line 950 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 150: -#line 951 "ecc/parser.y" -{ yyval=yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 151: -#line 952 "ecc/parser.y" -{ yyval=yyvsp[-3]+" "+yyvsp[-2]+" "+yyvsp[-1]+" "+yyvsp[0]; ; - break;} -case 152: -#line 960 "ecc/parser.y" -{ yyval = "";; - break;} -case 153: -#line 961 "ecc/parser.y" -{yyval = yyvsp[-1]+yyvsp[0];; - break;} -case 154: -#line 965 "ecc/parser.y" -{ yyval = "-1"; ; - break;} -case 155: -#line 966 "ecc/parser.y" -{ - yyval = SType("STATE_")+yyvsp[-3]+"_"+yyvsp[0]; - ; - break;} -case 156: -#line 972 "ecc/parser.y" -{ - char *strProcedureName = yyvsp[-4].strString; + ;} + break; + + case 128: +#line 919 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 129: +#line 920 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 130: +#line 923 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 131: +#line 924 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (1)]); ;} + break; + + case 134: +#line 931 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 138: +#line 937 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 139: +#line 940 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 144: +#line 951 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 145: +#line 952 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 146: +#line 953 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 147: +#line 954 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 148: +#line 955 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 149: +#line 956 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 150: +#line 957 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 151: +#line 958 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); ;} + break; + + case 152: +#line 959 "./Ecc/Parser.y" + { (yyval)=(yyvsp[(1) - (4)])+" "+(yyvsp[(2) - (4)])+" "+(yyvsp[(3) - (4)])+" "+(yyvsp[(4) - (4)]); ;} + break; + + case 153: +#line 967 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 154: +#line 968 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 155: +#line 972 "./Ecc/Parser.y" + { (yyval) = "-1"; ;} + break; + + case 156: +#line 973 "./Ecc/Parser.y" + { + (yyval) = SType("STATE_")+(yyvsp[(2) - (5)])+"_"+(yyvsp[(5) - (5)]); + ;} + break; + + case 157: +#line 979 "./Ecc/Parser.y" + { + char *strProcedureName = (yyvsp[(1) - (5)]).strString; char strInputEventType[80]; char strInputEventName[80]; - sscanf(yyvsp[-2].strString, "%s %s", strInputEventType, strInputEventName); + sscanf((yyvsp[(3) - (5)]).strString, "%s %s", strInputEventType, strInputEventName); char strStateID[256]; char *strBaseStateID = "-1"; @@ -2761,7 +3686,7 @@ case 156: sprintf(_strCurrentStateID, "STATE_%s_%s", _strCurrentClass, RemoveLineDirective(strProcedureName)); fprintf(_fDeclaration, "#define %s %s\n", _strCurrentStateID, strStateID); - AddHandlerFunction(strProcedureName, strStateID, yyvsp[0].strString); + AddHandlerFunction(strProcedureName, strStateID, (yyvsp[(5) - (5)]).strString); fprintf(_fImplementation, "BOOL %s::%s(const CEntityEvent &__eeInput) {\n#undef STATE_CURRENT\n#define STATE_CURRENT %s\n", _strCurrentClass, strProcedureName, _strCurrentStateID); @@ -2772,294 +3697,342 @@ case 156: fprintf(_fImplementation, " const %s &%s = (const %s &)__eeInput;", strInputEventType, strInputEventName, strInputEventType); - ; - break;} -case 157: -#line 1003 "ecc/parser.y" -{ - char *strFunctionBody = yyvsp[-2].strString; + ;} + break; + + case 158: +#line 1010 "./Ecc/Parser.y" + { + char *strFunctionBody = (yyvsp[(8) - (10)]).strString; fprintf(_fImplementation, "%s ASSERT(FALSE); return TRUE;};", strFunctionBody); - ; - break;} -case 158: -#line 1010 "ecc/parser.y" -{ - yyval="EVoid e"; - ; - break;} -case 159: -#line 1013 "ecc/parser.y" -{ - yyval=yyvsp[0]+" e"; - ; - break;} -case 160: -#line 1016 "ecc/parser.y" -{ - yyval=yyvsp[-1]+" "+yyvsp[0]; - ; - break;} -case 166: -#line 1023 "ecc/parser.y" -{yyval = yyvsp[0] + " ";; - break;} -case 187: -#line 1026 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 188: -#line 1027 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 189: -#line 1028 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 190: -#line 1029 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 191: -#line 1030 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 192: -#line 1031 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 193: -#line 1032 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 194: -#line 1033 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 195: -#line 1034 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 196: -#line 1035 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 197: -#line 1036 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 198: -#line 1037 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 199: -#line 1038 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 200: -#line 1039 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 201: -#line 1040 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 202: -#line 1041 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 203: -#line 1042 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 204: -#line 1043 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 205: -#line 1044 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 206: -#line 1045 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 207: -#line 1046 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 208: -#line 1047 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 209: -#line 1048 "ecc/parser.y" -{yyval=yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 210: -#line 1049 "ecc/parser.y" -{yyval=yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 211: -#line 1050 "ecc/parser.y" -{yyval = yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 212: -#line 1051 "ecc/parser.y" -{yyval = yyvsp[-1]+" "+yyvsp[0];; - break;} -case 244: -#line 1064 "ecc/parser.y" -{yyval = yyvsp[0] + " ";; - break;} -case 245: -#line 1071 "ecc/parser.y" -{ yyval = "";; - break;} -case 246: -#line 1072 "ecc/parser.y" -{ yyval = yyvsp[-1]+yyvsp[0]; ; - break;} -case 247: -#line 1075 "ecc/parser.y" -{yyval=yyvsp[-1]+yyvsp[0];; - break;} -case 248: -#line 1076 "ecc/parser.y" -{yyval=yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; - break;} -case 249: -#line 1077 "ecc/parser.y" -{yyval=yyvsp[-2]+" "+yyvsp[-1]+yyvsp[0]+" ";; - break;} -case 250: -#line 1078 "ecc/parser.y" -{yyval=yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 251: -#line 1079 "ecc/parser.y" -{yyval=yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0];; - break;} -case 268: -#line 1100 "ecc/parser.y" -{ - if (yyvsp[-1].bCrossesStates) { + ;} + break; + + case 159: +#line 1017 "./Ecc/Parser.y" + { + (yyval)="EVoid e"; + ;} + break; + + case 160: +#line 1020 "./Ecc/Parser.y" + { + (yyval)=(yyvsp[(1) - (1)])+" e"; + ;} + break; + + case 161: +#line 1023 "./Ecc/Parser.y" + { + (yyval)=(yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]); + ;} + break; + + case 167: +#line 1030 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (1)]) + " ";;} + break; + + case 188: +#line 1033 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 189: +#line 1034 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 190: +#line 1035 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 191: +#line 1036 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 192: +#line 1037 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 193: +#line 1038 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 194: +#line 1039 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 195: +#line 1040 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 196: +#line 1041 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 197: +#line 1042 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 198: +#line 1043 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 199: +#line 1044 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 200: +#line 1045 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 201: +#line 1046 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 202: +#line 1047 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 203: +#line 1048 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 204: +#line 1049 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 205: +#line 1050 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 206: +#line 1051 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 207: +#line 1052 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 208: +#line 1053 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 209: +#line 1054 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 210: +#line 1055 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 211: +#line 1056 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 212: +#line 1057 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 213: +#line 1058 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (2)])+" "+(yyvsp[(2) - (2)]);;} + break; + + case 245: +#line 1071 "./Ecc/Parser.y" + {(yyval) = (yyvsp[(1) - (1)]) + " ";;} + break; + + case 246: +#line 1078 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 247: +#line 1079 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]); ;} + break; + + case 248: +#line 1082 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]);;} + break; + + case 249: +#line 1083 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (7)])+(yyvsp[(2) - (7)])+(yyvsp[(3) - (7)])+(yyvsp[(4) - (7)])+(yyvsp[(5) - (7)])+(yyvsp[(6) - (7)])+(yyvsp[(7) - (7)]);} + break; + + case 250: +#line 1084 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (3)])+" "+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)])+" ";;} + break; + + case 251: +#line 1085 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]);;} + break; + + case 252: +#line 1086 "./Ecc/Parser.y" + {(yyval)=(yyvsp[(1) - (4)])+(yyvsp[(2) - (4)])+(yyvsp[(3) - (4)])+(yyvsp[(4) - (4)]);;} + break; + + case 269: +#line 1107 "./Ecc/Parser.y" + { + if ((yyvsp[(6) - (7)]).bCrossesStates) { char strAfterIfName[80], strAfterIfID[11]; CreateInternalHandlerFunction(strAfterIfName, strAfterIfID); - yyval = yyvsp[-6]+"(!"+yyvsp[-5]+yyvsp[-4]+yyvsp[-3]+"){ Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}"+yyvsp[-1]+ + (yyval) = (yyvsp[(1) - (7)])+"(!"+(yyvsp[(2) - (7)])+(yyvsp[(3) - (7)])+(yyvsp[(4) - (7)])+"){ Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}"+(yyvsp[(6) - (7)])+ "Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+strAfterIfName+"(const CEntityEvent &__eeInput){"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+strAfterIfID+"\n"; } else { - yyval = yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; + (yyval) = (yyvsp[(1) - (7)])+(yyvsp[(2) - (7)])+(yyvsp[(3) - (7)])+(yyvsp[(4) - (7)])+(yyvsp[(5) - (7)])+(yyvsp[(6) - (7)])+(yyvsp[(7) - (7)]); } - ; - break;} -case 269: -#line 1116 "ecc/parser.y" -{ - if (yyvsp[-3].bCrossesStates || yyvsp[0].bCrossesStates) { + ;} + break; + + case 270: +#line 1123 "./Ecc/Parser.y" + { + if ((yyvsp[(6) - (9)]).bCrossesStates || (yyvsp[(9) - (9)]).bCrossesStates) { char strAfterIfName[80], strAfterIfID[11]; char strElseName[80], strElseID[11]; CreateInternalHandlerFunction(strAfterIfName, strAfterIfID); CreateInternalHandlerFunction(strElseName, strElseID); - yyval = yyvsp[-8]+"(!"+yyvsp[-7]+yyvsp[-6]+yyvsp[-5]+"){ Jump(STATE_CURRENT,"+strElseID+", FALSE, EInternal());return TRUE;}"+ - yyvsp[-3]+"Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}"+ + (yyval) = (yyvsp[(1) - (9)])+"(!"+(yyvsp[(2) - (9)])+(yyvsp[(3) - (9)])+(yyvsp[(4) - (9)])+"){ Jump(STATE_CURRENT,"+strElseID+", FALSE, EInternal());return TRUE;}"+ + (yyvsp[(6) - (9)])+"Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+strElseName+"(const CEntityEvent &__eeInput){"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+strElseID+"\n"+ - yyvsp[0]+"Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}\n"+ + (yyvsp[(9) - (9)])+"Jump(STATE_CURRENT,"+strAfterIfID+", FALSE, EInternal());return TRUE;}\n"+ "BOOL "+_strCurrentClass+"::"+strAfterIfName+"(const CEntityEvent &__eeInput){"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+strAfterIfID+"\n"; } else { - yyval = yyvsp[-8]+yyvsp[-7]+yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+" "+yyvsp[0]; + (yyval) = (yyvsp[(1) - (9)])+(yyvsp[(2) - (9)])+(yyvsp[(3) - (9)])+(yyvsp[(4) - (9)])+(yyvsp[(5) - (9)])+(yyvsp[(6) - (9)])+(yyvsp[(7) - (9)])+(yyvsp[(8) - (9)])+" "+(yyvsp[(9) - (9)]); } - ; - break;} -case 270: -#line 1138 "ecc/parser.y" -{ + ;} + break; + + case 271: +#line 1145 "./Ecc/Parser.y" + { if (strlen(_strInLoopName)>0) { yyerror("Nested loops are not implemented yet"); } - ; - break;} -case 271: -#line 1142 "ecc/parser.y" -{ - if (yyvsp[-1].bCrossesStates) { + ;} + break; + + case 272: +#line 1149 "./Ecc/Parser.y" + { + if ((yyvsp[(7) - (8)]).bCrossesStates) { CreateInternalHandlerFunction(_strInLoopName, _strInLoopID); CreateInternalHandlerFunction(_strAfterLoopName, _strAfterLoopID); - yyval = SType(GetLineDirective(yyvsp[-7]))+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;}"+ - "BOOL "+_strCurrentClass+"::"+_strInLoopName+"(const CEntityEvent &__eeInput)"+yyvsp[-2]+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (8)])))+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;}"+ + "BOOL "+_strCurrentClass+"::"+_strInLoopName+"(const CEntityEvent &__eeInput)"+(yyvsp[(6) - (8)])+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInLoopID+"\n"+ - "if(!"+yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+"){ Jump(STATE_CURRENT,"+_strAfterLoopID+", FALSE, EInternal());return TRUE;}"+ - yyvsp[-1]+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;"+yyvsp[0]+ + "if(!"+(yyvsp[(2) - (8)])+(yyvsp[(3) - (8)])+(yyvsp[(4) - (8)])+"){ Jump(STATE_CURRENT,"+_strAfterLoopID+", FALSE, EInternal());return TRUE;}"+ + (yyvsp[(7) - (8)])+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;"+(yyvsp[(8) - (8)])+ "BOOL "+_strCurrentClass+"::"+_strAfterLoopName+"(const CEntityEvent &__eeInput) {"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterLoopID+"\n"; } else { - yyval = yyvsp[-7]+yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; + (yyval) = (yyvsp[(1) - (8)])+(yyvsp[(2) - (8)])+(yyvsp[(3) - (8)])+(yyvsp[(4) - (8)])+(yyvsp[(6) - (8)])+(yyvsp[(7) - (8)])+(yyvsp[(8) - (8)]); } _strInLoopName[0] = 0; - ; - break;} -case 272: -#line 1163 "ecc/parser.y" -{ + ;} + break; + + case 273: +#line 1170 "./Ecc/Parser.y" + { if (strlen(_strInLoopName)>0) { yyerror("Nested loops are not implemented yet"); } _strInLoopName[0] = 0; - ; - break;} -case 273: -#line 1168 "ecc/parser.y" -{ - if (yyvsp[-7].bCrossesStates) { + ;} + break; + + case 274: +#line 1175 "./Ecc/Parser.y" + { + if ((yyvsp[(3) - (10)]).bCrossesStates) { CreateInternalHandlerFunction(_strInLoopName, _strInLoopID); CreateInternalHandlerFunction(_strAfterLoopName, _strAfterLoopID); - yyval = SType(GetLineDirective(yyvsp[-9]))+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;}"+ - "BOOL "+_strCurrentClass+"::"+_strInLoopName+"(const CEntityEvent &__eeInput)"+yyvsp[-8]+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (10)])))+"Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;}"+ + "BOOL "+_strCurrentClass+"::"+_strInLoopName+"(const CEntityEvent &__eeInput)"+(yyvsp[(2) - (10)])+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ - "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInLoopID+"\n"+yyvsp[-7]+ - "if(!"+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+"){ Jump(STATE_CURRENT,"+_strAfterLoopID+", FALSE, EInternal());return TRUE;}"+ - "Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;"+yyvsp[-6]+ + "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInLoopID+"\n"+(yyvsp[(3) - (10)])+ + "if(!"+(yyvsp[(7) - (10)])+(yyvsp[(8) - (10)])+(yyvsp[(9) - (10)])+"){ Jump(STATE_CURRENT,"+_strAfterLoopID+", FALSE, EInternal());return TRUE;}"+ + "Jump(STATE_CURRENT,"+_strInLoopID+", FALSE, EInternal());return TRUE;"+(yyvsp[(4) - (10)])+ "BOOL "+_strCurrentClass+"::"+_strAfterLoopName+"(const CEntityEvent &__eeInput) {"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterLoopID+"\n"; } else { - yyval = yyvsp[-9]+yyvsp[-8]+yyvsp[-7]+yyvsp[-6]+yyvsp[-4]+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; + (yyval) = (yyvsp[(1) - (10)])+(yyvsp[(2) - (10)])+(yyvsp[(3) - (10)])+(yyvsp[(4) - (10)])+(yyvsp[(6) - (10)])+(yyvsp[(7) - (10)])+(yyvsp[(8) - (10)])+(yyvsp[(9) - (10)])+(yyvsp[(10) - (10)]); } _strInLoopName[0] = 0; - ; - break;} -case 274: -#line 1189 "ecc/parser.y" -{ + ;} + break; + + case 275: +#line 1196 "./Ecc/Parser.y" + { if (strlen(_strInLoopName)>0) { yyerror("Nested loops are not implemented yet"); } - ; - break;} -case 275: -#line 1193 "ecc/parser.y" -{ - if (yyvsp[-1].bCrossesStates) { + ;} + break; + + case 276: +#line 1200 "./Ecc/Parser.y" + { + if ((yyvsp[(11) - (12)]).bCrossesStates) { CreateInternalHandlerFunction(_strInLoopName, _strInLoopID); CreateInternalHandlerFunction(_strAfterLoopName, _strAfterLoopID); yyerror("For loops across states are not supported"); } else { - yyval = yyvsp[-11]+yyvsp[-10]+yyvsp[-9]+yyvsp[-8]+yyvsp[-7]+yyvsp[-6]+yyvsp[-5]+yyvsp[-4]+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; + (yyval) = (yyvsp[(1) - (12)])+(yyvsp[(2) - (12)])+(yyvsp[(3) - (12)])+(yyvsp[(4) - (12)])+(yyvsp[(5) - (12)])+(yyvsp[(6) - (12)])+(yyvsp[(7) - (12)])+(yyvsp[(8) - (12)])+(yyvsp[(10) - (12)])+(yyvsp[(11) - (12)])+(yyvsp[(12) - (12)]); } _strInLoopName[0] = 0; - ; - break;} -case 276: -#line 1206 "ecc/parser.y" -{ + ;} + break; + + case 277: +#line 1213 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'wait' in functions"); } @@ -3067,14 +4040,15 @@ case 276: CreateInternalHandlerFunction(_strAfterWaitName, _strAfterWaitID); _bHasOtherwise = 0; _bInHandler = 1; - ; - break;} -case 277: -#line 1214 "ecc/parser.y" -{ - if (yyvsp[-1].bCrossesStates) { + ;} + break; + + case 278: +#line 1221 "./Ecc/Parser.y" + { + if ((yyvsp[(5) - (6)]).bCrossesStates) { yyerror("'wait' statements must not be nested"); - yyval = ""; + (yyval) = ""; } else { SType stDefault; if (!_bHasOtherwise) { @@ -3083,22 +4057,23 @@ case 277: stDefault = SType(""); } - yyval = SType(GetLineDirective(yyvsp[-5]))+yyvsp[-4]+";\n"+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (6)])))+(yyvsp[(2) - (6)])+";\n"+ "Jump(STATE_CURRENT, "+_strInWaitID+", FALSE, EBegin());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+_strInWaitName+"(const CEntityEvent &__eeInput) {"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInWaitID+"\n"+ - "switch(__eeInput.ee_slEvent)"+yyvsp[-2]+yyvsp[-1]+stDefault+yyvsp[0]+ + "switch(__eeInput.ee_slEvent)"+(yyvsp[(4) - (6)])+(yyvsp[(5) - (6)])+stDefault+(yyvsp[(6) - (6)])+ "return TRUE;}BOOL "+_strCurrentClass+"::"+_strAfterWaitName+"(const CEntityEvent &__eeInput){"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterWaitID+"\n"; - yyval.bCrossesStates = 1; + (yyval).bCrossesStates = 1; _bInHandler = 0; } - ; - break;} -case 278: -#line 1240 "ecc/parser.y" -{ + ;} + break; + + case 279: +#line 1247 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'autowait' in functions"); } @@ -3106,7 +4081,7 @@ case 278: CreateInternalHandlerFunction(_strAfterWaitName, _strAfterWaitID); _bHasOtherwise = 0; - yyval = SType(GetLineDirective(yyvsp[-2]))+yyvsp[-1]+";\n"+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (3)])))+(yyvsp[(2) - (3)])+";\n"+ "Jump(STATE_CURRENT, "+_strInWaitID+", FALSE, EBegin());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+_strInWaitName+"(const CEntityEvent &__eeInput) {"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInWaitID+"\n"+ @@ -3116,13 +4091,14 @@ case 278: "default: return FALSE; }}"+ "BOOL "+_strCurrentClass+"::"+_strAfterWaitName+"(const CEntityEvent &__eeInput){"+ "\nASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);"+ - "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterWaitID+"\n"+yyvsp[0]; - yyval.bCrossesStates = 1; - ; - break;} -case 279: -#line 1264 "ecc/parser.y" -{ + "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterWaitID+"\n"+(yyvsp[(3) - (3)]); + (yyval).bCrossesStates = 1; + ;} + break; + + case 280: +#line 1271 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'autocall' in functions"); } @@ -3130,35 +4106,38 @@ case 279: CreateInternalHandlerFunction(_strAfterWaitName, _strAfterWaitID); _bHasOtherwise = 0; - yyval = SType(GetLineDirective(yyvsp[-4]))+yyvsp[-3]+";\n"+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (5)])))+(yyvsp[(2) - (5)])+";\n"+ "Jump(STATE_CURRENT, "+_strInWaitID+", FALSE, EBegin());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+_strInWaitName+"(const CEntityEvent &__eeInput) {"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInWaitID+"\n"+ "switch(__eeInput.ee_slEvent) {"+ "case EVENTCODE_EBegin: return TRUE;"+ - "case EVENTCODE_"+yyvsp[-2]+": Jump(STATE_CURRENT,"+_strAfterWaitID+", FALSE, __eeInput); return TRUE;"+ + "case EVENTCODE_"+(yyvsp[(3) - (5)])+": Jump(STATE_CURRENT,"+_strAfterWaitID+", FALSE, __eeInput); return TRUE;"+ "default: return FALSE; }}"+ "BOOL "+_strCurrentClass+"::"+_strAfterWaitName+"(const CEntityEvent &__eeInput){"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterWaitID+"\n"+ - "const "+yyvsp[-2]+"&"+yyvsp[-1]+"= ("+yyvsp[-2]+"&)__eeInput;\n"+yyvsp[0]; - yyval.bCrossesStates = 1; - ; - break;} -case 280: -#line 1289 "ecc/parser.y" -{ - yyval = SType("__e"); - ; - break;} -case 281: -#line 1292 "ecc/parser.y" -{ - yyval = yyvsp[0]; - ; - break;} -case 282: -#line 1297 "ecc/parser.y" -{ + "const "+(yyvsp[(3) - (5)])+"&"+(yyvsp[(4) - (5)])+"= ("+(yyvsp[(3) - (5)])+"&)__eeInput;\n"+(yyvsp[(5) - (5)]); + (yyval).bCrossesStates = 1; + ;} + break; + + case 281: +#line 1296 "./Ecc/Parser.y" + { + (yyval) = SType("__e"); + ;} + break; + + case 282: +#line 1299 "./Ecc/Parser.y" + { + (yyval) = (yyvsp[(1) - (1)]); + ;} + break; + + case 283: +#line 1304 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'autocall' in functions"); } @@ -3166,343 +4145,380 @@ case 282: CreateInternalHandlerFunction(_strAfterWaitName, _strAfterWaitID); _bHasOtherwise = 0; - yyval = SType(GetLineDirective(yyvsp[-7]))+yyvsp[-6]+";\n"+ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (8)])))+(yyvsp[(2) - (8)])+";\n"+ "Jump(STATE_CURRENT, "+_strInWaitID+", FALSE, EBegin());return TRUE;}"+ "BOOL "+_strCurrentClass+"::"+_strInWaitName+"(const CEntityEvent &__eeInput) {"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strInWaitID+"\n"+ "switch(__eeInput.ee_slEvent) {"+ - "case EVENTCODE_EBegin: Call"+yyvsp[-5]+"STATE_CURRENT, "+yyvsp[-6]+", "+yyvsp[-4]+yyvsp[-3]+";return TRUE;"+ - "case EVENTCODE_"+yyvsp[-2]+": Jump(STATE_CURRENT,"+_strAfterWaitID+", FALSE, __eeInput); return TRUE;"+ + "case EVENTCODE_EBegin: Call"+(yyvsp[(3) - (8)])+"STATE_CURRENT, "+(yyvsp[(2) - (8)])+", "+(yyvsp[(4) - (8)])+(yyvsp[(5) - (8)])+";return TRUE;"+ + "case EVENTCODE_"+(yyvsp[(6) - (8)])+": Jump(STATE_CURRENT,"+_strAfterWaitID+", FALSE, __eeInput); return TRUE;"+ "default: return FALSE; }}"+ "BOOL "+_strCurrentClass+"::"+_strAfterWaitName+"(const CEntityEvent &__eeInput){"+ "\n#undef STATE_CURRENT\n#define STATE_CURRENT "+_strAfterWaitID+"\n"+ - "const "+yyvsp[-2]+"&"+yyvsp[-1]+"= ("+yyvsp[-2]+"&)__eeInput;\n"+yyvsp[0]; - yyval.bCrossesStates = 1; - ; - break;} -case 283: -#line 1321 "ecc/parser.y" -{ - yyval = SType("SetTimerAt(THINKTIME_NEVER)"); - ; - break;} -case 284: -#line 1324 "ecc/parser.y" -{ - yyval = SType("SetTimerAfter")+yyvsp[-2]+yyvsp[-1]+yyvsp[0]; - ; - break;} -case 285: -#line 1330 "ecc/parser.y" -{ + "const "+(yyvsp[(6) - (8)])+"&"+(yyvsp[(7) - (8)])+"= ("+(yyvsp[(6) - (8)])+"&)__eeInput;\n"+(yyvsp[(8) - (8)]); + (yyval).bCrossesStates = 1; + ;} + break; + + case 284: +#line 1328 "./Ecc/Parser.y" + { + (yyval) = SType("SetTimerAt(THINKTIME_NEVER)"); + ;} + break; + + case 285: +#line 1331 "./Ecc/Parser.y" + { + (yyval) = SType("SetTimerAfter")+(yyvsp[(1) - (3)])+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]); + ;} + break; + + case 286: +#line 1337 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'jump' in functions"); } - yyval = SType(GetLineDirective(yyvsp[-5]))+"Jump"+yyvsp[-3]+"STATE_CURRENT, "+yyvsp[-4]+", "+yyvsp[-2]+yyvsp[-1]+";return TRUE;"; - ; - break;} -case 286: -#line 1339 "ecc/parser.y" -{ + (yyval) = SType(GetLineDirective((yyvsp[(1) - (6)])))+"Jump"+(yyvsp[(3) - (6)])+"STATE_CURRENT, "+(yyvsp[(2) - (6)])+", "+(yyvsp[(4) - (6)])+(yyvsp[(5) - (6)])+";return TRUE;"; + ;} + break; + + case 287: +#line 1346 "./Ecc/Parser.y" + { if (!_bInProcedure) { yyerror("Cannot have 'call' in functions"); } if (!_bInHandler) { yyerror("'call' must be inside a 'wait' statement"); } - yyval = SType(GetLineDirective(yyvsp[-5]))+"Call"+yyvsp[-3]+"STATE_CURRENT, "+yyvsp[-4]+", "+yyvsp[-2]+yyvsp[-1]+";return TRUE;"; - ; - break;} -case 287: -#line 1351 "ecc/parser.y" -{ - yyval = yyvsp[0]; - ; - break;} -case 288: -#line 1354 "ecc/parser.y" -{ - yyval = SType("EVoid()"); - ; - break;} -case 289: -#line 1360 "ecc/parser.y" -{ - yyval = SType("STATE_")+_strCurrentClass+"_"+yyvsp[0]+", TRUE"; - ; - break;} -case 290: -#line 1363 "ecc/parser.y" -{ - yyval = SType("STATE_")+yyvsp[-3]+"_"+yyvsp[0]+", FALSE"; - ; - break;} -case 291: -#line 1369 "ecc/parser.y" -{ - yyval = SType(GetLineDirective(yyvsp[-1]))+"UnsetTimer();Jump(STATE_CURRENT," - +_strAfterWaitID+", FALSE, EInternal());"+"return TRUE"+yyvsp[0]; - ; - break;} -case 292: -#line 1375 "ecc/parser.y" -{ - yyval = SType(GetLineDirective(yyvsp[-1]))+"return TRUE"+yyvsp[0]; - ; - break;} -case 293: -#line 1380 "ecc/parser.y" -{ - yyval = SType(GetLineDirective(yyvsp[-1]))+"return FALSE"+yyvsp[0]; - ; - break;} -case 294: -#line 1385 "ecc/parser.y" -{ - if (!_bInProcedure) { - yyval = yyvsp[-2]+" "+yyvsp[-1]+yyvsp[0]; - } else { - if (strlen(yyvsp[-1].strString)==0) { - yyvsp[-1] = SType("EVoid()"); - } - yyval = SType(GetLineDirective(yyvsp[-2])) - +"Return(STATE_CURRENT,"+yyvsp[-1]+");" - +yyvsp[-2]+" TRUE"+yyvsp[0]; - } - ; - break;} -case 295: -#line 1399 "ecc/parser.y" -{yyval = "";; - break;} -case 297: -#line 1404 "ecc/parser.y" -{ - char strInputEventType[80]; - char strInputEventName[80]; - sscanf(yyvsp[-6].strString, "%s %s", strInputEventType, strInputEventName); + (yyval) = SType(GetLineDirective((yyvsp[(1) - (6)])))+"Call"+(yyvsp[(3) - (6)])+"STATE_CURRENT, "+(yyvsp[(2) - (6)])+", "+(yyvsp[(4) - (6)])+(yyvsp[(5) - (6)])+";return TRUE;"; + ;} + break; - yyval = SType("case")+yyvsp[-7]+"EVENTCODE_"+strInputEventType+yyvsp[-5]+yyvsp[-4]+yyvsp[-3]+ - "const "+strInputEventType+"&"+strInputEventName+"= ("+ - strInputEventType+"&)__eeInput;\n"+yyvsp[-2]+yyvsp[-1]+"ASSERT(FALSE);break;"; - ; - break;} -case 298: -#line 1413 "ecc/parser.y" -{ - char strInputEventType[80]; - char strInputEventName[80]; - sscanf(yyvsp[-6].strString, "%s %s", strInputEventType, strInputEventName); + case 288: +#line 1358 "./Ecc/Parser.y" + { + (yyval) = (yyvsp[(1) - (1)]); + ;} + break; - yyval = SType("default")+yyvsp[-4]+yyvsp[-3]+yyvsp[-2]+yyvsp[-1]+"ASSERT(FALSE);break;"; - _bHasOtherwise = 1; - ; - break;} -case 299: -#line 1423 "ecc/parser.y" -{ yyval = "";; - break;} -case 300: -#line 1424 "ecc/parser.y" -{ yyval = yyvsp[-1]+yyvsp[0]; ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 487 "bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) + case 289: +#line 1361 "./Ecc/Parser.y" { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); + (yyval) = SType("EVoid()"); + ;} + break; + + case 290: +#line 1367 "./Ecc/Parser.y" + { + (yyval) = SType("STATE_")+_strCurrentClass+"_"+(yyvsp[(1) - (1)])+", TRUE"; + ;} + break; + + case 291: +#line 1370 "./Ecc/Parser.y" + { + (yyval) = SType("STATE_")+(yyvsp[(1) - (4)])+"_"+(yyvsp[(4) - (4)])+", FALSE"; + ;} + break; + + case 292: +#line 1376 "./Ecc/Parser.y" + { + (yyval) = SType(GetLineDirective((yyvsp[(1) - (2)])))+"UnsetTimer();Jump(STATE_CURRENT," + +_strAfterWaitID+", FALSE, EInternal());"+"return TRUE"+(yyvsp[(2) - (2)]); + ;} + break; + + case 293: +#line 1382 "./Ecc/Parser.y" + { + (yyval) = SType(GetLineDirective((yyvsp[(1) - (2)])))+"return TRUE"+(yyvsp[(2) - (2)]); + ;} + break; + + case 294: +#line 1387 "./Ecc/Parser.y" + { + (yyval) = SType(GetLineDirective((yyvsp[(1) - (2)])))+"return FALSE"+(yyvsp[(2) - (2)]); + ;} + break; + + case 295: +#line 1392 "./Ecc/Parser.y" + { + if (!_bInProcedure) { + (yyval) = (yyvsp[(1) - (3)])+" "+(yyvsp[(2) - (3)])+(yyvsp[(3) - (3)]); + } else { + if (strlen((yyvsp[(2) - (3)]).strString)==0) { + (yyvsp[(2) - (3)]) = SType("EVoid()"); + } + (yyval) = SType(GetLineDirective((yyvsp[(1) - (3)]))) + +"Return(STATE_CURRENT,"+(yyvsp[(2) - (3)])+");" + +(yyvsp[(1) - (3)])+" TRUE"+(yyvsp[(3) - (3)]); } -#endif + ;} + break; + + case 296: +#line 1406 "./Ecc/Parser.y" + {(yyval) = "";;} + break; + + case 298: +#line 1411 "./Ecc/Parser.y" + { + char strInputEventType[80]; + char strInputEventName[80]; + sscanf((yyvsp[(3) - (9)]).strString, "%s %s", strInputEventType, strInputEventName); + + (yyval) = SType("case")+(yyvsp[(2) - (9)])+"EVENTCODE_"+strInputEventType+(yyvsp[(4) - (9)])+(yyvsp[(5) - (9)])+(yyvsp[(6) - (9)])+ + "const "+strInputEventType+"&"+strInputEventName+"= ("+ + strInputEventType+"&)__eeInput;\n"+(yyvsp[(7) - (9)])+(yyvsp[(8) - (9)])+"ASSERT(FALSE);break;"; + ;} + break; + + case 299: +#line 1420 "./Ecc/Parser.y" + { + char strInputEventType[80]; + char strInputEventName[80]; + sscanf((yyvsp[(3) - (9)]).strString, "%s %s", strInputEventType, strInputEventName); + + (yyval) = SType("default")+(yyvsp[(5) - (9)])+(yyvsp[(6) - (9)])+(yyvsp[(7) - (9)])+(yyvsp[(8) - (9)])+"ASSERT(FALSE);break;"; + _bHasOtherwise = 1; + ;} + break; + + case 300: +#line 1430 "./Ecc/Parser.y" + { (yyval) = "";;} + break; + + case 301: +#line 1431 "./Ecc/Parser.y" + { (yyval) = (yyvsp[(1) - (2)])+(yyvsp[(2) - (2)]); ;} + break; + + +/* Line 1267 of yacc.c. */ +#line 4309 "./Ecc/Parser.cpp" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; -yyerrlab: /* here on detecting error */ - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ + if (yyerrstatus == 3) { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ - /* return failure if at end of input */ - if (yychar == YYEOF) + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) YYABORT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - yychar = YYEMPTY; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - if (yyn == YYFINAL) YYACCEPT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; -} -#line 1427 "ecc/parser.y" + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 1434 "./Ecc/Parser.y" + diff --git a/Sources/Ecc/Scanner.cpp b/Sources/Ecc/Scanner.cpp index d31f14b..1972ce0 100644 --- a/Sources/Ecc/Scanner.cpp +++ b/Sources/Ecc/Scanner.cpp @@ -1,68 +1,114 @@ -#line 2 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.cpp" -/* A lexical scanner generated by flex */ +#line 2 "./Ecc/Scanner.cpp" -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $ - */ +#line 4 "./Ecc/Scanner.cpp" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 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 +/* end standard C headers. */ -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif +/* 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; +typedef uint64_t flex_uint64_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ #ifdef __cplusplus -#include -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #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 @@ -77,70 +123,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 yyrestart(yyin ) #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 + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; -extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + 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 + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext 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_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -156,7 +202,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -177,12 +223,16 @@ struct yy_buffer_state */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; + #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -196,28 +246,38 @@ struct yy_buffer_state * just pointing yyin 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. */ static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* 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 @@ -225,66 +285,92 @@ static int yy_start = 0; /* start state number */ */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); -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 yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_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 *str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +#define YY_FLUSH_BUFFER yy_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 yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ typedef unsigned char YY_CHAR; + FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + extern char *yytext; #define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + yyleng = (yy_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 84 #define YY_END_OF_BUFFER 85 -static yyconst short int yy_accept[415] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[415] = { 0, 0, 0, 0, 0, 76, 76, 85, 83, 81, 82, 65, 83, 65, 83, 65, 66, 66, 72, 72, 72, @@ -334,7 +420,7 @@ static yyconst short int yy_accept[415] = 43, 72, 60, 0 } ; -static yyconst int yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -366,7 +452,7 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[77] = +static yyconst flex_int32_t yy_meta[77] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, @@ -378,7 +464,7 @@ static yyconst int yy_meta[77] = 4, 4, 1, 1, 1, 1 } ; -static yyconst short int yy_base[423] = +static yyconst flex_int16_t yy_base[423] = { 0, 0, 0, 74, 75, 76, 77, 511, 512, 508, 512, 512, 504, 435, 499, 73, 73, 78, 469, 467, 68, @@ -429,7 +515,7 @@ static yyconst short int yy_base[423] = 247, 102 } ; -static yyconst short int yy_def[423] = +static yyconst flex_int16_t yy_def[423] = { 0, 414, 1, 415, 415, 416, 416, 414, 414, 414, 414, 414, 417, 414, 418, 414, 414, 414, 419, 419, 419, @@ -480,7 +566,7 @@ static yyconst short int yy_def[423] = 414, 414 } ; -static yyconst short int yy_nxt[589] = +static yyconst flex_int16_t yy_nxt[589] = { 0, 8, 9, 10, 11, 12, 13, 11, 14, 11, 11, 11, 11, 11, 11, 11, 15, 16, 17, 17, 11, @@ -548,7 +634,7 @@ static yyconst short int yy_nxt[589] = 414, 414, 414, 414, 414, 414, 414, 414 } ; -static yyconst short int yy_chk[589] = +static yyconst flex_int16_t yy_chk[589] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -619,16 +705,19 @@ static yyconst short int yy_chk[589] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int yy_flex_debug; +int yy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" -#define INITIAL 0 -#line 2 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 1 "./Ecc/Scanner.l" +#line 2 "./Ecc/Scanner.l" // rcg10042001 Changed to specify Ecc directory... #include "Ecc/StdH.h" #include "Ecc/Main.h" @@ -652,11 +741,56 @@ int iLastLine = -1; char *_strCppBlock; -#define COMMENT 1 + +#line 747 "./Ecc/Scanner.cpp" + +#define INITIAL 0 +#define COMMENT 1 #define CPPBLOCK 2 -#line 660 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.cpp" +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -664,61 +798,30 @@ char *_strCppBlock; #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int yywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int yywrap (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 (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. */ @@ -727,12 +830,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( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -740,9 +842,10 @@ YY_MALLOC_DECL */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -752,9 +855,22 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -775,12 +891,18 @@ YY_MALLOC_DECL #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -797,28 +919,30 @@ 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 38 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" + +#line 38 "./Ecc/Scanner.l" /* standard cpp-keywords */ -#line 811 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.cpp" +#line 935 "./Ecc/Scanner.cpp" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -826,34 +950,36 @@ YY_DECL if ( ! yyout ) yyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); /* Support of yytext. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -870,396 +996,394 @@ yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP -#line 41 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 41 "./Ecc/Scanner.l" {RETURN(k_while);} YY_BREAK case 2: YY_RULE_SETUP -#line 42 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 42 "./Ecc/Scanner.l" {RETURN(k_switch);} YY_BREAK case 3: YY_RULE_SETUP -#line 43 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 43 "./Ecc/Scanner.l" {RETURN(k_case);} YY_BREAK case 4: YY_RULE_SETUP -#line 44 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 44 "./Ecc/Scanner.l" {RETURN(k_for);} YY_BREAK case 5: YY_RULE_SETUP -#line 45 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 45 "./Ecc/Scanner.l" {RETURN(k_if);} YY_BREAK case 6: YY_RULE_SETUP -#line 46 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 46 "./Ecc/Scanner.l" {RETURN(k_else);} YY_BREAK case 7: YY_RULE_SETUP -#line 47 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 47 "./Ecc/Scanner.l" {RETURN(k_enum);} YY_BREAK case 8: YY_RULE_SETUP -#line 48 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 48 "./Ecc/Scanner.l" {RETURN(k_class);} YY_BREAK case 9: YY_RULE_SETUP -#line 49 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 49 "./Ecc/Scanner.l" {RETURN(k_do);} YY_BREAK case 10: YY_RULE_SETUP -#line 50 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 50 "./Ecc/Scanner.l" {RETURN(k_void);} YY_BREAK case 11: YY_RULE_SETUP -#line 51 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 51 "./Ecc/Scanner.l" {RETURN(k_const);} YY_BREAK case 12: YY_RULE_SETUP -#line 52 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 52 "./Ecc/Scanner.l" {RETURN(k_inline);} YY_BREAK case 13: YY_RULE_SETUP -#line 53 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 53 "./Ecc/Scanner.l" {RETURN(k_static);} YY_BREAK case 14: YY_RULE_SETUP -#line 54 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 54 "./Ecc/Scanner.l" {RETURN(k_virtual);} YY_BREAK case 15: YY_RULE_SETUP -#line 55 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 55 "./Ecc/Scanner.l" {RETURN(k_return);} YY_BREAK case 16: YY_RULE_SETUP -#line 56 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 56 "./Ecc/Scanner.l" {RETURN(k_autowait);} YY_BREAK case 17: YY_RULE_SETUP -#line 57 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 57 "./Ecc/Scanner.l" {RETURN(k_autocall);} YY_BREAK case 18: YY_RULE_SETUP -#line 58 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 58 "./Ecc/Scanner.l" {RETURN(k_waitevent);} YY_BREAK /* aditional keywords */ case 19: YY_RULE_SETUP -#line 61 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 61 "./Ecc/Scanner.l" {RETURN(k_event);} YY_BREAK case 20: YY_RULE_SETUP -#line 62 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 62 "./Ecc/Scanner.l" {RETURN(k_name);} YY_BREAK case 21: YY_RULE_SETUP -#line 63 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 63 "./Ecc/Scanner.l" {RETURN(k_thumbnail);} YY_BREAK case 22: YY_RULE_SETUP -#line 64 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 64 "./Ecc/Scanner.l" {RETURN(k_features);} YY_BREAK case 23: YY_RULE_SETUP -#line 65 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 65 "./Ecc/Scanner.l" {RETURN(k_uses);} YY_BREAK case 24: YY_RULE_SETUP -#line 66 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 66 "./Ecc/Scanner.l" {RETURN(k_export);} YY_BREAK case 25: YY_RULE_SETUP -#line 68 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 68 "./Ecc/Scanner.l" {RETURN(k_texture);} YY_BREAK case 26: YY_RULE_SETUP -#line 69 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 69 "./Ecc/Scanner.l" {RETURN(k_sound);} YY_BREAK case 27: YY_RULE_SETUP -#line 70 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 70 "./Ecc/Scanner.l" {RETURN(k_model);} YY_BREAK case 28: YY_RULE_SETUP -#line 72 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 72 "./Ecc/Scanner.l" {RETURN(k_properties);} YY_BREAK case 29: YY_RULE_SETUP -#line 73 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 73 "./Ecc/Scanner.l" {RETURN(k_components);} YY_BREAK case 30: YY_RULE_SETUP -#line 74 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 74 "./Ecc/Scanner.l" {RETURN(k_functions);} YY_BREAK case 31: YY_RULE_SETUP -#line 75 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 75 "./Ecc/Scanner.l" {RETURN(k_procedures);} YY_BREAK case 32: YY_RULE_SETUP -#line 77 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 77 "./Ecc/Scanner.l" {RETURN(k_wait );} YY_BREAK case 33: YY_RULE_SETUP -#line 78 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 78 "./Ecc/Scanner.l" {RETURN(k_on );} YY_BREAK case 34: YY_RULE_SETUP -#line 79 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 79 "./Ecc/Scanner.l" {RETURN(k_otherwise);} YY_BREAK case 35: YY_RULE_SETUP -#line 81 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 81 "./Ecc/Scanner.l" {RETURN(k_call );} YY_BREAK case 36: YY_RULE_SETUP -#line 82 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 82 "./Ecc/Scanner.l" {RETURN(k_jump );} YY_BREAK case 37: YY_RULE_SETUP -#line 83 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 83 "./Ecc/Scanner.l" {RETURN(k_stop );} YY_BREAK case 38: YY_RULE_SETUP -#line 84 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 84 "./Ecc/Scanner.l" {RETURN(k_resume );} YY_BREAK case 39: YY_RULE_SETUP -#line 85 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 85 "./Ecc/Scanner.l" {RETURN(k_pass );} YY_BREAK /* special data types */ case 40: YY_RULE_SETUP -#line 88 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 88 "./Ecc/Scanner.l" {RETURN(k_CTString);} YY_BREAK case 41: YY_RULE_SETUP -#line 89 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 89 "./Ecc/Scanner.l" {RETURN(k_CTStringTrans);} YY_BREAK case 42: YY_RULE_SETUP -#line 90 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 90 "./Ecc/Scanner.l" {RETURN(k_CTFileName);} YY_BREAK case 43: YY_RULE_SETUP -#line 91 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 91 "./Ecc/Scanner.l" {RETURN(k_CTFileNameNoDep);} YY_BREAK case 44: YY_RULE_SETUP -#line 92 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 92 "./Ecc/Scanner.l" {RETURN(k_BOOL);} YY_BREAK case 45: YY_RULE_SETUP -#line 93 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 93 "./Ecc/Scanner.l" {RETURN(k_COLOR);} YY_BREAK case 46: YY_RULE_SETUP -#line 94 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 94 "./Ecc/Scanner.l" {RETURN(k_FLOAT);} YY_BREAK case 47: YY_RULE_SETUP -#line 95 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 95 "./Ecc/Scanner.l" {RETURN(k_INDEX);} YY_BREAK case 48: YY_RULE_SETUP -#line 96 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 96 "./Ecc/Scanner.l" {RETURN(k_RANGE);} YY_BREAK case 49: YY_RULE_SETUP -#line 97 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 97 "./Ecc/Scanner.l" {RETURN(k_CEntityPointer);} YY_BREAK case 50: YY_RULE_SETUP -#line 98 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 98 "./Ecc/Scanner.l" {RETURN(k_CModelObject);} YY_BREAK case 51: YY_RULE_SETUP -#line 99 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 99 "./Ecc/Scanner.l" {RETURN(k_CModelInstance);} YY_BREAK case 52: YY_RULE_SETUP -#line 100 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 100 "./Ecc/Scanner.l" {RETURN(k_CAnimObject);} YY_BREAK case 53: YY_RULE_SETUP -#line 101 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 101 "./Ecc/Scanner.l" {RETURN(k_CSoundObject);} YY_BREAK case 54: YY_RULE_SETUP -#line 102 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 102 "./Ecc/Scanner.l" {RETURN(k_CPlacement3D);} YY_BREAK case 55: YY_RULE_SETUP -#line 103 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 103 "./Ecc/Scanner.l" {RETURN(k_FLOATaabbox3D);} YY_BREAK case 56: YY_RULE_SETUP -#line 104 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 104 "./Ecc/Scanner.l" {RETURN(k_FLOATmatrix3D);} YY_BREAK case 57: YY_RULE_SETUP -#line 105 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 105 "./Ecc/Scanner.l" {RETURN(k_FLOATquat3D);} YY_BREAK case 58: YY_RULE_SETUP -#line 106 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 106 "./Ecc/Scanner.l" {RETURN(k_ANGLE);}; YY_BREAK case 59: YY_RULE_SETUP -#line 107 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 107 "./Ecc/Scanner.l" {RETURN(k_ANIMATION);}; YY_BREAK case 60: YY_RULE_SETUP -#line 108 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 108 "./Ecc/Scanner.l" {RETURN(k_ILLUMINATIONTYPE);}; YY_BREAK case 61: YY_RULE_SETUP -#line 109 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 109 "./Ecc/Scanner.l" {RETURN(k_FLOAT3D);}; YY_BREAK case 62: YY_RULE_SETUP -#line 110 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 110 "./Ecc/Scanner.l" {RETURN(k_ANGLE3D);}; YY_BREAK case 63: YY_RULE_SETUP -#line 111 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 111 "./Ecc/Scanner.l" {RETURN(k_FLOATplane3D);}; YY_BREAK case 64: YY_RULE_SETUP -#line 112 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 112 "./Ecc/Scanner.l" {RETURN(k_FLAGS);}; YY_BREAK /* single character operators and punctuations */ case 65: YY_RULE_SETUP -#line 115 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 115 "./Ecc/Scanner.l" { RETURN(yytext[0]);} YY_BREAK /* constants */ case 66: YY_RULE_SETUP -#line 119 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 119 "./Ecc/Scanner.l" { RETURN(c_int); } YY_BREAK case 67: YY_RULE_SETUP -#line 120 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 120 "./Ecc/Scanner.l" { RETURN(c_int)}; YY_BREAK case 68: YY_RULE_SETUP -#line 121 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 121 "./Ecc/Scanner.l" { RETURN(c_int); } YY_BREAK case 69: YY_RULE_SETUP -#line 122 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 122 "./Ecc/Scanner.l" { RETURN(c_int); } YY_BREAK case 70: YY_RULE_SETUP -#line 123 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 123 "./Ecc/Scanner.l" { RETURN(c_string); } YY_BREAK case 71: YY_RULE_SETUP -#line 124 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 124 "./Ecc/Scanner.l" { RETURN(c_char); } YY_BREAK /* identifier */ case 72: YY_RULE_SETUP -#line 127 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 127 "./Ecc/Scanner.l" {RETURN(identifier);} YY_BREAK /* specially bracketed cpp blocks */ case 73: YY_RULE_SETUP -#line 130 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 130 "./Ecc/Scanner.l" { char strLine[80]; sprintf(strLine, "#line %d \"%s\"\n", _iLinesCt, _strInputFileName ); @@ -1269,7 +1393,7 @@ YY_RULE_SETUP YY_BREAK case 74: YY_RULE_SETUP -#line 136 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 136 "./Ecc/Scanner.l" { BEGIN(INITIAL); yylval = SType(_strCppBlock); @@ -1277,8 +1401,9 @@ YY_RULE_SETUP } YY_BREAK case 75: +/* rule 75 can match eol */ YY_RULE_SETUP -#line 141 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 141 "./Ecc/Scanner.l" { _iLinesCt++; _strCppBlock = (SType(_strCppBlock)+yytext).strString; @@ -1286,7 +1411,7 @@ YY_RULE_SETUP YY_BREAK case 76: YY_RULE_SETUP -#line 145 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 145 "./Ecc/Scanner.l" { _strCppBlock = (SType(_strCppBlock)+yytext).strString; } @@ -1294,35 +1419,37 @@ YY_RULE_SETUP /* eat up comments */ case 77: YY_RULE_SETUP -#line 150 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 150 "./Ecc/Scanner.l" { BEGIN(COMMENT); } YY_BREAK case 78: YY_RULE_SETUP -#line 151 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 151 "./Ecc/Scanner.l" { BEGIN(INITIAL); } YY_BREAK case 79: YY_RULE_SETUP -#line 152 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 152 "./Ecc/Scanner.l" {} YY_BREAK case 80: +/* rule 80 can match eol */ YY_RULE_SETUP -#line 153 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 153 "./Ecc/Scanner.l" { _iLinesCt++; } YY_BREAK /* eat up whitespace */ case 81: YY_RULE_SETUP -#line 156 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 156 "./Ecc/Scanner.l" { } YY_BREAK /* eat up linefeeds and count lines in all conditions */ case 82: +/* rule 82 can match eol */ YY_RULE_SETUP -#line 159 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 159 "./Ecc/Scanner.l" { _iLinesCt++; } @@ -1330,7 +1457,7 @@ YY_RULE_SETUP /* for all unrecognized characters */ case 83: YY_RULE_SETUP -#line 163 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 163 "./Ecc/Scanner.l" { // report an error char strError[80]; @@ -1341,10 +1468,10 @@ YY_RULE_SETUP YY_BREAK case 84: YY_RULE_SETUP -#line 171 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" +#line 171 "./Ecc/Scanner.l" ECHO; YY_BREAK -#line 1348 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.cpp" +#line 1475 "./Ecc/Scanner.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(CPPBLOCK): @@ -1353,25 +1480,26 @@ case YY_STATE_EOF(CPPBLOCK): case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1381,13 +1509,13 @@ case YY_STATE_EOF(CPPBLOCK): * 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 @@ -1400,30 +1528,30 @@ case YY_STATE_EOF(CPPBLOCK): yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1434,7 +1562,7 @@ case YY_STATE_EOF(CPPBLOCK): * 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; @@ -1442,30 +1570,30 @@ case YY_STATE_EOF(CPPBLOCK): 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; @@ -1476,8 +1604,7 @@ case YY_STATE_EOF(CPPBLOCK): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1486,23 +1613,22 @@ case YY_STATE_EOF(CPPBLOCK): * 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 singled characater, the EOB, so + /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; @@ -1520,38 +1646,34 @@ 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_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; + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1560,8 +1682,7 @@ static int yy_get_next_buffer() b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1571,33 +1692,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -#endif + } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); + yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1605,32 +1728,39 @@ static int yy_get_next_buffer() else ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() - { + static yy_state_type yy_get_previous_state (void) +{ register yy_state_type yy_current_state; register char *yy_cp; + + yy_current_state = (yy_start); - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1642,30 +1772,23 @@ static yy_state_type yy_get_previous_state() } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1677,90 +1800,96 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 414); return yy_is_jam ? 0 : yy_current_state; - } +} - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; + register yy_size_t 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_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 */ - yytext_ptr = yy_c_buf_p; - ++yy_c_buf_p; + yy_size_t 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() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) - { - yy_c_buf_p = - yytext_ptr + YY_MORE_ADJ; - return EOF; - } + if ( yywrap( ) ) + return 0; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1770,99 +1899,92 @@ static int input() } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + offset; break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( - "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( - "unexpected last match in input()" ); -#endif } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); 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 yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); } + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void 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 yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -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 yy_create_buffer (FILE * file, int size ) +{ YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1871,79 +1993,77 @@ int size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer(b,file ); return b; - } +} - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); + yyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + yyfree((void *) b ); +} +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; - { b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes @@ -1958,29 +2078,125 @@ YY_BUFFER_STATE b; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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 yy_scan_buffer (char * base, yy_size_t size ) +{ YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1994,56 +2210,50 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to yylex() 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 + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *str ) -#else -YY_BUFFER_STATE yy_scan_string( str ) -yyconst char *str; -#endif - { - int len; - for ( len = 0; str[len]; ++len ) - ; - - return yy_scan_bytes( 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 yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ YY_BUFFER_STATE b; char *buf; - yy_size_t n; - int i; - + yy_size_t n, 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 *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_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 = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -2053,78 +2263,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. */ @@ -2133,52 +2282,177 @@ char msg[]; do \ { \ /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +yy_size_t yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() 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 +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; + return n; +} #endif - { + +void *yyalloc (yy_size_t size ) +{ return (void *) malloc( size ); - } +} -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { +void *yyrealloc (void * ptr, yy_size_t size ) +{ /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2187,25 +2461,17 @@ yy_size_t size; * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); - } +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 171 "./Ecc/Scanner.l" -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 171 "D:\\SE1_GPL\\Sources\\Ecc\\\\Scanner.l" diff --git a/Sources/Ecc/parser.h b/Sources/Ecc/parser.h index d07179f..aba5cec 100644 --- a/Sources/Ecc/parser.h +++ b/Sources/Ecc/parser.h @@ -1,77 +1,199 @@ -#ifndef YYSTYPE -#define YYSTYPE int -#endif -#define c_char 258 -#define c_int 259 -#define c_float 260 -#define c_bool 261 -#define c_string 262 -#define identifier 263 -#define cppblock 264 -#define k_while 265 -#define k_for 266 -#define k_if 267 -#define k_else 268 -#define k_enum 269 -#define k_switch 270 -#define k_case 271 -#define k_class 272 -#define k_do 273 -#define k_void 274 -#define k_const 275 -#define k_inline 276 -#define k_static 277 -#define k_virtual 278 -#define k_return 279 -#define k_autowait 280 -#define k_autocall 281 -#define k_waitevent 282 -#define k_event 283 -#define k_name 284 -#define k_thumbnail 285 -#define k_features 286 -#define k_uses 287 -#define k_export 288 -#define k_texture 289 -#define k_sound 290 -#define k_model 291 -#define k_properties 292 -#define k_components 293 -#define k_functions 294 -#define k_procedures 295 -#define k_wait 296 -#define k_on 297 -#define k_otherwise 298 -#define k_call 299 -#define k_jump 300 -#define k_stop 301 -#define k_resume 302 -#define k_pass 303 -#define k_CTString 304 -#define k_CTStringTrans 305 -#define k_CTFileName 306 -#define k_CTFileNameNoDep 307 -#define k_BOOL 308 -#define k_COLOR 309 -#define k_FLOAT 310 -#define k_INDEX 311 -#define k_RANGE 312 -#define k_CEntityPointer 313 -#define k_CModelObject 314 -#define k_CModelInstance 315 -#define k_CAnimObject 316 -#define k_CSoundObject 317 -#define k_CPlacement3D 318 -#define k_FLOATaabbox3D 319 -#define k_FLOATmatrix3D 320 -#define k_FLOATquat3D 321 -#define k_ANGLE 322 -#define k_FLOAT3D 323 -#define k_ANGLE3D 324 -#define k_FLOATplane3D 325 -#define k_ANIMATION 326 -#define k_ILLUMINATIONTYPE 327 -#define k_FLAGS 328 +/* A Bison parser, made by GNU Bison 2.3. */ +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + c_char = 258, + c_int = 259, + c_float = 260, + c_bool = 261, + c_string = 262, + identifier = 263, + cppblock = 264, + k_while = 265, + k_for = 266, + k_if = 267, + k_else = 268, + k_enum = 269, + k_switch = 270, + k_case = 271, + k_class = 272, + k_do = 273, + k_void = 274, + k_const = 275, + k_inline = 276, + k_static = 277, + k_virtual = 278, + k_return = 279, + k_autowait = 280, + k_autocall = 281, + k_waitevent = 282, + k_event = 283, + k_name = 284, + k_thumbnail = 285, + k_features = 286, + k_uses = 287, + k_export = 288, + k_texture = 289, + k_sound = 290, + k_model = 291, + k_properties = 292, + k_components = 293, + k_functions = 294, + k_procedures = 295, + k_wait = 296, + k_on = 297, + k_otherwise = 298, + k_call = 299, + k_jump = 300, + k_stop = 301, + k_resume = 302, + k_pass = 303, + k_CTString = 304, + k_CTStringTrans = 305, + k_CTFileName = 306, + k_CTFileNameNoDep = 307, + k_BOOL = 308, + k_COLOR = 309, + k_FLOAT = 310, + k_INDEX = 311, + k_RANGE = 312, + k_CEntityPointer = 313, + k_CModelObject = 314, + k_CModelInstance = 315, + k_CAnimObject = 316, + k_CSoundObject = 317, + k_CPlacement3D = 318, + k_FLOATaabbox3D = 319, + k_FLOATmatrix3D = 320, + k_FLOATquat3D = 321, + k_ANGLE = 322, + k_FLOAT3D = 323, + k_ANGLE3D = 324, + k_FLOATplane3D = 325, + k_ANIMATION = 326, + k_ILLUMINATIONTYPE = 327, + k_FLAGS = 328 + }; +#endif +/* Tokens. */ +#define c_char 258 +#define c_int 259 +#define c_float 260 +#define c_bool 261 +#define c_string 262 +#define identifier 263 +#define cppblock 264 +#define k_while 265 +#define k_for 266 +#define k_if 267 +#define k_else 268 +#define k_enum 269 +#define k_switch 270 +#define k_case 271 +#define k_class 272 +#define k_do 273 +#define k_void 274 +#define k_const 275 +#define k_inline 276 +#define k_static 277 +#define k_virtual 278 +#define k_return 279 +#define k_autowait 280 +#define k_autocall 281 +#define k_waitevent 282 +#define k_event 283 +#define k_name 284 +#define k_thumbnail 285 +#define k_features 286 +#define k_uses 287 +#define k_export 288 +#define k_texture 289 +#define k_sound 290 +#define k_model 291 +#define k_properties 292 +#define k_components 293 +#define k_functions 294 +#define k_procedures 295 +#define k_wait 296 +#define k_on 297 +#define k_otherwise 298 +#define k_call 299 +#define k_jump 300 +#define k_stop 301 +#define k_resume 302 +#define k_pass 303 +#define k_CTString 304 +#define k_CTStringTrans 305 +#define k_CTFileName 306 +#define k_CTFileNameNoDep 307 +#define k_BOOL 308 +#define k_COLOR 309 +#define k_FLOAT 310 +#define k_INDEX 311 +#define k_RANGE 312 +#define k_CEntityPointer 313 +#define k_CModelObject 314 +#define k_CModelInstance 315 +#define k_CAnimObject 316 +#define k_CSoundObject 317 +#define k_CPlacement3D 318 +#define k_FLOATaabbox3D 319 +#define k_FLOATmatrix3D 320 +#define k_FLOATquat3D 321 +#define k_ANGLE 322 +#define k_FLOAT3D 323 +#define k_ANGLE3D 324 +#define k_FLOATplane3D 325 +#define k_ANIMATION 326 +#define k_ILLUMINATIONTYPE 327 +#define k_FLAGS 328 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif extern YYSTYPE yylval; + diff --git a/Sources/Engine/Base/Parser.cpp b/Sources/Engine/Base/Parser.cpp index 830dea6..7f30df6 100644 --- a/Sources/Engine/Base/Parser.cpp +++ b/Sources/Engine/Base/Parser.cpp @@ -1,44 +1,144 @@ +/* A Bison parser, made by GNU Bison 2.3. */ -/* A Bison parser, made from engine/base/parser.y with Bison version GNU Bison version 1.24 - */ +/* Skeleton implementation for Bison's Yacc-like parsers in C -#define YYBISON 1 /* Identify Bison output. */ + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. -#define c_float 258 -#define c_int 259 -#define c_string 260 -#define c_char 261 -#define identifier 262 -#define k_INDEX 263 -#define k_FLOAT 264 -#define k_CTString 265 -#define k_void 266 -#define k_const 267 -#define k_user 268 -#define k_persistent 269 -#define k_extern 270 -#define k_pre 271 -#define k_post 272 -#define k_help 273 -#define k_if 274 -#define k_else 275 -#define k_else_if 276 -#define SHL 277 -#define SHR 278 -#define EQ 279 -#define NEQ 280 -#define GEQ 281 -#define LEQ 282 -#define LOGAND 283 -#define LOGOR 284 -#define block_beg 285 -#define block_end 286 -#define TYPECAST 287 -#define SIGN 288 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -#line 1 "engine/base/parser.y" + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -#include "StdH.h" + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + c_float = 258, + c_int = 259, + c_string = 260, + c_char = 261, + identifier = 262, + k_INDEX = 263, + k_FLOAT = 264, + k_CTString = 265, + k_void = 266, + k_const = 267, + k_user = 268, + k_persistent = 269, + k_extern = 270, + k_pre = 271, + k_post = 272, + k_help = 273, + k_if = 274, + k_else = 275, + k_else_if = 276, + SHL = 277, + SHR = 278, + EQ = 279, + NEQ = 280, + GEQ = 281, + LEQ = 282, + LOGAND = 283, + LOGOR = 284, + block_beg = 285, + block_end = 286, + TYPECAST = 287, + SIGN = 288 + }; +#endif +/* Tokens. */ +#define c_float 258 +#define c_int 259 +#define c_string 260 +#define c_char 261 +#define identifier 262 +#define k_INDEX 263 +#define k_FLOAT 264 +#define k_CTString 265 +#define k_void 266 +#define k_const 267 +#define k_user 268 +#define k_persistent 269 +#define k_extern 270 +#define k_pre 271 +#define k_post 272 +#define k_help 273 +#define k_if 274 +#define k_else 275 +#define k_else_if 276 +#define SHL 277 +#define SHR 278 +#define EQ 279 +#define NEQ 280 +#define GEQ 281 +#define LEQ 282 +#define LOGAND 283 +#define LOGOR 284 +#define block_beg 285 +#define block_end 286 +#define TYPECAST 287 +#define SIGN 288 + + + + +/* Copy the first part of user declarations. */ +#line 1 "./Engine/Base/Parser.y" + +#include #include #include @@ -47,7 +147,12 @@ #include #include -#line 13 "engine/base/parser.y" +#line 13 "./Engine/Base/Parser.y" + +// turn off over-helpful bit of bison... --ryan. +#ifdef __GNUC__ +#define __attribute__(x) +#endif #define YYERROR_VERBOSE 1 // if error occurs in parsing @@ -133,7 +238,7 @@ void Declaration( if (!ShellTypeIsSame(ssNew.ss_istType, istType) || ((ssNew.ss_ulFlags&SSF_CONSTANT)!=(ulQualifiers&SSF_CONSTANT))) { // error - _pShell->ErrorF("Symbol '%s' is already declared diferrently", ssNew.ss_strName); + _pShell->ErrorF("Symbol '%s' is already declared diferrently", (const char *) ssNew.ss_strName); return; } @@ -150,7 +255,7 @@ void Declaration( NOTHING; // function values are not retained } else { // error - _pShell->ErrorF("'%s': old value couldn't be retained", ssNew.ss_strName); + _pShell->ErrorF("'%s': old value couldn't be retained", (const char *) ssNew.ss_strName); return; } } @@ -221,8 +326,29 @@ void DoComparison(value &vRes, value &v0, value &v1, int token) } } -#line 192 "engine/base/parser.y" -typedef union { + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 197 "./Engine/Base/Parser.y" +{ value val; // for constants and expressions arguments arg; // for function input arguments ULONG ulFlags; // for declaration qualifiers @@ -231,583 +357,1223 @@ typedef union { struct LValue lvLValue; INDEX (*pPreFunc)(INDEX); // pre-set function for a variable void (*pPostFunc)(INDEX); // post-set function for a variable -} YYSTYPE; -#line 203 "engine/base/parser.y" +} +/* Line 193 of yacc.c. */ +#line 363 "./Engine/Base/Parser.cpp" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ +#line 208 "./Engine/Base/Parser.y" extern int yylex(YYSTYPE *lvalp); -#ifndef YYLTYPE -typedef - struct yyltype - { - int timestamp; - int first_line; - int first_column; - int last_line; - int last_column; - char *text; - } - yyltype; -#define YYLTYPE yyltype +/* Line 216 of yacc.c. */ +#line 379 "./Engine/Base/Parser.cpp" + +#ifdef short +# undef short #endif -#include - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; #endif +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ -#define YYFINAL 156 -#define YYFLAG -32768 -#define YYNTBASE 53 +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) -#define YYTRANSLATE(x) ((unsigned)(x) <= 288 ? yytranslate[x] : 75) +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 45, 2, 2, 2, 42, 33, 2, 49, - 50, 40, 39, 47, 38, 2, 41, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 46, 48, 36, - 32, 37, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 51, 2, 52, 34, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 35, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 43, 44 -}; +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 8, 12, 13, 16, 17, 20, 23, - 26, 29, 30, 32, 34, 36, 38, 40, 41, 45, - 46, 50, 51, 53, 55, 59, 67, 76, 87, 89, - 91, 94, 99, 106, 109, 114, 119, 120, 121, 130, - 131, 132, 133, 142, 143, 147, 149, 154, 155, 157, - 159, 163, 165, 167, 169, 171, 175, 179, 183, 187, - 191, 195, 199, 203, 207, 211, 215, 219, 223, 227, - 231, 235, 239, 243, 246, 249, 252, 257, 262, 267, - 272 -}; +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) -static const short yyrhs[] = { 63, - 0, 55, 0, 30, 55, 31, 0, 30, 55, 31, - 0, 0, 64, 55, 0, 0, 56, 12, 0, 56, - 13, 0, 56, 14, 0, 56, 15, 0, 0, 5, - 0, 9, 0, 8, 0, 10, 0, 11, 0, 0, - 16, 46, 7, 0, 0, 17, 46, 7, 0, 0, - 62, 0, 58, 0, 62, 47, 58, 0, 56, 58, - 7, 59, 60, 57, 48, 0, 56, 58, 7, 49, - 61, 50, 57, 48, 0, 56, 58, 7, 51, 74, - 52, 59, 60, 57, 48, 0, 48, 0, 54, 0, - 74, 48, 0, 71, 32, 74, 48, 0, 56, 58, - 7, 32, 74, 48, 0, 18, 7, 0, 18, 7, - 49, 50, 0, 18, 7, 51, 52, 0, 0, 0, - 19, 49, 74, 50, 65, 54, 66, 67, 0, 0, - 0, 0, 21, 49, 74, 50, 68, 54, 69, 67, - 0, 0, 20, 70, 54, 0, 7, 0, 7, 51, - 74, 52, 0, 0, 73, 0, 74, 0, 73, 47, - 74, 0, 3, 0, 4, 0, 5, 0, 71, 0, - 74, 22, 74, 0, 74, 23, 74, 0, 74, 33, - 74, 0, 74, 35, 74, 0, 74, 34, 74, 0, - 74, 28, 74, 0, 74, 29, 74, 0, 74, 39, - 74, 0, 74, 38, 74, 0, 74, 40, 74, 0, - 74, 41, 74, 0, 74, 42, 74, 0, 74, 36, - 74, 0, 74, 37, 74, 0, 74, 24, 74, 0, - 74, 25, 74, 0, 74, 26, 74, 0, 74, 27, - 74, 0, 38, 74, 0, 39, 74, 0, 45, 74, - 0, 49, 9, 50, 74, 0, 49, 8, 50, 74, - 0, 49, 10, 50, 74, 0, 7, 49, 72, 50, - 0, 49, 74, 50, 0 -}; +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) #endif -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 270, 271, 275, 276, 280, 281, 285, 288, 291, 294, - 297, 302, 305, 312, 315, 318, 321, 326, 329, 342, - 345, 358, 362, 368, 376, 387, 391, 400, 410, 413, - 416, 430, 468, 502, 506, 510, 514, 524, 528, 531, - 533, 549, 554, 554, 556, 562, 587, 627, 632, 638, - 643, 650, 654, 658, 662, 680, 693, 707, 721, 735, - 751, 765, 780, 799, 815, 831, 853, 869, 872, 875, - 878, 881, 884, 890, 904, 916, 929, 943, 957, 974, - 1046 +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 35 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 457 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 53 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 23 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 82 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 156 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 288 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 44, 2, 2, 2, 42, 33, 2, + 49, 50, 40, 39, 47, 38, 2, 41, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 46, 48, + 36, 32, 37, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 51, 2, 52, 34, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 35, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 43, 45 }; -static const char * const yytname[] = { "$","error","$undefined.","c_float", -"c_int","c_string","c_char","identifier","k_INDEX","k_FLOAT","k_CTString","k_void", -"k_const","k_user","k_persistent","k_extern","k_pre","k_post","k_help","k_if", -"k_else","k_else_if","SHL","SHR","EQ","NEQ","GEQ","LEQ","LOGAND","LOGOR","block_beg", -"block_end","'='","'&'","'^'","'|'","'<'","'>'","'-'","'+'","'*'","'/'","'%'", -"TYPECAST","SIGN","'!'","':'","','","';'","'('","')'","'['","']'","program", -"block","statements","declaration_qualifiers","opt_string","type_specifier", -"pre_func_opt","post_func_opt","parameter_list_opt","parameter_list","declaration", -"statement","@1","@2","opt_else","@3","@4","@5","lvalue","argument_expression_list_opt", -"argument_expression_list","expression","" +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 11, 15, 16, 19, 20, + 23, 26, 29, 32, 33, 35, 37, 39, 41, 43, + 44, 48, 49, 53, 54, 56, 58, 62, 70, 79, + 90, 92, 94, 97, 102, 109, 112, 117, 122, 123, + 124, 133, 134, 135, 136, 145, 146, 150, 152, 157, + 158, 160, 162, 166, 168, 170, 172, 174, 178, 182, + 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, + 226, 230, 234, 238, 242, 246, 249, 252, 255, 260, + 265, 270, 275 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 54, 0, -1, 64, -1, 56, -1, 30, 56, 31, + -1, 30, 56, 31, -1, -1, 65, 56, -1, -1, + 57, 12, -1, 57, 13, -1, 57, 14, -1, 57, + 15, -1, -1, 5, -1, 9, -1, 8, -1, 10, + -1, 11, -1, -1, 16, 46, 7, -1, -1, 17, + 46, 7, -1, -1, 63, -1, 59, -1, 63, 47, + 59, -1, 57, 59, 7, 60, 61, 58, 48, -1, + 57, 59, 7, 49, 62, 50, 58, 48, -1, 57, + 59, 7, 51, 75, 52, 60, 61, 58, 48, -1, + 48, -1, 55, -1, 75, 48, -1, 72, 32, 75, + 48, -1, 57, 59, 7, 32, 75, 48, -1, 18, + 7, -1, 18, 7, 49, 50, -1, 18, 7, 51, + 52, -1, -1, -1, 19, 49, 75, 50, 66, 55, + 67, 68, -1, -1, -1, -1, 21, 49, 75, 50, + 69, 55, 70, 68, -1, -1, 20, 71, 55, -1, + 7, -1, 7, 51, 75, 52, -1, -1, 74, -1, + 75, -1, 74, 47, 75, -1, 3, -1, 4, -1, + 5, -1, 72, -1, 75, 22, 75, -1, 75, 23, + 75, -1, 75, 33, 75, -1, 75, 35, 75, -1, + 75, 34, 75, -1, 75, 28, 75, -1, 75, 29, + 75, -1, 75, 39, 75, -1, 75, 38, 75, -1, + 75, 40, 75, -1, 75, 41, 75, -1, 75, 42, + 75, -1, 75, 36, 75, -1, 75, 37, 75, -1, + 75, 24, 75, -1, 75, 25, 75, -1, 75, 26, + 75, -1, 75, 27, 75, -1, 38, 75, -1, 39, + 75, -1, 44, 75, -1, 49, 9, 50, 75, -1, + 49, 8, 50, 75, -1, 49, 10, 50, 75, -1, + 7, 49, 73, 50, -1, 49, 75, 50, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 275, 275, 276, 280, 281, 284, 286, 290, 293, + 296, 299, 302, 307, 310, 317, 320, 323, 326, 331, + 334, 347, 350, 363, 367, 373, 381, 392, 396, 405, + 415, 418, 421, 435, 473, 507, 511, 515, 519, 529, + 519, 535, 538, 554, 538, 559, 559, 567, 592, 632, + 637, 643, 648, 655, 659, 663, 667, 685, 698, 712, + 726, 740, 756, 770, 785, 804, 820, 836, 858, 874, + 877, 880, 883, 886, 889, 895, 909, 921, 934, 948, + 962, 979, 1075 }; #endif -static const short yyr1[] = { 0, - 53, 53, 54, 54, 55, 55, 56, 56, 56, 56, - 56, 57, 57, 58, 58, 58, 58, 59, 59, 60, - 60, 61, 61, 62, 62, 63, 63, 63, 64, 64, - 64, 64, 64, 64, 64, 64, 65, 66, 64, 67, - 68, 69, 67, 70, 67, 71, 71, 72, 72, 73, - 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - 74 +#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", "c_float", "c_int", "c_string", "c_char", + "identifier", "k_INDEX", "k_FLOAT", "k_CTString", "k_void", "k_const", + "k_user", "k_persistent", "k_extern", "k_pre", "k_post", "k_help", + "k_if", "k_else", "k_else_if", "SHL", "SHR", "EQ", "NEQ", "GEQ", "LEQ", + "LOGAND", "LOGOR", "block_beg", "block_end", "'='", "'&'", "'^'", "'|'", + "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "TYPECAST", "'!'", + "SIGN", "':'", "','", "';'", "'('", "')'", "'['", "']'", "$accept", + "program", "block", "statements", "declaration_qualifiers", "opt_string", + "type_specifier", "pre_func_opt", "post_func_opt", "parameter_list_opt", + "parameter_list", "declaration", "statement", "@1", "@2", "opt_else", + "@3", "@4", "@5", "lvalue", "argument_expression_list_opt", + "argument_expression_list", "expression", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 61, 38, 94, 124, 60, 62, 45, 43, + 42, 47, 37, 287, 33, 288, 58, 44, 59, 40, + 41, 91, 93 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 53, 54, 54, 55, 55, 56, 56, 57, 57, + 57, 57, 57, 58, 58, 59, 59, 59, 59, 60, + 60, 61, 61, 62, 62, 63, 63, 64, 64, 64, + 65, 65, 65, 65, 65, 65, 65, 65, 66, 67, + 65, 68, 69, 70, 68, 71, 68, 72, 72, 73, + 73, 74, 74, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75 }; -static const short yyr2[] = { 0, - 1, 1, 3, 3, 0, 2, 0, 2, 2, 2, - 2, 0, 1, 1, 1, 1, 1, 0, 3, 0, - 3, 0, 1, 1, 3, 7, 8, 10, 1, 1, - 2, 4, 6, 2, 4, 4, 0, 0, 8, 0, - 0, 0, 8, 0, 3, 1, 4, 0, 1, 1, - 3, 1, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 4, 4, 4, 4, - 3 +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 3, 3, 0, 2, 0, 2, + 2, 2, 2, 0, 1, 1, 1, 1, 1, 0, + 3, 0, 3, 0, 1, 1, 3, 7, 8, 10, + 1, 1, 2, 4, 6, 2, 4, 4, 0, 0, + 8, 0, 0, 0, 8, 0, 3, 1, 4, 0, + 1, 1, 3, 1, 1, 1, 1, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 2, 2, 2, 4, 4, + 4, 4, 3 }; -static const short yydefact[] = { 7, - 52, 53, 54, 46, 0, 0, 7, 0, 0, 0, - 29, 0, 30, 2, 0, 1, 7, 55, 0, 48, - 0, 34, 0, 0, 0, 55, 74, 75, 76, 0, - 0, 0, 0, 15, 14, 16, 17, 8, 9, 10, - 11, 0, 6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 31, 0, 49, 50, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 81, 18, 0, 56, 57, - 70, 71, 72, 73, 61, 62, 58, 60, 59, 68, - 69, 64, 63, 65, 66, 67, 80, 0, 47, 35, - 36, 37, 0, 78, 77, 79, 0, 0, 22, 0, - 20, 32, 51, 0, 0, 0, 24, 0, 23, 0, - 0, 12, 38, 19, 33, 12, 0, 18, 0, 13, - 0, 40, 0, 25, 20, 21, 26, 44, 0, 39, - 27, 12, 0, 0, 0, 45, 0, 28, 41, 0, - 42, 40, 43, 0, 0, 0 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 8, 53, 54, 55, 47, 0, 0, 8, 0, 0, + 0, 30, 0, 0, 31, 3, 0, 2, 8, 56, + 0, 49, 0, 35, 0, 0, 0, 56, 75, 76, + 77, 0, 0, 0, 0, 1, 16, 15, 17, 18, + 9, 10, 11, 12, 0, 7, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 32, 0, 50, 51, 0, + 0, 0, 0, 4, 0, 0, 0, 0, 82, 19, + 0, 57, 58, 71, 72, 73, 74, 62, 63, 59, + 61, 60, 69, 70, 65, 64, 66, 67, 68, 81, + 0, 48, 36, 37, 38, 0, 79, 78, 80, 0, + 0, 23, 0, 21, 33, 52, 0, 0, 0, 25, + 0, 24, 0, 0, 13, 39, 20, 34, 13, 0, + 19, 0, 14, 0, 41, 0, 26, 21, 22, 27, + 45, 0, 40, 28, 13, 0, 0, 0, 46, 0, + 29, 42, 0, 43, 41, 44 }; -static const short yydefgoto[] = { 154, - 13, 14, 25, 131, 42, 111, 122, 118, 119, 16, - 17, 114, 132, 140, 150, 152, 143, 26, 64, 65, - 19 +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 13, 14, 15, 26, 133, 44, 113, 124, 120, + 121, 17, 18, 116, 134, 142, 152, 154, 145, 27, + 66, 67, 20 }; -static const short yypact[] = { 110, --32768,-32768,-32768, -44, 4, -19, 134, 81, 81, 81, --32768, 19,-32768,-32768, 434,-32768, 73, 0, 291, 81, - 81, -41, 81, 3, 434,-32768,-32768,-32768,-32768, -15, - 10, 11, 204,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, 52,-32768, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81,-32768, 24, 28, 372, 162, 31, 37, 233, --32768, 75, 81, 81, 81,-32768, 47, 318, 93, 104, - 128, 128, 128, 128, 393, 393, 414, 414, 414, 128, - 128, 30, 30,-32768,-32768,-32768,-32768, 81,-32768,-32768, --32768,-32768, 51,-32768,-32768,-32768, 48, 81, 9, 81, - 76,-32768, 372, 65, 90, 345,-32768, 49, 54, 183, - 60, 102,-32768,-32768,-32768, 102, 9, 92, 116,-32768, - 61, 35, 77,-32768, 76,-32768,-32768,-32768, 78,-32768, --32768, 102, 65, 81, 99,-32768, 262,-32768,-32768, 65, --32768, 35,-32768, 124, 154,-32768 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -117 +static const yytype_int16 yypact[] = +{ + 109, -117, -117, -117, 30, -2, -34, 137, 80, 80, + 80, -117, 156, 27, -117, -117, 22, -117, 59, 25, + 313, 80, 80, 45, 80, 43, 22, -117, -117, -117, + -117, 32, 36, 49, 226, -117, -117, -117, -117, -117, + -117, -117, -117, -117, 68, -117, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, -117, 51, 53, 394, 184, + 55, 58, 255, -117, 104, 80, 80, 80, -117, 44, + 340, 92, 231, 149, 149, 149, 149, -16, -16, 415, + 415, 415, 149, 149, 95, 95, -117, -117, -117, -117, + 80, -117, -117, -117, -117, 85, -117, -117, -117, 79, + 80, 112, 80, 126, -117, 394, 96, 138, 367, -117, + 99, 103, 205, 100, 146, -117, -117, -117, 146, 112, + 136, 147, -117, 114, 50, 121, -117, 126, -117, -117, + -117, 124, -117, -117, 146, 96, 80, 122, -117, 284, + -117, -117, 96, -117, 50, -117 }; -static const short yypgoto[] = {-32768, - -81, -1, 156, -117, -22, 29, 25,-32768,-32768,-32768, --32768,-32768,-32768, 22,-32768,-32768,-32768, 14,-32768,-32768, - -8 +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -117, -117, -87, 54, 174, -116, -23, 47, 41, -117, + -117, -117, -117, -117, -117, 26, -117, -117, -117, 73, + -117, -117, -8 }; - -#define YYLAST 456 - - -static const short yytable[] = { 27, - 28, 29, 72, 33, 20, 24, 21, 68, 133, 69, - 22, 66, 67, 18, 70, 43, 34, 35, 36, 37, - 18, 1, 2, 3, 145, 4, 30, 31, 32, 23, - 18, 44, 123, 71, 73, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 138, 139, 8, 9, 77, 74, - 75, 146, 107, 10, 104, 105, 106, 12, 151, 60, - 61, 62, -5, 97, 98, 1, 2, 3, 108, 4, - 100, 103, 108, 1, 2, 3, 117, 4, 101, 113, - 5, 6, 121, 115, 7, 109, 124, 110, 126, 116, - 127, 120, 7, -5, 134, 129, 130, 107, 137, -5, - 8, 9, 1, 2, 3, 46, 4, 10, 8, 9, - 11, 12, 136, 155, 141, 10, 144, 5, 6, 12, - 58, 59, 60, 61, 62, 147, 1, 2, 3, 7, - 4, 58, 59, 60, 61, 62, 148, 8, 9, 45, - 46, 5, 6, 156, 10, 15, 135, 11, 12, 142, - 0, 0, 0, 7, -5, 58, 59, 60, 61, 62, - 0, 8, 9, 153, 0, 0, 0, 0, 10, 0, - 0, 11, 12, 45, 46, 47, 48, 49, 50, 51, - 52, 0, 0, 0, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 45, 46, 47, 48, 49, 50, - 51, 52, 0, 99, 0, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 45, 46, 47, 48, 49, - 50, 51, 52, 0, 128, 0, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, - 0, 0, 0, 76, 45, 46, 47, 48, 49, 50, - 51, 52, 0, 0, 0, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, - 0, 0, 102, 45, 46, 47, 48, 49, 50, 51, - 52, 0, 0, 0, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, - 0, 149, 45, 46, 47, 48, 49, 50, 51, 52, - 0, 0, 0, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 0, 0, 0, 0, 0, 63, 45, - 46, 47, 48, 49, 50, 51, 52, 0, 0, 0, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 0, 0, 0, 0, 0, 112, 45, 46, 47, 48, - 49, 50, 51, 52, 0, 0, 0, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, - 0, 0, 125, 45, 46, 47, 48, 49, 50, 51, - 52, 0, 0, 0, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 45, 46, 47, 48, 49, 50, - 0, 0, 0, 0, 0, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 45, 46, 47, 48, 49, - 50, 34, 35, 36, 37, 38, 39, 40, 41, 56, - 57, 58, 59, 60, 61, 62 +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -7 +static const yytype_int16 yytable[] = +{ + 28, 29, 30, 74, 34, 23, 47, 48, 49, 50, + 51, 52, 135, 68, 69, 24, 72, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 35, 147, 125, + 36, 37, 38, 39, 40, 41, 42, 43, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 46, 148, -6, + 109, 25, 1, 2, 3, 153, 4, 106, 107, 108, + 140, 141, 45, 19, 73, 79, 110, 5, 6, 21, + 19, 22, 75, 1, 2, 3, 76, 4, 119, 7, + -6, 19, 115, 111, 70, 112, 71, 8, 9, 77, + 100, 99, 118, 10, 122, 102, 136, 11, 12, -6, + 103, 105, 1, 2, 3, 48, 4, 110, 8, 9, + 36, 37, 38, 39, 10, 117, 7, 5, 6, 12, + 60, 61, 62, 63, 64, 62, 63, 64, 149, 7, + 1, 2, 3, 123, 4, 126, 131, 8, 9, 128, + 129, 132, 109, 10, 138, 5, 6, 11, 12, 1, + 2, 3, 139, 4, 31, 32, 33, 7, -6, 143, + 150, 47, 48, 146, 16, 8, 9, 137, 144, 0, + 155, 10, 0, 0, 0, 11, 12, 60, 61, 62, + 63, 64, 0, 0, 8, 9, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 12, 47, 48, 49, 50, + 51, 52, 53, 54, 0, 0, 0, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 47, 48, 49, + 50, 51, 52, 53, 54, 0, 101, 0, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 47, 48, + 49, 50, 51, 52, 53, 54, 0, 130, 0, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 60, + 61, 62, 63, 64, 0, 0, 78, 47, 48, 49, + 50, 51, 52, 53, 54, 0, 0, 0, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 0, 0, + 0, 0, 0, 0, 0, 104, 47, 48, 49, 50, + 51, 52, 53, 54, 0, 0, 0, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 0, 0, 0, + 0, 0, 0, 0, 151, 47, 48, 49, 50, 51, + 52, 53, 54, 0, 0, 0, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 0, 0, 0, 0, + 0, 65, 47, 48, 49, 50, 51, 52, 53, 54, + 0, 0, 0, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 0, 0, 0, 0, 0, 114, 47, + 48, 49, 50, 51, 52, 53, 54, 0, 0, 0, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 0, 0, 0, 0, 0, 127, 47, 48, 49, 50, + 51, 52, 53, 54, 0, 0, 0, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 47, 48, 49, + 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, + 0, 58, 59, 60, 61, 62, 63, 64 }; -static const short yycheck[] = { 8, - 9, 10, 25, 12, 49, 7, 51, 49, 126, 51, - 7, 20, 21, 0, 23, 17, 8, 9, 10, 11, - 7, 3, 4, 5, 142, 7, 8, 9, 10, 49, - 17, 32, 114, 31, 50, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 20, 21, 38, 39, 7, 50, - 50, 143, 16, 45, 73, 74, 75, 49, 150, 40, - 41, 42, 0, 50, 47, 3, 4, 5, 32, 7, - 50, 7, 32, 3, 4, 5, 109, 7, 52, 98, - 18, 19, 17, 46, 30, 49, 7, 51, 50, 108, - 47, 110, 30, 31, 127, 46, 5, 16, 48, 0, - 38, 39, 3, 4, 5, 23, 7, 45, 38, 39, - 48, 49, 7, 0, 48, 45, 49, 18, 19, 49, - 38, 39, 40, 41, 42, 144, 3, 4, 5, 30, - 7, 38, 39, 40, 41, 42, 48, 38, 39, 22, - 23, 18, 19, 0, 45, 0, 128, 48, 49, 135, - -1, -1, -1, 30, 31, 38, 39, 40, 41, 42, - -1, 38, 39, 152, -1, -1, -1, -1, 45, -1, - -1, 48, 49, 22, 23, 24, 25, 26, 27, 28, - 29, -1, -1, -1, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 22, 23, 24, 25, 26, 27, - 28, 29, -1, 52, -1, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 22, 23, 24, 25, 26, - 27, 28, 29, -1, 52, -1, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, -1, -1, -1, -1, - -1, -1, -1, 50, 22, 23, 24, 25, 26, 27, - 28, 29, -1, -1, -1, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, -1, -1, -1, -1, -1, - -1, -1, 50, 22, 23, 24, 25, 26, 27, 28, - 29, -1, -1, -1, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, -1, -1, -1, -1, -1, -1, - -1, 50, 22, 23, 24, 25, 26, 27, 28, 29, - -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, -1, -1, -1, -1, -1, 48, 22, - 23, 24, 25, 26, 27, 28, 29, -1, -1, -1, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - -1, -1, -1, -1, -1, 48, 22, 23, 24, 25, - 26, 27, 28, 29, -1, -1, -1, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, -1, -1, -1, - -1, -1, 48, 22, 23, 24, 25, 26, 27, 28, - 29, -1, -1, -1, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 22, 23, 24, 25, 26, 27, - -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 22, 23, 24, 25, 26, - 27, 8, 9, 10, 11, 12, 13, 14, 15, 36, - 37, 38, 39, 40, 41, 42 +static const yytype_int16 yycheck[] = +{ + 8, 9, 10, 26, 12, 7, 22, 23, 24, 25, + 26, 27, 128, 21, 22, 49, 24, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 0, 144, 116, + 8, 9, 10, 11, 12, 13, 14, 15, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 32, 145, 0, + 16, 7, 3, 4, 5, 152, 7, 75, 76, 77, + 20, 21, 18, 0, 31, 7, 32, 18, 19, 49, + 7, 51, 50, 3, 4, 5, 50, 7, 111, 30, + 31, 18, 100, 49, 49, 51, 51, 38, 39, 50, + 47, 50, 110, 44, 112, 50, 129, 48, 49, 0, + 52, 7, 3, 4, 5, 23, 7, 32, 38, 39, + 8, 9, 10, 11, 44, 46, 30, 18, 19, 49, + 38, 39, 40, 41, 42, 40, 41, 42, 146, 30, + 3, 4, 5, 17, 7, 7, 46, 38, 39, 50, + 47, 5, 16, 44, 7, 18, 19, 48, 49, 3, + 4, 5, 48, 7, 8, 9, 10, 30, 31, 48, + 48, 22, 23, 49, 0, 38, 39, 130, 137, -1, + 154, 44, -1, -1, -1, 48, 49, 38, 39, 40, + 41, 42, -1, -1, 38, 39, -1, -1, -1, -1, + 44, -1, -1, -1, -1, 49, 22, 23, 24, 25, + 26, 27, 28, 29, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 22, 23, 24, + 25, 26, 27, 28, 29, -1, 52, -1, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 22, 23, + 24, 25, 26, 27, 28, 29, -1, 52, -1, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 38, + 39, 40, 41, 42, -1, -1, 50, 22, 23, 24, + 25, 26, 27, 28, 29, -1, -1, -1, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, -1, -1, + -1, -1, -1, -1, -1, 50, 22, 23, 24, 25, + 26, 27, 28, 29, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, -1, -1, -1, + -1, -1, -1, -1, 50, 22, 23, 24, 25, 26, + 27, 28, 29, -1, -1, -1, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, -1, -1, -1, -1, + -1, 48, 22, 23, 24, 25, 26, 27, 28, 29, + -1, -1, -1, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, -1, -1, -1, -1, -1, 48, 22, + 23, 24, 25, 26, 27, 28, 29, -1, -1, -1, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + -1, -1, -1, -1, -1, 48, 22, 23, 24, 25, + 26, 27, 28, 29, -1, -1, -1, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 22, 23, 24, + 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, + -1, 36, 37, 38, 39, 40, 41, 42 }; -#define YYPURE 1 -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "bison.simple" - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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. */ - -#undef YYERROR_VERBOSE -#ifndef alloca -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#include -#else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) -#include -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -#include - #pragma alloca -#else /* not MSDOS, __TURBOC__, or _AIX */ -#ifdef __hpux -#ifdef __cplusplus -extern "C" { -void *alloca (unsigned int); +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 4, 5, 7, 18, 19, 30, 38, 39, + 44, 48, 49, 54, 55, 56, 57, 64, 65, 72, + 75, 49, 51, 7, 49, 56, 57, 72, 75, 75, + 75, 8, 9, 10, 75, 0, 8, 9, 10, 11, + 12, 13, 14, 15, 59, 56, 32, 22, 23, 24, + 25, 26, 27, 28, 29, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 48, 73, 74, 75, 75, + 49, 51, 75, 31, 59, 50, 50, 50, 50, 7, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 50, + 47, 52, 50, 52, 50, 7, 75, 75, 75, 16, + 32, 49, 51, 60, 48, 75, 66, 46, 75, 59, + 62, 63, 75, 17, 61, 55, 7, 48, 50, 47, + 52, 46, 5, 58, 67, 58, 59, 60, 7, 48, + 20, 21, 68, 48, 61, 71, 49, 58, 55, 75, + 48, 50, 69, 55, 70, 68 }; -#else /* not __cplusplus */ -void *alloca (); -#endif /* not __cplusplus */ -#endif /* __hpux */ -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc. */ -#endif /* not GNU C. */ -#endif /* alloca not defined. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 +#define YYEMPTY (-2) #define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */ + #define YYFAIL goto yyerrlab + #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ + +#define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYPURE -#define YYLEX yylex() + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif -#ifdef YYPURE -#ifdef YYLSP_NEEDED + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + #ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) +# define YYLEX yylex (&yylval, YYLEX_PARAM) #else -#define YYLEX yylex(&yylval, &yylloc) +# define YYLEX yylex (&yylval) #endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else -#define YYLEX yylex(&yylval) +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif -#endif /* not YYLSP_NEEDED */ +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; #endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); -/* If nonreentrant, generate the variables here */ + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} -#ifndef YYPURE +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; #endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; #endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} -/* YYINITDEPTH indicates the initial size of the parser's stacks */ +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -#define YYINITDEPTH 200 +# define YYINITDEPTH 200 #endif -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 +# define YYMAXDEPTH 10000 #endif -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (from, to, count) - char *from; - char *to; - int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *from, char *to, int count) -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} +#if YYERROR_VERBOSE +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; #endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; #endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ -#line 192 "bison.simple" -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); #else -#define YYPARSE_PARAM -#define YYPARSE_PARAM_DECL +int yyparse (); #endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) int -yyparse(YYPARSE_PARAM) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) +yyparse (void *YYPARSE_PARAM) #else -#define YYPOPSTACK (yyvsp--, yyssp--) +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; #endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () - int yystacksize = YYINITDEPTH; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; #endif #endif +{ + /* The look-ahead symbol. */ +int yychar; - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; - int yylen; +/* Number of syntax errors so far. */ +int yynerrs; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + yystate = 0; yyerrstatus = 0; yynerrs = 0; @@ -818,450 +1584,435 @@ yyparse(YYPARSE_PARAM) so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss - 1; + yyssp = yyss; yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: + goto yysetstate; - *++yyssp = yystate; +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; - if (yyssp >= yyss + yystacksize - 1) + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; + YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - return 2; - } + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; - yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); -#endif + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif #endif /* no yyoverflow */ - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - if (yyssp >= yyss + yystacksize - 1) + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); goto yybackup; - yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ +/*-----------. +| yybackup. | +`-----------*/ +yybackup: - /* First try to decide what to do without reference to lookahead token. */ + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ + /* Not known => get a look-ahead token if don't already have one. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif + YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) + if (yyn <= 0) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the token being shifted unless it is eof. */ + /* Discard the shifted token unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; -/* Do the default action for the current state. */ -yydefault: +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; + goto yyreduce; -/* Do a reduction. yyn is the number of a rule to reduce with. */ + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ yyreduce: + /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ -#if YYDEBUG != 0 - if (yydebug) + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) { - int i; + case 8: +#line 290 "./Engine/Base/Parser.y" + { + (yyval.ulFlags) = 0; +;} + break; - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); + case 9: +#line 293 "./Engine/Base/Parser.y" + { + (yyval.ulFlags) = (yyvsp[(1) - (2)].ulFlags) | SSF_CONSTANT; +;} + break; - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif + case 10: +#line 296 "./Engine/Base/Parser.y" + { + (yyval.ulFlags) = (yyvsp[(1) - (2)].ulFlags) | SSF_USER; +;} + break; + case 11: +#line 299 "./Engine/Base/Parser.y" + { + (yyval.ulFlags) = (yyvsp[(1) - (2)].ulFlags) | SSF_PERSISTENT; +;} + break; - switch (yyn) { + case 12: +#line 302 "./Engine/Base/Parser.y" + { + (yyval.ulFlags) = (yyvsp[(1) - (2)].ulFlags) | SSF_EXTERNAL; +;} + break; -case 7: -#line 285 "engine/base/parser.y" -{ - yyval.ulFlags = 0; -; - break;} -case 8: -#line 288 "engine/base/parser.y" -{ - yyval.ulFlags = yyvsp[-1].ulFlags | SSF_CONSTANT; -; - break;} -case 9: -#line 291 "engine/base/parser.y" -{ - yyval.ulFlags = yyvsp[-1].ulFlags | SSF_USER; -; - break;} -case 10: -#line 294 "engine/base/parser.y" -{ - yyval.ulFlags = yyvsp[-1].ulFlags | SSF_PERSISTENT; -; - break;} -case 11: -#line 297 "engine/base/parser.y" -{ - yyval.ulFlags = yyvsp[-1].ulFlags | SSF_EXTERNAL; -; - break;} -case 12: -#line 302 "engine/base/parser.y" -{ - yyval.val.strString = ""; -; - break;} -case 13: -#line 305 "engine/base/parser.y" -{ + case 13: +#line 307 "./Engine/Base/Parser.y" + { + (yyval.val).strString = ""; +;} + break; + + case 14: +#line 310 "./Engine/Base/Parser.y" + { // !!!! remove this option //_pShell->ErrorF("Warning: symbol comments are not supported"); - yyval.val.strString = yyvsp[0].val.strString; -; - break;} -case 14: -#line 312 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewFloat(); -; - break;} -case 15: -#line 315 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewIndex(); -; - break;} -case 16: -#line 318 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewString(); -; - break;} -case 17: -#line 321 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewVoid(); -; - break;} -case 18: -#line 326 "engine/base/parser.y" -{ - yyval.pPreFunc = NULL; -; - break;} -case 19: -#line 329 "engine/base/parser.y" -{ - if (_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_sttType!=STT_FUNCTION - ||_shell_ast[_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istBaseType].st_sttType!=STT_INDEX - ||_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istFirstArgument!=_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istLastArgument - ||_shell_ast[_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istFirstArgument].st_sttType!=STT_INDEX) { - _pShell->ErrorF("'%s' must return 'INDEX' and take 'INDEX' as input", yyvsp[0].pssSymbol->ss_strName); + (yyval.val).strString = (yyvsp[(1) - (1)].val).strString; +;} + break; + + case 15: +#line 317 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewFloat(); +;} + break; + + case 16: +#line 320 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewIndex(); +;} + break; + + case 17: +#line 323 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewString(); +;} + break; + + case 18: +#line 326 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewVoid(); +;} + break; + + case 19: +#line 331 "./Engine/Base/Parser.y" + { + (yyval.pPreFunc) = NULL; +;} + break; + + case 20: +#line 334 "./Engine/Base/Parser.y" + { + if (_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_sttType!=STT_FUNCTION + ||_shell_ast[_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istBaseType].st_sttType!=STT_INDEX + ||_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istFirstArgument!=_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istLastArgument + ||_shell_ast[_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istFirstArgument].st_sttType!=STT_INDEX) { + _pShell->ErrorF("'%s' must return 'INDEX' and take 'INDEX' as input", (const char *) (yyvsp[(3) - (3)].pssSymbol)->ss_strName); } else { - void *pv = yyvsp[0].pssSymbol->ss_pvValue; - yyval.pPreFunc = (INDEX(*)(INDEX))yyvsp[0].pssSymbol->ss_pvValue; + void *pv = (yyvsp[(3) - (3)].pssSymbol)->ss_pvValue; + (yyval.pPreFunc) = (INDEX(*)(INDEX))(yyvsp[(3) - (3)].pssSymbol)->ss_pvValue; } -; - break;} -case 20: -#line 342 "engine/base/parser.y" -{ - yyval.pPostFunc = NULL; -; - break;} -case 21: -#line 345 "engine/base/parser.y" -{ - if (_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_sttType!=STT_FUNCTION - ||_shell_ast[_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istBaseType].st_sttType!=STT_VOID - ||_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istFirstArgument!=_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istLastArgument - ||_shell_ast[_shell_ast[yyvsp[0].pssSymbol->ss_istType].st_istFirstArgument].st_sttType!=STT_INDEX) { - _pShell->ErrorF("'%s' must return 'void' and take 'INDEX' as input", yyvsp[0].pssSymbol->ss_strName); +;} + break; + + case 21: +#line 347 "./Engine/Base/Parser.y" + { + (yyval.pPostFunc) = NULL; +;} + break; + + case 22: +#line 350 "./Engine/Base/Parser.y" + { + if (_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_sttType!=STT_FUNCTION + ||_shell_ast[_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istBaseType].st_sttType!=STT_VOID + ||_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istFirstArgument!=_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istLastArgument + ||_shell_ast[_shell_ast[(yyvsp[(3) - (3)].pssSymbol)->ss_istType].st_istFirstArgument].st_sttType!=STT_INDEX) { + _pShell->ErrorF("'%s' must return 'void' and take 'INDEX' as input", (const char *) (yyvsp[(3) - (3)].pssSymbol)->ss_strName); } else { - yyval.pPostFunc = (void(*)(INDEX))yyvsp[0].pssSymbol->ss_pvValue; + (yyval.pPostFunc) = (void(*)(INDEX))(yyvsp[(3) - (3)].pssSymbol)->ss_pvValue; } -; - break;} -case 22: -#line 358 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewFunction(0); - ShellTypeAddFunctionArgument(yyval.istType, ShellTypeNewVoid()); -; - break;} -case 23: -#line 362 "engine/base/parser.y" -{ - yyval.istType = yyvsp[0].istType; -; - break;} -case 24: -#line 368 "engine/base/parser.y" -{ - yyval.istType = ShellTypeNewFunction(0); - ShellTypeAddFunctionArgument(yyval.istType, yyvsp[0].istType); -; - break;} -case 25: -#line 376 "engine/base/parser.y" -{ - yyval.istType = yyvsp[-2].istType; - ShellTypeAddFunctionArgument(yyval.istType, yyvsp[0].istType); -; - break;} -case 26: -#line 387 "engine/base/parser.y" -{ - Declaration(yyvsp[-6].ulFlags, yyvsp[-5].istType, *yyvsp[-4].pssSymbol, yyvsp[-3].pPreFunc, yyvsp[-2].pPostFunc); - ShellTypeDelete(yyvsp[-5].istType); -; - break;} -case 27: -#line 391 "engine/base/parser.y" -{ +;} + break; + + case 23: +#line 363 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewFunction(0); + ShellTypeAddFunctionArgument((yyval.istType), ShellTypeNewVoid()); +;} + break; + + case 24: +#line 367 "./Engine/Base/Parser.y" + { + (yyval.istType) = (yyvsp[(1) - (1)].istType); +;} + break; + + case 25: +#line 373 "./Engine/Base/Parser.y" + { + (yyval.istType) = ShellTypeNewFunction(0); + ShellTypeAddFunctionArgument((yyval.istType), (yyvsp[(1) - (1)].istType)); +;} + break; + + case 26: +#line 381 "./Engine/Base/Parser.y" + { + (yyval.istType) = (yyvsp[(1) - (3)].istType); + ShellTypeAddFunctionArgument((yyval.istType), (yyvsp[(3) - (3)].istType)); +;} + break; + + case 27: +#line 392 "./Engine/Base/Parser.y" + { + Declaration((yyvsp[(1) - (7)].ulFlags), (yyvsp[(2) - (7)].istType), *(yyvsp[(3) - (7)].pssSymbol), (yyvsp[(4) - (7)].pPreFunc), (yyvsp[(5) - (7)].pPostFunc)); + ShellTypeDelete((yyvsp[(2) - (7)].istType)); +;} + break; + + case 28: +#line 396 "./Engine/Base/Parser.y" + { // take function from the parameter list and set its return type - _shell_ast[yyvsp[-3].istType].st_istBaseType = yyvsp[-6].istType; - yyvsp[-6].istType = yyvsp[-3].istType; + _shell_ast[(yyvsp[(5) - (8)].istType)].st_istBaseType = (yyvsp[(2) - (8)].istType); + (yyvsp[(2) - (8)].istType) = (yyvsp[(5) - (8)].istType); // declare it - Declaration(yyvsp[-7].ulFlags, yyvsp[-6].istType, *yyvsp[-5].pssSymbol, NULL, NULL); + Declaration((yyvsp[(1) - (8)].ulFlags), (yyvsp[(2) - (8)].istType), *(yyvsp[(3) - (8)].pssSymbol), NULL, NULL); // free the type (declaration will make a copy) - ShellTypeDelete(yyvsp[-6].istType); -; - break;} -case 28: -#line 400 "engine/base/parser.y" -{ - if (yyvsp[-5].val.sttType!=STT_INDEX) { + ShellTypeDelete((yyvsp[(2) - (8)].istType)); +;} + break; + + case 29: +#line 405 "./Engine/Base/Parser.y" + { + if ((yyvsp[(5) - (10)].val).sttType!=STT_INDEX) { _pShell->ErrorF("Array size is not integral"); } - yyvsp[-8].istType = ShellTypeNewArray(yyvsp[-8].istType, yyvsp[-5].val.iIndex); - Declaration(yyvsp[-9].ulFlags, yyvsp[-8].istType, *yyvsp[-7].pssSymbol, NULL, NULL); - ShellTypeDelete(yyvsp[-8].istType); -; - break;} -case 29: -#line 410 "engine/base/parser.y" -{ + (yyvsp[(2) - (10)].istType) = ShellTypeNewArray((yyvsp[(2) - (10)].istType), (yyvsp[(5) - (10)].val).iIndex); + Declaration((yyvsp[(1) - (10)].ulFlags), (yyvsp[(2) - (10)].istType), *(yyvsp[(3) - (10)].pssSymbol), NULL, NULL); + ShellTypeDelete((yyvsp[(2) - (10)].istType)); +;} + break; + + case 30: +#line 415 "./Engine/Base/Parser.y" + { // dummy -; - break;} -case 30: -#line 413 "engine/base/parser.y" -{ +;} + break; + + case 31: +#line 418 "./Engine/Base/Parser.y" + { // dummy -; - break;} -case 31: -#line 416 "engine/base/parser.y" -{ +;} + break; + + case 32: +#line 421 "./Engine/Base/Parser.y" + { // print its value - if (yyvsp[-1].val.sttType == STT_VOID) { + if ((yyvsp[(1) - (2)].val).sttType == STT_VOID) { NOTHING; - } else if (yyvsp[-1].val.sttType == STT_FLOAT) { - CPrintF("%g\n", yyvsp[-1].val.fFloat); - } else if (yyvsp[-1].val.sttType == STT_STRING) { - CPrintF("\"%s\"\n", yyvsp[-1].val.strString); - } else if (yyvsp[-1].val.sttType == STT_INDEX) { - CPrintF("%d(0x%08X)\n", yyvsp[-1].val.iIndex, yyvsp[-1].val.iIndex); + } else if ((yyvsp[(1) - (2)].val).sttType == STT_FLOAT) { + CPrintF("%g\n", (yyvsp[(1) - (2)].val).fFloat); + } else if ((yyvsp[(1) - (2)].val).sttType == STT_STRING) { + CPrintF("\"%s\"\n", (yyvsp[(1) - (2)].val).strString); + } else if ((yyvsp[(1) - (2)].val).sttType == STT_INDEX) { + CPrintF("%d(0x%08X)\n", (yyvsp[(1) - (2)].val).iIndex, (yyvsp[(1) - (2)].val).iIndex); } else { _pShell->ErrorF("Expression cannot be printed"); } -; - break;} -case 32: -#line 430 "engine/base/parser.y" -{ +;} + break; + + case 33: +#line 435 "./Engine/Base/Parser.y" + { // if it is constant - if (yyvsp[-3].lvLValue.lv_pssSymbol->ss_ulFlags&SSF_CONSTANT) { - _pShell->ErrorF("Symbol '%s' is a constant", yyvsp[-3].lvLValue.lv_pssSymbol->ss_strName); + if ((yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_ulFlags&SSF_CONSTANT) { + _pShell->ErrorF("Symbol '%s' is a constant", (const char *) (yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_strName); // if it is not constant } else { // if it can be changed - if (yyvsp[-3].lvLValue.lv_pssSymbol->ss_pPreFunc==NULL || yyvsp[-3].lvLValue.lv_pssSymbol->ss_pPreFunc(yyvsp[-3].lvLValue.lv_pvAddress)) { + if ((yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_pPreFunc==NULL || (yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_pPreFunc((yyvsp[(1) - (4)].lvLValue).lv_pvAddress)) { // if floats - if (yyvsp[-3].lvLValue.lv_sttType == STT_FLOAT && yyvsp[-1].val.sttType==STT_FLOAT) { + if ((yyvsp[(1) - (4)].lvLValue).lv_sttType == STT_FLOAT && (yyvsp[(3) - (4)].val).sttType==STT_FLOAT) { // assign value - *(FLOAT*)yyvsp[-3].lvLValue.lv_pvAddress = yyvsp[-1].val.fFloat; + *(FLOAT*)(yyvsp[(1) - (4)].lvLValue).lv_pvAddress = (yyvsp[(3) - (4)].val).fFloat; // if indices - } else if (yyvsp[-3].lvLValue.lv_sttType == STT_INDEX && yyvsp[-1].val.sttType==STT_INDEX) { + } else if ((yyvsp[(1) - (4)].lvLValue).lv_sttType == STT_INDEX && (yyvsp[(3) - (4)].val).sttType==STT_INDEX) { // assign value - *(INDEX*)yyvsp[-3].lvLValue.lv_pvAddress = yyvsp[-1].val.iIndex; + *(INDEX*)(yyvsp[(1) - (4)].lvLValue).lv_pvAddress = (yyvsp[(3) - (4)].val).iIndex; // if strings - } else if (yyvsp[-3].lvLValue.lv_sttType == STT_STRING && yyvsp[-1].val.sttType==STT_STRING) { + } else if ((yyvsp[(1) - (4)].lvLValue).lv_sttType == STT_STRING && (yyvsp[(3) - (4)].val).sttType==STT_STRING) { // assign value - *(CTString*)yyvsp[-3].lvLValue.lv_pvAddress = yyvsp[-1].val.strString; + *(CTString*)(yyvsp[(1) - (4)].lvLValue).lv_pvAddress = (yyvsp[(3) - (4)].val).strString; // if assigning index to float - } else if (yyvsp[-3].lvLValue.lv_sttType == STT_FLOAT && yyvsp[-1].val.sttType==STT_INDEX) { - *(FLOAT*)yyvsp[-3].lvLValue.lv_pvAddress = yyvsp[-1].val.iIndex; + } else if ((yyvsp[(1) - (4)].lvLValue).lv_sttType == STT_FLOAT && (yyvsp[(3) - (4)].val).sttType==STT_INDEX) { + *(FLOAT*)(yyvsp[(1) - (4)].lvLValue).lv_pvAddress = (yyvsp[(3) - (4)].val).iIndex; // otherwise } else { // error @@ -1269,171 +2020,183 @@ case 32: } // call post-change function - if (yyvsp[-3].lvLValue.lv_pssSymbol->ss_pPostFunc!=NULL) { - yyvsp[-3].lvLValue.lv_pssSymbol->ss_pPostFunc(yyvsp[-3].lvLValue.lv_pvAddress); + if ((yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_pPostFunc!=NULL) { + (yyvsp[(1) - (4)].lvLValue).lv_pssSymbol->ss_pPostFunc((yyvsp[(1) - (4)].lvLValue).lv_pvAddress); } } } -; - break;} -case 33: -#line 468 "engine/base/parser.y" -{ - Declaration(yyvsp[-5].ulFlags, yyvsp[-4].istType, *yyvsp[-3].pssSymbol, NULL, NULL); - ShellTypeDelete(yyvsp[-4].istType); +;} + break; - CShellSymbol &ssSymbol = *yyvsp[-3].pssSymbol; + case 34: +#line 473 "./Engine/Base/Parser.y" + { + Declaration((yyvsp[(1) - (6)].ulFlags), (yyvsp[(2) - (6)].istType), *(yyvsp[(3) - (6)].pssSymbol), NULL, NULL); + ShellTypeDelete((yyvsp[(2) - (6)].istType)); + + CShellSymbol &ssSymbol = *(yyvsp[(3) - (6)].pssSymbol); // if it is constant if (ssSymbol.ss_ulFlags&SSF_CONSTANT) { // error - _pShell->ErrorF("Symbol '%s' is a constant", ssSymbol.ss_strName); + _pShell->ErrorF("Symbol '%s' is a constant", (const char *) ssSymbol.ss_strName); } // get symbol type - ShellTypeType stt = _shell_ast[yyvsp[-4].istType].st_sttType; + ShellTypeType stt = _shell_ast[(yyvsp[(2) - (6)].istType)].st_sttType; // if floats - if (stt == STT_FLOAT && yyvsp[-1].val.sttType==STT_FLOAT) { + if (stt == STT_FLOAT && (yyvsp[(5) - (6)].val).sttType==STT_FLOAT) { // assign value - *(FLOAT*)ssSymbol.ss_pvValue = yyvsp[-1].val.fFloat; + *(FLOAT*)ssSymbol.ss_pvValue = (yyvsp[(5) - (6)].val).fFloat; // if indices - } else if (stt == STT_INDEX && yyvsp[-1].val.sttType==STT_INDEX) { + } else if (stt == STT_INDEX && (yyvsp[(5) - (6)].val).sttType==STT_INDEX) { // assign value - *(INDEX*)ssSymbol.ss_pvValue = yyvsp[-1].val.iIndex; + *(INDEX*)ssSymbol.ss_pvValue = (yyvsp[(5) - (6)].val).iIndex; // if strings - } else if (stt == STT_STRING && yyvsp[-1].val.sttType==STT_STRING) { + } else if (stt == STT_STRING && (yyvsp[(5) - (6)].val).sttType==STT_STRING) { // assign value - *(CTString*)ssSymbol.ss_pvValue = yyvsp[-1].val.strString; + *(CTString*)ssSymbol.ss_pvValue = (yyvsp[(5) - (6)].val).strString; // !!!! remove this conversion - } else if (stt == STT_FLOAT && yyvsp[-1].val.sttType==STT_INDEX) { + } else if (stt == STT_FLOAT && (yyvsp[(5) - (6)].val).sttType==STT_INDEX) { _pShell->ErrorF("Warning: assigning INDEX to FLOAT!"); - *(FLOAT*)ssSymbol.ss_pvValue = yyvsp[-1].val.iIndex; + *(FLOAT*)ssSymbol.ss_pvValue = (yyvsp[(5) - (6)].val).iIndex; } else { - _pShell->ErrorF("Symbol '%s' and its initializer have different types", ssSymbol.ss_strName); + _pShell->ErrorF("Symbol '%s' and its initializer have different types", (const char *) ssSymbol.ss_strName); } -; - break;} -case 34: -#line 502 "engine/base/parser.y" -{ +;} + break; + + case 35: +#line 507 "./Engine/Base/Parser.y" + { extern void PrintShellSymbolHelp(const CTString &strSymbol); - PrintShellSymbolHelp(yyvsp[0].pssSymbol->ss_strName); -; - break;} -case 35: -#line 506 "engine/base/parser.y" -{ + PrintShellSymbolHelp((yyvsp[(2) - (2)].pssSymbol)->ss_strName); +;} + break; + + case 36: +#line 511 "./Engine/Base/Parser.y" + { extern void PrintShellSymbolHelp(const CTString &strSymbol); - PrintShellSymbolHelp(yyvsp[-2].pssSymbol->ss_strName); -; - break;} -case 36: -#line 510 "engine/base/parser.y" -{ + PrintShellSymbolHelp((yyvsp[(2) - (4)].pssSymbol)->ss_strName); +;} + break; + + case 37: +#line 515 "./Engine/Base/Parser.y" + { extern void PrintShellSymbolHelp(const CTString &strSymbol); - PrintShellSymbolHelp(yyvsp[-2].pssSymbol->ss_strName); -; - break;} -case 37: -#line 514 "engine/base/parser.y" -{ + PrintShellSymbolHelp((yyvsp[(2) - (4)].pssSymbol)->ss_strName); +;} + break; + + case 38: +#line 519 "./Engine/Base/Parser.y" + { _bExecNextBlock = FALSE; - if (yyvsp[-1].val.sttType == STT_INDEX) { - _bExecNextBlock = yyvsp[-1].val.iIndex!=0; - } else if (yyvsp[-1].val.sttType == STT_FLOAT) { - _bExecNextBlock = yyvsp[-1].val.fFloat!=0; + if ((yyvsp[(3) - (4)].val).sttType == STT_INDEX) { + _bExecNextBlock = (yyvsp[(3) - (4)].val).iIndex!=0; + } else if ((yyvsp[(3) - (4)].val).sttType == STT_FLOAT) { + _bExecNextBlock = (yyvsp[(3) - (4)].val).fFloat!=0; } else { _pShell->ErrorF("If expression is not integral"); } - yyvsp[-3].ulFlags = _bExecNextBlock; -; - break;} -case 38: -#line 524 "engine/base/parser.y" -{ - _bExecNextElse = !yyvsp[-5].ulFlags; + (yyvsp[(1) - (4)].ulFlags) = _bExecNextBlock; +;} + break; + + case 39: +#line 529 "./Engine/Base/Parser.y" + { + _bExecNextElse = !(yyvsp[(1) - (6)].ulFlags); _bExecNextBlock = TRUE; -; - break;} -case 41: -#line 533 "engine/base/parser.y" -{ +;} + break; + + case 42: +#line 538 "./Engine/Base/Parser.y" + { if (_bExecNextElse) { _bExecNextBlock = FALSE; - if (yyvsp[-1].val.sttType == STT_INDEX) { - _bExecNextBlock = yyvsp[-1].val.iIndex!=0; - } else if (yyvsp[-1].val.sttType == STT_FLOAT) { - _bExecNextBlock = yyvsp[-1].val.fFloat!=0; + if ((yyvsp[(3) - (4)].val).sttType == STT_INDEX) { + _bExecNextBlock = (yyvsp[(3) - (4)].val).iIndex!=0; + } else if ((yyvsp[(3) - (4)].val).sttType == STT_FLOAT) { + _bExecNextBlock = (yyvsp[(3) - (4)].val).fFloat!=0; } else { _pShell->ErrorF("If expression is not integral"); } - yyvsp[-3].ulFlags = _bExecNextBlock; + (yyvsp[(1) - (4)].ulFlags) = _bExecNextBlock; } else { _bExecNextBlock = FALSE; _bExecNextElse = FALSE; - yyvsp[-3].ulFlags = TRUE; + (yyvsp[(1) - (4)].ulFlags) = TRUE; } -; - break;} -case 42: -#line 549 "engine/base/parser.y" -{ - _bExecNextElse = !yyvsp[-5].ulFlags; +;} + break; + + case 43: +#line 554 "./Engine/Base/Parser.y" + { + _bExecNextElse = !(yyvsp[(1) - (6)].ulFlags); _bExecNextBlock = TRUE; -; - break;} -case 44: -#line 554 "engine/base/parser.y" -{ +;} + break; + + case 45: +#line 559 "./Engine/Base/Parser.y" + { _bExecNextBlock = _bExecNextElse; -; - break;} -case 45: -#line 556 "engine/base/parser.y" -{ +;} + break; + + case 46: +#line 561 "./Engine/Base/Parser.y" + { _bExecNextBlock = TRUE; -; - break;} -case 46: -#line 562 "engine/base/parser.y" -{ - CShellSymbol &ssSymbol = *yyvsp[0].pssSymbol; +;} + break; + + case 47: +#line 567 "./Engine/Base/Parser.y" + { + CShellSymbol &ssSymbol = *(yyvsp[(1) - (1)].pssSymbol); const ShellType &stType = _shell_ast[ssSymbol.ss_istType]; - yyval.lvLValue.lv_pssSymbol = &ssSymbol; + (yyval.lvLValue).lv_pssSymbol = &ssSymbol; if (!ssSymbol.IsDeclared()) { // error - _pShell->ErrorF("Identifier '%s' is not declared", yyvsp[0].pssSymbol->ss_strName); + _pShell->ErrorF("Identifier '%s' is not declared", (const char *) (yyvsp[(1) - (1)].pssSymbol)->ss_strName); fDummy = -666; - yyval.lvLValue.lv_sttType = STT_VOID; - yyval.lvLValue.lv_pvAddress = &fDummy; + (yyval.lvLValue).lv_sttType = STT_VOID; + (yyval.lvLValue).lv_pvAddress = &fDummy; // if the identifier is a float, int or string } else if (stType.st_sttType==STT_FLOAT || stType.st_sttType==STT_INDEX || stType.st_sttType==STT_STRING) { // get its value and type - yyval.lvLValue.lv_sttType = stType.st_sttType; - yyval.lvLValue.lv_pvAddress = ssSymbol.ss_pvValue; + (yyval.lvLValue).lv_sttType = stType.st_sttType; + (yyval.lvLValue).lv_pvAddress = ssSymbol.ss_pvValue; // if the identifier is something else } else { // error - _pShell->ErrorF("'%s' doesn't have a value", yyvsp[0].pssSymbol->ss_strName); + _pShell->ErrorF("'%s' doesn't have a value", (const char *) (yyvsp[(1) - (1)].pssSymbol)->ss_strName); fDummy = -666.0f; - yyval.lvLValue.lv_sttType = STT_VOID; - yyval.lvLValue.lv_pvAddress = &fDummy; + (yyval.lvLValue).lv_sttType = STT_VOID; + (yyval.lvLValue).lv_pvAddress = &fDummy; } -; - break;} -case 47: -#line 587 "engine/base/parser.y" -{ - CShellSymbol &ssSymbol = *yyvsp[-3].pssSymbol; +;} + break; + + case 48: +#line 592 "./Engine/Base/Parser.y" + { + CShellSymbol &ssSymbol = *(yyvsp[(1) - (4)].pssSymbol); const ShellType &stType = _shell_ast[ssSymbol.ss_istType]; - yyval.lvLValue.lv_pssSymbol = &ssSymbol; + (yyval.lvLValue).lv_pssSymbol = &ssSymbol; int iIndex = 0; // if subscript is index - if (yyvsp[-1].val.sttType==STT_INDEX) { + if ((yyvsp[(3) - (4)].val).sttType==STT_INDEX) { // get the index - iIndex = yyvsp[-1].val.iIndex; + iIndex = (yyvsp[(3) - (4)].val).iIndex; // if subscript is not index } else { // error @@ -1448,710 +2211,788 @@ case 47: if (iIndex<0 || iIndex>=stType.st_ctArraySize) { _pShell->ErrorF("Array member out of range"); fDummy = -666.0f; - yyval.lvLValue.lv_pvAddress = &fDummy; + (yyval.lvLValue).lv_pvAddress = &fDummy; } else { // get its value and type - yyval.lvLValue.lv_sttType = stBase.st_sttType; - yyval.lvLValue.lv_pvAddress = (FLOAT*)ssSymbol.ss_pvValue+iIndex; + (yyval.lvLValue).lv_sttType = stBase.st_sttType; + (yyval.lvLValue).lv_pvAddress = (FLOAT*)ssSymbol.ss_pvValue+iIndex; } } } else { - _pShell->ErrorF("'%s[]' doesn't have a value", yyvsp[-3].pssSymbol->ss_strName); + _pShell->ErrorF("'%s[]' doesn't have a value", (const char *) (yyvsp[(1) - (4)].pssSymbol)->ss_strName); fDummy = -666.0f; - yyval.lvLValue.lv_pvAddress = &fDummy; + (yyval.lvLValue).lv_pvAddress = &fDummy; } -; - break;} -case 48: -#line 627 "engine/base/parser.y" -{ - yyval.arg.istType = ShellTypeNewFunction(ShellTypeNewVoid()); - ShellTypeAddFunctionArgument(yyval.arg.istType, ShellTypeNewVoid()); - yyval.arg.ctBytes = 0; -; - break;} -case 49: -#line 632 "engine/base/parser.y" -{ - yyval.arg = yyvsp[0].arg; -; - break;} -case 50: -#line 638 "engine/base/parser.y" -{ - yyval.arg.istType = ShellTypeNewFunction(ShellTypeNewVoid()); - ShellTypeAddFunctionArgument(yyval.arg.istType, ShellTypeNewByType(yyvsp[0].val.sttType)); - yyval.arg.ctBytes = PushExpression(yyvsp[0].val); -; - break;} -case 51: -#line 643 "engine/base/parser.y" -{ - yyval.arg = yyvsp[-2].arg; - ShellTypeAddFunctionArgument(yyval.arg.istType, ShellTypeNewByType(yyvsp[0].val.sttType)); - yyval.arg.ctBytes += PushExpression(yyvsp[0].val); -; - break;} -case 52: -#line 650 "engine/base/parser.y" -{ - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = yyvsp[0].val.fFloat; -; - break;} -case 53: -#line 654 "engine/base/parser.y" -{ - yyval.val.sttType = STT_INDEX; - yyval.val.iIndex = yyvsp[0].val.iIndex; -; - break;} -case 54: -#line 658 "engine/base/parser.y" -{ - yyval.val.sttType = STT_STRING; - yyval.val.strString = yyvsp[0].val.strString; -; - break;} -case 55: -#line 662 "engine/base/parser.y" -{ +;} + break; + + case 49: +#line 632 "./Engine/Base/Parser.y" + { + (yyval.arg).istType = ShellTypeNewFunction(ShellTypeNewVoid()); + ShellTypeAddFunctionArgument((yyval.arg).istType, ShellTypeNewVoid()); + (yyval.arg).ctBytes = 0; +;} + break; + + case 50: +#line 637 "./Engine/Base/Parser.y" + { + (yyval.arg) = (yyvsp[(1) - (1)].arg); +;} + break; + + case 51: +#line 643 "./Engine/Base/Parser.y" + { + (yyval.arg).istType = ShellTypeNewFunction(ShellTypeNewVoid()); + ShellTypeAddFunctionArgument((yyval.arg).istType, ShellTypeNewByType((yyvsp[(1) - (1)].val).sttType)); + (yyval.arg).ctBytes = PushExpression((yyvsp[(1) - (1)].val)); +;} + break; + + case 52: +#line 648 "./Engine/Base/Parser.y" + { + (yyval.arg) = (yyvsp[(1) - (3)].arg); + ShellTypeAddFunctionArgument((yyval.arg).istType, ShellTypeNewByType((yyvsp[(3) - (3)].val).sttType)); + (yyval.arg).ctBytes += PushExpression((yyvsp[(3) - (3)].val)); +;} + break; + + case 53: +#line 655 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = (yyvsp[(1) - (1)].val).fFloat; +;} + break; + + case 54: +#line 659 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = STT_INDEX; + (yyval.val).iIndex = (yyvsp[(1) - (1)].val).iIndex; +;} + break; + + case 55: +#line 663 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = STT_STRING; + (yyval.val).strString = (yyvsp[(1) - (1)].val).strString; +;} + break; + + case 56: +#line 667 "./Engine/Base/Parser.y" + { // get its value - yyval.val.sttType = yyvsp[0].lvLValue.lv_sttType; - if (yyvsp[0].lvLValue.lv_sttType==STT_VOID) { + (yyval.val).sttType = (yyvsp[(1) - (1)].lvLValue).lv_sttType; + if ((yyvsp[(1) - (1)].lvLValue).lv_sttType==STT_VOID) { NOTHING; - } else if (yyvsp[0].lvLValue.lv_sttType==STT_FLOAT) { - yyval.val.fFloat = *(FLOAT*)yyvsp[0].lvLValue.lv_pvAddress; - } else if (yyvsp[0].lvLValue.lv_sttType==STT_INDEX) { - yyval.val.iIndex = *(INDEX*)yyvsp[0].lvLValue.lv_pvAddress; - } else if (yyvsp[0].lvLValue.lv_sttType==STT_STRING) { - yyval.val.strString = (const char*)*(CTString*)yyvsp[0].lvLValue.lv_pvAddress; + } else if ((yyvsp[(1) - (1)].lvLValue).lv_sttType==STT_FLOAT) { + (yyval.val).fFloat = *(FLOAT*)(yyvsp[(1) - (1)].lvLValue).lv_pvAddress; + } else if ((yyvsp[(1) - (1)].lvLValue).lv_sttType==STT_INDEX) { + (yyval.val).iIndex = *(INDEX*)(yyvsp[(1) - (1)].lvLValue).lv_pvAddress; + } else if ((yyvsp[(1) - (1)].lvLValue).lv_sttType==STT_STRING) { + (yyval.val).strString = (const char*)*(CTString*)(yyvsp[(1) - (1)].lvLValue).lv_pvAddress; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; - _pShell->ErrorF("'%s' is of wrong type", yyvsp[0].lvLValue.lv_pssSymbol->ss_strName); + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; + _pShell->ErrorF("'%s' is of wrong type", (const char *) (yyvsp[(1) - (1)].lvLValue).lv_pssSymbol->ss_strName); } -; - break;} -case 56: -#line 680 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 57: +#line 685 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex<ErrorF("Wrong arguments for '<<'"); - yyval.val.sttType = STT_INDEX; - yyval.val.iIndex = -666; + (yyval.val).sttType = STT_INDEX; + (yyval.val).iIndex = -666; } -; - break;} -case 57: -#line 693 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 58: +#line 698 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex>>yyvsp[0].val.iIndex; + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex>>(yyvsp[(3) - (3)].val).iIndex; } else { _pShell->ErrorF("Wrong arguments for '>>'"); - yyval.val.sttType = STT_INDEX; - yyval.val.iIndex = -666; + (yyval.val).sttType = STT_INDEX; + (yyval.val).iIndex = -666; } -; - break;} -case 58: -#line 707 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 59: +#line 712 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'&' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex&yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex&(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 59: -#line 721 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 60: +#line 726 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'|' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex|yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex|(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 60: -#line 735 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 61: +#line 740 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'^' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex^yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex^(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 61: -#line 751 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 62: +#line 756 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'&&' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex&&yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex&&(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 62: -#line 765 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 63: +#line 770 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'||' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex||yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex||(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 63: -#line 780 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 64: +#line 785 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[-2].val.fFloat+yyvsp[0].val.fFloat; - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex+yyvsp[0].val.iIndex; - } else if (yyvsp[-2].val.sttType == STT_STRING) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(1) - (3)].val).fFloat+(yyvsp[(3) - (3)].val).fFloat; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex+(yyvsp[(3) - (3)].val).iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_STRING) { CTString &strNew = _shell_astrTempStrings.Push(); - strNew = CTString(yyvsp[-2].val.strString)+yyvsp[0].val.strString; - yyval.val.strString = (const char*)strNew; + strNew = CTString((yyvsp[(1) - (3)].val).strString)+(yyvsp[(3) - (3)].val).strString; + (yyval.val).strString = (const char*)strNew; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 64: -#line 799 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 65: +#line 804 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[-2].val.fFloat-yyvsp[0].val.fFloat; - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex-yyvsp[0].val.iIndex; + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(1) - (3)].val).fFloat-(yyvsp[(3) - (3)].val).fFloat; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex-(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 65: -#line 815 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 66: +#line 820 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[-2].val.fFloat*yyvsp[0].val.fFloat; - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex*yyvsp[0].val.iIndex; + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(1) - (3)].val).fFloat*(yyvsp[(3) - (3)].val).fFloat; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex*(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 66: -#line 831 "engine/base/parser.y" -{ +;} + break; - MatchTypes(yyvsp[-2].val, yyvsp[0].val); + case 67: +#line 836 "./Engine/Base/Parser.y" + { - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[-2].val.fFloat/yyvsp[0].val.fFloat; - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - if (yyvsp[0].val.iIndex==0) { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(1) - (3)].val).fFloat/(yyvsp[(3) - (3)].val).fFloat; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + if ((yyvsp[(3) - (3)].val).iIndex==0) { _pShell->ErrorF("Division by zero!\n"); - yyval.val.iIndex = 0; + (yyval.val).iIndex = 0; } else { - yyval.val.iIndex = yyvsp[-2].val.iIndex/yyvsp[0].val.iIndex; + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex/(yyvsp[(3) - (3)].val).iIndex; } } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 67: -#line 853 "engine/base/parser.y" -{ - MatchTypes(yyvsp[-2].val, yyvsp[0].val); +;} + break; - yyval.val.sttType = yyvsp[-2].val.sttType; - if (yyvsp[-2].val.sttType == STT_FLOAT) { + case 68: +#line 858 "./Engine/Base/Parser.y" + { + MatchTypes((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); + + (yyval.val).sttType = (yyvsp[(1) - (3)].val).sttType; + if ((yyvsp[(1) - (3)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'%' is illegal for FLOAT values"); - } else if (yyvsp[-2].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[-2].val.iIndex%yyvsp[0].val.iIndex; + } else if ((yyvsp[(1) - (3)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(1) - (3)].val).iIndex%(yyvsp[(3) - (3)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 68: -#line 869 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '<'); -; - break;} -case 69: -#line 872 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '>'); -; - break;} -case 70: -#line 875 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '='); -; - break;} -case 71: -#line 878 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '!'); -; - break;} -case 72: -#line 881 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '}'); -; - break;} -case 73: -#line 884 "engine/base/parser.y" -{ - DoComparison(yyval.val, yyvsp[-2].val, yyvsp[0].val, '{'); -; - break;} -case 74: -#line 890 "engine/base/parser.y" -{ - yyval.val.sttType = yyvsp[0].val.sttType; - if (yyvsp[0].val.sttType == STT_FLOAT) { - yyval.val.fFloat = -yyvsp[0].val.fFloat; - } else if (yyvsp[0].val.sttType == STT_INDEX) { - yyval.val.iIndex = -yyvsp[0].val.iIndex; +;} + break; + + case 69: +#line 874 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '<'); +;} + break; + + case 70: +#line 877 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '>'); +;} + break; + + case 71: +#line 880 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '='); +;} + break; + + case 72: +#line 883 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '!'); +;} + break; + + case 73: +#line 886 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '}'); +;} + break; + + case 74: +#line 889 "./Engine/Base/Parser.y" + { + DoComparison((yyval.val), (yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val), '{'); +;} + break; + + case 75: +#line 895 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = (yyvsp[(2) - (2)].val).sttType; + if ((yyvsp[(2) - (2)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = -(yyvsp[(2) - (2)].val).fFloat; + } else if ((yyvsp[(2) - (2)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = -(yyvsp[(2) - (2)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 75: -#line 904 "engine/base/parser.y" -{ - yyval.val.sttType = yyvsp[0].val.sttType; - if (yyvsp[0].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[0].val.fFloat; - } else if (yyvsp[0].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[0].val.iIndex; +;} + break; + + case 76: +#line 909 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = (yyvsp[(2) - (2)].val).sttType; + if ((yyvsp[(2) - (2)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(2) - (2)].val).fFloat; + } else if ((yyvsp[(2) - (2)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(2) - (2)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 76: -#line 916 "engine/base/parser.y" -{ - yyval.val.sttType = yyvsp[0].val.sttType; - if (yyvsp[0].val.sttType == STT_FLOAT) { +;} + break; + + case 77: +#line 921 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = (yyvsp[(2) - (2)].val).sttType; + if ((yyvsp[(2) - (2)].val).sttType == STT_FLOAT) { _pShell->ErrorF("'!' is illegal for FLOAT values"); - yyval.val.fFloat = yyvsp[0].val.fFloat; - } else if (yyvsp[0].val.sttType == STT_INDEX) { - yyval.val.iIndex = !yyvsp[0].val.iIndex; + (yyval.val).fFloat = (yyvsp[(2) - (2)].val).fFloat; + } else if ((yyvsp[(2) - (2)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = !(yyvsp[(2) - (2)].val).iIndex; } else { - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; } -; - break;} -case 77: -#line 929 "engine/base/parser.y" -{ - yyval.val.sttType = STT_FLOAT; - if (yyvsp[0].val.sttType == STT_FLOAT) { - yyval.val.fFloat = yyvsp[0].val.fFloat; - } else if (yyvsp[0].val.sttType == STT_INDEX) { - yyval.val.fFloat = FLOAT(yyvsp[0].val.iIndex); - } else if (yyvsp[0].val.sttType == STT_STRING) { - yyval.val.fFloat = atof(yyvsp[0].val.strString); +;} + break; + + case 78: +#line 934 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = STT_FLOAT; + if ((yyvsp[(4) - (4)].val).sttType == STT_FLOAT) { + (yyval.val).fFloat = (yyvsp[(4) - (4)].val).fFloat; + } else if ((yyvsp[(4) - (4)].val).sttType == STT_INDEX) { + (yyval.val).fFloat = FLOAT((yyvsp[(4) - (4)].val).iIndex); + } else if ((yyvsp[(4) - (4)].val).sttType == STT_STRING) { + (yyval.val).fFloat = atof((yyvsp[(4) - (4)].val).strString); } else { _pShell->ErrorF("Cannot convert to FLOAT"); - yyval.val.sttType = STT_VOID; + (yyval.val).sttType = STT_VOID; } -; - break;} -case 78: -#line 943 "engine/base/parser.y" -{ - yyval.val.sttType = STT_INDEX; - if (yyvsp[0].val.sttType == STT_FLOAT) { - yyval.val.iIndex = INDEX(yyvsp[0].val.fFloat); - } else if (yyvsp[0].val.sttType == STT_INDEX) { - yyval.val.iIndex = yyvsp[0].val.iIndex; - } else if (yyvsp[0].val.sttType == STT_STRING) { - yyval.val.iIndex = atol(yyvsp[0].val.strString); +;} + break; + + case 79: +#line 948 "./Engine/Base/Parser.y" + { + (yyval.val).sttType = STT_INDEX; + if ((yyvsp[(4) - (4)].val).sttType == STT_FLOAT) { + (yyval.val).iIndex = INDEX((yyvsp[(4) - (4)].val).fFloat); + } else if ((yyvsp[(4) - (4)].val).sttType == STT_INDEX) { + (yyval.val).iIndex = (yyvsp[(4) - (4)].val).iIndex; + } else if ((yyvsp[(4) - (4)].val).sttType == STT_STRING) { + (yyval.val).iIndex = atol((yyvsp[(4) - (4)].val).strString); } else { _pShell->ErrorF("Cannot convert to INDEX"); - yyval.val.sttType = STT_VOID; + (yyval.val).sttType = STT_VOID; } -; - break;} -case 79: -#line 957 "engine/base/parser.y" -{ +;} + break; + + case 80: +#line 962 "./Engine/Base/Parser.y" + { CTString &strNew = _shell_astrTempStrings.Push(); - yyval.val.sttType = STT_STRING; - if (yyvsp[0].val.sttType == STT_FLOAT) { - strNew.PrintF("%g", yyvsp[0].val.fFloat); - } else if (yyvsp[0].val.sttType == STT_INDEX) { - strNew.PrintF("%d", yyvsp[0].val.iIndex); - } else if (yyvsp[0].val.sttType == STT_STRING) { - strNew = yyvsp[0].val.strString; + (yyval.val).sttType = STT_STRING; + if ((yyvsp[(4) - (4)].val).sttType == STT_FLOAT) { + strNew.PrintF("%g", (yyvsp[(4) - (4)].val).fFloat); + } else if ((yyvsp[(4) - (4)].val).sttType == STT_INDEX) { + strNew.PrintF("%d", (yyvsp[(4) - (4)].val).iIndex); + } else if ((yyvsp[(4) - (4)].val).sttType == STT_STRING) { + strNew = (yyvsp[(4) - (4)].val).strString; } else { _pShell->ErrorF("Cannot convert to CTString"); - yyval.val.sttType = STT_VOID; + (yyval.val).sttType = STT_VOID; } - yyval.val.strString = (const char*)strNew; -; - break;} -case 80: -#line 974 "engine/base/parser.y" -{ + (yyval.val).strString = (const char*)strNew; +;} + break; + + case 81: +#line 979 "./Engine/Base/Parser.y" + { // if the identifier is not declared - if (!yyvsp[-3].pssSymbol->IsDeclared()) { + if (!(yyvsp[(1) - (4)].pssSymbol)->IsDeclared()) { // error - _pShell->ErrorF("Identifier '%s' is not declared", yyvsp[-3].pssSymbol->ss_strName); + _pShell->ErrorF("Identifier '%s' is not declared", (const char *) (yyvsp[(1) - (4)].pssSymbol)->ss_strName); // if the identifier is declared } else { // get its type - ShellType &stFunc = _shell_ast[yyvsp[-3].pssSymbol->ss_istType]; + ShellType &stFunc = _shell_ast[(yyvsp[(1) - (4)].pssSymbol)->ss_istType]; // if the identifier is a function if (stFunc.st_sttType==STT_FUNCTION) { // determine result type ShellType &stResult = _shell_ast[stFunc.st_istBaseType]; // match argument list result to that result - _shell_ast[_shell_ast[yyvsp[-1].arg.istType].st_istBaseType].st_sttType = stResult.st_sttType; + _shell_ast[_shell_ast[(yyvsp[(3) - (4)].arg).istType].st_istBaseType].st_sttType = stResult.st_sttType; // if types are same - if (ShellTypeIsSame(yyvsp[-1].arg.istType, yyvsp[-3].pssSymbol->ss_istType)) { + if (ShellTypeIsSame((yyvsp[(3) - (4)].arg).istType, (yyvsp[(1) - (4)].pssSymbol)->ss_istType)) { + bool callfunc = true; -#define PUSHPARAMS \ - memcpy(_alloca(yyvsp[-1].arg.ctBytes), _ubStack+_iStack-yyvsp[-1].arg.ctBytes, yyvsp[-1].arg.ctBytes); - - // if void - if (stResult.st_sttType==STT_VOID) { - // just call the function - yyval.val.sttType = STT_VOID; - //PUSHPARAMS; - ((void (*)(void*))yyvsp[-3].pssSymbol->ss_pvValue)(_ubStack+_iStack-yyvsp[-1].arg.ctBytes); - // if index - } else if (stResult.st_sttType==STT_INDEX) { - // call the function and return result - yyval.val.sttType = STT_INDEX; - PUSHPARAMS; - yyval.val.iIndex = ((INDEX (*)(void))yyvsp[-3].pssSymbol->ss_pvValue)(); - // if float - } else if (stResult.st_sttType==STT_FLOAT) { - // call the function and return result - yyval.val.sttType = STT_FLOAT; - PUSHPARAMS; - yyval.val.fFloat = ((FLOAT (*)(void))yyvsp[-3].pssSymbol->ss_pvValue)(); - // if string - } else if (stResult.st_sttType==STT_STRING) { - // call the function and return result - yyval.val.sttType = STT_STRING; - CTString &strNew = _shell_astrTempStrings.Push(); - PUSHPARAMS; - strNew = ((CTString (*)(void))yyvsp[-3].pssSymbol->ss_pvValue)(); - yyval.val.strString = (const char*)strNew; - } else { - ASSERT(FALSE); - yyval.val.sttType = STT_FLOAT; - yyval.val.fFloat = -666.0f; +// !!! FIXME: maybe just dump the win32 codepath here? This will break on Win64, and maybe break on different compilers/compiler versions, etc. +#ifdef PLATFORM_WIN32 + #define CALLPARAMS + #define FUNCSIG void + #define PUSHPARAMS memcpy(_alloca((yyvsp[(3) - (4)].arg).ctBytes), _ubStack+_iStack-(yyvsp[(3) - (4)].arg).ctBytes, (yyvsp[(3) - (4)].arg).ctBytes); +#else + // This is possibly more portable, but no less scary than the alloca hack. + #define MAXSCRIPTFUNCARGS 5 + void *ARG[MAXSCRIPTFUNCARGS]; + if (((yyvsp[(3) - (4)].arg).ctBytes > sizeof (ARG))) + { + _pShell->ErrorF("Function '%s' has too many arguments!", (const char *) (yyvsp[(1) - (4)].pssSymbol)->ss_strName); + callfunc = false; + } + else + { + memcpy(ARG, _ubStack+_iStack-(yyvsp[(3) - (4)].arg).ctBytes, (yyvsp[(3) - (4)].arg).ctBytes); + memset(((char *) ARG) + (yyvsp[(3) - (4)].arg).ctBytes, '\0', sizeof (ARG) - (yyvsp[(3) - (4)].arg).ctBytes); + } + #define PUSHPARAMS + #define FUNCSIG void*, void*, void*, void*, void* + #define CALLPARAMS ARG[0], ARG[1], ARG[2], ARG[3], ARG[4] +#endif + + if (callfunc) { + // if void + if (stResult.st_sttType==STT_VOID) { + // just call the function + (yyval.val).sttType = STT_VOID; + PUSHPARAMS; + ((void (*)(FUNCSIG))(yyvsp[(1) - (4)].pssSymbol)->ss_pvValue)(CALLPARAMS); + // if index + } else if (stResult.st_sttType==STT_INDEX) { + // call the function and return result + (yyval.val).sttType = STT_INDEX; + PUSHPARAMS; + (yyval.val).iIndex = ((INDEX (*)(FUNCSIG))(yyvsp[(1) - (4)].pssSymbol)->ss_pvValue)(CALLPARAMS); + // if float + } else if (stResult.st_sttType==STT_FLOAT) { + // call the function and return result + (yyval.val).sttType = STT_FLOAT; + PUSHPARAMS; + (yyval.val).fFloat = ((FLOAT (*)(FUNCSIG))(yyvsp[(1) - (4)].pssSymbol)->ss_pvValue)(CALLPARAMS); + // if string + } else if (stResult.st_sttType==STT_STRING) { + // call the function and return result + (yyval.val).sttType = STT_STRING; + CTString &strNew = _shell_astrTempStrings.Push(); + PUSHPARAMS; + strNew = ((CTString (*)(FUNCSIG))(yyvsp[(1) - (4)].pssSymbol)->ss_pvValue)(CALLPARAMS); + (yyval.val).strString = (const char*)strNew; + } else { + ASSERT(FALSE); + (yyval.val).sttType = STT_FLOAT; + (yyval.val).fFloat = -666.0f; + } } // if types are different } else { // error - yyval.val.sttType = STT_VOID; - _pShell->ErrorF("Wrong parameters for '%s'", yyvsp[-3].pssSymbol->ss_strName); + (yyval.val).sttType = STT_VOID; + _pShell->ErrorF("Wrong parameters for '%s'", (const char *) (yyvsp[(1) - (4)].pssSymbol)->ss_strName); } // if the identifier is something else } else { // error - yyval.val.sttType = STT_VOID; - _pShell->ErrorF("Can't call '%s'", yyvsp[-3].pssSymbol->ss_strName); + (yyval.val).sttType = STT_VOID; + _pShell->ErrorF("Can't call '%s'", (const char *) (yyvsp[(1) - (4)].pssSymbol)->ss_strName); } } // pop arguments and free type info - _iStack-=yyvsp[-1].arg.ctBytes; - ShellTypeDelete(yyvsp[-1].arg.istType); -; - break;} -case 81: -#line 1046 "engine/base/parser.y" -{ - yyval.val = yyvsp[-1].val; -; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 487 "bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif + _iStack-=(yyvsp[(3) - (4)].arg).ctBytes; + ShellTypeDelete((yyvsp[(3) - (4)].arg).istType); +;} + break; -#if YYDEBUG != 0 - if (yydebug) + case 82: +#line 1075 "./Engine/Base/Parser.y" { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); + (yyval.val) = (yyvsp[(2) - (3)].val); +;} + break; + + +/* Line 1267 of yacc.c. */ +#line 2783 "./Engine/Base/Parser.cpp" + default: break; } -#endif + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; -yyerrlab: /* here on detecting error */ - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) { ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ + if (yyerrstatus == 3) { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ - /* return failure if at end of input */ - if (yychar == YYEOF) + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) YYABORT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - yychar = YYEMPTY; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - if (yyn == YYFINAL) YYACCEPT; -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; -} -#line 1051 "engine/base/parser.y" + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 1080 "./Engine/Base/Parser.y" + diff --git a/Sources/Engine/Base/Scanner.cpp b/Sources/Engine/Base/Scanner.cpp index f60f4a2..351245e 100644 --- a/Sources/Engine/Base/Scanner.cpp +++ b/Sources/Engine/Base/Scanner.cpp @@ -1,54 +1,107 @@ -#line 2 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.cpp" -#include "StdH.h" +#line 2 "./Engine/Base/Scanner.cpp" + +#line 4 "./Engine/Base/Scanner.cpp" + +#define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.81 95/03/20 14:02:24 vern Exp $ - */ - #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 +/* end standard C headers. */ -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -//#ifdef c_plusplus -//#ifndef __cplusplus -//#define __cplusplus -//#endif -//#endif +/* flex integer type definitions */ -#if 1 //def __cplusplus +#ifndef FLEXINT_H +#define FLEXINT_H - #include +/* C99 systems have . Non-C99 systems may or may not. */ - /* Use prototypes in function declarations. */ - #define YY_USE_PROTOS +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - /* The "const" storage-class-modifier is valid. */ - #define YY_USE_CONST +/* 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; +typedef uint64_t flex_uint64_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST #else /* ! __cplusplus */ - #if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) - #define YY_USE_PROTOS - #define YY_USE_CONST - - #endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include #define YY_USE_CONST -#define YY_USE_PROTOS -#endif + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const @@ -56,13 +109,6 @@ #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 @@ -77,70 +123,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 yyrestart(yyin ) #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 + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; -extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + 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 + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext 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_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -156,7 +202,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -177,12 +223,16 @@ struct yy_buffer_state */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; + #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -196,120 +246,131 @@ struct yy_buffer_state * just pointing yyin 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. */ static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* 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 ... + * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); -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 yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_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(( const char *str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( const char *bytes, int len )); +#define YY_FLUSH_BUFFER yy_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 yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ typedef unsigned char YY_CHAR; + FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + extern char *yytext; #define yytext_ptr yytext -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -//static - void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, const char *, int )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -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(( const char msg[] )); +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + yyleng = (yy_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 50 #define YY_END_OF_BUFFER 51 -static yyconst short int yy_accept[165] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[165] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 51, 49, 47, 48, 29, 49, 49, 29, 29, 49, @@ -331,7 +392,7 @@ static yyconst short int yy_accept[165] = 36, 36, 13, 0 } ; -static yyconst int yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -363,7 +424,7 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[66] = +static yyconst flex_int32_t yy_meta[66] = { 0, 1, 1, 2, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, @@ -374,7 +435,7 @@ static yyconst int yy_meta[66] = 6, 1, 1, 1, 1 } ; -static yyconst short int yy_base[179] = +static yyconst flex_int16_t yy_base[179] = { 0, 0, 0, 63, 64, 65, 66, 68, 76, 81, 89, 323, 324, 71, 324, 298, 75, 0, 324, 312, 278, @@ -397,7 +458,7 @@ static yyconst short int yy_base[179] = 241, 244, 250, 256, 262, 265, 271, 274 } ; -static yyconst short int yy_def[179] = +static yyconst flex_int16_t yy_def[179] = { 0, 164, 1, 165, 165, 166, 166, 167, 167, 168, 168, 164, 164, 164, 164, 164, 169, 170, 164, 164, 171, @@ -420,7 +481,7 @@ static yyconst short int yy_def[179] = 164, 164, 164, 164, 164, 164, 164, 164 } ; -static yyconst short int yy_nxt[390] = +static yyconst flex_int16_t yy_nxt[390] = { 0, 12, 13, 14, 13, 15, 16, 17, 18, 19, 20, 18, 18, 18, 18, 18, 18, 18, 21, 22, 23, @@ -466,7 +527,7 @@ static yyconst short int yy_nxt[390] = 164, 164, 164, 164, 164, 164, 164, 164, 164 } ; -static yyconst short int yy_chk[390] = +static yyconst flex_int16_t yy_chk[390] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -515,16 +576,19 @@ static yyconst short int yy_chk[390] = static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int yy_flex_debug; +int yy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET char *yytext; -#line 1 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" -#define INITIAL 0 -#line 2 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 1 "./Engine/Base/Scanner.l" +#line 2 "./Engine/Base/Scanner.l" #include "ParsingSymbols.h" #include "Parser.h" @@ -539,6 +603,10 @@ char *yytext; #define YY_DECL int yylex (YYSTYPE *lvalp) #define yylval (*lvalp) +#ifdef __cplusplus +extern "C" { int yywrap(void); } +#endif + int yywrap(void) { // no more bufers @@ -579,53 +647,91 @@ void TranscriptEsc(CTString &str) *pchDst=0; } + + + + +#line 655 "./Engine/Base/Scanner.cpp" + +#define INITIAL 0 #define COMMENT 1 - #define DUMMYBLOCK 2 - #define INCLUDE 3 - #define COMMAND 4 -#line 591 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.cpp" +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ -#ifdef 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 )); +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap (void ); +#else +extern int yywrap (void ); #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 + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); #endif -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); #endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); #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). - */ +static int input (void ); #endif + #endif /* Amount of stuff to slurp up with each read. */ @@ -634,12 +740,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( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -647,9 +752,10 @@ YY_MALLOC_DECL */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -659,9 +765,22 @@ YY_MALLOC_DECL YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -682,12 +801,18 @@ YY_MALLOC_DECL #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -704,30 +829,32 @@ 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 75 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" + +#line 79 "./Engine/Base/Scanner.l" /*\0 yyterminate();*/ /* Include file parsing. */ -#line 720 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.cpp" +#line 847 "./Engine/Base/Scanner.cpp" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -735,34 +862,36 @@ YY_DECL if ( ! yyout ) yyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); /* Support of yytext. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -779,39 +908,38 @@ yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP -#line 80 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 84 "./Engine/Base/Scanner.l" BEGIN(INCLUDE); YY_BREAK case 2: YY_RULE_SETUP -#line 82 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 86 "./Engine/Base/Scanner.l" /* eat the whitespace until first quote */ YY_BREAK case 3: +/* rule 3 can match eol */ YY_RULE_SETUP -#line 83 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 87 "./Engine/Base/Scanner.l" { /* get the include file name until second quote */ if (ShellGetBufferStackDepth() >= SHELL_MAX_INCLUDE_LEVEL) { _pShell->ErrorF("Script files nested too deeply"); @@ -833,7 +961,7 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 101 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 105 "./Engine/Base/Scanner.l" { /* something unrecognized inside include statement */ _pShell->ErrorF("Wrong syntax for include statement"); BEGIN(INITIAL); @@ -841,8 +969,9 @@ YY_RULE_SETUP YY_BREAK /* command parsing */ case 5: +/* rule 5 can match eol */ YY_RULE_SETUP -#line 107 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 111 "./Engine/Base/Scanner.l" { // for each parameter _ctCmdParam++; CTString strParam = yytext; @@ -852,8 +981,8 @@ YY_RULE_SETUP if (strParam.FindSubstr(strParamNo)!=-1) { _pShell->ErrorF("Parameter substitution recursion detected!"); } else { - INDEX ctFound=0; - for(;; ctFound++) { + INDEX ctFound; + for(ctFound=0;; ctFound++) { if (!_strCmd.ReplaceSubstr(strParamNo, strParam)) { break; } @@ -868,8 +997,9 @@ YY_RULE_SETUP } YY_BREAK case 6: +/* rule 6 can match eol */ YY_RULE_SETUP -#line 130 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 134 "./Engine/Base/Scanner.l" { // at the end of the command @@ -883,7 +1013,7 @@ case YY_STATE_EOF(COMMENT): case YY_STATE_EOF(DUMMYBLOCK): case YY_STATE_EOF(INCLUDE): case YY_STATE_EOF(COMMAND): -#line 138 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 142 "./Engine/Base/Scanner.l" { if (ShellPopBuffer()) { yyterminate(); @@ -893,146 +1023,147 @@ case YY_STATE_EOF(COMMAND): /* special data types */ case 7: YY_RULE_SETUP -#line 145 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 149 "./Engine/Base/Scanner.l" { return(k_FLOAT);} YY_BREAK case 8: YY_RULE_SETUP -#line 146 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 150 "./Engine/Base/Scanner.l" { return(k_INDEX);} YY_BREAK case 9: YY_RULE_SETUP -#line 147 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 151 "./Engine/Base/Scanner.l" { return(k_CTString);} YY_BREAK /* keywords */ case 10: YY_RULE_SETUP -#line 150 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 154 "./Engine/Base/Scanner.l" { return(k_void); } YY_BREAK case 11: YY_RULE_SETUP -#line 151 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 155 "./Engine/Base/Scanner.l" { return(k_const); } YY_BREAK case 12: YY_RULE_SETUP -#line 152 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 156 "./Engine/Base/Scanner.l" { return(k_user); } YY_BREAK case 13: YY_RULE_SETUP -#line 153 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 157 "./Engine/Base/Scanner.l" { return(k_persistent); } YY_BREAK case 14: YY_RULE_SETUP -#line 154 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 158 "./Engine/Base/Scanner.l" { return(k_extern); } YY_BREAK case 15: YY_RULE_SETUP -#line 155 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 159 "./Engine/Base/Scanner.l" { return(k_pre); } YY_BREAK case 16: YY_RULE_SETUP -#line 156 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 160 "./Engine/Base/Scanner.l" { return(k_post); } YY_BREAK case 17: YY_RULE_SETUP -#line 157 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 161 "./Engine/Base/Scanner.l" { return(k_help); } YY_BREAK case 18: YY_RULE_SETUP -#line 158 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 162 "./Engine/Base/Scanner.l" { return(k_if); } YY_BREAK case 19: YY_RULE_SETUP -#line 159 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 163 "./Engine/Base/Scanner.l" { return(k_else); } YY_BREAK case 20: YY_RULE_SETUP -#line 160 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 164 "./Engine/Base/Scanner.l" { return(k_else_if); } YY_BREAK case 21: YY_RULE_SETUP -#line 162 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 166 "./Engine/Base/Scanner.l" { return (LEQ); } YY_BREAK case 22: YY_RULE_SETUP -#line 163 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 167 "./Engine/Base/Scanner.l" { return (GEQ); } YY_BREAK case 23: YY_RULE_SETUP -#line 164 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 168 "./Engine/Base/Scanner.l" { return (EQ); } YY_BREAK case 24: YY_RULE_SETUP -#line 165 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 169 "./Engine/Base/Scanner.l" { return (NEQ); } YY_BREAK case 25: YY_RULE_SETUP -#line 167 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 171 "./Engine/Base/Scanner.l" { return (SHR); } YY_BREAK case 26: YY_RULE_SETUP -#line 168 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 172 "./Engine/Base/Scanner.l" { return (SHL); } YY_BREAK case 27: YY_RULE_SETUP -#line 170 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 174 "./Engine/Base/Scanner.l" { return (LOGAND); } YY_BREAK case 28: YY_RULE_SETUP -#line 171 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 175 "./Engine/Base/Scanner.l" { return (LOGOR); } YY_BREAK /* single character operators and punctuations */ case 29: YY_RULE_SETUP -#line 174 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 178 "./Engine/Base/Scanner.l" { return(yytext[0]);} YY_BREAK /* constants */ case 30: YY_RULE_SETUP -#line 178 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 182 "./Engine/Base/Scanner.l" { yylval.val.iIndex = atoi(yytext); return(c_int); } YY_BREAK case 31: YY_RULE_SETUP -#line 179 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 183 "./Engine/Base/Scanner.l" { yylval.val.iIndex = strtoul(yytext+2, NULL, 16); return(c_int); } YY_BREAK case 32: YY_RULE_SETUP -#line 180 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 184 "./Engine/Base/Scanner.l" { yylval.val.fFloat = (float) atof(yytext); return(c_float); } YY_BREAK case 33: YY_RULE_SETUP -#line 181 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 185 "./Engine/Base/Scanner.l" { yylval.val.fFloat = (float) atof(yytext); return(c_float); } YY_BREAK case 34: +/* rule 34 can match eol */ YY_RULE_SETUP -#line 182 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 186 "./Engine/Base/Scanner.l" { CTString &strNew = _shell_astrTempStrings.Push(); // remove double-quotes @@ -1044,14 +1175,15 @@ YY_RULE_SETUP } YY_BREAK case 35: +/* rule 35 can match eol */ YY_RULE_SETUP -#line 191 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 195 "./Engine/Base/Scanner.l" { return(c_char); } YY_BREAK /* identifier */ case 36: YY_RULE_SETUP -#line 194 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 198 "./Engine/Base/Scanner.l" { // get the symbol yylval.pssSymbol = _pShell->GetSymbol(yytext, FALSE); @@ -1078,7 +1210,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 217 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 221 "./Engine/Base/Scanner.l" { // special case of identifier, used to bypass command parsing // get the symbol yylval.pssSymbol = _pShell->GetSymbol(yytext+1, FALSE); @@ -1088,7 +1220,7 @@ YY_RULE_SETUP /* eat up or execute blocks */ case 38: YY_RULE_SETUP -#line 224 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 228 "./Engine/Base/Scanner.l" { _iBlockDepth++; if (!_bExecNextBlock) { @@ -1100,7 +1232,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 233 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 237 "./Engine/Base/Scanner.l" { _iBlockDepth--; if (_iBlockDepth<0) { @@ -1111,7 +1243,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 240 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 244 "./Engine/Base/Scanner.l" { _iBlockDepth++; _iDummyDepth++; @@ -1119,7 +1251,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 244 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 248 "./Engine/Base/Scanner.l" { _iBlockDepth--; _iDummyDepth--; @@ -1131,41 +1263,43 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 252 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 256 "./Engine/Base/Scanner.l" {} YY_BREAK /* eat up comments */ case 43: YY_RULE_SETUP -#line 255 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 259 "./Engine/Base/Scanner.l" { BEGIN(COMMENT); } YY_BREAK case 44: YY_RULE_SETUP -#line 256 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 260 "./Engine/Base/Scanner.l" { BEGIN(INITIAL); } YY_BREAK case 45: YY_RULE_SETUP -#line 257 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 261 "./Engine/Base/Scanner.l" {} YY_BREAK case 46: +/* rule 46 can match eol */ YY_RULE_SETUP -#line 258 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 262 "./Engine/Base/Scanner.l" { ShellCountOneLine(); } YY_BREAK /* eat up whitespace */ case 47: YY_RULE_SETUP -#line 262 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 266 "./Engine/Base/Scanner.l" { } YY_BREAK /* eat up linefeeds and count lines in all conditions */ case 48: +/* rule 48 can match eol */ YY_RULE_SETUP -#line 265 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 269 "./Engine/Base/Scanner.l" { ShellCountOneLine(); } @@ -1173,7 +1307,7 @@ YY_RULE_SETUP /* for all unrecognized characters */ case 49: YY_RULE_SETUP -#line 270 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 274 "./Engine/Base/Scanner.l" { // report an error _pShell->ErrorF("Unrecognized character '%c' (ASCII 0x%02x)", yytext[0], yytext[0] ); @@ -1181,33 +1315,34 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 275 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" +#line 279 "./Engine/Base/Scanner.l" ECHO; YY_BREAK -#line 1188 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.cpp" +#line 1322 "./Engine/Base/Scanner.cpp" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -1217,16 +1352,16 @@ 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 + * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't @@ -1236,30 +1371,30 @@ ECHO; yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -1270,7 +1405,7 @@ ECHO; * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -1278,30 +1413,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; @@ -1312,8 +1447,7 @@ ECHO; "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1322,23 +1456,22 @@ 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 singled characater, the EOB, so + /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; @@ -1356,38 +1489,34 @@ 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_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; + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1396,8 +1525,7 @@ static int yy_get_next_buffer() b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1407,33 +1535,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -#endif + } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); + yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1441,32 +1571,39 @@ static int yy_get_next_buffer() else ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() - { + static yy_state_type yy_get_previous_state (void) +{ register yy_state_type yy_current_state; register char *yy_cp; + + yy_current_state = (yy_start); - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1478,30 +1615,23 @@ static yy_state_type yy_get_previous_state() } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1513,90 +1643,96 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 164); return yy_is_jam ? 0 : yy_current_state; - } +} - -#ifdef YY_USE_PROTOS -//static - void yyunput( int c, register char *yy_bp ) -#else -//static - void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; + register yy_size_t 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_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; - } - - +#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 */ - yytext_ptr = yy_c_buf_p; - ++yy_c_buf_p; + yy_size_t 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() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin ); + + /*FALLTHROUGH*/ + case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) - { - yy_c_buf_p = - yytext_ptr + YY_MORE_ADJ; - return EOF; - } + if ( yywrap( ) ) + return 0; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1606,99 +1742,92 @@ static int input() } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + offset; break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( - "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( - "unexpected last match in input()" ); -#endif } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); 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 yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); } + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void 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 yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -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 yy_create_buffer (FILE * file, int size ) +{ YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1707,76 +1836,77 @@ int size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer(b,file ); return b; - } +} +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - 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 ); + yyfree((void *) b->yy_ch_buf ); - yy_flex_free( (void *) b ); - } + yyfree((void *) b ); +} +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#ifdef YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#ifdef 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 yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; - { b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes @@ -1791,29 +1921,125 @@ YY_BUFFER_STATE b; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_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 yy_scan_buffer (char * base, yy_size_t size ) +{ YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1827,56 +2053,50 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); return b; - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to yylex() 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 + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( const char *str ) -#else -YY_BUFFER_STATE yy_scan_string( str ) -const char *str; -#endif - { - int len; - for ( len = 0; str[len]; ++len ) - ; - - return yy_scan_bytes( str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( const char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -const char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ YY_BUFFER_STATE b; char *buf; - yy_size_t n; - int i; - + yy_size_t n, 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 *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_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 = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -1886,78 +2106,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( const 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. */ @@ -1966,72 +2125,196 @@ char msg[]; do \ { \ /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ } \ while ( 0 ) +/* Accessor methods (get/set functions) to struct members. */ -/* Internal utility routines. */ +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} + +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} + +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} + +/** Get the length of the current token. + * + */ +yy_size_t yyget_leng (void) +{ + return yyleng; +} + +/** Get the current token. + * + */ + +char *yyget_text (void) +{ + return yytext; +} + +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} + +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} + +int yyget_debug (void) +{ + return yy_flex_debug; +} + +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} + +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() 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, const char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -const 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 +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; + return n; +} #endif - { + +void *yyalloc (yy_size_t size ) +{ return (void *) malloc( size ); - } +} -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - return (void *) realloc( ptr, size ); - } +void *yyrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 279 "./Engine/Base/Scanner.l" -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } -#ifdef YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 275 "D:\\SE1_GPL\\Sources\\Engine\\Base\\\\Scanner.l" diff --git a/Sources/Engine/Base/parser.h b/Sources/Engine/Base/parser.h index 63fb21c..557c0d6 100644 --- a/Sources/Engine/Base/parser.h +++ b/Sources/Engine/Base/parser.h @@ -1,4 +1,117 @@ -typedef union { +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + c_float = 258, + c_int = 259, + c_string = 260, + c_char = 261, + identifier = 262, + k_INDEX = 263, + k_FLOAT = 264, + k_CTString = 265, + k_void = 266, + k_const = 267, + k_user = 268, + k_persistent = 269, + k_extern = 270, + k_pre = 271, + k_post = 272, + k_help = 273, + k_if = 274, + k_else = 275, + k_else_if = 276, + SHL = 277, + SHR = 278, + EQ = 279, + NEQ = 280, + GEQ = 281, + LEQ = 282, + LOGAND = 283, + LOGOR = 284, + block_beg = 285, + block_end = 286, + TYPECAST = 287, + SIGN = 288 + }; +#endif +/* Tokens. */ +#define c_float 258 +#define c_int 259 +#define c_string 260 +#define c_char 261 +#define identifier 262 +#define k_INDEX 263 +#define k_FLOAT 264 +#define k_CTString 265 +#define k_void 266 +#define k_const 267 +#define k_user 268 +#define k_persistent 269 +#define k_extern 270 +#define k_pre 271 +#define k_post 272 +#define k_help 273 +#define k_if 274 +#define k_else 275 +#define k_else_if 276 +#define SHL 277 +#define SHR 278 +#define EQ 279 +#define NEQ 280 +#define GEQ 281 +#define LEQ 282 +#define LOGAND 283 +#define LOGOR 284 +#define block_beg 285 +#define block_end 286 +#define TYPECAST 287 +#define SIGN 288 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 197 "./Engine/Base/Parser.y" +{ value val; // for constants and expressions arguments arg; // for function input arguments ULONG ulFlags; // for declaration qualifiers @@ -7,36 +120,14 @@ typedef union { struct LValue lvLValue; INDEX (*pPreFunc)(INDEX); // pre-set function for a variable void (*pPostFunc)(INDEX); // post-set function for a variable -} YYSTYPE; -#define c_float 258 -#define c_int 259 -#define c_string 260 -#define c_char 261 -#define identifier 262 -#define k_INDEX 263 -#define k_FLOAT 264 -#define k_CTString 265 -#define k_void 266 -#define k_const 267 -#define k_user 268 -#define k_persistent 269 -#define k_extern 270 -#define k_pre 271 -#define k_post 272 -#define k_help 273 -#define k_if 274 -#define k_else 275 -#define k_else_if 276 -#define SHL 277 -#define SHR 278 -#define EQ 279 -#define NEQ 280 -#define GEQ 281 -#define LEQ 282 -#define LOGAND 283 -#define LOGOR 284 -#define block_beg 285 -#define block_end 286 -#define TYPECAST 287 -#define SIGN 288 +} +/* Line 1529 of yacc.c. */ +#line 126 "./Engine/Base/Parser.hpp" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + diff --git a/Sources/Engine/Ska/smcPars.cpp b/Sources/Engine/Ska/smcPars.cpp deleted file mode 100644 index 6efa7c3..0000000 --- a/Sources/Engine/Ska/smcPars.cpp +++ /dev/null @@ -1,1142 +0,0 @@ - -/* A Bison parser, made from engine/ska/smcpars.y with Bison version GNU Bison version 1.24 - */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define yyparse syyparse -#define yylex syylex -#define yyerror syyerror -#define yylval syylval -#define yychar syychar -#define yydebug syydebug -#define yynerrs syynerrs -#define c_float 258 -#define c_int 259 -#define c_string 260 -#define c_modelinstance 261 -#define k_PARENTBONE 262 -#define k_SE_SMC 263 -#define k_SE_END 264 -#define k_NAME 265 -#define k_TFNM 266 -#define k_MESH 267 -#define k_SKELETON 268 -#define k_ANIMSET 269 -#define K_ANIMATION 270 -#define k_TEXTURES 271 -#define k_OFFSET 272 -#define k_COLISION 273 -#define k_ALLFRAMESBBOX 274 -#define k_ANIMSPEED 275 -#define k_COLOR 276 - -#line 1 "engine/ska/smcpars.y" - -#include -#include -#include -#include -#include -#include -#include -#include "ParsingSmbs.h" - -extern BOOL bRememberSourceFN; -BOOL bOffsetAllreadySet = FALSE; -#line 15 "engine/ska/smcpars.y" - -#define YYERROR_VERBOSE 0 -// if error occurs in parsing -void syyerror(char *str) -{ - // just report the string - _pShell->ErrorF("%s", str); -}; - -#line 27 "engine/ska/smcpars.y" -typedef union { - int i; - float f; - const char *str; - CModelInstance *pmi; - float f6[6]; -} YYSTYPE; - -#ifndef YYLTYPE -typedef - struct yyltype - { - int timestamp; - int first_line; - int first_column; - int last_line; - int last_column; - char *text; - } - yyltype; - -#define YYLTYPE yyltype -#endif - -#include - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 123 -#define YYFLAG -32768 -#define YYNTBASE 26 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 276 ? yytranslate[x] : 55) - -static const char yytranslate[] = { 0, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 25, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 22, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 23, 2, 24, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 1, 10, 11, 14, 16, 18, 20, 22, 24, - 26, 28, 30, 31, 33, 37, 42, 43, 45, 47, - 50, 66, 67, 69, 83, 84, 87, 101, 102, 114, - 115, 122, 127, 130, 135, 137, 140, 144, 145, 147, - 151, 152, 155, 160, 161, 164, 169, 171, 173 -}; - -static const short yyrhs[] = { -1, - 38, 10, 5, 22, 27, 23, 28, 24, 0, 0, - 29, 28, 0, 42, 0, 44, 0, 45, 0, 48, - 0, 40, 0, 32, 0, 36, 0, 30, 0, 0, - 31, 0, 21, 4, 22, 0, 18, 23, 33, 24, - 0, 0, 34, 0, 35, 0, 34, 35, 0, 5, - 23, 54, 25, 54, 25, 54, 25, 54, 25, 54, - 25, 54, 22, 24, 0, 0, 37, 0, 19, 54, - 25, 54, 25, 54, 25, 54, 25, 54, 25, 54, - 22, 0, 0, 39, 38, 0, 17, 54, 25, 54, - 25, 54, 25, 54, 25, 54, 25, 54, 22, 0, - 0, 7, 5, 22, 38, 10, 5, 22, 41, 23, - 28, 24, 0, 0, 12, 11, 5, 22, 43, 50, - 0, 13, 11, 5, 22, 0, 14, 47, 0, 14, - 23, 46, 24, 0, 47, 0, 46, 47, 0, 11, - 5, 22, 0, 0, 49, 0, 15, 5, 22, 0, - 0, 50, 51, 0, 16, 23, 52, 24, 0, 0, - 52, 53, 0, 5, 11, 5, 22, 0, 3, 0, - 4, 0, 4, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 72, 91, 95, 96, 100, 101, 102, 103, 104, 105, - 106, 107, 111, 112, 116, 124, 130, 131, 135, 136, - 140, 150, 151, 155, 164, 174, 181, 200, 225, 234, - 240, 243, 250, 251, 255, 256, 260, 268, 269, 273, - 285, 286, 290, 294, 295, 299, 306, 310, 317 -}; - -static const char * const yytname[] = { "$","error","$undefined.","c_float", -"c_int","c_string","c_modelinstance","k_PARENTBONE","k_SE_SMC","k_SE_END","k_NAME", -"k_TFNM","k_MESH","k_SKELETON","k_ANIMSET","K_ANIMATION","k_TEXTURES","k_OFFSET", -"k_COLISION","k_ALLFRAMESBBOX","k_ANIMSPEED","k_COLOR","';'","'{'","'}'","','", -"parent_model","@1","components","component","mdl_color_opt","mdl_color","colision_header", -"colision_opt","colision_array","colision","all_frames_bbox_opt","all_frames_bbox", -"offset_opt","offset","child_model","@2","mesh","@3","skeleton","animset_header", -"animset_array","animset","animation_opt","animation","opt_textures","textures", -"textures_array","texture","float_const","\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735\37777777735" -}; -#endif - -static const short yyr1[] = { 0, - 27, 26, 28, 28, 29, 29, 29, 29, 29, 29, - 29, 29, 30, 30, 31, 32, 33, 33, 34, 34, - 35, 36, 36, 37, 38, 38, 39, 41, 40, 43, - 42, 44, 45, 45, 46, 46, 47, 48, 48, 49, - 50, 50, 51, 52, 52, 53, 54, 54, -1 -}; - -static const short yyr2[] = { 0, - 0, 8, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 0, 1, 3, 4, 0, 1, 1, 2, - 15, 0, 1, 13, 0, 2, 13, 0, 11, 0, - 6, 4, 2, 4, 1, 2, 3, 0, 1, 3, - 0, 2, 4, 0, 2, 4, 1, 1, 1 -}; - -static const short yydefact[] = { 25, - 0, 0, 25, 47, 48, 0, 0, 26, 0, 0, - 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 12, 14, 10, - 11, 23, 9, 5, 6, 7, 8, 39, 0, 0, - 0, 0, 0, 0, 33, 0, 17, 0, 0, 2, - 4, 0, 25, 0, 0, 0, 0, 35, 40, 0, - 0, 18, 19, 0, 15, 0, 0, 30, 32, 37, - 34, 36, 0, 16, 20, 0, 0, 0, 41, 0, - 0, 0, 0, 31, 0, 0, 27, 28, 0, 42, - 0, 0, 0, 44, 0, 0, 3, 0, 0, 0, - 0, 0, 43, 45, 0, 0, 29, 0, 0, 0, - 0, 0, 0, 46, 0, 24, 0, 0, 0, 21, - 0, 0, 0 -}; - -static const short yydefgoto[] = { 121, - 14, 26, 27, 28, 29, 30, 61, 62, 63, 31, - 32, 2, 3, 33, 93, 34, 79, 35, 36, 57, - 45, 37, 38, 84, 90, 98, 104, 6 -}; - -static const short yypact[] = { -12, - 6, -4, -12,-32768,-32768, -18, 16,-32768, 6, -11, - 7,-32768, 6, 8, 9, 5, 6, 23, 19, 22, - 2, 30, 13, 6, 33, 14, 5,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 15, 17, - 36, 37, 39, 34,-32768, 24, 42, 25, 26,-32768, --32768, 6, -12, 27, 29, 31, 3,-32768,-32768, 35, - 32, 42,-32768, 6,-32768, 38, 44,-32768,-32768,-32768, --32768,-32768, 6,-32768,-32768, 40, 6, 52,-32768, 41, - 6, 45, 47, 43, 6, 48,-32768,-32768, 51,-32768, - 50, 6, 54,-32768, 6, 53, 5, -2, 55, 6, - 46, 49,-32768,-32768, 6, 56,-32768, 57, 59, 6, - 60, 6, 63,-32768, 62,-32768, 6, 66, 65,-32768, - 61, 79,-32768 -}; - -static const short yypgoto[] = {-32768, --32768, -26,-32768,-32768,-32768,-32768,-32768,-32768, 28,-32768, --32768, -1,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - -28,-32768,-32768,-32768,-32768,-32768,-32768, -9 -}; - - -#define YYLAST 108 - - -static const short yytable[] = { 11, - 51, 8, 102, 15, 1, 7, 9, 39, 4, 5, - 12, 18, 43, 43, 48, 58, 19, 20, 21, 22, - 10, 103, 23, 24, 44, 25, 71, 40, 72, 41, - 16, 13, 42, 17, 46, 47, 49, 50, 53, 52, - 54, 55, 66, 56, 43, 59, 60, 65, 68, 64, - 69, 67, 70, 78, 76, 74, 83, 73, 89, 108, - 122, 111, 77, 80, 81, 85, 87, 82, 88, 107, - 101, 86, 92, 94, 95, 91, 97, 100, 123, 105, - 110, 114, 96, 112, 116, 99, 117, 119, 120, 75, - 106, 0, 0, 0, 0, 109, 0, 0, 0, 0, - 113, 0, 115, 0, 0, 0, 0, 118 -}; - -static const short yycheck[] = { 9, - 27, 3, 5, 13, 17, 10, 25, 17, 3, 4, - 22, 7, 11, 11, 24, 44, 12, 13, 14, 15, - 5, 24, 18, 19, 23, 21, 24, 5, 57, 11, - 23, 25, 11, 25, 5, 23, 4, 24, 22, 25, - 5, 5, 52, 5, 11, 22, 5, 22, 22, 25, - 22, 53, 22, 10, 64, 24, 5, 23, 16, 11, - 0, 5, 25, 73, 25, 25, 22, 77, 22, 24, - 97, 81, 25, 23, 25, 85, 23, 25, 0, 25, - 25, 22, 92, 25, 22, 95, 25, 22, 24, 62, - 100, -1, -1, -1, -1, 105, -1, -1, -1, -1, - 110, -1, 112, -1, -1, -1, -1, 117 -}; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "bison.simple" - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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. */ - -#undef YYERROR_VERBOSE -#ifndef alloca -#ifdef __GNUC__ -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) -#include -#else /* not sparc */ -#if defined (MSDOS) && !defined (__TURBOC__) -#include -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -#include - #pragma alloca -#else /* not MSDOS, __TURBOC__, or _AIX */ -#ifdef __hpux -#ifdef __cplusplus -extern "C" { -void *alloca (unsigned int); -}; -#else /* not __cplusplus */ -void *alloca (); -#endif /* not __cplusplus */ -#endif /* __hpux */ -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc. */ -#endif /* not GNU C. */ -#endif /* alloca not defined. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT return(0) -#define YYABORT return(1) -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. - This remains here temporarily to ease the - transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (from, to, count) - char *from; - char *to; - int count; -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *from, char *to, int count) -{ - register char *f = from; - register char *t = to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -#line 192 "bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#else -#define YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#endif - -int -yyparse(YYPARSE_PARAM) - YYPARSE_PARAM_DECL -{ - register int yystate; - register int yyn; - register short *yyssp; - register YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Give user a chance to reallocate the stack */ - /* Use copies of these so that the &'s don't force the real ones into memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; - yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - fprintf (stderr, "%s ", yytname[yyrhs[i]]); - fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 1: -#line 73 "engine/ska/smcpars.y" -{ - if(_yy_mi==0) { - yyerror("_yy_mi = NULL"); - } - // create new model instance - // _yy_mi = CreateModelInstance($3); - _yy_mi->SetName(yyvsp[-1].str); - // set its offset - _yy_mi->SetOffset(yyvsp[-3].f6); - // mark offset as read - bOffsetAllreadySet = FALSE; - // check if flag to remember source file name is set - if(bRememberSourceFN) - { - // remember source file name - _yy_mi->mi_fnSourceFile = CTString(SMCGetBufferName()); - } -; - break;} -case 15: -#line 117 "engine/ska/smcpars.y" -{ - COLOR c = yyvsp[-1].i; - // _yy_mi->SetModelColor($2); -; - break;} -case 16: -#line 125 "engine/ska/smcpars.y" -{ - -; - break;} -case 21: -#line 141 "engine/ska/smcpars.y" -{ - FLOAT3D vMin = FLOAT3D(yyvsp[-12].f, yyvsp[-10].f, yyvsp[-8].f); - FLOAT3D vMax = FLOAT3D(yyvsp[-6].f,yyvsp[-4].f,yyvsp[-2].f); - // add new colision box to current model instance - _yy_mi->AddColisionBox(yyvsp[-14].str,vMin,vMax); -; - break;} -case 24: -#line 156 "engine/ska/smcpars.y" -{ - // add new colision box to current model instance - _yy_mi->mi_cbAllFramesBBox.SetMin(FLOAT3D(yyvsp[-11].f, yyvsp[-9].f, yyvsp[-7].f)); - _yy_mi->mi_cbAllFramesBBox.SetMax(FLOAT3D(yyvsp[-5].f,yyvsp[-3].f,yyvsp[-1].f)); -; - break;} -case 25: -#line 165 "engine/ska/smcpars.y" -{ - // set offset with default offset values - yyval.f6[0] = 0; - yyval.f6[1] = 0; - yyval.f6[2] = 0; - yyval.f6[3] = 0; - yyval.f6[4] = 0; - yyval.f6[5] = 0; -; - break;} -case 26: -#line 175 "engine/ska/smcpars.y" -{ - // return new offset - memcpy(yyval.f6,yyvsp[-1].f6,sizeof(float)*6); -; - break;} -case 27: -#line 182 "engine/ska/smcpars.y" -{ - // if offset is not set - if(!bOffsetAllreadySet) - { - // set offset - yyval.f6[0] = yyvsp[-11].f; - yyval.f6[1] = yyvsp[-9].f; - yyval.f6[2] = yyvsp[-7].f; - yyval.f6[3] = yyvsp[-5].f; - yyval.f6[4] = yyvsp[-3].f; - yyval.f6[5] = yyvsp[-1].f; - // mark it as set now - bOffsetAllreadySet = TRUE; - } -; - break;} -case 28: -#line 201 "engine/ska/smcpars.y" -{ - // get parent ID - int iParentBoneID = ska_FindStringInTable(yyvsp[-5].str); - if(iParentBoneID<0) iParentBoneID=0; - // remember current model instance in parent bone token - yyvsp[-6].pmi = _yy_mi; - // set _yy_mi as new child - _yy_mi = CreateModelInstance(yyvsp[-1].str); - // add child to parent model instance - yyvsp[-6].pmi->AddChild(_yy_mi); - // add offset - _yy_mi->SetOffset(yyvsp[-3].f6); - // set its parent bone - _yy_mi->SetParentBone(iParentBoneID); - // - bOffsetAllreadySet = FALSE; - // if flag to remember source file is set - if(bRememberSourceFN) - { - // remember source name - _yy_mi->mi_fnSourceFile = CTString(SMCGetBufferName()); - } -; - break;} -case 29: -#line 226 "engine/ska/smcpars.y" -{ - // set parent model instance to _yy_mi again - _yy_mi = yyvsp[-10].pmi; -; - break;} -case 30: -#line 235 "engine/ska/smcpars.y" -{ - // add mesh to current model instance - _yy_mi->AddMesh_t((CTString)yyvsp[-1].str); -; - break;} -case 32: -#line 244 "engine/ska/smcpars.y" -{ - // add skeleton to current model instance - _yy_mi->AddSkeleton_t((CTString)yyvsp[-1].str); -; - break;} -case 37: -#line 261 "engine/ska/smcpars.y" -{ - // add animset to curent model instnce - _yy_mi->AddAnimSet_t((CTString)yyvsp[-1].str); -; - break;} -case 40: -#line 274 "engine/ska/smcpars.y" -{ - // set new clear state in model instance - _yy_mi->NewClearState(1); - // get anim ID - INDEX iAnimID = ska_GetIDFromStringTable(yyvsp[-1].str); - // add animation to curent model instance - _yy_mi->AddAnimation(iAnimID,AN_LOOPING,1,0); -; - break;} -case 46: -#line 300 "engine/ska/smcpars.y" -{ - // add texture to current model instance - _yy_mi->AddTexture_t((CTString)yyvsp[-1].str,yyvsp[-3].str,NULL); -; - break;} -case 47: -#line 307 "engine/ska/smcpars.y" -{ - yyval.f = yyvsp[0].f; -; - break;} -case 48: -#line 311 "engine/ska/smcpars.y" -{ - yyval.f = (float)yyvsp[0].i; -; - break;} -case 49: -#line 318 "engine/ska/smcpars.y" -{ - yyval.i = yyvsp[0].i; -; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -#line 487 "bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* Now "shift" the result of the reduction. - Determine what state that goes to, - based on the state we popped back to - and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += strlen(yytname[x]) + 15, count++; - msg = (char *) malloc(size + 15); - if (msg != 0) - { - strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - strcat(msg, count == 0 ? ", expecting `" : " or `"); - strcat(msg, yytname[x]); - strcat(msg, "'"); - count++; - } - } - yyerror(msg); - free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - fprintf (stderr, " %d", *++ssp1); - fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; -} -#line 323 "engine/ska/smcpars.y" diff --git a/Sources/Engine/Ska/smcScan.cpp b/Sources/Engine/Ska/smcScan.cpp deleted file mode 100644 index 9aeacf5..0000000 --- a/Sources/Engine/Ska/smcScan.cpp +++ /dev/null @@ -1,1869 +0,0 @@ -#define yy_create_buffer syy_create_buffer -#define yy_delete_buffer syy_delete_buffer -#define yy_scan_buffer syy_scan_buffer -#define yy_scan_string syy_scan_string -#define yy_scan_bytes syy_scan_bytes -#define yy_flex_debug syy_flex_debug -#define yy_init_buffer syy_init_buffer -#define yy_flush_buffer syy_flush_buffer -#define yy_load_buffer_state syy_load_buffer_state -#define yy_switch_to_buffer syy_switch_to_buffer -#define yyin syyin -#define yyleng syyleng -#define yylex syylex -#define yyout syyout -#define yyrestart syyrestart -#define yytext syytext -#define yywrap syywrap - -#line 20 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.cpp" -#include - -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.81 95/03/20 14:02:24 vern Exp $ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -//#ifdef c_plusplus -//#ifndef __cplusplus -//#define __cplusplus -//#endif -//#endif - -#if 1 //def __cplusplus - - #include - - /* Use prototypes in function declarations. */ - #define YY_USE_PROTOS - - /* The "const" storage-class-modifier is valid. */ - #define YY_USE_CONST - -#else /* ! __cplusplus */ - - #if __STDC__ - - #define YY_USE_PROTOS - #define YY_USE_CONST - - #endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#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 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_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) syyunput( 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; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* 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 - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * 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. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* 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". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* 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 ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( const char *str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( const char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#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; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -//static - void syyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, const char *, int )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -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(( const char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 33 -#define YY_END_OF_BUFFER 34 -static yyconst short int yy_accept[146] = - { 0, - 0, 0, 0, 0, 0, 0, 34, 32, 30, 31, - 32, 32, 20, 32, 32, 21, 21, 32, 32, 32, - 32, 32, 32, 32, 32, 28, 28, 19, 19, 31, - 17, 30, 0, 25, 0, 0, 21, 26, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 18, 0, 17, 25, 0, - 0, 29, 23, 23, 0, 24, 22, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, - 24, 0, 0, 0, 0, 6, 5, 0, 0, 0, - 0, 0, 0, 4, 0, 0, 0, 0, 0, 15, - - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 12, 0, 3, 2, 0, 0, 0, 0, - 0, 8, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 13, 0, 7, 10, 0, 9, 14, 0, 0, - 11, 0, 0, 16, 0 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 5, 6, 1, 1, 1, 1, 1, - 1, 7, 8, 9, 10, 11, 12, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 1, 15, 1, - 1, 1, 1, 1, 16, 17, 18, 19, 20, 21, - 1, 22, 23, 1, 24, 25, 26, 27, 28, 29, - 1, 30, 31, 32, 33, 1, 1, 34, 1, 1, - 1, 35, 1, 1, 36, 1, 37, 37, 37, 37, - - 38, 39, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 40, - 1, 1, 41, 1, 42, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[43] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, - 1, 1 - } ; - -static yyconst short int yy_base[152] = - { 0, - 0, 0, 40, 41, 47, 51, 221, 222, 55, 222, - 40, 197, 222, 47, 51, 51, 56, 41, 191, 198, - 201, 195, 199, 53, 58, 222, 210, 208, 78, 207, - 222, 70, 76, 222, 79, 184, 79, 222, 207, 82, - 96, 0, 184, 185, 182, 175, 179, 183, 173, 166, - 181, 166, 172, 186, 192, 222, 83, 222, 81, 178, - 192, 222, 87, 222, 84, 109, 0, 173, 167, 90, - 170, 171, 159, 169, 104, 163, 155, 160, 222, 160, - 222, 154, 96, 152, 152, 222, 222, 161, 153, 152, - 152, 157, 143, 222, 142, 158, 141, 99, 149, 222, - - 139, 138, 150, 150, 135, 136, 146, 138, 140, 130, - 141, 132, 222, 142, 222, 222, 119, 126, 125, 124, - 115, 222, 122, 114, 112, 112, 107, 222, 106, 109, - 115, 222, 106, 222, 222, 115, 222, 222, 111, 112, - 222, 87, 71, 222, 222, 148, 150, 152, 154, 156, - 44 - } ; - -static yyconst short int yy_def[152] = - { 0, - 145, 1, 146, 146, 147, 147, 145, 145, 145, 145, - 148, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 149, 149, 149, - 145, 145, 148, 145, 148, 145, 145, 145, 150, 145, - 145, 151, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 149, 145, 149, 145, 148, 145, - 150, 145, 145, 145, 145, 145, 151, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 0, 145, 145, 145, 145, 145, - 145 - } ; - -static yyconst short int yy_nxt[265] = - { 0, - 8, 9, 10, 9, 11, 12, 8, 8, 13, 14, - 8, 15, 16, 17, 13, 18, 8, 19, 8, 8, - 8, 8, 8, 8, 8, 20, 21, 22, 23, 8, - 24, 25, 8, 8, 8, 8, 8, 8, 8, 8, - 13, 13, 10, 10, 34, 67, 27, 27, 29, 30, - 29, 31, 29, 30, 29, 31, 32, 38, 32, 37, - 37, 40, 39, 37, 37, 43, 40, 44, 37, 37, - 41, 32, 50, 32, 35, 41, 51, 52, 53, 57, - 34, 57, 58, 59, 57, 34, 57, 58, 41, 40, - 42, 37, 37, 41, 63, 63, 66, 66, 41, 63, - - 63, 41, 64, 65, 144, 65, 41, 64, 66, 66, - 35, 97, 84, 35, 143, 35, 41, 85, 110, 41, - 64, 66, 66, 90, 41, 64, 98, 111, 142, 81, - 141, 140, 139, 138, 91, 137, 136, 135, 134, 133, - 132, 131, 130, 129, 128, 127, 126, 81, 26, 26, - 28, 28, 33, 33, 55, 55, 61, 61, 125, 124, - 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, - 113, 112, 109, 108, 107, 106, 105, 104, 103, 102, - 101, 100, 99, 96, 95, 94, 93, 92, 89, 88, - 87, 86, 83, 82, 62, 80, 56, 79, 78, 77, - - 76, 75, 74, 73, 72, 71, 70, 69, 68, 62, - 60, 56, 56, 54, 49, 48, 47, 46, 45, 36, - 145, 7, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145 - } ; - -static yyconst short int yy_chk[265] = - { 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, - 1, 1, 3, 4, 11, 151, 3, 4, 5, 5, - 5, 5, 6, 6, 6, 6, 9, 15, 9, 14, - 14, 16, 15, 16, 16, 18, 17, 18, 17, 17, - 16, 32, 24, 32, 11, 17, 24, 25, 25, 29, - 33, 29, 29, 35, 57, 59, 57, 57, 16, 37, - 16, 37, 37, 17, 40, 40, 65, 65, 37, 63, - - 63, 40, 40, 41, 143, 41, 63, 63, 41, 41, - 33, 83, 70, 35, 142, 59, 37, 70, 98, 40, - 40, 66, 66, 75, 63, 63, 83, 98, 140, 66, - 139, 136, 133, 131, 75, 130, 129, 127, 126, 125, - 124, 123, 121, 120, 119, 118, 117, 66, 146, 146, - 147, 147, 148, 148, 149, 149, 150, 150, 114, 112, - 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, - 101, 99, 97, 96, 95, 93, 92, 91, 90, 89, - 88, 85, 84, 82, 80, 78, 77, 76, 74, 73, - 72, 71, 69, 68, 61, 60, 55, 54, 53, 52, - - 51, 50, 49, 48, 47, 46, 45, 44, 43, 39, - 36, 30, 28, 27, 23, 22, 21, 20, 19, 12, - 7, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -char *yytext; -#line 1 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -#define INITIAL 0 -#line 3 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -#include "ParsingSmbs.h" -#include "smcPars.h" - -#include -#include -#include -#include - -#include -extern CTFileName _fnmApplicationPath; - -int syywrap(void) -{ - // no more buffers - return 1; -}; - -// declarations for recursive SMC script parsing -struct BufferStackEntry { - YY_BUFFER_STATE bse_bs; - const char *bse_strName; - const char *bse_strContents; - int bse_iLineCt; - BOOL bse_bParserEnd; -}; - -static BufferStackEntry _abseBufferStack[SMC_MAX_INCLUDE_LEVEL]; -static int _ibsBufferStackTop = -1; - -void SMCPushBuffer(const char *strName, const char *strBuffer, BOOL bParserEnd) -{ - _ibsBufferStackTop++; - - _abseBufferStack[_ibsBufferStackTop].bse_strContents = strdup(strBuffer); - _abseBufferStack[_ibsBufferStackTop].bse_strName = strdup(strName); - _abseBufferStack[_ibsBufferStackTop].bse_iLineCt = 1; - _abseBufferStack[_ibsBufferStackTop].bse_bParserEnd = bParserEnd; - - _abseBufferStack[_ibsBufferStackTop].bse_bs = syy_scan_string((char*)(const char*)strBuffer); - - syy_switch_to_buffer(_abseBufferStack[_ibsBufferStackTop].bse_bs); -} -BOOL SMCPopBuffer(void) -{ - syy_delete_buffer( _abseBufferStack[_ibsBufferStackTop].bse_bs); - free((void*)_abseBufferStack[_ibsBufferStackTop].bse_strName); - free((void*)_abseBufferStack[_ibsBufferStackTop].bse_strContents); - BOOL bParserEnd = _abseBufferStack[_ibsBufferStackTop].bse_bParserEnd; - - _ibsBufferStackTop--; - - if (_ibsBufferStackTop>=0) { - syy_switch_to_buffer(_abseBufferStack[_ibsBufferStackTop].bse_bs); - } - return bParserEnd; -} -const char *SMCGetBufferName(void) -{ - return _abseBufferStack[_ibsBufferStackTop].bse_strName; -} -int SMCGetBufferLineNumber(void) -{ - return _abseBufferStack[_ibsBufferStackTop].bse_iLineCt; -} -int SMCGetBufferStackDepth(void) -{ - return _ibsBufferStackTop; -} -const char *SMCGetBufferContents(void) -{ - return _abseBufferStack[_ibsBufferStackTop].bse_strContents; -} -void SMCCountOneLine(void) -{ - _abseBufferStack[_ibsBufferStackTop].bse_iLineCt++; -} -#define COMMENT 1 - -#define INCLUDE 2 - -#line 593 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.cpp" - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifdef 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. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#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 ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* 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 - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 91 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" - - -#line 719 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.cpp" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *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_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - 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 >= 146 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 222 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 93 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -BEGIN(INCLUDE); - YY_BREAK -case 2: -YY_RULE_SETUP -#line 94 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_SE_SMC); } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 95 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_SE_END); } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 96 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_TFNM); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 97 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_NAME); } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 98 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_MESH); } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 99 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_SKELETON);} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 100 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_ANIMSET);} - YY_BREAK -case 9: -YY_RULE_SETUP -#line 101 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(K_ANIMATION);} - YY_BREAK -case 10: -YY_RULE_SETUP -#line 102 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_TEXTURES);} - YY_BREAK -case 11: -YY_RULE_SETUP -#line 103 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_PARENTBONE);} - YY_BREAK -case 12: -YY_RULE_SETUP -#line 104 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_OFFSET);} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 105 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_COLISION);} - YY_BREAK -case 14: -YY_RULE_SETUP -#line 106 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_ANIMSPEED);} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 107 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_COLOR);} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 108 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ return(k_ALLFRAMESBBOX);} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 110 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -/* eat the whitespace */ - YY_BREAK -case 18: -YY_RULE_SETUP -#line 111 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ /* got the include file name */ - - if (SMCGetBufferStackDepth() >= SMC_MAX_INCLUDE_LEVEL) { - ThrowF_t("File '%s' line %d\nIncludes nested too deeply '%s'",SMCGetBufferName(), SMCGetBufferLineNumber(),yytext); - } - char strFileName[256]; - strcpy(strFileName, yytext); - strFileName[strlen(strFileName)-1] = 0; - - CTString strIncludeFile; - try { - strIncludeFile.Load_t(CTString(strFileName)); - SMCPushBuffer(strFileName, strIncludeFile, FALSE); - - } catch(char *strError) { - (void)strError; - ThrowF_t("File '%s'\n Could not open '%s' (line %d)",SMCGetBufferName(), strFileName, SMCGetBufferLineNumber()); - } - BEGIN(INITIAL); -} - YY_BREAK -case 19: -YY_RULE_SETUP -#line 131 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ /* something unrecognized inside include statement */ - BEGIN(INITIAL); - ThrowF_t("File '%s'\n Wrong syntax for include statement",SMCGetBufferName()); -} - YY_BREAK -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(COMMENT): -case YY_STATE_EOF(INCLUDE): -#line 135 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ - if (SMCPopBuffer()) { - yyterminate(); - } -} - YY_BREAK -/* single character operators and punctuations */ -case 20: -YY_RULE_SETUP -#line 143 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ - return(yytext[0]);} - YY_BREAK -/* constants */ -case 21: -YY_RULE_SETUP -#line 148 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ syylval.i = atoi(yytext); return(c_int); } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 149 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ syylval.i = strtoul(yytext+2, NULL, 16); return(c_int);} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 150 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ syylval.f = (float) atof(yytext); return(c_float); } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 151 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ syylval.f = (float) atof(yytext); return(c_float); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 152 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ - char *strNew; - // remove double-quotes - yytext[strlen(yytext)-1] = 0; - strNew = yytext+1; - syylval.str = (const char*)strNew; - return(c_string); -} - YY_BREAK -/* eat up comments */ -case 26: -YY_RULE_SETUP -#line 162 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ BEGIN(COMMENT); } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 163 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ BEGIN(INITIAL); } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 164 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 165 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ SMCCountOneLine(); } - YY_BREAK -/* eat up whitespace */ -case 30: -YY_RULE_SETUP -#line 168 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ -} - YY_BREAK -/* eat up linefeeds and count lines in all conditions */ -case 31: -YY_RULE_SETUP -#line 171 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ - SMCCountOneLine();; -} - YY_BREAK -/* for all unrecognized characters */ -case 32: -YY_RULE_SETUP -#line 176 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -{ - // report an error - ThrowF_t("File '%s'\n Unrecognized character '%c' (line %d)", SMCGetBufferName(), yytext[0], SMCGetBufferLineNumber()); - //ThrowF_t("Unrecognized character '%c' in line %d)", yytext[0], _yy_iLine ); -} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 182 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" -ECHO; - YY_BREAK -#line 1020 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.cpp" - - 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; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - - if ( yy_current_buffer->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 - * 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; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * 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] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, 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_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - 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_current_state = yy_get_previous_state(); - - 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_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * 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; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->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 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a singled characater, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - 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 ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->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 ); - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - 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; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - 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 >= 146 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - 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 - { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; - } - 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 >= 146 ) - 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 == 145); - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifdef YY_USE_PROTOS -//static - void syyunput( int c, register char *yy_bp ) -#else -//static - void syyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->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 char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->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; - } - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_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] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - yytext_ptr = yy_c_buf_p; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - { - yy_c_buf_p = - yytext_ptr + YY_MORE_ADJ; - return EOF; - } - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( - "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( - "unexpected last match in input()" ); -#endif - } - } - } - - 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; - - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - 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 ) - return; - - 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_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#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 - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_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 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - 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 - { - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#ifdef YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#ifdef YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - 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 ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( const char *str ) -#else -YY_BUFFER_STATE yy_scan_string( str ) -const char *str; -#endif - { - int len; - for ( len = 0; str[len]; ++len ) - ; - - return yy_scan_bytes( str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( const char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -const char *bytes; -int len; -#endif - { - 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 ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - 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( const char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, const char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -const char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#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 - { - 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 - { - return (void *) realloc( 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 ); - } - -#ifdef YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 182 "D:\\SE1_GPL\\Sources\\Engine\\Ska\\\\smcScan.l" - - diff --git a/Sources/Engine/Ska/smcpars.h b/Sources/Engine/Ska/smcpars.h deleted file mode 100644 index 57a4e8f..0000000 --- a/Sources/Engine/Ska/smcpars.h +++ /dev/null @@ -1,29 +0,0 @@ -typedef union { - int i; - float f; - const char *str; - CModelInstance *pmi; - float f6[6]; -} YYSTYPE; -#define c_float 258 -#define c_int 259 -#define c_string 260 -#define c_modelinstance 261 -#define k_PARENTBONE 262 -#define k_SE_SMC 263 -#define k_SE_END 264 -#define k_NAME 265 -#define k_TFNM 266 -#define k_MESH 267 -#define k_SKELETON 268 -#define k_ANIMSET 269 -#define K_ANIMATION 270 -#define k_TEXTURES 271 -#define k_OFFSET 272 -#define k_COLISION 273 -#define k_ALLFRAMESBBOX 274 -#define k_ANIMSPEED 275 -#define k_COLOR 276 - - -extern YYSTYPE syylval;