/* A Bison parser, made by GNU Bison 2.4. */ /* Skeleton implementation for Bison's Yacc-like parsers in C Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, 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, see . */ /* 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.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse spl_yyparse #define yylex spl_yylex #define yyerror spl_yyerror #define yylval spl_yylval #define yychar spl_yychar #define yydebug spl_yydebug #define yynerrs spl_yynerrs /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ #line 30 "compiler.y" #include #include #include #include #include #include #ifdef ENABLE_PTHREAD_SUPPORT #include #endif #include "spl.h" #define COMPAT_H_NO_WIN_INCL #include "compat.h" static int spl_yylex (void); static void spl_yyerror (char const *); static struct spl_asm *as; static int gen_debug_info; static int no_checkp_insn; static void create_debug_op(int force); static int rvtolv_counter; static int import_asm_label_counter; static int label_stack[1024]; static int label_stack_index; static int label_stack_counter; static void lbstack_push() { label_stack[++label_stack_index] = ++label_stack_counter; } static void lbstack_pop() { label_stack_index--; } static int lbstack_value() { return label_stack[label_stack_index]; } static int breakcont_stack[1024]; static int breakcont_stack_index; static int breakcont_stack_counter; static void breakcont_begin() { breakcont_stack[++breakcont_stack_index] = ++breakcont_stack_counter; } static void breakcont_end() { breakcont_stack_index--; } static int breakcont_value() { return breakcont_stack[breakcont_stack_index]; } static int breakcont_label(char type) { char label[100]; snprintf(label, sizeof(label), "%c%d:%d", type, lbstack_value(), breakcont_value()); if ( spl_asm_setlabel(as, label, spl_asm_add(as, SPL_OP_NOP, 0)) < 0 ) { spl_yyerror("Assembler error"); return 1; } return 0; } static void breakcont_goto(char type) { char label[100]; snprintf(label, sizeof(label), "%c%d:%d", type, lbstack_value(), breakcont_value()); spl_asm_reflabel(as, label, spl_asm_add(as, SPL_OP_GOTO, 0)); } static int packpatch_stack[1024]; static int packpatch_stack_index; static int pbstack_push(int v) { return packpatch_stack[packpatch_stack_index++] = v; } static int pbstack_pop() { return packpatch_stack[--packpatch_stack_index]; } static int php_like_tags_active; static int php_like_tags_indenting_delim; static char *php_like_tags_term; #ifdef ENABLE_PTHREAD_SUPPORT static pthread_mutex_t compiler_lck = PTHREAD_MUTEX_INITIALIZER; #endif #define CHECKPOINT() \ do { if (!no_checkp_insn) spl_asm_add(as, SPL_OP_CHECKP, 0); } while (0) #define REGEX_EVAL_SUBST 1 #define REGEX_EVAL_RETURN 2 #define REGEX_EVAL_NEG 4 /* Line 189 of yacc.c */ #line 188 "y.tab.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #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 1 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { ID = 258, FUNC_ID = 259, VALUE = 260, SPECIALREF = 261, NOTOKEN = 262, TRANSLATE_PREFIX = 263, TRANSLATE_SEPERATOR = 264, TRANSLATE_END = 265, STRING_EOL = 266, STRING_EOL_S = 267, STRING_LABEL = 268, STRING_LABEL_S = 269, DBLCOMMA = 270, DEBUG = 271, WARNING = 272, ERROR = 273, DELETE = 274, FUNCTION = 275, METHOD = 276, IMPORT = 277, LOAD = 278, OBJECT = 279, VAR = 280, STATIC = 281, NEW = 282, THIS = 283, IF = 284, ELSE = 285, DO = 286, WHILE = 287, FOR = 288, FOREACH = 289, ASM = 290, RETURN = 291, EXIT = 292, DECLARED = 293, UNDEF = 294, GOTO = 295, BREAK = 296, CONTINUE = 297, ARRAYREF = 298, TRY = 299, CATCH = 300, THROW = 301, SWITCH = 302, DEFAULT = 303, CASE = 304, EF_BEGIN = 305, EF_END = 306, BLK_BEGIN_NOCTX = 307, INSERT_PROG_BEGIN = 308, INSERT_PROG_END = 309, RVALUE_CONTEXT_BEGIN = 310, RVALUE_CONTEXT_END = 311, XCHG = 312, SAPPEND = 313, OPOWEQ = 314, OMODEQ = 315, ODIVEQ = 316, OMULEQ = 317, OSUBEQ = 318, OADDEQ = 319, FPOWEQ = 320, FMODEQ = 321, FDIVEQ = 322, FMULEQ = 323, FSUBEQ = 324, FADDEQ = 325, IPOWEQ = 326, IMODEQ = 327, IDIVEQ = 328, IMULEQ = 329, ISUBEQ = 330, IADDEQ = 331, POWEQ = 332, MODEQ = 333, DIVEQ = 334, MULEQ = 335, SUBEQ = 336, ADDEQ = 337, SETCOPY = 338, LOR = 339, LAND = 340, REGEX_SEP = 341, NREGEX_EVAL_R = 342, REGEX_EVAL_R = 343, NREGEX_EVAL = 344, REGEX_EVAL = 345, NREGEX_SUBST_R = 346, REGEX_SUBST_R = 347, NREGEX_SUBST = 348, REGEX_SUBST = 349, NREGEX = 350, REGEX = 351, SGE = 352, SLE = 353, SGT = 354, SLT = 355, SNE = 356, SEQ = 357, OGE = 358, OLE = 359, OGT = 360, OLT = 361, ONE = 362, OEQ = 363, FGE = 364, FLE = 365, FGT = 366, FLT = 367, FNE = 368, FEQ = 369, IGE = 370, ILE = 371, IGT = 372, ILT = 373, INE = 374, IEQ = 375, GE = 376, LE = 377, GT = 378, LT = 379, NE = 380, EQ = 381, PNE = 382, PEQ = 383, ELEMENTSOF = 384, LENGTHOF = 385, EVAL = 386, PREV = 387, NEXT = 388, UNSHIFT = 389, PUSH = 390, SHIFT = 391, POP = 392, OADD = 393, OSUB = 394, FADD = 395, FSUB = 396, IADD = 397, ISUB = 398, ADD = 399, SUB = 400, OMOD = 401, ODIV = 402, OMUL = 403, FMOD = 404, FDIV = 405, FMUL = 406, IMOD = 407, IDIV = 408, IMUL = 409, MOD = 410, DIV = 411, MUL = 412, OPOW = 413, FPOW = 414, IPOW = 415, POW = 416, LNOT = 417, DEC = 418, INC = 419, NEG = 420, DEFINED = 421, ENC = 422, CAT = 423 }; #endif /* Tokens. */ #define ID 258 #define FUNC_ID 259 #define VALUE 260 #define SPECIALREF 261 #define NOTOKEN 262 #define TRANSLATE_PREFIX 263 #define TRANSLATE_SEPERATOR 264 #define TRANSLATE_END 265 #define STRING_EOL 266 #define STRING_EOL_S 267 #define STRING_LABEL 268 #define STRING_LABEL_S 269 #define DBLCOMMA 270 #define DEBUG 271 #define WARNING 272 #define ERROR 273 #define DELETE 274 #define FUNCTION 275 #define METHOD 276 #define IMPORT 277 #define LOAD 278 #define OBJECT 279 #define VAR 280 #define STATIC 281 #define NEW 282 #define THIS 283 #define IF 284 #define ELSE 285 #define DO 286 #define WHILE 287 #define FOR 288 #define FOREACH 289 #define ASM 290 #define RETURN 291 #define EXIT 292 #define DECLARED 293 #define UNDEF 294 #define GOTO 295 #define BREAK 296 #define CONTINUE 297 #define ARRAYREF 298 #define TRY 299 #define CATCH 300 #define THROW 301 #define SWITCH 302 #define DEFAULT 303 #define CASE 304 #define EF_BEGIN 305 #define EF_END 306 #define BLK_BEGIN_NOCTX 307 #define INSERT_PROG_BEGIN 308 #define INSERT_PROG_END 309 #define RVALUE_CONTEXT_BEGIN 310 #define RVALUE_CONTEXT_END 311 #define XCHG 312 #define SAPPEND 313 #define OPOWEQ 314 #define OMODEQ 315 #define ODIVEQ 316 #define OMULEQ 317 #define OSUBEQ 318 #define OADDEQ 319 #define FPOWEQ 320 #define FMODEQ 321 #define FDIVEQ 322 #define FMULEQ 323 #define FSUBEQ 324 #define FADDEQ 325 #define IPOWEQ 326 #define IMODEQ 327 #define IDIVEQ 328 #define IMULEQ 329 #define ISUBEQ 330 #define IADDEQ 331 #define POWEQ 332 #define MODEQ 333 #define DIVEQ 334 #define MULEQ 335 #define SUBEQ 336 #define ADDEQ 337 #define SETCOPY 338 #define LOR 339 #define LAND 340 #define REGEX_SEP 341 #define NREGEX_EVAL_R 342 #define REGEX_EVAL_R 343 #define NREGEX_EVAL 344 #define REGEX_EVAL 345 #define NREGEX_SUBST_R 346 #define REGEX_SUBST_R 347 #define NREGEX_SUBST 348 #define REGEX_SUBST 349 #define NREGEX 350 #define REGEX 351 #define SGE 352 #define SLE 353 #define SGT 354 #define SLT 355 #define SNE 356 #define SEQ 357 #define OGE 358 #define OLE 359 #define OGT 360 #define OLT 361 #define ONE 362 #define OEQ 363 #define FGE 364 #define FLE 365 #define FGT 366 #define FLT 367 #define FNE 368 #define FEQ 369 #define IGE 370 #define ILE 371 #define IGT 372 #define ILT 373 #define INE 374 #define IEQ 375 #define GE 376 #define LE 377 #define GT 378 #define LT 379 #define NE 380 #define EQ 381 #define PNE 382 #define PEQ 383 #define ELEMENTSOF 384 #define LENGTHOF 385 #define EVAL 386 #define PREV 387 #define NEXT 388 #define UNSHIFT 389 #define PUSH 390 #define SHIFT 391 #define POP 392 #define OADD 393 #define OSUB 394 #define FADD 395 #define FSUB 396 #define IADD 397 #define ISUB 398 #define ADD 399 #define SUB 400 #define OMOD 401 #define ODIV 402 #define OMUL 403 #define FMOD 404 #define FDIV 405 #define FMUL 406 #define IMOD 407 #define IDIV 408 #define IMUL 409 #define MOD 410 #define DIV 411 #define MUL 412 #define OPOW 413 #define FPOW 414 #define IPOW 415 #define POW 416 #define LNOT 417 #define DEC 418 #define INC 419 #define NEG 420 #define DEFINED 421 #define ENC 422 #define CAT 423 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 214 of yacc.c */ #line 144 "compiler.y" char *text; char ch; /* Line 214 of yacc.c */ #line 567 "y.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ #line 579 "y.tab.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if 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 yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #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_alloc; YYSTYPE yyvs_alloc; }; /* 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_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 3939 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 184 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 129 /* YYNRULES -- Number of rules. */ #define YYNRULES 336 /* YYNRULES -- Number of states. */ #define YYNSTATES 673 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 423 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 181, 180, 2, 2, 2, 176, 177, 2, 2, 178, 2, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 175, 173, 2, 58, 2, 182, 183, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 179, 2, 174, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 171, 2, 172, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 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, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170 }; #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, 9, 10, 15, 18, 23, 25, 30, 31, 36, 40, 42, 44, 48, 52, 53, 61, 62, 63, 64, 73, 74, 75, 76, 87, 88, 89, 90, 91, 92, 93, 109, 110, 111, 121, 122, 123, 135, 136, 144, 145, 152, 153, 154, 165, 169, 170, 171, 179, 183, 187, 188, 192, 195, 196, 201, 205, 209, 213, 217, 221, 222, 225, 226, 229, 231, 235, 239, 241, 245, 247, 251, 252, 257, 259, 263, 265, 269, 270, 275, 276, 277, 281, 283, 286, 287, 293, 295, 298, 299, 303, 307, 310, 313, 314, 316, 318, 321, 324, 327, 330, 333, 334, 340, 342, 346, 348, 350, 352, 353, 357, 359, 363, 365, 367, 369, 372, 374, 377, 380, 383, 386, 389, 392, 396, 397, 402, 405, 408, 411, 413, 416, 419, 420, 426, 427, 428, 439, 440, 445, 446, 455, 456, 457, 458, 465, 466, 473, 474, 479, 481, 482, 483, 492, 493, 494, 495, 505, 506, 514, 515, 522, 524, 528, 533, 538, 540, 544, 548, 549, 554, 555, 560, 561, 566, 567, 572, 573, 578, 579, 584, 585, 590, 591, 596, 597, 602, 603, 608, 609, 614, 615, 620, 621, 626, 627, 632, 633, 638, 639, 644, 645, 650, 651, 656, 657, 662, 663, 668, 669, 674, 675, 680, 681, 686, 687, 692, 693, 698, 699, 700, 708, 711, 714, 719, 724, 729, 734, 737, 739, 741, 745, 749, 753, 757, 761, 765, 769, 773, 777, 781, 785, 789, 793, 797, 801, 805, 809, 813, 817, 821, 825, 829, 833, 837, 841, 845, 849, 853, 857, 861, 865, 869, 873, 877, 881, 885, 889, 893, 897, 901, 905, 909, 913, 917, 921, 925, 929, 933, 937, 941, 945, 949, 953, 957, 961, 965, 966, 971, 972, 977, 984, 993, 1002, 1003, 1011, 1012, 1022, 1023, 1033, 1034, 1035, 1044, 1045, 1048, 1049, 1051, 1055, 1056, 1061, 1065, 1067, 1071, 1073, 1074, 1076, 1080, 1082, 1085, 1088, 1089, 1091, 1095, 1096, 1098, 1102, 1103, 1106, 1108, 1111, 1114, 1118, 1120 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { 185, 0, -1, -1, -1, 185, 186, 187, -1, -1, 171, 188, 185, 172, -1, 264, 173, -1, 235, 59, 235, 173, -1, 173, -1, 53, 185, 174, 172, -1, -1, 3, 175, 189, 187, -1, 40, 3, 173, -1, 41, -1, 42, -1, 25, 217, 173, -1, 26, 220, 173, -1, -1, 29, 176, 264, 177, 190, 187, 223, -1, -1, -1, -1, 32, 191, 176, 264, 177, 192, 187, 193, -1, -1, -1, -1, 31, 194, 187, 195, 32, 176, 264, 177, 173, 196, -1, -1, -1, -1, -1, -1, -1, 33, 176, 197, 216, 173, 198, 264, 173, 199, 200, 216, 177, 201, 187, 202, -1, -1, -1, 34, 232, 3, 203, 176, 264, 177, 204, 187, -1, -1, -1, 233, 3, 176, 205, 305, 300, 177, 206, 171, 185, 172, -1, -1, 24, 235, 235, 171, 207, 185, 172, -1, -1, 24, 235, 171, 208, 185, 172, -1, -1, -1, 44, 176, 3, 177, 171, 209, 185, 210, 225, 172, -1, 46, 264, 173, -1, -1, -1, 47, 171, 211, 185, 212, 228, 172, -1, 35, 215, 173, -1, 36, 264, 173, -1, -1, 36, 173, 213, -1, 37, 173, -1, -1, 19, 235, 173, 214, -1, 16, 264, 173, -1, 17, 264, 173, -1, 18, 264, 173, -1, 22, 264, 173, -1, 23, 264, 173, -1, -1, 215, 5, -1, -1, 25, 217, -1, 264, -1, 216, 178, 264, -1, 216, 15, 264, -1, 218, -1, 217, 178, 218, -1, 235, -1, 235, 58, 264, -1, -1, 235, 85, 219, 264, -1, 221, -1, 220, 178, 218, -1, 235, -1, 235, 58, 264, -1, -1, 235, 85, 222, 264, -1, -1, -1, 30, 224, 187, -1, 226, -1, 225, 226, -1, -1, 45, 3, 175, 227, 185, -1, 229, -1, 228, 229, -1, -1, 231, 230, 185, -1, 49, 264, 175, -1, 48, 175, -1, 179, 174, -1, -1, 20, -1, 21, -1, 292, 90, -1, 292, 89, -1, 235, 92, -1, 235, 91, -1, 238, 239, -1, -1, 237, 50, 236, 240, 239, -1, 255, -1, 176, 264, 177, -1, 3, -1, 28, -1, 6, -1, -1, 50, 240, 239, -1, 3, -1, 179, 264, 174, -1, 6, -1, 5, -1, 241, -1, 242, 241, -1, 263, -1, 235, 166, -1, 235, 165, -1, 166, 235, -1, 165, 235, -1, 132, 243, -1, 131, 243, -1, 243, 170, 243, -1, -1, 3, 169, 244, 292, -1, 146, 292, -1, 147, 292, -1, 164, 292, -1, 39, -1, 168, 243, -1, 38, 235, -1, -1, 179, 245, 301, 300, 174, -1, -1, -1, 233, 176, 246, 305, 300, 177, 247, 171, 185, 172, -1, -1, 51, 248, 185, 52, -1, -1, 54, 215, 173, 249, 185, 55, 215, 173, -1, -1, -1, -1, 56, 250, 251, 292, 57, 252, -1, -1, 304, 176, 253, 307, 300, 177, -1, -1, 8, 254, 308, 10, -1, 255, -1, -1, -1, 27, 256, 263, 176, 257, 307, 300, 177, -1, -1, -1, -1, 159, 258, 304, 176, 259, 260, 307, 300, 177, -1, -1, 180, 3, 176, 261, 307, 300, 177, -1, -1, 4, 176, 262, 307, 300, 177, -1, 242, -1, 176, 264, 177, -1, 181, 176, 264, 177, -1, 50, 176, 264, 177, -1, 235, -1, 235, 58, 264, -1, 235, 85, 264, -1, -1, 235, 84, 265, 264, -1, -1, 235, 83, 266, 264, -1, -1, 235, 82, 267, 264, -1, -1, 235, 81, 268, 264, -1, -1, 235, 80, 269, 264, -1, -1, 235, 79, 270, 264, -1, -1, 235, 78, 271, 264, -1, -1, 235, 77, 272, 264, -1, -1, 235, 76, 273, 264, -1, -1, 235, 75, 274, 264, -1, -1, 235, 74, 275, 264, -1, -1, 235, 73, 276, 264, -1, -1, 235, 72, 277, 264, -1, -1, 235, 71, 278, 264, -1, -1, 235, 70, 279, 264, -1, -1, 235, 69, 280, 264, -1, -1, 235, 68, 281, 264, -1, -1, 235, 67, 282, 264, -1, -1, 235, 66, 283, 264, -1, -1, 235, 65, 284, 264, -1, -1, 235, 64, 285, 264, -1, -1, 235, 63, 286, 264, -1, -1, 235, 62, 287, 264, -1, -1, 235, 61, 288, 264, -1, -1, 235, 60, 289, 264, -1, -1, -1, 292, 182, 290, 264, 175, 291, 264, -1, 139, 243, -1, 138, 243, -1, 137, 235, 178, 264, -1, 136, 235, 178, 264, -1, 135, 292, 178, 243, -1, 134, 292, 178, 243, -1, 133, 243, -1, 292, -1, 243, -1, 292, 130, 292, -1, 292, 129, 292, -1, 292, 146, 292, -1, 292, 147, 292, -1, 292, 159, 292, -1, 292, 158, 292, -1, 292, 157, 292, -1, 292, 163, 292, -1, 292, 128, 292, -1, 292, 127, 292, -1, 292, 126, 292, -1, 292, 123, 292, -1, 292, 124, 292, -1, 292, 125, 292, -1, 292, 144, 292, -1, 292, 145, 292, -1, 292, 156, 292, -1, 292, 155, 292, -1, 292, 154, 292, -1, 292, 162, 292, -1, 292, 122, 292, -1, 292, 121, 292, -1, 292, 120, 292, -1, 292, 117, 292, -1, 292, 118, 292, -1, 292, 119, 292, -1, 292, 142, 292, -1, 292, 143, 292, -1, 292, 153, 292, -1, 292, 152, 292, -1, 292, 151, 292, -1, 292, 161, 292, -1, 292, 116, 292, -1, 292, 115, 292, -1, 292, 114, 292, -1, 292, 111, 292, -1, 292, 112, 292, -1, 292, 113, 292, -1, 292, 140, 292, -1, 292, 141, 292, -1, 292, 150, 292, -1, 292, 149, 292, -1, 292, 148, 292, -1, 292, 160, 292, -1, 292, 110, 292, -1, 292, 109, 292, -1, 292, 108, 292, -1, 292, 105, 292, -1, 292, 106, 292, -1, 292, 107, 292, -1, 292, 104, 292, -1, 292, 103, 292, -1, 292, 102, 292, -1, 292, 99, 292, -1, 292, 100, 292, -1, 292, 101, 292, -1, -1, 292, 86, 293, 292, -1, -1, 292, 87, 294, 292, -1, 292, 98, 292, 88, 292, 88, -1, 292, 94, 292, 88, 292, 88, 292, 88, -1, 235, 96, 292, 88, 292, 88, 292, 88, -1, -1, 292, 97, 292, 88, 292, 88, 295, -1, -1, 292, 93, 292, 88, 292, 88, 292, 88, 296, -1, -1, 235, 95, 292, 88, 292, 88, 292, 88, 297, -1, -1, -1, 234, 298, 292, 88, 292, 88, 299, 292, -1, -1, 178, 300, -1, -1, 302, -1, 301, 178, 302, -1, -1, 264, 43, 303, 264, -1, 312, 175, 264, -1, 264, -1, 176, 264, 177, -1, 235, -1, -1, 306, -1, 305, 178, 306, -1, 3, -1, 183, 3, -1, 157, 3, -1, -1, 309, -1, 307, 178, 309, -1, -1, 309, -1, 308, 9, 309, -1, -1, 310, 311, -1, 264, -1, 183, 264, -1, 157, 264, -1, 312, 175, 264, -1, 5, -1, 235, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 234, 234, 235, 235, 240, 239, 244, 247, 250, 253, 258, 257, 269, 278, 281, 284, 287, 291, 290, 296, 302, 304, 295, 316, 321, 323, 315, 333, 338, 340, 341, 345, 347, 333, 372, 383, 371, 434, 440, 433, 460, 459, 472, 471, 494, 508, 493, 523, 527, 529, 526, 541, 544, 548, 547, 551, 555, 554, 558, 561, 564, 567, 570, 575, 576, 589, 590, 591, 592, 593, 597, 598, 602, 603, 606, 605, 616, 617, 621, 622, 625, 624, 641, 643, 642, 653, 654, 659, 658, 689, 690, 695, 694, 711, 712, 717, 718, 722, 723, 727, 728, 729, 730, 734, 737, 736, 750, 751, 755, 757, 759, 763, 764, 769, 772, 775, 780, 784, 785, 796, 798, 799, 800, 801, 803, 804, 806, 809, 808, 819, 820, 821, 823, 825, 827, 831, 830, 835, 840, 834, 852, 851, 866, 865, 871, 872, 874, 870, 878, 877, 887, 886, 894, 899, 901, 898, 918, 920, 921, 917, 938, 937, 947, 946, 957, 958, 960, 963, 966, 970, 972, 976, 975, 987, 986, 998, 997, 1009, 1008, 1020, 1019, 1031, 1030, 1042, 1041, 1053, 1052, 1064, 1063, 1075, 1074, 1086, 1085, 1097, 1096, 1108, 1107, 1119, 1118, 1130, 1129, 1141, 1140, 1152, 1151, 1163, 1162, 1174, 1173, 1185, 1184, 1196, 1195, 1207, 1206, 1218, 1217, 1229, 1228, 1240, 1239, 1251, 1256, 1250, 1266, 1268, 1270, 1272, 1274, 1276, 1279, 1282, 1286, 1288, 1289, 1291, 1292, 1293, 1294, 1295, 1296, 1298, 1299, 1300, 1301, 1302, 1303, 1305, 1306, 1307, 1308, 1309, 1310, 1312, 1313, 1314, 1315, 1316, 1317, 1319, 1320, 1321, 1322, 1323, 1324, 1326, 1327, 1328, 1329, 1330, 1331, 1333, 1334, 1335, 1336, 1337, 1338, 1340, 1341, 1342, 1343, 1344, 1345, 1347, 1348, 1349, 1350, 1351, 1352, 1360, 1359, 1372, 1371, 1383, 1386, 1389, 1393, 1392, 1397, 1396, 1401, 1400, 1405, 1424, 1404, 1519, 1520, 1523, 1524, 1525, 1530, 1529, 1533, 1535, 1540, 1541, 1544, 1545, 1546, 1550, 1552, 1559, 1569, 1570, 1571, 1574, 1575, 1576, 1580, 1580, 1587, 1603, 1620, 1637, 1656, 1657 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ID", "FUNC_ID", "VALUE", "SPECIALREF", "NOTOKEN", "TRANSLATE_PREFIX", "TRANSLATE_SEPERATOR", "TRANSLATE_END", "STRING_EOL", "STRING_EOL_S", "STRING_LABEL", "STRING_LABEL_S", "DBLCOMMA", "DEBUG", "WARNING", "ERROR", "DELETE", "FUNCTION", "METHOD", "IMPORT", "LOAD", "OBJECT", "VAR", "STATIC", "NEW", "THIS", "IF", "ELSE", "DO", "WHILE", "FOR", "FOREACH", "ASM", "RETURN", "EXIT", "DECLARED", "UNDEF", "GOTO", "BREAK", "CONTINUE", "ARRAYREF", "TRY", "CATCH", "THROW", "SWITCH", "DEFAULT", "CASE", "'.'", "EF_BEGIN", "EF_END", "BLK_BEGIN_NOCTX", "INSERT_PROG_BEGIN", "INSERT_PROG_END", "RVALUE_CONTEXT_BEGIN", "RVALUE_CONTEXT_END", "'='", "XCHG", "SAPPEND", "OPOWEQ", "OMODEQ", "ODIVEQ", "OMULEQ", "OSUBEQ", "OADDEQ", "FPOWEQ", "FMODEQ", "FDIVEQ", "FMULEQ", "FSUBEQ", "FADDEQ", "IPOWEQ", "IMODEQ", "IDIVEQ", "IMULEQ", "ISUBEQ", "IADDEQ", "POWEQ", "MODEQ", "DIVEQ", "MULEQ", "SUBEQ", "ADDEQ", "SETCOPY", "LOR", "LAND", "REGEX_SEP", "NREGEX_EVAL_R", "REGEX_EVAL_R", "NREGEX_EVAL", "REGEX_EVAL", "NREGEX_SUBST_R", "REGEX_SUBST_R", "NREGEX_SUBST", "REGEX_SUBST", "NREGEX", "REGEX", "SGE", "SLE", "SGT", "SLT", "SNE", "SEQ", "OGE", "OLE", "OGT", "OLT", "ONE", "OEQ", "FGE", "FLE", "FGT", "FLT", "FNE", "FEQ", "IGE", "ILE", "IGT", "ILT", "INE", "IEQ", "GE", "LE", "GT", "LT", "NE", "EQ", "PNE", "PEQ", "ELEMENTSOF", "LENGTHOF", "EVAL", "PREV", "NEXT", "UNSHIFT", "PUSH", "SHIFT", "POP", "OADD", "OSUB", "FADD", "FSUB", "IADD", "ISUB", "ADD", "SUB", "OMOD", "ODIV", "OMUL", "FMOD", "FDIV", "FMUL", "IMOD", "IDIV", "IMUL", "MOD", "DIV", "MUL", "OPOW", "FPOW", "IPOW", "POW", "LNOT", "DEC", "INC", "NEG", "DEFINED", "ENC", "CAT", "'{'", "'}'", "';'", "']'", "':'", "'('", "')'", "','", "'['", "'$'", "'#'", "'?'", "'@'", "$accept", "prog", "$@1", "cmd", "$@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", "asm_list", "for_cmds", "var_decl", "var_decl_entry", "$@29", "static_decl", "static_decl_entry", "$@30", "else_branch", "$@31", "catch_list", "catch_list_entry", "$@32", "case_list", "case_list_entry", "$@33", "case_list_entry_cond", "foreach_type", "function_method", "regex_eval_mode", "lvalue", "$@34", "rvalue_to_lvalue_head", "lvalue_head", "lvalue_tail_list", "lvalue_tail", "val_list_entry", "val_list", "rvalue", "$@35", "$@36", "$@37", "$@38", "$@39", "$@40", "$@41", "$@42", "$@43", "$@44", "$@45", "simple_call", "$@46", "$@47", "$@48", "$@49", "$@50", "$@51", "$@52", "rvalue_primitives", "complex_expr", "$@53", "$@54", "$@55", "$@56", "$@57", "$@58", "$@59", "$@60", "$@61", "$@62", "$@63", "$@64", "$@65", "$@66", "$@67", "$@68", "$@69", "$@70", "$@71", "$@72", "$@73", "$@74", "$@75", "$@76", "$@77", "$@78", "$@79", "basic_expr", "$@80", "$@81", "$@82", "$@83", "$@84", "$@85", "$@86", "optional_list_tail", "array_list", "array_element", "$@87", "func_expr", "arglist_def", "arglist_def_entry", "arglist_call", "translate_args", "arglist_call_entry", "$@88", "arglist_call_entry_tail", "hash_index_lvalue", 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, 46, 305, 306, 307, 308, 309, 310, 311, 61, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 123, 125, 59, 93, 58, 40, 41, 44, 91, 36, 35, 63, 64 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { 0, 184, 185, 186, 185, 188, 187, 187, 187, 187, 187, 189, 187, 187, 187, 187, 187, 187, 190, 187, 191, 192, 193, 187, 194, 195, 196, 187, 197, 198, 199, 200, 201, 202, 187, 203, 204, 187, 205, 206, 187, 207, 187, 208, 187, 209, 210, 187, 187, 211, 212, 187, 187, 187, 213, 187, 187, 214, 187, 187, 187, 187, 187, 187, 215, 215, 216, 216, 216, 216, 216, 217, 217, 218, 218, 219, 218, 220, 220, 221, 221, 222, 221, 223, 224, 223, 225, 225, 227, 226, 228, 228, 230, 229, 231, 231, 232, 232, 233, 233, 234, 234, 234, 234, 235, 236, 235, 237, 237, 238, 238, 238, 239, 239, 240, 240, 240, 241, 242, 242, 243, 243, 243, 243, 243, 243, 243, 243, 244, 243, 243, 243, 243, 243, 243, 243, 245, 243, 246, 247, 243, 248, 243, 249, 243, 250, 251, 252, 243, 253, 243, 254, 243, 243, 256, 257, 255, 258, 259, 260, 255, 261, 255, 262, 255, 263, 263, 263, 263, 263, 264, 264, 265, 264, 266, 264, 267, 264, 268, 264, 269, 264, 270, 264, 271, 264, 272, 264, 273, 264, 274, 264, 275, 264, 276, 264, 277, 264, 278, 264, 279, 264, 280, 264, 281, 264, 282, 264, 283, 264, 284, 264, 285, 264, 286, 264, 287, 264, 288, 264, 289, 264, 290, 291, 264, 264, 264, 264, 264, 264, 264, 264, 264, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 293, 292, 294, 292, 292, 292, 292, 295, 292, 296, 292, 297, 292, 298, 299, 292, 300, 300, 301, 301, 301, 303, 302, 302, 302, 304, 304, 305, 305, 305, 306, 306, 306, 307, 307, 307, 308, 308, 308, 310, 309, 311, 311, 311, 311, 312, 312 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 0, 3, 0, 4, 2, 4, 1, 4, 0, 4, 3, 1, 1, 3, 3, 0, 7, 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 15, 0, 0, 9, 0, 0, 11, 0, 7, 0, 6, 0, 0, 10, 3, 0, 0, 7, 3, 3, 0, 3, 2, 0, 4, 3, 3, 3, 3, 3, 0, 2, 0, 2, 1, 3, 3, 1, 3, 1, 3, 0, 4, 1, 3, 1, 3, 0, 4, 0, 0, 3, 1, 2, 0, 5, 1, 2, 0, 3, 3, 2, 2, 0, 1, 1, 2, 2, 2, 2, 2, 0, 5, 1, 3, 1, 1, 1, 0, 3, 1, 3, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 0, 4, 2, 2, 2, 1, 2, 2, 0, 5, 0, 0, 10, 0, 4, 0, 8, 0, 0, 0, 6, 0, 6, 0, 4, 1, 0, 0, 8, 0, 0, 0, 9, 0, 7, 0, 6, 1, 3, 4, 4, 1, 3, 3, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 0, 7, 2, 2, 4, 4, 4, 4, 2, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 4, 0, 4, 6, 8, 8, 0, 7, 0, 9, 0, 9, 0, 0, 8, 0, 2, 0, 1, 3, 0, 4, 3, 1, 3, 1, 0, 1, 3, 1, 2, 2, 0, 1, 3, 0, 1, 3, 0, 2, 1, 2, 2, 3, 1, 1 }; /* 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[] = { 2, 3, 1, 0, 109, 0, 117, 111, 151, 0, 0, 0, 0, 98, 99, 0, 0, 0, 0, 0, 154, 110, 0, 24, 20, 0, 97, 64, 0, 0, 0, 133, 0, 14, 15, 0, 0, 0, 0, 141, 2, 64, 145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 0, 0, 0, 5, 9, 0, 136, 0, 0, 4, 0, 303, 169, 0, 112, 118, 165, 233, 153, 120, 0, 232, 0, 128, 11, 163, 329, 109, 0, 169, 0, 0, 0, 109, 0, 0, 107, 0, 0, 0, 0, 71, 73, 0, 77, 79, 0, 0, 0, 0, 28, 0, 0, 0, 54, 0, 56, 135, 0, 0, 0, 49, 0, 2, 3, 0, 146, 169, 126, 125, 231, 169, 0, 0, 0, 0, 226, 225, 130, 131, 0, 132, 124, 123, 134, 2, 0, 308, 0, 0, 0, 138, 0, 0, 0, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196, 194, 192, 190, 188, 186, 184, 182, 180, 178, 176, 174, 172, 0, 103, 102, 0, 0, 122, 121, 105, 0, 104, 119, 0, 7, 290, 292, 101, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 222, 149, 0, 0, 329, 0, 327, 0, 59, 60, 61, 0, 57, 62, 63, 43, 0, 16, 0, 0, 75, 17, 0, 0, 81, 0, 169, 0, 0, 25, 0, 66, 96, 35, 65, 52, 55, 53, 13, 0, 48, 2, 0, 3, 0, 143, 0, 0, 0, 0, 0, 0, 316, 0, 3, 166, 117, 169, 314, 306, 309, 0, 161, 0, 38, 317, 0, 170, 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, 171, 0, 0, 0, 114, 116, 0, 112, 127, 0, 0, 0, 0, 0, 0, 287, 288, 289, 286, 285, 284, 281, 282, 283, 280, 279, 278, 269, 270, 271, 268, 267, 266, 257, 258, 259, 256, 255, 254, 245, 246, 247, 244, 243, 242, 235, 234, 272, 273, 260, 261, 248, 249, 236, 237, 276, 275, 274, 264, 263, 262, 252, 251, 250, 240, 239, 238, 277, 265, 253, 241, 0, 329, 129, 12, 306, 324, 329, 152, 0, 0, 331, 330, 0, 108, 58, 2, 41, 72, 74, 0, 78, 80, 0, 0, 155, 18, 0, 0, 0, 0, 68, 0, 0, 3, 168, 142, 10, 2, 0, 230, 229, 228, 227, 0, 158, 6, 311, 306, 0, 0, 329, 167, 317, 320, 0, 0, 306, 318, 0, 8, 221, 219, 217, 215, 213, 211, 209, 207, 205, 203, 201, 199, 197, 195, 193, 191, 189, 187, 185, 183, 181, 179, 177, 175, 173, 0, 0, 112, 0, 113, 291, 293, 0, 0, 0, 0, 0, 306, 329, 0, 328, 333, 332, 0, 3, 2, 76, 82, 108, 329, 0, 0, 21, 67, 0, 29, 0, 0, 45, 0, 3, 147, 108, 159, 0, 306, 307, 310, 137, 313, 306, 306, 322, 321, 306, 0, 0, 0, 0, 106, 115, 0, 0, 0, 0, 223, 0, 325, 164, 334, 44, 3, 306, 83, 0, 0, 70, 0, 69, 0, 2, 0, 0, 0, 90, 92, 64, 148, 329, 312, 0, 0, 319, 139, 304, 0, 0, 0, 0, 297, 294, 0, 150, 42, 0, 84, 19, 0, 22, 0, 36, 3, 95, 0, 51, 91, 2, 0, 306, 162, 39, 0, 0, 0, 0, 0, 0, 298, 224, 156, 0, 0, 23, 30, 0, 0, 94, 3, 144, 0, 0, 2, 305, 301, 296, 299, 295, 85, 26, 31, 37, 0, 0, 86, 160, 2, 3, 302, 300, 27, 66, 0, 47, 87, 3, 140, 0, 88, 40, 32, 2, 0, 3, 33, 34 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 3, 65, 141, 256, 528, 105, 573, 630, 104, 444, 657, 284, 575, 647, 658, 669, 672, 449, 632, 470, 638, 523, 433, 578, 633, 294, 537, 289, 432, 109, 447, 96, 97, 437, 99, 100, 440, 604, 628, 650, 651, 668, 581, 582, 614, 583, 108, 84, 67, 127, 350, 69, 70, 185, 354, 71, 72, 73, 255, 143, 318, 619, 119, 455, 122, 299, 585, 419, 82, 74, 102, 527, 136, 541, 586, 468, 257, 75, 76, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 418, 599, 77, 356, 357, 625, 656, 655, 148, 620, 544, 312, 313, 542, 78, 474, 475, 422, 258, 423, 260, 429, 314 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -394 static const yytype_int16 yypact[] = { -394, 63, -394, 1081, -84, -104, -394, -394, -394, 1359, 1359, 1359, 67, -394, -394, 1359, 1359, 67, 67, 67, -394, -394, -102, -394, -394, -93, -89, -394, 725, -55, 67, -394, 90, -394, -394, -52, 1359, -44, -48, -394, -394, -394, -394, 1547, 1547, 1547, 1547, 1547, 67, 67, 1547, 1547, 1547, 1547, -394, 1547, 67, 67, 1547, -394, -394, 1359, -394, 128, -41, -394, 1, -394, 1671, 88, 91, -394, 138, -26, 98, -394, -28, 1908, -27, -394, -394, -394, 51, -17, -21, 1749, -20, -19, -16, -394, 1359, -5, -394, 3, 9, 53, -135, -394, -23, -75, -394, -9, 61, 1359, 1081, 4, -394, -18, 164, 6, -394, 13, -394, -394, 16, 167, 18, -394, 1359, -394, 22, 14, -394, -97, -26, -26, -26, 34, 1994, 2076, 10, 24, -26, -26, -394, -394, 133, -394, -394, -394, -26, -394, 26, 1509, 30, 1359, 32, -394, 1547, 1359, 67, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 1359, -394, -394, 1547, 1547, -394, -394, -394, 28, -394, -394, 1547, -394, -394, -394, -394, -394, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, -394, -394, 1547, 1081, -81, 95, -394, 790, -394, -394, -394, 36, -394, -394, -394, -394, 38, -394, 67, 1359, -394, -394, 67, 1359, -394, 1359, -394, 35, 39, -394, 1359, 1136, -394, -394, -394, -394, -394, -394, -394, 40, -394, -394, 41, 123, 33, -394, 1547, 1547, 1547, 1359, 1359, 1359, -394, 43, 49, -13, 47, 1710, 172, 45, -394, 50, -394, 54, -394, 15, 2158, -394, 55, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, 1359, -394, 2236, 2314, 28, -394, -394, 1359, 91, -394, 1547, 1547, 2392, 2470, 2548, 2626, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 3776, 251, 251, 251, 251, 251, 251, 251, 251, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -394, -394, -394, -394, 1359, -81, -394, -394, 52, -394, -394, -394, 1359, 1359, -394, -394, 57, -394, -394, -394, -394, -394, -394, 1359, -394, -394, 1359, 58, -394, -394, 195, 59, 67, 5, -394, 68, 69, 64, -394, -394, -394, -394, 1830, -26, -26, -394, -394, 62, -394, -394, -394, 1305, 60, 1359, -81, -394, 15, -394, 242, 243, 70, -394, 1547, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 1547, 1547, 91, 75, -394, 3561, 3636, 1547, 1547, 1547, 1547, 76, 52, -61, 73, -394, -394, -394, 1359, 84, -394, -394, -394, 82, -81, 1081, 85, -394, 86, 1359, -394, 1359, 1359, -394, 74, 205, -394, 87, -394, 1359, 89, -394, -394, -394, -394, 52, 70, -394, -394, 7, 93, 2704, 2782, 2860, -394, -394, 2938, 3016, 3094, 3172, -394, 94, -394, -394, -394, -394, 104, 52, 232, 1359, 1081, -394, 1359, -394, 97, -394, 107, 1359, 2, -394, -394, -394, -394, -81, -394, 100, 106, -394, -394, -394, 1547, 1547, 1547, 1547, -394, -394, 1359, -394, -394, 108, -394, -394, 109, -394, 92, -394, 221, -394, 112, -394, -394, -394, 19, 52, -394, -394, 113, 1547, 3250, 3328, 3406, 3484, -394, -394, -394, 1081, 117, -394, -394, 1081, 246, -394, 29, -394, 116, 124, -394, 3711, -394, -394, -394, -394, -394, -394, -394, -394, 291, -6, -394, -394, -394, 130, -394, -394, -394, 1136, 121, -394, -394, 131, -394, 17, -394, -394, -394, -394, 1081, -1, -394, -394 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -394, -35, -394, -87, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -38, -354, -141, -189, -394, -394, -394, -394, -394, -394, -394, -344, -394, -394, -274, -394, -394, -394, -2, -394, -3, -394, -394, -394, -324, -42, 239, -394, -22, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 102, -394, -394, -394, -394, -394, -394, -394, 210, 360, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, -394, 827, -394, -394, -394, -394, -394, -394, -394, -260, -394, -151, -394, 179, -154, -235, -393, -394, -80, -394, -394, 99 }; /* 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 -337 static const yytype_int16 yytable[] = { 68, 66, 259, 121, 146, 120, 85, 85, 85, 91, 471, 287, 85, 85, 95, 98, 101, 282, 471, 287, 532, 124, 125, 126, 287, 85, 515, 113, 132, 133, 507, 351, 532, 85, 352, 272, 140, -108, 270, 649, 123, 123, 123, 271, -89, 130, 131, 123, 123, 276, 579, 580, 466, 138, 139, 123, 89, 5, 85, 7, -326, -326, 273, 2, 89, 5, 6, 7, 181, 182, 89, 5, 81, 7, 103, 548, 277, -93, -93, -316, 20, 21, 435, 106, 296, 79, 438, 85, 20, 21, 107, 80, 269, 114, 20, 21, -323, -323, 274, 279, 85, 68, 66, 275, 424, 425, 307, 249, 250, 251, 252, 38, -50, -50, 92, 85, -306, 543, 112, 92, 92, 92, 579, 580, 115, 177, 178, 117, 118, 179, 180, 144, 92, 305, 570, 145, 89, 5, 183, 7, 310, 184, 85, 6, 187, 188, 85, 321, -107, 254, 92, 92, 79, 261, 262, 147, 285, 263, 92, 92, 20, 21, 517, -315, 472, 355, 660, 286, 265, 421, 292, -89, 472, 85, 612, 453, 266, 147, 533, 288, 283, 557, 267, 534, 123, 543, 290, 298, 302, 291, 473, 293, 636, 616, 667, 534, 297, 92, 473, 181, 182, -93, 303, 308, 92, 454, 315, 353, 317, 434, -316, 442, 54, 431, 553, 464, 443, 450, 452, 462, 54, 463, -335, 465, 268, 467, 54, 529, 477, 90, 516, 469, 521, 63, 546, 526, 530, 278, 92, 540, 536, 63, 64, 90, 535, 550, 551, 63, 552, 558, 566, 563, 92, 68, 66, 564, 568, 310, -166, 451, 584, 572, 603, -315, 271, 631, -46, 543, 98, 85, 591, 600, 98, 85, 608, 85, 601, 617, 457, 458, 85, 85, 610, 618, 639, 627, 629, 634, 588, 589, 646, 649, 54, 652, 659, 653, 665, 123, 123, 85, 85, 85, 663, 666, 664, 531, 661, 613, 505, 304, 602, 186, 280, 63, 545, 306, 549, 590, 0, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 518, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 637, 0, 0, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 87, 88, 0, 92, 0, 93, 94, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 116, 0, 522, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 85, 0, 0, 0, 0, 538, 142, 0, 85, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 565, 85, 0, 0, 0, 571, 0, 98, 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 281, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 295, 0, 0, 0, 0, 0, 0, 0, 606, 0, 569, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 0, 316, 0, 0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 68, 66, 0, 0, 85, 0, 85, 85, 0, 0, 0, 347, 0, 0, 85, 0, 645, 0, 609, 0, 648, 615, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 68, 66, 85, 0, 0, 0, 0, 85, 0, 635, 0, 0, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 428, 0, 0, 0, 0, 68, 66, 0, 0, 68, 66, 0, 436, 670, 0, 0, 439, 0, 441, 0, 0, 0, 0, 445, 448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 459, 460, 461, 0, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 0, 0, 0, 0, 0, 0, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 5, 6, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 514, 41, 0, 42, 0, 0, 0, 0, 519, 520, 0, 0, 0, 0, 0, 83, 5, 309, 7, 524, 8, 0, 525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 311, 0, 547, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 0, 41, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 52, 53, 128, 129, 0, 0, 0, 0, 134, 135, 567, 137, 0, 54, 0, 0, 0, 0, 55, 56, 57, 574, 58, 576, 577, 0, 0, 110, 0, 0, 61, 587, 0, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 605, 0, 0, 607, 52, 53, 0, 0, 611, 0, 0, 0, 0, 0, 0, 426, 0, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 626, 0, 0, 0, 0, 0, 0, 61, 0, 0, 62, 63, 64, 0, 427, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 349, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 448, 0, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 0, 0, 420, 0, 4, 5, 6, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 0, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 0, 35, 456, 36, 37, 0, 0, 38, 39, 0, 40, 41, 0, 42, 0, 83, 5, 6, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 446, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 508, 509, 0, 38, 39, 0, 0, 41, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 0, 0, 59, 0, 60, 0, 0, 61, 0, 0, 62, 63, 64, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 56, 57, 554, 58, 0, 0, 0, 83, 5, 309, 7, 61, 8, 0, 62, 63, 64, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 555, 556, 20, 21, 0, 0, 0, 559, 560, 561, 562, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 0, 41, 0, 42, 83, 5, 6, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 0, 41, 0, 42, 0, 0, 0, 0, 621, 622, 623, 624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 640, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 0, 0, 0, 0, 0, 0, 0, 61, 0, 543, 62, 63, 64, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 83, 5, 309, 7, 0, 8, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 0, 13, 14, 0, 0, 0, 0, 61, 20, 21, 62, 63, 64, 0, 0, 0, 0, 0, 0, 30, 31, 0, 83, 5, 6, 7, 0, 8, 0, 0, 0, 38, 39, 0, 0, 41, 0, 42, 0, 13, 14, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 39, 0, 0, 41, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 43, 44, 0, 0, 0, 0, 0, 61, 0, 0, 62, 63, 64, 0, 0, 52, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 55, 56, 57, 0, 58, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, 62, 63, 64, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 0, 0, 0, 0, 0, 177, 178, 0, 0, 179, 180, 149, 0, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 0, 0, 0, 0, 0, 177, 178, 0, 0, 179, 180, 149, 0, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 0, 181, 182, 0, 0, 177, 178, 0, 0, 179, 180, 0, -316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 182, 0, 0, 0, 0, 0, 0, 0, 0, -336, -316, 539, 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, 181, 182, 189, 190, 0, 191, 192, 0, 0, 193, 194, -316, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 0, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, 189, 190, 0, 191, 192, 0, 0, 193, 194, 0, 253, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 0, 0, 0, 0, 189, 190, 0, 191, 192, 0, 0, 193, 194, 0, 300, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 0, 0, 0, 0, 189, 190, 476, 191, 192, 0, 0, 193, 194, 0, 301, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 503, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 504, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 510, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 511, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 512, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 513, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 592, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 593, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 594, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 595, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 596, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 597, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 598, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 641, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 642, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 643, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 189, 190, 644, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 190, 0, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 191, 192, 0, 0, 193, 194, 0, 0, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, -337, -337, 0, 0, -337, -337, 0, 0, -337, -337, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, -337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252 }; static const yytype_int16 yycheck[] = { 3, 3, 82, 41, 3, 40, 9, 10, 11, 12, 3, 5, 15, 16, 17, 18, 19, 104, 3, 5, 15, 43, 44, 45, 5, 28, 419, 30, 50, 51, 354, 3, 15, 36, 6, 58, 58, 50, 173, 45, 43, 44, 45, 178, 45, 48, 49, 50, 51, 58, 48, 49, 312, 56, 57, 58, 3, 4, 61, 6, 9, 10, 85, 0, 3, 4, 5, 6, 165, 166, 3, 4, 176, 6, 176, 468, 85, 48, 49, 176, 27, 28, 271, 176, 119, 169, 275, 90, 27, 28, 179, 175, 95, 3, 27, 28, 177, 178, 173, 102, 103, 104, 104, 178, 9, 10, 141, 160, 161, 162, 163, 50, 48, 49, 12, 118, 177, 178, 173, 17, 18, 19, 48, 49, 176, 91, 92, 171, 176, 95, 96, 3, 30, 136, 527, 176, 3, 4, 50, 6, 143, 50, 145, 5, 170, 173, 149, 150, 50, 176, 48, 49, 169, 173, 173, 176, 174, 173, 56, 57, 27, 28, 422, 176, 157, 187, 172, 3, 173, 256, 3, 172, 157, 176, 172, 52, 173, 176, 173, 173, 176, 505, 173, 178, 187, 178, 173, 173, 178, 173, 183, 173, 173, 586, 177, 178, 174, 95, 183, 165, 166, 172, 178, 177, 102, 172, 176, 179, 176, 171, 176, 176, 159, 177, 474, 43, 177, 177, 177, 176, 159, 172, 175, 178, 171, 175, 159, 32, 173, 176, 178, 177, 175, 180, 174, 177, 177, 176, 136, 177, 171, 180, 181, 176, 176, 3, 3, 180, 178, 174, 177, 175, 150, 256, 256, 515, 172, 260, 176, 294, 55, 176, 30, 176, 178, 173, 45, 178, 271, 272, 177, 177, 275, 276, 177, 278, 172, 177, 300, 301, 283, 284, 175, 177, 171, 177, 177, 175, 548, 549, 173, 45, 159, 177, 3, 171, 175, 300, 301, 302, 303, 304, 172, 172, 658, 446, 650, 581, 350, 176, 570, 72, 102, 180, 465, 136, 470, 552, -1, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 424, -1, -1, -1, -1, -1, 353, -1, -1, -1, -1, -1, 616, -1, -1, 260, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 11, -1, 271, -1, 15, 16, 275, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, -1, -1, -1, -1, -1, -1, -1, 36, -1, 433, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 418, -1, -1, -1, -1, 455, 61, -1, 426, 427, -1, -1, -1, -1, -1, -1, -1, -1, -1, 437, -1, 516, 440, -1, -1, -1, 528, -1, 446, -1, -1, -1, -1, -1, -1, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 465, 103, 467, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 118, -1, -1, -1, -1, -1, -1, -1, 573, -1, 523, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 143, -1, 145, -1, -1, -1, 149, -1, -1, -1, -1, -1, -1, -1, -1, 521, -1, -1, -1, -1, -1, -1, 528, 528, -1, -1, 532, -1, 534, 535, -1, -1, -1, 176, -1, -1, 542, -1, 628, -1, 578, -1, 632, 584, -1, 446, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 572, 573, 573, 575, -1, -1, -1, -1, 580, -1, 614, -1, -1, 669, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 599, -1, -1, -1, -1, -1, -1, -1, 639, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 653, -1, 260, -1, -1, -1, -1, 628, 628, -1, -1, 632, 632, -1, 272, 668, -1, -1, 276, -1, 278, -1, -1, -1, -1, 283, 284, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 658, -1, -1, -1, -1, -1, -1, 302, 303, 304, -1, 669, 669, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, -1, -1, -1, -1, -1, -1, 353, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, 51, -1, 418, 54, -1, 56, -1, -1, -1, -1, 426, 427, -1, -1, -1, -1, -1, 3, 4, 5, 6, 437, 8, -1, 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, -1, -1, 465, -1, 467, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, -1, -1, 146, 147, 46, 47, -1, -1, -1, -1, 52, 53, 521, 55, -1, 159, -1, -1, -1, -1, 164, 165, 166, 532, 168, 534, 535, -1, -1, 173, -1, -1, 176, 542, -1, 179, 180, 181, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 572, -1, -1, 575, 146, 147, -1, -1, 580, -1, -1, -1, -1, -1, -1, 157, -1, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, 599, -1, -1, -1, -1, -1, -1, 176, -1, -1, 179, 180, 181, -1, 183, -1, 148, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 179, 180, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 658, -1, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, -1, -1, 255, -1, 3, 4, 5, 6, -1, 8, -1, -1, -1, -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, -1, 44, 299, 46, 47, -1, -1, 50, 51, -1, 53, 54, -1, 56, -1, 3, 4, 5, 6, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, -1, -1, 25, -1, 27, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, 356, 357, -1, 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, -1, -1, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, -1, -1, 171, -1, 173, -1, -1, 176, -1, -1, 179, 180, 181, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, -1, -1, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, 164, 165, 166, 476, 168, -1, -1, -1, 3, 4, 5, 6, 176, 8, -1, 179, 180, 181, -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, -1, -1, 503, 504, 27, 28, -1, -1, -1, 510, 511, 512, 513, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, 3, 4, 5, 6, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 20, 21, -1, -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, 593, 594, 595, 596, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, 620, -1, -1, -1, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, -1, -1, -1, -1, -1, -1, -1, 176, -1, 178, 179, 180, 181, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, -1, -1, 146, 147, -1, -1, -1, -1, -1, 3, 4, 5, 6, -1, 8, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, -1, 20, 21, -1, -1, -1, -1, 176, 27, 28, 179, 180, 181, -1, -1, -1, -1, -1, -1, 38, 39, -1, 3, 4, 5, 6, -1, 8, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, -1, 20, 21, -1, -1, -1, -1, -1, 27, 28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 131, 132, 133, 134, 135, 136, 137, 138, 139, -1, -1, -1, -1, -1, -1, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, 131, 132, -1, -1, -1, -1, -1, 176, -1, -1, 179, 180, 181, -1, -1, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, 164, 165, 166, -1, 168, -1, -1, -1, -1, -1, -1, -1, 176, -1, -1, 179, 180, 181, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, -1, -1, -1, -1, 91, 92, -1, -1, 95, 96, 58, -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, -1, -1, -1, -1, 91, 92, -1, -1, 95, 96, 58, -1, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, -1, 165, 166, -1, -1, 91, 92, -1, -1, 95, 96, -1, 176, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 165, 166, -1, -1, -1, -1, -1, -1, -1, -1, 175, 176, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 165, 166, 86, 87, -1, 89, 90, -1, -1, 93, 94, 176, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, -1, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, -1, -1, 86, 87, -1, 89, 90, -1, -1, 93, 94, -1, 182, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, 86, 87, -1, 89, 90, -1, -1, 93, 94, -1, 178, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, 178, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 86, 87, 88, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 87, -1, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 89, 90, -1, -1, 93, 94, -1, -1, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, -1, -1, -1, -1, -1, -1, -1, -1, -1, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 185, 0, 186, 3, 4, 5, 6, 8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 47, 50, 51, 53, 54, 56, 131, 132, 133, 134, 135, 136, 137, 138, 139, 146, 147, 159, 164, 165, 166, 168, 171, 173, 176, 179, 180, 181, 187, 233, 234, 235, 237, 238, 241, 242, 243, 255, 263, 264, 292, 304, 169, 175, 176, 254, 3, 233, 235, 264, 264, 264, 3, 176, 235, 255, 264, 264, 235, 217, 218, 235, 220, 221, 235, 256, 176, 194, 191, 176, 179, 232, 215, 173, 264, 173, 235, 3, 176, 264, 171, 176, 248, 185, 215, 250, 235, 243, 243, 243, 235, 292, 292, 235, 235, 243, 243, 292, 292, 258, 292, 235, 235, 243, 188, 264, 245, 3, 176, 3, 176, 298, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 91, 92, 95, 96, 165, 166, 50, 50, 239, 241, 170, 173, 86, 87, 89, 90, 93, 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 182, 176, 244, 189, 262, 308, 309, 310, 173, 173, 173, 264, 173, 173, 173, 171, 235, 173, 178, 58, 85, 173, 178, 58, 85, 176, 235, 263, 264, 187, 176, 197, 174, 3, 5, 173, 213, 173, 173, 3, 173, 211, 264, 185, 174, 173, 251, 178, 178, 178, 178, 176, 235, 304, 185, 177, 5, 235, 264, 301, 302, 312, 176, 264, 176, 246, 292, 264, 235, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 292, 292, 236, 3, 6, 179, 240, 243, 293, 294, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 290, 253, 292, 187, 307, 309, 9, 10, 157, 183, 264, 311, 312, 177, 214, 208, 171, 218, 264, 219, 218, 264, 222, 264, 176, 177, 195, 264, 25, 216, 264, 203, 177, 185, 177, 52, 172, 249, 292, 243, 243, 264, 264, 264, 176, 172, 43, 178, 300, 175, 261, 177, 205, 3, 157, 183, 305, 306, 88, 173, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, 88, 88, 240, 264, 239, 292, 292, 88, 88, 88, 88, 264, 307, 178, 300, 309, 264, 264, 175, 185, 207, 264, 264, 177, 257, 190, 32, 177, 217, 15, 173, 178, 176, 171, 212, 185, 57, 177, 259, 303, 178, 300, 302, 174, 264, 307, 305, 3, 3, 178, 300, 292, 292, 292, 239, 174, 292, 292, 292, 292, 175, 300, 309, 177, 264, 172, 185, 307, 187, 176, 192, 264, 198, 264, 264, 209, 48, 49, 228, 229, 231, 55, 252, 260, 264, 300, 300, 306, 177, 88, 88, 88, 88, 88, 88, 88, 291, 177, 172, 300, 30, 223, 264, 187, 264, 177, 185, 175, 264, 172, 229, 230, 215, 307, 177, 177, 247, 299, 292, 292, 292, 292, 295, 264, 177, 224, 177, 193, 173, 204, 210, 175, 185, 173, 300, 206, 171, 292, 88, 88, 88, 88, 187, 173, 199, 187, 45, 225, 226, 177, 171, 185, 297, 296, 196, 200, 3, 172, 226, 185, 172, 216, 175, 172, 177, 227, 201, 185, 187, 202 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #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) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* 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 /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* 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 static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | 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++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # 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 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). 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 #endif #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 */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*-------------------------. | yyparse or yypush_parse. | `-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); 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; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | 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++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* 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; /* 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 (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; 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 lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* 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]; if (yyn <= 0) { if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* 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) { case 3: /* Line 1455 of yacc.c */ #line 235 "compiler.y" { create_debug_op(0); } break; case 5: /* Line 1455 of yacc.c */ #line 240 "compiler.y" { spl_asm_add(as, SPL_OP_BEGIN, 0); } break; case 6: /* Line 1455 of yacc.c */ #line 242 "compiler.y" { spl_asm_add(as, SPL_OP_END, 0); } break; case 7: /* Line 1455 of yacc.c */ #line 245 "compiler.y" { spl_asm_add(as, SPL_OP_DROP, 0); CHECKPOINT(); } break; case 8: /* Line 1455 of yacc.c */ #line 248 "compiler.y" { spl_asm_add(as, SPL_OP_LXCHG, 0); } break; case 9: /* Line 1455 of yacc.c */ #line 251 "compiler.y" { CHECKPOINT(); } break; case 11: /* Line 1455 of yacc.c */ #line 258 "compiler.y" { char *label; my_asprintf(&label, "L%d:%s", lbstack_value(), (yyvsp[(1) - (2)].text)); if ( spl_asm_setlabel(as, label, spl_asm_add(as, SPL_OP_NOP, 0)) < 0 ) { spl_yyerror("Assembler error"); free(label); YYABORT; } free(label); free((yyvsp[(1) - (2)].text)); } break; case 13: /* Line 1455 of yacc.c */ #line 270 "compiler.y" { char *label; my_asprintf(&label, "L%d:%s", lbstack_value(), (yyvsp[(2) - (3)].text)); spl_asm_reflabel(as, label, spl_asm_add(as, SPL_OP_GOTO, 0)); free(label); free((yyvsp[(2) - (3)].text)); } break; case 14: /* Line 1455 of yacc.c */ #line 279 "compiler.y" { breakcont_goto('B'); } break; case 15: /* Line 1455 of yacc.c */ #line 282 "compiler.y" { breakcont_goto('C'); } break; case 16: /* Line 1455 of yacc.c */ #line 285 "compiler.y" { CHECKPOINT(); } break; case 17: /* Line 1455 of yacc.c */ #line 288 "compiler.y" { CHECKPOINT(); } break; case 18: /* Line 1455 of yacc.c */ #line 291 "compiler.y" { spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 19: /* Line 1455 of yacc.c */ #line 293 "compiler.y" { CHECKPOINT(); } break; case 20: /* Line 1455 of yacc.c */ #line 296 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); breakcont_begin(); if (breakcont_label('C')) YYABORT; } break; case 21: /* Line 1455 of yacc.c */ #line 302 "compiler.y" { spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 22: /* Line 1455 of yacc.c */ #line 304 "compiler.y" { int label_end = pbstack_pop(); int label_begin = pbstack_pop(); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), label_begin); spl_asm_setaddr(as, label_end, spl_asm_add(as, SPL_OP_NOP, 0)); if (breakcont_label('B')) YYABORT; breakcont_end(); } break; case 23: /* Line 1455 of yacc.c */ #line 313 "compiler.y" { CHECKPOINT(); } break; case 24: /* Line 1455 of yacc.c */ #line 316 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); breakcont_begin(); } break; case 25: /* Line 1455 of yacc.c */ #line 321 "compiler.y" { if (breakcont_label('C')) YYABORT; } break; case 26: /* Line 1455 of yacc.c */ #line 323 "compiler.y" { int label_begin = pbstack_pop(); spl_asm_add(as, SPL_OP_IF, 0); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), label_begin); if (breakcont_label('B')) YYABORT; breakcont_end(); } break; case 27: /* Line 1455 of yacc.c */ #line 331 "compiler.y" { CHECKPOINT(); } break; case 28: /* Line 1455 of yacc.c */ #line 333 "compiler.y" { breakcont_begin(); spl_asm_add(as, SPL_OP_BEGIN, 0); } break; case 29: /* Line 1455 of yacc.c */ #line 338 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 30: /* Line 1455 of yacc.c */ #line 340 "compiler.y" { spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 31: /* Line 1455 of yacc.c */ #line 341 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 32: /* Line 1455 of yacc.c */ #line 345 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 33: /* Line 1455 of yacc.c */ #line 347 "compiler.y" { if (breakcont_label('C')) YYABORT; int label_body_start = pbstack_pop(); int label_extra_start = pbstack_pop(); int label_finish_jump = pbstack_pop(); int label_cond_start = pbstack_pop(); int label_body_end = spl_asm_add(as, SPL_OP_JUMP, 0); spl_asm_setaddr(as, label_body_end, label_cond_start); spl_asm_setaddr(as, label_finish_jump, spl_asm_add(as, SPL_OP_NOP, 0)); spl_asm_shuffle(as, label_body_end - label_body_start, label_body_start, label_extra_start, label_body_start - label_extra_start, label_extra_start, label_extra_start + (label_body_end - label_body_start), -1); spl_asm_add(as, SPL_OP_END, 0); if (breakcont_label('B')) YYABORT; breakcont_end(); } break; case 34: /* Line 1455 of yacc.c */ #line 369 "compiler.y" { CHECKPOINT(); } break; case 35: /* Line 1455 of yacc.c */ #line 372 "compiler.y" { breakcont_begin(); spl_asm_add(as, SPL_OP_BEGIN, 0); spl_asm_add(as, SPL_OP_PUSHC, "#index"); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#array"); } break; case 36: /* Line 1455 of yacc.c */ #line 383 "compiler.y" { spl_asm_add(as, SPL_OP_POPL, 0); if (breakcont_label('C')) YYABORT; pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); spl_asm_add(as, SPL_OP_PUSHC, "#index"); spl_asm_add(as, SPL_OP_PUSH, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_NEXT, 0); spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_DEFINED, 0); spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_add(as, SPL_OP_POPL, 0); if ((yyvsp[(2) - (7)].ch) == 'V') { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(3) - (7)].text)); spl_asm_add(as, SPL_OP_PUSHC, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_HENC, 0); spl_asm_add(as, SPL_OP_DOTCAT, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); spl_asm_add(as, SPL_OP_POPL, 0); } else { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(3) - (7)].text)); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_POPL, 0); } } break; case 37: /* Line 1455 of yacc.c */ #line 417 "compiler.y" { int finish_jump = pbstack_pop(); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), pbstack_pop()); spl_asm_setaddr(as, finish_jump, spl_asm_add(as, SPL_OP_DROP, 0)); spl_asm_add(as, SPL_OP_DROP, 0); spl_asm_add(as, SPL_OP_END, 0); if (breakcont_label('B')) YYABORT; breakcont_end(); CHECKPOINT(); free((yyvsp[(3) - (9)].text)); } break; case 38: /* Line 1455 of yacc.c */ #line 434 "compiler.y" { lbstack_push(); spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(2) - (3)].text)); pbstack_push(spl_asm_add(as, (yyvsp[(1) - (3)].ch) == 'F' ? SPL_OP_REGF : SPL_OP_REGM, 0)); } break; case 39: /* Line 1455 of yacc.c */ #line 440 "compiler.y" { spl_asm_add(as, SPL_OP_CLEARA, 0); if (gen_debug_info) { spl_asm_add(as, SPL_OP_PUSHC, "#func"); spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(2) - (7)].text)); spl_asm_add(as, SPL_OP_POPL, 0); } } break; case 40: /* Line 1455 of yacc.c */ #line 449 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_RETURN, 0); spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_POPL, 0)); CHECKPOINT(); lbstack_pop(); free((yyvsp[(2) - (11)].text)); } break; case 41: /* Line 1455 of yacc.c */ #line 460 "compiler.y" { lbstack_push(); spl_asm_add(as, SPL_OP_OBJECT, 0); } break; case 42: /* Line 1455 of yacc.c */ #line 465 "compiler.y" { spl_asm_add(as, SPL_OP_ENDOBJ, 0); CHECKPOINT(); lbstack_pop(); } break; case 43: /* Line 1455 of yacc.c */ #line 472 "compiler.y" { lbstack_push(); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_OBJECT, 0); spl_asm_add(as, SPL_OP_PUSHC, "init"); pbstack_push(spl_asm_add(as, SPL_OP_REGM, 0)); spl_asm_add(as, SPL_OP_CLEARA, 0); spl_asm_add(as, SPL_OP_PUSH, "!THIS"); spl_asm_add(as, SPL_OP_RETURN, 0); spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_POPL, 0)); } break; case 44: /* Line 1455 of yacc.c */ #line 487 "compiler.y" { spl_asm_add(as, SPL_OP_ENDOBJ, 0); CHECKPOINT(); lbstack_pop(); } break; case 45: /* Line 1455 of yacc.c */ #line 494 "compiler.y" { lbstack_push(); spl_asm_add(as, SPL_OP_BEGIN, 0); spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(3) - (5)].text)); spl_asm_add(as, SPL_OP_TRY, 0); free((yyvsp[(3) - (5)].text)); int j = spl_asm_add(as, SPL_OP_JUMP, 0); int n = spl_asm_add(as, SPL_OP_NOP, 0); pbstack_push(n); pbstack_push(j); } break; case 46: /* Line 1455 of yacc.c */ #line 508 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 47: /* Line 1455 of yacc.c */ #line 512 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); int j = pbstack_pop(); int n = pbstack_pop(); spl_asm_setaddr(as, j, n); spl_asm_add(as, SPL_OP_END, 0); lbstack_pop(); } break; case 48: /* Line 1455 of yacc.c */ #line 524 "compiler.y" { spl_asm_add(as, SPL_OP_THROW, 0); } break; case 49: /* Line 1455 of yacc.c */ #line 527 "compiler.y" { spl_asm_add(as, SPL_OP_BEGIN, 0); } break; case 50: /* Line 1455 of yacc.c */ #line 529 "compiler.y" { int case_begin_jump = spl_asm_add(as, SPL_OP_JUMP, 0); int fin_jump = spl_asm_add(as, SPL_OP_JUMP, 0); spl_asm_setaddr(as, case_begin_jump, spl_asm_add(as, SPL_OP_NOP, 0)); pbstack_push(fin_jump); } break; case 51: /* Line 1455 of yacc.c */ #line 536 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); spl_asm_add(as, SPL_OP_END, 0); } break; case 52: /* Line 1455 of yacc.c */ #line 542 "compiler.y" { CHECKPOINT(); } break; case 53: /* Line 1455 of yacc.c */ #line 545 "compiler.y" { spl_asm_add(as, SPL_OP_RETURN, 0); } break; case 54: /* Line 1455 of yacc.c */ #line 548 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); } break; case 55: /* Line 1455 of yacc.c */ #line 549 "compiler.y" { spl_asm_add(as, SPL_OP_RETURN, 0); } break; case 56: /* Line 1455 of yacc.c */ #line 552 "compiler.y" { spl_asm_add(as, SPL_OP_HALT, 0); } break; case 57: /* Line 1455 of yacc.c */ #line 555 "compiler.y" { spl_asm_add(as, SPL_OP_DELETE, 0); } break; case 58: /* Line 1455 of yacc.c */ #line 556 "compiler.y" { CHECKPOINT(); } break; case 59: /* Line 1455 of yacc.c */ #line 559 "compiler.y" { spl_asm_add(as, SPL_OP_DEBUG, 0); } break; case 60: /* Line 1455 of yacc.c */ #line 562 "compiler.y" { spl_asm_add(as, SPL_OP_WARNING, 0); } break; case 61: /* Line 1455 of yacc.c */ #line 565 "compiler.y" { spl_asm_add(as, SPL_OP_ERROR, 0); } break; case 62: /* Line 1455 of yacc.c */ #line 568 "compiler.y" { spl_asm_add(as, SPL_OP_IMPORT, 0); } break; case 63: /* Line 1455 of yacc.c */ #line 571 "compiler.y" { spl_asm_add(as, SPL_OP_LOAD, 0); } break; case 65: /* Line 1455 of yacc.c */ #line 576 "compiler.y" { spl_asm_parse_line(as, (yyvsp[(2) - (2)].text)); free((yyvsp[(2) - (2)].text)); } break; case 68: /* Line 1455 of yacc.c */ #line 591 "compiler.y" { spl_asm_add(as, SPL_OP_DROP, 0); CHECKPOINT(); } break; case 69: /* Line 1455 of yacc.c */ #line 592 "compiler.y" { spl_asm_add(as, SPL_OP_DROP, 0); CHECKPOINT(); } break; case 70: /* Line 1455 of yacc.c */ #line 593 "compiler.y" { spl_asm_add(as, SPL_OP_DROP, 0); CHECKPOINT(); } break; case 73: /* Line 1455 of yacc.c */ #line 602 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPL, 0); } break; case 74: /* Line 1455 of yacc.c */ #line 603 "compiler.y" { spl_asm_add(as, SPL_OP_POPL, 0); } break; case 75: /* Line 1455 of yacc.c */ #line 606 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPL, 0); } break; case 76: /* Line 1455 of yacc.c */ #line 612 "compiler.y" { spl_asm_add(as, SPL_OP_POPU, 0); } break; case 79: /* Line 1455 of yacc.c */ #line 621 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPS, 0); } break; case 80: /* Line 1455 of yacc.c */ #line 622 "compiler.y" { spl_asm_add(as, SPL_OP_POPS, 0); } break; case 81: /* Line 1455 of yacc.c */ #line 625 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPS, 0); } break; case 82: /* Line 1455 of yacc.c */ #line 631 "compiler.y" { spl_asm_add(as, SPL_OP_POPU, 0); } break; case 83: /* Line 1455 of yacc.c */ #line 641 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 84: /* Line 1455 of yacc.c */ #line 643 "compiler.y" { int else_label = pbstack_pop(); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_setaddr(as, else_label, spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 85: /* Line 1455 of yacc.c */ #line 649 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 88: /* Line 1455 of yacc.c */ #line 659 "compiler.y" { int fin = pbstack_pop(); int frm = pbstack_pop(); spl_asm_setaddr(as, frm, spl_asm_add(as, SPL_OP_NOP, 0)); spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(2) - (3)].text)); int c = spl_asm_add(as, SPL_OP_CATCH, 0); free((yyvsp[(2) - (3)].text)); frm = spl_asm_add(as, SPL_OP_JUMP, 0); pbstack_push(frm); pbstack_push(fin); spl_asm_setaddr(as, c, spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 89: /* Line 1455 of yacc.c */ #line 677 "compiler.y" { int fin = pbstack_pop(); int frm = pbstack_pop(); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), fin); pbstack_push(frm); pbstack_push(fin); } break; case 92: /* Line 1455 of yacc.c */ #line 695 "compiler.y" { spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 93: /* Line 1455 of yacc.c */ #line 700 "compiler.y" { int next_jump = pbstack_pop(); int fin_jump = pbstack_pop(); pbstack_push(fin_jump); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), fin_jump); spl_asm_setaddr(as, next_jump, spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 95: /* Line 1455 of yacc.c */ #line 713 "compiler.y" { spl_asm_add(as, SPL_OP_ONE, 0); } break; case 96: /* Line 1455 of yacc.c */ #line 717 "compiler.y" { (yyval.ch) = 'V'; } break; case 97: /* Line 1455 of yacc.c */ #line 718 "compiler.y" { (yyval.ch) = 'K'; } break; case 98: /* Line 1455 of yacc.c */ #line 722 "compiler.y" { (yyval.ch) = 'F'; } break; case 99: /* Line 1455 of yacc.c */ #line 723 "compiler.y" { (yyval.ch) = 'M'; } break; case 100: /* Line 1455 of yacc.c */ #line 727 "compiler.y" { (yyval.ch) = REGEX_EVAL_RETURN; } break; case 101: /* Line 1455 of yacc.c */ #line 728 "compiler.y" { (yyval.ch) = REGEX_EVAL_RETURN|REGEX_EVAL_NEG; } break; case 102: /* Line 1455 of yacc.c */ #line 729 "compiler.y" { (yyval.ch) = REGEX_EVAL_SUBST; } break; case 103: /* Line 1455 of yacc.c */ #line 730 "compiler.y" { (yyval.ch) = REGEX_EVAL_SUBST|REGEX_EVAL_NEG; } break; case 105: /* Line 1455 of yacc.c */ #line 737 "compiler.y" { char varname[32]; snprintf(varname, 32, "#rvtolv%d", rvtolv_counter++); spl_asm_add(as, SPL_OP_PUSHC, varname); spl_asm_add(as, SPL_OP_XCHG, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, varname); } break; case 106: /* Line 1455 of yacc.c */ #line 746 "compiler.y" { spl_asm_add(as, SPL_OP_DOTCAT, 0); } break; case 109: /* Line 1455 of yacc.c */ #line 755 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 110: /* Line 1455 of yacc.c */ #line 757 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, "!THIS"); } break; case 111: /* Line 1455 of yacc.c */ #line 760 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 113: /* Line 1455 of yacc.c */ #line 765 "compiler.y" { spl_asm_add(as, SPL_OP_DOTCAT, 0); } break; case 114: /* Line 1455 of yacc.c */ #line 770 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 115: /* Line 1455 of yacc.c */ #line 773 "compiler.y" { spl_asm_add(as, SPL_OP_HENC, 0); } break; case 116: /* Line 1455 of yacc.c */ #line 776 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 117: /* Line 1455 of yacc.c */ #line 780 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 119: /* Line 1455 of yacc.c */ #line 786 "compiler.y" { spl_asm_add(as, SPL_OP_CAT, 0); } break; case 121: /* Line 1455 of yacc.c */ #line 798 "compiler.y" { spl_asm_add(as, SPL_OP_POSTINC, 0); } break; case 122: /* Line 1455 of yacc.c */ #line 799 "compiler.y" { spl_asm_add(as, SPL_OP_POSTDEC, 0); } break; case 123: /* Line 1455 of yacc.c */ #line 800 "compiler.y" { spl_asm_add(as, SPL_OP_PREINC, 0); } break; case 124: /* Line 1455 of yacc.c */ #line 801 "compiler.y" { spl_asm_add(as, SPL_OP_PREDEC, 0); } break; case 125: /* Line 1455 of yacc.c */ #line 803 "compiler.y" { spl_asm_add(as, SPL_OP_LENGTH, 0); } break; case 126: /* Line 1455 of yacc.c */ #line 804 "compiler.y" { spl_asm_add(as, SPL_OP_ELEMENTS, 0); } break; case 127: /* Line 1455 of yacc.c */ #line 806 "compiler.y" { spl_asm_add(as, SPL_OP_CAT, 0); } break; case 128: /* Line 1455 of yacc.c */ #line 809 "compiler.y" { spl_asm_add(as, SPL_OP_ZERO, 0); } break; case 129: /* Line 1455 of yacc.c */ #line 811 "compiler.y" { char *fname; my_asprintf(&fname, "encode_%s", (yyvsp[(1) - (4)].text)); spl_asm_add(as, SPL_OP_PUSHAV, 0); spl_asm_add(as, SPL_OP_DCALL, fname); free(fname); free((yyvsp[(1) - (4)].text)); } break; case 131: /* Line 1455 of yacc.c */ #line 820 "compiler.y" { spl_asm_add(as, SPL_OP_NEG, 0); } break; case 132: /* Line 1455 of yacc.c */ #line 821 "compiler.y" { spl_asm_add(as, SPL_OP_LNOT, 0); } break; case 133: /* Line 1455 of yacc.c */ #line 824 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); } break; case 134: /* Line 1455 of yacc.c */ #line 826 "compiler.y" { spl_asm_add(as, SPL_OP_DEFINED, 0); } break; case 135: /* Line 1455 of yacc.c */ #line 828 "compiler.y" { spl_asm_add(as, SPL_OP_DECLARED, 0); } break; case 136: /* Line 1455 of yacc.c */ #line 831 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); } break; case 138: /* Line 1455 of yacc.c */ #line 835 "compiler.y" { lbstack_push(); pbstack_push(spl_asm_add(as, (yyvsp[(1) - (2)].ch) == 'F' ? SPL_OP_REGF : SPL_OP_REGM, 0)); } break; case 139: /* Line 1455 of yacc.c */ #line 840 "compiler.y" { spl_asm_add(as, SPL_OP_CLEARA, 0); } break; case 140: /* Line 1455 of yacc.c */ #line 844 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_RETURN, 0); spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); lbstack_pop(); } break; case 141: /* Line 1455 of yacc.c */ #line 852 "compiler.y" { lbstack_push(); pbstack_push(spl_asm_add(as, SPL_OP_ENTER, 0)); } break; case 142: /* Line 1455 of yacc.c */ #line 857 "compiler.y" { spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_RETURN, 0); spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); lbstack_pop(); } break; case 143: /* Line 1455 of yacc.c */ #line 866 "compiler.y" { no_checkp_insn++; } break; case 144: /* Line 1455 of yacc.c */ #line 868 "compiler.y" { no_checkp_insn--; } break; case 145: /* Line 1455 of yacc.c */ #line 871 "compiler.y" { no_checkp_insn++; } break; case 146: /* Line 1455 of yacc.c */ #line 872 "compiler.y" { spl_asm_add(as, SPL_OP_BEGIN, 0); } break; case 147: /* Line 1455 of yacc.c */ #line 874 "compiler.y" { spl_asm_add(as, SPL_OP_END, 0); } break; case 148: /* Line 1455 of yacc.c */ #line 875 "compiler.y" { no_checkp_insn--; } break; case 149: /* Line 1455 of yacc.c */ #line 878 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 150: /* Line 1455 of yacc.c */ #line 880 "compiler.y" { pbstack_pop(); spl_asm_add(as, SPL_OP_LIFTCALL, 0); spl_asm_add(as, SPL_OP_CALL, 0); } break; case 151: /* Line 1455 of yacc.c */ #line 887 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 152: /* Line 1455 of yacc.c */ #line 889 "compiler.y" { pbstack_pop(); spl_asm_add(as, SPL_OP_DCALL, "_"); } break; case 154: /* Line 1455 of yacc.c */ #line 899 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 155: /* Line 1455 of yacc.c */ #line 901 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 156: /* Line 1455 of yacc.c */ #line 903 "compiler.y" { int call_pos = spl_asm_add(as, SPL_OP_NEW, 0); int arg_pos = pbstack_pop(); int fp_pos = pbstack_pop(); int fp_size = arg_pos - fp_pos; int arg_size = call_pos - arg_pos; spl_asm_shuffle(as, fp_size, fp_pos, fp_pos + arg_size, arg_size, arg_pos, fp_pos, -1); } break; case 157: /* Line 1455 of yacc.c */ #line 918 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 158: /* Line 1455 of yacc.c */ #line 920 "compiler.y" { spl_asm_add(as, SPL_OP_SETCTX, 0); } break; case 159: /* Line 1455 of yacc.c */ #line 921 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 160: /* Line 1455 of yacc.c */ #line 923 "compiler.y" { int call_pos = spl_asm_add(as, SPL_OP_CALL, 0); int arg_pos = pbstack_pop(); int fp_pos = pbstack_pop(); int fp_size = arg_pos - fp_pos; int arg_size = call_pos - arg_pos; spl_asm_shuffle(as, fp_size, fp_pos, fp_pos + arg_size, arg_size, arg_pos, fp_pos, -1); } break; case 161: /* Line 1455 of yacc.c */ #line 938 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 162: /* Line 1455 of yacc.c */ #line 940 "compiler.y" { pbstack_pop(); spl_asm_add(as, SPL_OP_CLIB, (yyvsp[(2) - (7)].text)); free((yyvsp[(2) - (7)].text)); } break; case 163: /* Line 1455 of yacc.c */ #line 947 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_ZERO, 0)); } break; case 164: /* Line 1455 of yacc.c */ #line 949 "compiler.y" { pbstack_pop(); spl_asm_add(as, SPL_OP_DCALL, (yyvsp[(1) - (6)].text)); free((yyvsp[(1) - (6)].text)); } break; case 167: /* Line 1455 of yacc.c */ #line 961 "compiler.y" { spl_asm_add(as, SPL_OP_TOINT, 0); } break; case 168: /* Line 1455 of yacc.c */ #line 964 "compiler.y" { spl_asm_add(as, SPL_OP_TOFLOAT, 0); } break; case 169: /* Line 1455 of yacc.c */ #line 966 "compiler.y" { spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 170: /* Line 1455 of yacc.c */ #line 971 "compiler.y" { spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 171: /* Line 1455 of yacc.c */ #line 973 "compiler.y" { spl_asm_add(as, SPL_OP_POPUC, 0); } break; case 172: /* Line 1455 of yacc.c */ #line 976 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 173: /* Line 1455 of yacc.c */ #line 981 "compiler.y" { spl_asm_add(as, SPL_OP_ADD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 174: /* Line 1455 of yacc.c */ #line 987 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 175: /* Line 1455 of yacc.c */ #line 992 "compiler.y" { spl_asm_add(as, SPL_OP_SUB, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 176: /* Line 1455 of yacc.c */ #line 998 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 177: /* Line 1455 of yacc.c */ #line 1003 "compiler.y" { spl_asm_add(as, SPL_OP_MUL, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 178: /* Line 1455 of yacc.c */ #line 1009 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 179: /* Line 1455 of yacc.c */ #line 1014 "compiler.y" { spl_asm_add(as, SPL_OP_DIV, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 180: /* Line 1455 of yacc.c */ #line 1020 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 181: /* Line 1455 of yacc.c */ #line 1025 "compiler.y" { spl_asm_add(as, SPL_OP_MOD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 182: /* Line 1455 of yacc.c */ #line 1031 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 183: /* Line 1455 of yacc.c */ #line 1036 "compiler.y" { spl_asm_add(as, SPL_OP_POW, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 184: /* Line 1455 of yacc.c */ #line 1042 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 185: /* Line 1455 of yacc.c */ #line 1047 "compiler.y" { spl_asm_add(as, SPL_OP_IADD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 186: /* Line 1455 of yacc.c */ #line 1053 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 187: /* Line 1455 of yacc.c */ #line 1058 "compiler.y" { spl_asm_add(as, SPL_OP_ISUB, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 188: /* Line 1455 of yacc.c */ #line 1064 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 189: /* Line 1455 of yacc.c */ #line 1069 "compiler.y" { spl_asm_add(as, SPL_OP_IMUL, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 190: /* Line 1455 of yacc.c */ #line 1075 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 191: /* Line 1455 of yacc.c */ #line 1080 "compiler.y" { spl_asm_add(as, SPL_OP_IDIV, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 192: /* Line 1455 of yacc.c */ #line 1086 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 193: /* Line 1455 of yacc.c */ #line 1091 "compiler.y" { spl_asm_add(as, SPL_OP_IMOD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 194: /* Line 1455 of yacc.c */ #line 1097 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 195: /* Line 1455 of yacc.c */ #line 1102 "compiler.y" { spl_asm_add(as, SPL_OP_IPOW, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 196: /* Line 1455 of yacc.c */ #line 1108 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 197: /* Line 1455 of yacc.c */ #line 1113 "compiler.y" { spl_asm_add(as, SPL_OP_FADD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 198: /* Line 1455 of yacc.c */ #line 1119 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 199: /* Line 1455 of yacc.c */ #line 1124 "compiler.y" { spl_asm_add(as, SPL_OP_FSUB, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 200: /* Line 1455 of yacc.c */ #line 1130 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 201: /* Line 1455 of yacc.c */ #line 1135 "compiler.y" { spl_asm_add(as, SPL_OP_FMUL, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 202: /* Line 1455 of yacc.c */ #line 1141 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 203: /* Line 1455 of yacc.c */ #line 1146 "compiler.y" { spl_asm_add(as, SPL_OP_FDIV, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 204: /* Line 1455 of yacc.c */ #line 1152 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 205: /* Line 1455 of yacc.c */ #line 1157 "compiler.y" { spl_asm_add(as, SPL_OP_FMOD, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 206: /* Line 1455 of yacc.c */ #line 1163 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 207: /* Line 1455 of yacc.c */ #line 1168 "compiler.y" { spl_asm_add(as, SPL_OP_FPOW, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 208: /* Line 1455 of yacc.c */ #line 1174 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 209: /* Line 1455 of yacc.c */ #line 1179 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "add"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 210: /* Line 1455 of yacc.c */ #line 1185 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 211: /* Line 1455 of yacc.c */ #line 1190 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "sub"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 212: /* Line 1455 of yacc.c */ #line 1196 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 213: /* Line 1455 of yacc.c */ #line 1201 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "mul"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 214: /* Line 1455 of yacc.c */ #line 1207 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 215: /* Line 1455 of yacc.c */ #line 1212 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "div"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 216: /* Line 1455 of yacc.c */ #line 1218 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 217: /* Line 1455 of yacc.c */ #line 1223 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "mod"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 218: /* Line 1455 of yacc.c */ #line 1229 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 219: /* Line 1455 of yacc.c */ #line 1234 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "pow"); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 220: /* Line 1455 of yacc.c */ #line 1240 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 221: /* Line 1455 of yacc.c */ #line 1245 "compiler.y" { spl_asm_add(as, SPL_OP_CAT, 0); spl_asm_add(as, SPL_OP_POPIC, 0); } break; case 222: /* Line 1455 of yacc.c */ #line 1251 "compiler.y" { spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); } break; case 223: /* Line 1455 of yacc.c */ #line 1256 "compiler.y" { int bp_pos = pbstack_pop(); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_setaddr(as, bp_pos, spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 224: /* Line 1455 of yacc.c */ #line 1262 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 225: /* Line 1455 of yacc.c */ #line 1267 "compiler.y" { spl_asm_add(as, SPL_OP_APOP, 0); } break; case 226: /* Line 1455 of yacc.c */ #line 1269 "compiler.y" { spl_asm_add(as, SPL_OP_ASHIFT, 0); } break; case 227: /* Line 1455 of yacc.c */ #line 1271 "compiler.y" { spl_asm_add(as, SPL_OP_APUSH, 0); } break; case 228: /* Line 1455 of yacc.c */ #line 1273 "compiler.y" { spl_asm_add(as, SPL_OP_AUNSHIFT, 0); } break; case 229: /* Line 1455 of yacc.c */ #line 1275 "compiler.y" { spl_asm_add(as, SPL_OP_NEXT, 0); } break; case 230: /* Line 1455 of yacc.c */ #line 1277 "compiler.y" { spl_asm_add(as, SPL_OP_PREV, 0); } break; case 231: /* Line 1455 of yacc.c */ #line 1280 "compiler.y" { spl_asm_add(as, SPL_OP_EVAL, 0); } break; case 234: /* Line 1455 of yacc.c */ #line 1288 "compiler.y" { spl_asm_add(as, SPL_OP_PEQ, 0); } break; case 235: /* Line 1455 of yacc.c */ #line 1289 "compiler.y" { spl_asm_add(as, SPL_OP_PEQ, 0); spl_asm_add(as, SPL_OP_LNOT, 0); } break; case 236: /* Line 1455 of yacc.c */ #line 1291 "compiler.y" { spl_asm_add(as, SPL_OP_ADD, 0); } break; case 237: /* Line 1455 of yacc.c */ #line 1292 "compiler.y" { spl_asm_add(as, SPL_OP_SUB, 0); } break; case 238: /* Line 1455 of yacc.c */ #line 1293 "compiler.y" { spl_asm_add(as, SPL_OP_MUL, 0); } break; case 239: /* Line 1455 of yacc.c */ #line 1294 "compiler.y" { spl_asm_add(as, SPL_OP_DIV, 0); } break; case 240: /* Line 1455 of yacc.c */ #line 1295 "compiler.y" { spl_asm_add(as, SPL_OP_MOD, 0); } break; case 241: /* Line 1455 of yacc.c */ #line 1296 "compiler.y" { spl_asm_add(as, SPL_OP_POW, 0); } break; case 242: /* Line 1455 of yacc.c */ #line 1298 "compiler.y" { spl_asm_add(as, SPL_OP_EQ, 0); } break; case 243: /* Line 1455 of yacc.c */ #line 1299 "compiler.y" { spl_asm_add(as, SPL_OP_NE, 0); } break; case 244: /* Line 1455 of yacc.c */ #line 1300 "compiler.y" { spl_asm_add(as, SPL_OP_LT, 0); } break; case 245: /* Line 1455 of yacc.c */ #line 1301 "compiler.y" { spl_asm_add(as, SPL_OP_GE, 0); } break; case 246: /* Line 1455 of yacc.c */ #line 1302 "compiler.y" { spl_asm_add(as, SPL_OP_LE, 0); } break; case 247: /* Line 1455 of yacc.c */ #line 1303 "compiler.y" { spl_asm_add(as, SPL_OP_GT, 0); } break; case 248: /* Line 1455 of yacc.c */ #line 1305 "compiler.y" { spl_asm_add(as, SPL_OP_IADD, 0); } break; case 249: /* Line 1455 of yacc.c */ #line 1306 "compiler.y" { spl_asm_add(as, SPL_OP_ISUB, 0); } break; case 250: /* Line 1455 of yacc.c */ #line 1307 "compiler.y" { spl_asm_add(as, SPL_OP_IMUL, 0); } break; case 251: /* Line 1455 of yacc.c */ #line 1308 "compiler.y" { spl_asm_add(as, SPL_OP_IDIV, 0); } break; case 252: /* Line 1455 of yacc.c */ #line 1309 "compiler.y" { spl_asm_add(as, SPL_OP_IMOD, 0); } break; case 253: /* Line 1455 of yacc.c */ #line 1310 "compiler.y" { spl_asm_add(as, SPL_OP_IPOW, 0); } break; case 254: /* Line 1455 of yacc.c */ #line 1312 "compiler.y" { spl_asm_add(as, SPL_OP_IEQ, 0); } break; case 255: /* Line 1455 of yacc.c */ #line 1313 "compiler.y" { spl_asm_add(as, SPL_OP_INE, 0); } break; case 256: /* Line 1455 of yacc.c */ #line 1314 "compiler.y" { spl_asm_add(as, SPL_OP_ILT, 0); } break; case 257: /* Line 1455 of yacc.c */ #line 1315 "compiler.y" { spl_asm_add(as, SPL_OP_IGE, 0); } break; case 258: /* Line 1455 of yacc.c */ #line 1316 "compiler.y" { spl_asm_add(as, SPL_OP_ILE, 0); } break; case 259: /* Line 1455 of yacc.c */ #line 1317 "compiler.y" { spl_asm_add(as, SPL_OP_IGT, 0); } break; case 260: /* Line 1455 of yacc.c */ #line 1319 "compiler.y" { spl_asm_add(as, SPL_OP_FADD, 0); } break; case 261: /* Line 1455 of yacc.c */ #line 1320 "compiler.y" { spl_asm_add(as, SPL_OP_FSUB, 0); } break; case 262: /* Line 1455 of yacc.c */ #line 1321 "compiler.y" { spl_asm_add(as, SPL_OP_FMUL, 0); } break; case 263: /* Line 1455 of yacc.c */ #line 1322 "compiler.y" { spl_asm_add(as, SPL_OP_FDIV, 0); } break; case 264: /* Line 1455 of yacc.c */ #line 1323 "compiler.y" { spl_asm_add(as, SPL_OP_FMOD, 0); } break; case 265: /* Line 1455 of yacc.c */ #line 1324 "compiler.y" { spl_asm_add(as, SPL_OP_FPOW, 0); } break; case 266: /* Line 1455 of yacc.c */ #line 1326 "compiler.y" { spl_asm_add(as, SPL_OP_FEQ, 0); } break; case 267: /* Line 1455 of yacc.c */ #line 1327 "compiler.y" { spl_asm_add(as, SPL_OP_FNE, 0); } break; case 268: /* Line 1455 of yacc.c */ #line 1328 "compiler.y" { spl_asm_add(as, SPL_OP_FLT, 0); } break; case 269: /* Line 1455 of yacc.c */ #line 1329 "compiler.y" { spl_asm_add(as, SPL_OP_FGE, 0); } break; case 270: /* Line 1455 of yacc.c */ #line 1330 "compiler.y" { spl_asm_add(as, SPL_OP_FLE, 0); } break; case 271: /* Line 1455 of yacc.c */ #line 1331 "compiler.y" { spl_asm_add(as, SPL_OP_FGT, 0); } break; case 272: /* Line 1455 of yacc.c */ #line 1333 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "add"); } break; case 273: /* Line 1455 of yacc.c */ #line 1334 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "sub"); } break; case 274: /* Line 1455 of yacc.c */ #line 1335 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "mul"); } break; case 275: /* Line 1455 of yacc.c */ #line 1336 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "div"); } break; case 276: /* Line 1455 of yacc.c */ #line 1337 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "mod"); } break; case 277: /* Line 1455 of yacc.c */ #line 1338 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "pow"); } break; case 278: /* Line 1455 of yacc.c */ #line 1340 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "eq"); } break; case 279: /* Line 1455 of yacc.c */ #line 1341 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "ne"); } break; case 280: /* Line 1455 of yacc.c */ #line 1342 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "lt"); } break; case 281: /* Line 1455 of yacc.c */ #line 1343 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "ge"); } break; case 282: /* Line 1455 of yacc.c */ #line 1344 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "le"); } break; case 283: /* Line 1455 of yacc.c */ #line 1345 "compiler.y" { spl_asm_add(as, SPL_OP_OBJOP, "gt"); } break; case 284: /* Line 1455 of yacc.c */ #line 1347 "compiler.y" { spl_asm_add(as, SPL_OP_SEQ, 0); } break; case 285: /* Line 1455 of yacc.c */ #line 1348 "compiler.y" { spl_asm_add(as, SPL_OP_SNE, 0); } break; case 286: /* Line 1455 of yacc.c */ #line 1349 "compiler.y" { spl_asm_add(as, SPL_OP_SLT, 0); } break; case 287: /* Line 1455 of yacc.c */ #line 1350 "compiler.y" { spl_asm_add(as, SPL_OP_SGE, 0); } break; case 288: /* Line 1455 of yacc.c */ #line 1351 "compiler.y" { spl_asm_add(as, SPL_OP_SLE, 0); } break; case 289: /* Line 1455 of yacc.c */ #line 1352 "compiler.y" { spl_asm_add(as, SPL_OP_SGT, 0); } break; case 290: /* Line 1455 of yacc.c */ #line 1360 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_IF, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_add(as, SPL_OP_DROP, 0); } break; case 291: /* Line 1455 of yacc.c */ #line 1367 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 292: /* Line 1455 of yacc.c */ #line 1372 "compiler.y" { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_add(as, SPL_OP_DROP, 0); } break; case 293: /* Line 1455 of yacc.c */ #line 1379 "compiler.y" { spl_asm_setaddr(as, pbstack_pop(), spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 294: /* Line 1455 of yacc.c */ #line 1384 "compiler.y" { spl_asm_add(as, SPL_OP_REMATCH, 0); } break; case 295: /* Line 1455 of yacc.c */ #line 1387 "compiler.y" { spl_asm_add(as, SPL_OP_RESUBST, 0); } break; case 296: /* Line 1455 of yacc.c */ #line 1390 "compiler.y" { spl_asm_add(as, SPL_OP_RESUBST, 0); } break; case 297: /* Line 1455 of yacc.c */ #line 1393 "compiler.y" { spl_asm_add(as, SPL_OP_REMATCH, 0); } break; case 298: /* Line 1455 of yacc.c */ #line 1394 "compiler.y" { spl_asm_add(as, SPL_OP_LNOT, 0); } break; case 299: /* Line 1455 of yacc.c */ #line 1397 "compiler.y" { spl_asm_add(as, SPL_OP_RESUBST, 0); } break; case 300: /* Line 1455 of yacc.c */ #line 1398 "compiler.y" { spl_asm_add(as, SPL_OP_LNOT, 0); } break; case 301: /* Line 1455 of yacc.c */ #line 1401 "compiler.y" { spl_asm_add(as, SPL_OP_RESUBST, 0); } break; case 302: /* Line 1455 of yacc.c */ #line 1402 "compiler.y" { spl_asm_add(as, SPL_OP_LNOT, 0); } break; case 303: /* Line 1455 of yacc.c */ #line 1405 "compiler.y" { spl_asm_add(as, SPL_OP_BEGIN, 0); if ((yyvsp[(1) - (1)].ch) & REGEX_EVAL_SUBST) { spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_PUSHC, "#name"); spl_asm_add(as, SPL_OP_XCHG, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); } spl_asm_add(as, SPL_OP_PUSHC, "#text"); spl_asm_add(as, SPL_OP_XCHG, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#text"); } break; case 304: /* Line 1455 of yacc.c */ #line 1424 "compiler.y" { spl_asm_add(as, SPL_OP_REMATCH, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#index"); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#newtext"); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPL, 0); pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); spl_asm_add(as, SPL_OP_PUSHC, "#index"); spl_asm_add(as, SPL_OP_PUSH, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_NEXT, 0); spl_asm_add(as, SPL_OP_COPY, 0); spl_asm_add(as, SPL_OP_DEFINED, 0); spl_asm_add(as, SPL_OP_UNLESS, 0); pbstack_push(spl_asm_add(as, SPL_OP_JUMP, 0)); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#reres"); spl_asm_add(as, SPL_OP_PUSHC, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_HENC, 0); spl_asm_add(as, SPL_OP_DOTCAT, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_add(as, SPL_OP_PUSHC, "#newtext"); spl_asm_add(as, SPL_OP_PUSH, "#newtext"); spl_asm_add(as, SPL_OP_PUSH, "#reres.=NC"); spl_asm_add(as, SPL_OP_CAT, 0); spl_asm_add(as, SPL_OP_BEGIN, 0); } break; case 305: /* Line 1455 of yacc.c */ #line 1465 "compiler.y" { spl_asm_add(as, SPL_OP_END, 0); int finish_jump = pbstack_pop(); spl_asm_add(as, SPL_OP_CAT, 0); spl_asm_add(as, SPL_OP_POPL, 0); spl_asm_setaddr(as, spl_asm_add(as, SPL_OP_JUMP, 0), pbstack_pop()); spl_asm_setaddr(as, finish_jump, spl_asm_add(as, SPL_OP_DROP, 0)); spl_asm_add(as, SPL_OP_DROP, 0); spl_asm_add(as, SPL_OP_PUSH, "#newtext"); spl_asm_add(as, SPL_OP_DEFINED, 0); spl_asm_add(as, SPL_OP_UNLESS, 0); int p1 = spl_asm_add(as, SPL_OP_JUMP, 0); if ((yyvsp[(1) - (8)].ch) & REGEX_EVAL_SUBST) spl_asm_add(as, SPL_OP_PUSH, "#name"); spl_asm_add(as, SPL_OP_PUSH, "#newtext"); spl_asm_add(as, SPL_OP_PUSHC, "#array"); spl_asm_add(as, SPL_OP_PUSH, "#index"); spl_asm_add(as, SPL_OP_HENC, 0); spl_asm_add(as, SPL_OP_DOTCAT, 0); spl_asm_add(as, SPL_OP_PUSHC, "=LC"); spl_asm_add(as, SPL_OP_DOTCAT, 0); spl_asm_add(as, SPL_OP_GETVAL, 0); spl_asm_add(as, SPL_OP_CAT, 0); if ((yyvsp[(1) - (8)].ch) & REGEX_EVAL_SUBST) { spl_asm_add(as, SPL_OP_POPI, 0); spl_asm_setaddr(as, p1, spl_asm_add(as, SPL_OP_NOP, 0)); } if ((yyvsp[(1) - (8)].ch) & REGEX_EVAL_RETURN) { int p2 = spl_asm_add(as, SPL_OP_JUMP, 0); spl_asm_setaddr(as, p1, spl_asm_add(as, SPL_OP_PUSH, "#text")); spl_asm_setaddr(as, p2, spl_asm_add(as, SPL_OP_NOP, 0)); } if ((yyvsp[(1) - (8)].ch) & REGEX_EVAL_SUBST) { spl_asm_add(as, SPL_OP_PUSH, "#array"); spl_asm_add(as, SPL_OP_ZERO, 0); spl_asm_add(as, SPL_OP_IADD, 0); } spl_asm_add(as, SPL_OP_END, 0); if ((yyvsp[(1) - (8)].ch) & REGEX_EVAL_NEG) spl_asm_add(as, SPL_OP_LNOT, 0); CHECKPOINT(); } break; case 311: /* Line 1455 of yacc.c */ #line 1530 "compiler.y" { spl_asm_add(as, SPL_OP_HENC, 0); } break; case 312: /* Line 1455 of yacc.c */ #line 1532 "compiler.y" { spl_asm_add(as, SPL_OP_APUSHREFID, 0); } break; case 313: /* Line 1455 of yacc.c */ #line 1534 "compiler.y" { spl_asm_add(as, SPL_OP_APUSHREFID, 0); } break; case 314: /* Line 1455 of yacc.c */ #line 1536 "compiler.y" { spl_asm_add(as, SPL_OP_APUSHREF, 0); } break; case 316: /* Line 1455 of yacc.c */ #line 1541 "compiler.y" { spl_asm_add(as, SPL_OP_GETVAL, 0); } break; case 320: /* Line 1455 of yacc.c */ #line 1550 "compiler.y" { spl_asm_add(as, SPL_OP_POPA, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; case 321: /* Line 1455 of yacc.c */ #line 1553 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(2) - (2)].text)); spl_asm_add(as, SPL_OP_APOPA, 0); free((yyvsp[(2) - (2)].text)); } break; case 322: /* Line 1455 of yacc.c */ #line 1560 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(2) - (2)].text)); spl_asm_add(as, SPL_OP_UNDEF, 0); spl_asm_add(as, SPL_OP_POPLC, 0); spl_asm_add(as, SPL_OP_HGETA, 0); free((yyvsp[(2) - (2)].text)); } break; case 329: /* Line 1455 of yacc.c */ #line 1580 "compiler.y" { pbstack_push(spl_asm_add(as, SPL_OP_NOP, 0)); } break; case 331: /* Line 1455 of yacc.c */ #line 1588 "compiler.y" { int begin_this_param = pbstack_pop(); int begin_param_list = pbstack_pop() + 1; int size_list = begin_this_param - begin_param_list; int size_this = spl_asm_add(as, SPL_OP_PUSHAV, 0) + 1 - begin_this_param; spl_asm_shuffle(as, size_list, begin_param_list, begin_param_list+size_this, size_this, begin_this_param, begin_param_list, -1); pbstack_push(begin_param_list - 1); } break; case 332: /* Line 1455 of yacc.c */ #line 1605 "compiler.y" { int begin_this_param = pbstack_pop(); int begin_param_list = pbstack_pop() + 1; int size_list = begin_this_param - begin_param_list; int size_this = spl_asm_add(as, SPL_OP_APUSHA, 0) + 1 - begin_this_param; spl_asm_shuffle(as, size_list, begin_param_list, begin_param_list+size_this, size_this, begin_this_param, begin_param_list, -1); pbstack_push(begin_param_list - 1); } break; case 333: /* Line 1455 of yacc.c */ #line 1622 "compiler.y" { int begin_this_param = pbstack_pop(); int begin_param_list = pbstack_pop() + 1; int size_list = begin_this_param - begin_param_list; int size_this = spl_asm_add(as, SPL_OP_HSETA, 0) + 1 - begin_this_param; spl_asm_shuffle(as, size_list, begin_param_list, begin_param_list+size_this, size_this, begin_this_param, begin_param_list, -1); pbstack_push(begin_param_list - 1); } break; case 334: /* Line 1455 of yacc.c */ #line 1639 "compiler.y" { int begin_this_param = pbstack_pop(); int begin_param_list = pbstack_pop() + 1; int size_list = begin_this_param - begin_param_list; int size_this = spl_asm_add(as, SPL_OP_APUSHREFID, 0) + 1 - begin_this_param; spl_asm_shuffle(as, size_list, begin_param_list, begin_param_list+size_this, size_this, begin_this_param, begin_param_list, -1); pbstack_push(begin_param_list - 1); } break; case 335: /* Line 1455 of yacc.c */ #line 1656 "compiler.y" { spl_asm_add(as, SPL_OP_PUSHC, (yyvsp[(1) - (1)].text)); free((yyvsp[(1) - (1)].text)); } break; /* Line 1455 of yacc.c */ #line 5765 "y.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* 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 - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | 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; } } if (0 < yysize && yysize <= yymsg_alloc) { (void) yysyntax_error (yymsg, yystate, yychar); yyerror (yymsg); } else { yyerror (YY_("syntax error")); if (yysize != 0) goto yyexhaustedlab; } } #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error 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; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (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 1675 of yacc.c */ #line 1660 "compiler.y" static struct { char *text; int lex; } lex_ops[] = { { "(**)=", OPOWEQ }, { "#**=", IPOWEQ }, { ".**=", FPOWEQ }, { "(**)", OPOW }, { "(+)=", OADDEQ }, { "(-)=", OSUBEQ }, { "(*)=", OMULEQ }, { "(/)=", ODIVEQ }, { "(%)=", OMODEQ }, { "(==)", OEQ }, { "(!=)", ONE }, { "(<=)", OLE }, { "(>=)", OGE }, { "(<)", OLT }, { "(>)", OGT }, { "(+)", OADD }, { "(-)", OSUB }, { "(*)", OMUL }, { "(/)", ODIV }, { "(%)", OMOD }, { "[*]", SPECIALREF }, { "[+]", SPECIALREF }, { "[/]", SPECIALREF }, { "[.]", SPECIALREF }, { ">>>", STRING_EOL }, { "<<<", STRING_EOL_S }, { "<=>", XCHG }, { "^==", PEQ }, { "^!=", PNE }, { "#==", IEQ }, { "#!=", INE }, { "#<=", ILE }, { "#>=", IGE }, { ".==", FEQ }, { ".!=", FNE }, { ".<=", FLE }, { ".>=", FGE }, { "~==", SEQ }, { "~!=", SNE }, { "~<=", SLE }, { "~>=", SGE }, { "#+=", IADDEQ }, { "#-=", ISUBEQ }, { "#*=", IMULEQ }, { "#/=", IDIVEQ }, { "#%=", IMODEQ }, { ".+=", FADDEQ }, { ".-=", FSUBEQ }, { ".*=", FMULEQ }, { "./=", FDIVEQ }, { ".%=", FMODEQ }, { "**=", POWEQ }, { "#**", IPOW }, { ".**", FPOW }, { ">>", STRING_LABEL }, { "<<", STRING_LABEL_S }, { "#<", ILT }, { "#>", IGT }, { ".<", FLT }, { ".>", FGT }, { "~<", SLT }, { "~>", SGT }, { ",,", DBLCOMMA }, { ":=", SETCOPY }, { "||", LOR }, { "&&", LAND }, { "++", INC }, { "--", DEC }, { "==", EQ }, { "!=", NE }, { "<=", LE }, { ">=", GE }, { "+=", ADDEQ }, { "-=", SUBEQ }, { "*=", MULEQ }, { "/=", DIVEQ }, { "%=", MODEQ }, { "#+", IADD }, { "#-", ISUB }, { "#*", IMUL }, { "#/", IDIV }, { "#%", IMOD }, { ".+", FADD }, { ".-", FSUB }, { ".*", FMUL }, { "./", FDIV }, { ".%", FMOD }, { "**", POW }, { "::", ENC }, { "~=", SAPPEND }, { "=>", ARRAYREF }, { "<", LT }, { ">", GT }, { "!", LNOT }, { "+", ADD }, { "-", SUB }, { "*", MUL }, { "/", DIV }, { "%", MOD }, { "~", CAT }, { 0, 0 } }; static struct { char *text; int lex; } lex_keywords[] = { { "debug", DEBUG }, { "warning", WARNING }, { "panic", ERROR }, { "delete", DELETE }, { "function", FUNCTION }, { "method", METHOD }, { "import", IMPORT }, { "load", LOAD }, { "new", NEW }, { "this", THIS }, { "object", OBJECT }, { "var", VAR }, { "static", STATIC }, { "if", IF }, { "else", ELSE }, { "do", DO }, { "while", WHILE }, { "for", FOR }, { "foreach", FOREACH }, { "asm", ASM }, { "return", RETURN }, { "exit", EXIT }, { "defined", DEFINED }, { "declared", DECLARED }, { "undef", UNDEF }, { "goto", GOTO }, { "break", BREAK }, { "continue", CONTINUE }, { "pop", POP }, { "shift", SHIFT }, { "push", PUSH }, { "unshift", UNSHIFT }, { "next", NEXT }, { "prev", PREV }, { "eval", EVAL }, { "not", LNOT }, { "and", LAND }, { "or", LOR }, { "try", TRY }, { "catch", CATCH }, { "throw", THROW }, { "switch", SWITCH }, { "default", DEFAULT }, { "case", CASE }, { "lengthof", LENGTHOF }, { "elementsof", ELEMENTSOF }, { 0, 0 } }; struct lex_srcfile; struct lex_srcfile { struct lex_srcfile *next; const char *text; const char *name; }; struct lex_item; struct lex_item { char *text; int lex; struct lex_item *next, *prev; struct lex_srcfile *src; const char *pos; }; static const char *input; static char *encoding; static spl_malloc_file_function *malloc_file_func; static struct lex_item *lex_item_list_first; static struct lex_item *lex_item_list_last; static struct lex_item *lex_last_item; static struct lex_item *lex_translate_ptr; int lex_translate_count; static struct lex_srcfile *lex_srcfile_list; static struct lex_srcfile *lex_srcfile_current; static jmp_buf lex_goterr; static char *lex_errstr; struct define { int active, isarg; char *name, *text, *args; struct define *next; }; static int in_pragma_arg; static struct define *define_list; static char *current_define; static int define_recursion; static struct lex_item *lex_insert(struct lex_item *insertafter, int lex, char *text) { if (in_pragma_arg) { if (text) free(text); return 0; } struct lex_item *item = calloc(1, sizeof(struct lex_item)); if (spl_yydebug) fprintf(stderr, "[Lexer: new symbol %s (%d) with (%s) value]\n", yytname[YYTRANSLATE(lex)], lex, text ? text : ""); item->text = text; item->lex = lex; item->src = lex_srcfile_current; item->pos = input; if (insertafter == lex_item_list_last) insertafter = 0; if (insertafter) { struct lex_item *next = insertafter->next; next->prev = insertafter->next = item; item->prev = insertafter; item->next = next; } else { if (lex_item_list_first) { lex_item_list_last->next = item; item->prev = lex_item_list_last; } else lex_item_list_first = item; lex_item_list_last = item; } return item; } static struct lex_item *lex_new(int lex, char *text) { return lex_insert(0, lex, text); } static struct lex_item *lex_new_translate(int lex, char *text) { if (!lex_translate_ptr) return lex_insert(0, lex, text); lex_translate_ptr = lex_insert(lex_translate_ptr, lex, text); return lex_translate_ptr; } static int spl_yylex() { if ( !lex_item_list_first ) return 0; int lex = lex_item_list_first->lex; spl_yylval.text = lex_item_list_first->text; if (spl_yydebug) fprintf(stderr, "[Lexer: shifting symbol %s (%d) with (%s) value] ", yytname[YYTRANSLATE(lex)], lex, spl_yylval.text ? spl_yylval.text : ""); if (lex_last_item) free(lex_last_item); lex_last_item = lex_item_list_first; lex_item_list_first = lex_item_list_first->next; return lex; } static void spl_lex_pragma(); static void spl_lex_string(char *term, int flags, int indenting_delim); static void spl_lex_prog_string(char *text); static void spl_lex_prog(char *term); #define LEX_STRING_BACKSLASHES 0x0001 #define LEX_STRING_SPLTAGS 0x0002 #define LEX_STRING_REGEX 0x0004 static char *malloc_file_wrapper(const char *filename, int is_embedded) { if ( is_embedded ) { char *token; my_asprintf(&token, "#embedded-file %s ", filename); const char *begin = strstr(lex_srcfile_current->text, token); int token_size = strlen(token); free(token); if ( !begin ) return 0; begin += token_size; token_size = strcspn(begin, " \r\n\t"); if ( token_size <= 0 ) return 0; token = my_strndup(begin, token_size); begin = begin + token_size; if ( *begin == ' ' || *begin == '\t' || *begin == '\r' || *begin == '\n' ) begin++; const char *end = strstr(begin, token); free(token); if ( !end ) return 0; return my_strndup(begin, end-begin); } if ( malloc_file_func ) { char *retval; if (*filename != '/' && as->vm && as->vm->current_dir_name) { char fullname[strlen(filename) + strlen(as->vm->current_dir_name) + 2]; sprintf(fullname, "%s/%s", as->vm->current_dir_name, filename); retval = malloc_file_func(fullname, 0); } else retval = malloc_file_func(filename, 0); if (retval) { if (encoding) { char *orig_retval = retval; retval = spl_utf8_import(orig_retval, encoding); free(orig_retval); if (!retval) { spl_report(SPL_REPORT_COMPILER, as, "Character set (#encoding) '%s' is unknown!\n", encoding); return 0; } } if ( spl_utf8_check(retval) ) { spl_report(SPL_REPORT_COMPILER, as, "Compiler tried to load non-utf8 encoded text!\n" "A decoder bug or just a missing '#encoding' pragma?\n"); free(retval); return 0; } } return retval; } return 0; } static char *get_pragma_body() { int data_len = strcspn(input, "\n"); while (input[data_len] == '\n' && input[data_len+1] == '\\') data_len += strcspn(input+data_len+1, "\n")+1; char *ret = my_strndup(input, data_len); input += data_len; for (char *in=ret, *out=ret; (*out = *in) != 0; in++, out++) if (in[0] == '\n' && in[1] == '\\') in++; return ret; } static void import_asm(int mode, unsigned char *bytecode, unsigned char *map, int offset, int bytecode_len) { int next_condit = 0; next_op: if (offset < 16 || offset >= bytecode_len) { my_asprintf(&lex_errstr, "Error while importing bytecode file."); longjmp(lex_goterr, __LINE__); } unsigned char op = bytecode[offset]; int arg_size = 0, arg = 0; char *txtarg = 0; if (op == SPL_OP_HALT || (mode == 0 && map[offset])) return; int this_offset = offset++; if (op < 0x60) { arg_size = 4 - (op & 3); op = op & ~3; arg = spl_bytes_to_int(arg_size, bytecode + offset); offset += arg_size; if (op >= 0x20) { if (offset + arg >= bytecode_len || offset + arg < 16) { my_asprintf(&lex_errstr, "Error while importing bytecode file."); longjmp(lex_goterr, __LINE__); } txtarg = (char*)(bytecode + offset + arg); } } if (mode == 0) { int optype = spl_optype(op); map[this_offset] = 1; int this_condit = next_condit; next_condit = optype == 'C'; if (optype == 'J' && !this_condit) { offset += arg; goto next_op; } if (optype == 'J' || optype == 'B') import_asm(mode, bytecode, map, offset + arg, bytecode_len); if (optype == 'E') return; } if (mode == 1) { char buffer[100 + (txtarg ? strlen(txtarg)*2 : 0)]; int pos = sprintf(buffer, ":BCI_%d_%d %s", import_asm_label_counter, this_offset, spl_asm_op2txt(op)); if (txtarg) { buffer[pos++] = ' '; buffer[pos++] = '\"'; for (int i=0; txtarg[i]; i++) { if (txtarg[i] == '\n') { buffer[pos++] = '\\'; buffer[pos++] = 'n'; continue; } if (txtarg[i] == '\"') { buffer[pos++] = '\\'; buffer[pos++] = '\"'; continue; } if (txtarg[i] == '\\') { buffer[pos++] = '\\'; buffer[pos++] = '\\'; continue; } buffer[pos++] = txtarg[i]; } buffer[pos++] = '\"'; } if (op < 0x20) pos += sprintf(buffer+pos, " :BCI_%d_%d", import_asm_label_counter, offset + arg); buffer[pos++] = 0; lex_new(VALUE, strdup(buffer)); while (offset < bytecode_len && !map[offset]) offset++; if (offset >= bytecode_len) return; } goto next_op; } static void spl_lex_pragma() { static const char *stop_string = " \t\r\n;,(){}[]*-+~!\'\"@#$%^&=?"; static const char *hard_pragmas[] = { "define", "undef", "encoding", "file-as-const", "file-as-code", "file-as-template", "file-as-bytecode", "embedded-file", 0 }; // ignore '#!...\n' strings if (*input == '!') { while (*input && *input != '\n') input++; return; } int stmt_len = strcspn(input, stop_string); for (int i=0; hard_pragmas[i]; i++) { int len = strlen(hard_pragmas[i]); if (!strncmp(input, hard_pragmas[i], len) && strcspn(input+len, stop_string) == 0) { stmt_len = len; break; } } char *stmt = my_strndupa(input, stmt_len); input += stmt_len; input += strspn(input, " \t\r\n"); int arg_has_asterisk_prefix = 0; char *arg = 0; if (!strncmp(stmt, "file-as-", 8)) if ( *input == '*' ) { arg_has_asterisk_prefix=1; input++; } if (!strncmp(stmt, "file-as-", 8) || !strcmp(stmt, "encoding") || !strcmp(stmt, "define") || !strcmp(stmt, "undef") || !strcmp(stmt, "embedded-file")) { int arg_len = strcspn(input, stop_string); arg = my_strndupa(input, arg_len); input += arg_len; } if ( !strcmp(stmt, "encoding") ) { return; } if ( !strcmp(stmt, "define") ) { if (in_pragma_arg) { free(get_pragma_body()); return; } struct define *def = calloc(1, sizeof(struct define)); if (*input == '(') { int len = strcspn(input+1, ")"); def->args = my_strndup(input+1, len); for (char *in=def->args, *out=def->args; (*out = *in) != 0; in++, out++) { while (in[1] == '\n' || in[1] == '\r' || in[1] == '\t' || in[1] == ' ') in++; } input += len+2; } def->name = strdup(arg); def->text = get_pragma_body(); def->next = define_list; define_list = def; return; } if ( !strcmp(stmt, "embedded-file") && *input == ' ' ) { int token_size = strcspn(++input, " \r\n\t"); if ( token_size <= 0 ) goto unknown_pragma; char *token = my_strndup(input, token_size); input = input + token_size; const char *end = strstr(input, token); free(token); if ( !end ) { my_asprintf(&lex_errstr, "Can't find end label for #%s.", stmt); longjmp(lex_goterr, __LINE__); } input = end + token_size; return; } if (in_pragma_arg) return; if ( !strcmp(stmt, "undef") ) { struct define **lastp = &define_list; struct define *def = define_list; while (def) { if (!def->isarg && !strcmp(def->name, arg)) { *lastp = def->next; free(def->name); free(def->text); if (def->args) free(def->args); free(def); def = *lastp; } else { lastp = &def->next; def = def->next; } } return; } if ( !strcmp(stmt, "file-as-const") ) { char *text = malloc_file_wrapper(arg, arg_has_asterisk_prefix); if ( !text ) { my_asprintf(&lex_errstr, "Can't open #file-as-const file (%s%s).", arg_has_asterisk_prefix ? "*" : "", arg); longjmp(lex_goterr, __LINE__); } lex_new(VALUE, text); return; } if ( !strcmp(stmt, "file-as-code") ) { char *text = malloc_file_wrapper(arg, arg_has_asterisk_prefix); if ( !text ) { my_asprintf(&lex_errstr, "Can't open #file-as-code file (%s%s).", arg_has_asterisk_prefix ? "*" : "", arg); longjmp(lex_goterr, __LINE__); } struct lex_srcfile *oldsrc = lex_srcfile_current; const char *oldinput = input; lex_srcfile_current = malloc(sizeof(struct lex_srcfile)); lex_srcfile_current->text = input = text; lex_srcfile_current->name = strdup(arg); lex_srcfile_current->next = lex_srcfile_list; lex_srcfile_list = lex_srcfile_current; spl_lex_prog(0); lex_srcfile_current = oldsrc; input = oldinput; return; } if ( !strcmp(stmt, "file-as-template") ) { char *text = malloc_file_wrapper(arg, arg_has_asterisk_prefix); if ( !text ) { my_asprintf(&lex_errstr, "Can't open #file-as-template file (%s%s).", arg_has_asterisk_prefix ? "*" : "", arg); longjmp(lex_goterr, __LINE__); } struct lex_srcfile *oldsrc = lex_srcfile_current; const char *oldinput = input; lex_srcfile_current = malloc(sizeof(struct lex_srcfile)); lex_srcfile_current->text = input = text; lex_srcfile_current->name = strdup(arg); lex_srcfile_current->next = lex_srcfile_list; lex_srcfile_list = lex_srcfile_current; spl_lex_string(0, LEX_STRING_SPLTAGS, 0); lex_srcfile_current = oldsrc; input = oldinput; return; } if ( !strcmp(stmt, "file-as-bytecode") ) { unsigned char *bytecode = 0; int bytecode_len = 0; if (malloc_file_func) { if (*arg != '/' && as->vm && as->vm->current_dir_name) { char fullname[strlen(arg) + strlen(as->vm->current_dir_name) + 2]; sprintf(fullname, "%s/%s", as->vm->current_dir_name, arg); bytecode = malloc_file_func(fullname, &bytecode_len); } else bytecode = malloc_file_func(arg, &bytecode_len); } if (!bytecode) { my_asprintf(&lex_errstr, "Can't open #file-as-bytecode file (%s).", arg); longjmp(lex_goterr, __LINE__); } if (bytecode_len < 16 || memcmp(bytecode, SPL_SIGNATURE, 16)) { my_asprintf(&lex_errstr, "Bytecode from #file-as-bytecode file (%s) has invalid signature.", arg); longjmp(lex_goterr, __LINE__); } lex_new(ASM, 0); import_asm_label_counter++; unsigned char *map = calloc(1, bytecode_len); import_asm(0, bytecode, map, 16, bytecode_len); import_asm(1, bytecode, map, 16, bytecode_len); lex_new(';', 0); free(bytecode); free(map); return; } for (struct define *def = define_list; def; def = def->next) if (!strcmp(def->name, stmt)) { lex_new(VALUE, strdup(def->text)); return; } unknown_pragma: my_asprintf(&lex_errstr, "Unknown compiler-pragma #%s.", stmt); longjmp(lex_goterr, __LINE__); } static void spl_lex_new_string(char *text, int flags) { if ( flags & LEX_STRING_BACKSLASHES ) { int i, j; for (i=0, j=0; text[i]; i++, j++) if ( text[i] == '\\' && text[i+1] ) { switch ( text[++i] ) { case 'a': text[j] = '\a'; break; case 'b': text[j] = '\b'; break; case 't': text[j] = '\t'; break; case 'n': text[j] = '\n'; break; case 'v': text[j] = '\v'; break; case 'f': text[j] = '\f'; break; case 'r': text[j] = '\r'; break; default: text[j] = input[i]; } } else text[j] = text[i]; text[j] = text[i]; } else { int i, j; for (i=0, j=0; text[i]; i++, j++) { text[j] = text[i]; } text[j] = text[i]; } if (lex_translate_ptr) { int newtext_len = 0; char *newtext; for (int i=0; text[i]; i++, newtext_len++) if (text[i] == '{') newtext_len++; newtext = malloc(newtext_len+1); for (int i=0, j=0; text[i]; i++) { newtext[j++] = text[i]; if (text[i] == '{') newtext[j++] = '}'; } newtext[newtext_len] = 0; free(text); text = newtext; } lex_new_translate(VALUE, text); } static int spl_lex_findelsetag() { int offset = strspn(input, " \t\r\n"); if (!strncmp(input + offset, "", 10)) { input += offset + 10; return 1; } return 0; } static void spl_lex_splifcalltag(int flags, int indenting_delim, int isiftag) { int len = strcspn(input, " \t\r\n>"); char *funcname, *endtag; int hasbody = 1; my_asprintf(&funcname, "%s_%.*s", isiftag ? "splif" : "splcall", len, input); my_asprintf(&endtag, "", isiftag ? "splif" : "splcall", len, input); input += len; lex_new('(', 0); lex_new(ID, funcname); lex_new('(', 0); while (1) { input += strspn(input, " \t\r\n"); if (!isiftag && input[0] == '/' && input[1] == '>') { hasbody = 0; input++; } if (*input == '>' || *input == 0) { if (*input) input++; break; } len = strcspn(input, " \t\r\n=\"\'(>"); lex_new(ID, my_strndup(input, len)); lex_new(':', 0); input += len; input += strcspn(input, "\'\"(>"); if (*input == '"') { input++; spl_lex_string("\"", LEX_STRING_BACKSLASHES, 0); if (*input == '"') input++; } if (*input == '\'') { input++; spl_lex_string("'", LEX_STRING_BACKSLASHES, 0); if (*input == '"') input++; } if (*input == '(') { input++; spl_lex_prog(")"); if (*input == ')') input++; } lex_new(',', 0); } if (!isiftag && hasbody) { lex_new(FUNCTION, 0); lex_new('(', 0); lex_new(')', 0); lex_new('{', 0); lex_new(RETURN, 0); spl_lex_string(endtag, flags, indenting_delim); lex_new(';', 0); lex_new('}', 0); } lex_new(')', 0); if (isiftag) { lex_new('?', 0); spl_lex_string(endtag, flags, indenting_delim); lex_new(':', 0); if (spl_lex_findelsetag()) spl_lex_string("", flags, indenting_delim); else lex_new(VALUE, strdup("")); } lex_new(')', 0); free(endtag); } static void spl_lex_spltag(int flags, int indenting_delim) { int len = strcspn(input, " \t\r\n>"); char *tag = my_strndupa(input, len); char *attr_var = 0; char *attr_list = 0; char *attr_code = 0; char *attr_char = 0; input += len; input += strspn(input, " \t\r\n"); while ( *input && *input != '>' ) { int inner_len = strcspn(input, " \t\r\n\"=>"); char *attr = my_strndupa(input, inner_len); input += inner_len; if ( *input == '=' ) { input++; if ( *input == '"' ) { input++; inner_len = strcspn(input, "\""); } else inner_len = strcspn(input, " \t\r\n\">"); char *value = my_strndupa(input, inner_len); input += inner_len; if (*input == '"') input++; input += strspn(input, " \t\r\n"); if ( !strcmp(attr, "var") ) attr_var = value; if ( !strcmp(attr, "list") ) attr_list = value; if ( !strcmp(attr, "code") ) attr_code = value; if ( !strcmp(attr, "char") ) attr_char = value; } } if (*input == '>') input++; if ( tag[0] == '_' && tag[strlen(tag)-1] == '_' ) { int endtag_len = strlen(tag) + 10; char endtag[endtag_len]; snprintf(endtag, endtag_len, "", tag); lex_new('(', 0); lex_new(ID, strdup(tag)); spl_lex_string(endtag, flags, indenting_delim); lex_new(')', 0); return; } if ( !strcmp(tag, "comment") ) { char *end = strstr(input, ""); if (!end) { my_asprintf(&lex_errstr, "missing ."); longjmp(lex_goterr, __LINE__); } input = end + strlen(""); lex_new(VALUE, strdup("")); return; } if ( !strcmp(tag, "inline") ) { lbstack_push(); lex_new(INSERT_PROG_BEGIN, 0); lex_new(';', 0); spl_lex_prog(""); input += strlen(""); lex_new(INSERT_PROG_END, 0); lex_new(VALUE, strdup("undef")); lex_new(';', 0); lbstack_pop(); return; } if ( !strcmp(tag, "code") ) { if ( !attr_code ) { lex_new(EF_BEGIN, 0); spl_lex_prog(""); input += strlen(""); lex_new(EF_END, 0); } else { lex_new(EF_BEGIN, 0); lex_new(VAR, 0); lex_new(ID, strdup("_data_")); lex_new('=', 0); spl_lex_string("", flags, indenting_delim); lex_new(';', 0); lex_new(RETURN, 0); spl_lex_prog_string(strdup(attr_code)); lex_new(';', 0); lex_new(EF_END, 0); } return; } if ( !strcmp(tag, "var") ) { if ( !attr_var ) { my_asprintf(&lex_errstr, " requires attribute 'var'."); longjmp(lex_goterr, __LINE__); } lex_new(EF_BEGIN, 0); char *var_name_dup; my_asprintf(&var_name_dup, "[*].%s", attr_var); if ( !attr_code ) { lex_new(VAR, 0); spl_lex_prog_string(var_name_dup); lex_new('=', 0); spl_lex_string("", flags, indenting_delim); lex_new(';', 0); } else { lex_new(VAR, 0); lex_new(ID, strdup("_data_")); lex_new('=', 0); spl_lex_string("", flags, indenting_delim); lex_new(';', 0); lex_new(VAR, 0); spl_lex_prog_string(var_name_dup); lex_new('=', 0); spl_lex_prog_string(strdup(attr_code)); lex_new(';', 0); } lex_new(EF_END, 0); return; } if ( !strcmp(tag, "if") ) { if ( !attr_code ) { my_asprintf(&lex_errstr, " requires attribute 'code'."); longjmp(lex_goterr, __LINE__); } lex_new('(', 0); spl_lex_prog_string(strdup(attr_code)); lex_new('?', 0); spl_lex_string("", flags, indenting_delim); lex_new(':', 0); if (spl_lex_findelsetag()) spl_lex_string("", flags, indenting_delim); else lex_new(VALUE, strdup("")); lex_new(')', 0); return; } if ( !strcmp(tag, "foreach") ) { if ( !attr_var || !attr_list ) { my_asprintf(&lex_errstr, " requires attributes 'var' and 'list'."); longjmp(lex_goterr, __LINE__); } lex_new(EF_BEGIN, 0); lex_new(VAR, 0); lex_new(ID, strdup("#iret")); lex_new(';', 0); lex_new(FOREACH, 0); spl_lex_prog_string(strdup(attr_var)); lex_new('(', 0); spl_lex_prog_string(strdup(attr_list)); lex_new(')', 0); lex_new(ID, strdup("#iret")); lex_new('=', 0); lex_new(ID, strdup("#iret")); lex_new(CAT, 0); spl_lex_string("", flags, indenting_delim); lex_new(';', 0); lex_new(RETURN, 0); lex_new(ID, strdup("#iret")); lex_new(';', 0); lex_new(EF_END, 0); return; } if ( !strcmp(tag, "indent") ) { lex_new('(', 0); spl_lex_string("", flags, attr_char ? *attr_char : 0); lex_new(')', 0); return; } if ( !strcmp(tag, "else") ) { my_asprintf(&lex_errstr, "Found tag without prior or tag."); longjmp(lex_goterr, __LINE__); } my_asprintf(&lex_errstr, "Unknown tag: %s", tag); longjmp(lex_goterr, __LINE__); } static char *strndup_with_indenting_delim(const char *str, int len, int indenting_delim, int *id_status) { if (!indenting_delim) return my_strndup(str, len); char *text = malloc(len + 1); int i=0, j=0; while (str[i] && i < len) { if (!*id_status) { if (!strchr(" \t\n\r", str[i])) { if (str[i] == indenting_delim) { if (str[++i] == ' ') i++; } *id_status = 1; continue; } } else { if (str[i] == '\n') *id_status = 0; text[j++] = str[i]; } i++; } text[j++] = 0; return realloc(text, j); } static void spl_lex_string(char *term, int flags, int indenting_delim) { int len, tlen = term ? strlen(term) : 0; int old_php_like_tags_active; int old_php_like_tags_indenting_delim; int old_lex_translate_count; struct lex_item *old_lex_translate_ptr; int called_in_php_like_tags_context = 0; int term_is_newline = 0; int id_status = 0; old_lex_translate_count = lex_translate_count; old_lex_translate_ptr = lex_translate_ptr; if (lex_item_list_last && lex_item_list_last->lex == ID) { char *translate_id = lex_item_list_last->text; int translate_id_len = strlen(translate_id); if (!strcmp(translate_id, "_")) { translate_id = 0; } else { if (translate_id_len < 3 || translate_id[0] != '_' || translate_id[translate_id_len-1] != '_') goto not_a_translate_call; translate_id = my_strndup(translate_id+1, translate_id_len-2); } lex_translate_ptr = lex_item_list_last; lex_item_list_last->lex = TRANSLATE_PREFIX; free(lex_item_list_last->text); lex_item_list_last->text = 0; flags &= ~LEX_STRING_SPLTAGS; lex_new(TRANSLATE_SEPERATOR, 0); if (translate_id) lex_new(VALUE, translate_id); else lex_new(UNDEF, 0); not_a_translate_call:; } if ( term && !strcmp(term, "\n") ) { term_is_newline = 1; tlen = 0; } old_php_like_tags_active = php_like_tags_active; old_php_like_tags_indenting_delim = php_like_tags_indenting_delim; php_like_tags_active = 0; if ( term && !strcmp(term, "") ) { php_like_tags_active = 1; called_in_php_like_tags_context = 1; indenting_delim = php_like_tags_indenting_delim; term = php_like_tags_term; tlen = term ? strlen(term) : 0; lex_new(ID, strdup("#tpldata")); lex_new(SAPPEND, 0); } if (!called_in_php_like_tags_context && (flags & LEX_STRING_SPLTAGS)) { lbstack_push(); lex_new(RVALUE_CONTEXT_BEGIN, 0); } for (len = 0; input[len]; len++) { if ( flags & (LEX_STRING_BACKSLASHES|LEX_STRING_REGEX) ) { if ( input[len] == '\\' && input[len+1] ) { len++; continue; } } if ( term ) { if ( term_is_newline ) { if (input[len] == '\r' || input[len] == '\n') { if (input[len] == '\r') len++; if (input[len] == '\n') len++; break; } } else if ( !strncmp(input+len, term, tlen) ) break; } if ( flags & LEX_STRING_SPLTAGS ) { if ( !strncmp(input+len, ""); input += 2; lex_new(ID, strdup("#tpldata")); lex_new(SAPPEND, 0); len = -1; continue; } } if ( input[len] == '$' && (!(flags & LEX_STRING_REGEX) || isalpha((unsigned char)input[len+1]) || strchr("_({$:[", input[len+1])) ) { spl_lex_new_string(strndup_with_indenting_delim(input, len, indenting_delim, &id_status), flags); input += len + 1; if (lex_translate_ptr) { char *translate_token; my_asprintf(&translate_token, "{%d}", lex_translate_count++); lex_new_translate(CAT, 0); lex_new_translate(VALUE, translate_token); lex_new(TRANSLATE_SEPERATOR, 0); } else lex_new(CAT, 0); switch ( *input ) { case '(': lex_new(EF_BEGIN, 0); input++; spl_lex_prog(")"); lex_new(EF_END, 0); input++; break; case '{': lex_new('(', 0); input++; spl_lex_prog("}"); lex_new(')', 0); input++; break; case '@': case '#': case ']': { char prog[3] = { '$', *input, 0 }; spl_lex_prog_string(strdup(prog)); input++; break; } case '$': case ':': case '?': len = 0; goto skip_2nd_cat_op; case ' ': case '\t': case '\r': case '\n': len = -1; while (*input == ' ' || *input == '\t') input++; if (*input == '\r') input++; if (*input == '\n') input++; goto skip_2nd_cat_op; case '[': len = -1; while (*input && *input != ']') input++; if (*input == ']') input++; goto skip_2nd_cat_op; case '<': { char *regex_result_id; int inner_len = strcspn(++input, ">"); my_asprintf(®ex_result_id, "#reres.%.*s", inner_len, input); lex_new(ID, regex_result_id); input += inner_len; if (*input == '>') input++; break; } case '-': case '+': case '0' ... '9': { char *regex_result_id; int inner_len = 1; /* strspn(input, "0123456789"); */ if (*input == '-' || *input == '+') my_asprintf(®ex_result_id, "#reres.%s", *input == '-' ? "=NC" : "=LC"); else my_asprintf(®ex_result_id, "#reres.%.*s", inner_len, input); lex_new(ID, regex_result_id); input += inner_len; break; } case 'a' ... 'z': case 'A' ... 'Z': case '_': { int inner_len = 0; do inner_len++; while ( (input[inner_len] >= 'a' && input[inner_len] <= 'z') || (input[inner_len] >= 'A' && input[inner_len] <= 'Z') || (input[inner_len] >= '0' && input[inner_len] <= '9') || input[inner_len] == '_' || input[inner_len] == '.'); while (input[inner_len-1] == '.') inner_len--; lex_new('(', 0); spl_lex_prog_string(my_strndup(input, inner_len)); lex_new(')', 0); input += inner_len; break; } default: my_asprintf(&lex_errstr, "Unrecognised $ substitution in string."); longjmp(lex_goterr, __LINE__); break; } lex_new_translate(CAT, 0); len = -1; skip_2nd_cat_op:; } } spl_lex_new_string(strndup_with_indenting_delim(input, len, indenting_delim, &id_status), flags); input += len + tlen; if (php_like_tags_active) { lex_new(';', 0); lex_new(INSERT_PROG_END, 0); lex_new(VALUE, strdup("push \"#tpldata\"")); lex_new(';', 0); } if (!called_in_php_like_tags_context && (flags & LEX_STRING_SPLTAGS)) { lex_new(RVALUE_CONTEXT_END, 0); lbstack_pop(); } if (lex_translate_ptr && !old_lex_translate_ptr) { lex_new(TRANSLATE_END, 0); lex_translate_count = old_lex_translate_count; lex_translate_ptr = old_lex_translate_ptr; } php_like_tags_active = old_php_like_tags_active; php_like_tags_indenting_delim = old_php_like_tags_indenting_delim; } static void spl_lex_prog_string(char *text) { const char *oldinput = input; struct lex_srcfile *oldsrc = lex_srcfile_current; lex_srcfile_current = malloc(sizeof(struct lex_srcfile)); lex_srcfile_current->text = input = text; my_asprintf((char**)&lex_srcfile_current->name, "%s:byte(%d)", oldsrc->name, (int)(oldinput - oldsrc->text)); lex_srcfile_current->next = lex_srcfile_list; lex_srcfile_list = lex_srcfile_current; spl_lex_prog(0); lex_srcfile_current = oldsrc; input = oldinput; } static void spl_lex_prog(char *term) { int tlen = term ? strlen(term) : 0; int last_was_id = 0; struct lex_item *old_lex_translate_ptr = lex_translate_ptr; int old_lex_translate_count = lex_translate_count; lex_translate_ptr = 0; lex_translate_count = 0; next_symbol: if ( last_was_id > 0 ) last_was_id--; input += strspn(input, " \t\r\n"); switch (*input) { case 0: if (!term) goto lex_prog_return; my_asprintf(&lex_errstr, "Unexpected end-of-file (expected '%s').", term); longjmp(lex_goterr, __LINE__); case '"': case '\'': { char *new_term = my_strndupa(input++, 1); spl_lex_string(new_term, LEX_STRING_BACKSLASHES, 0); goto next_symbol; } case '#': if ((input[1] < 'a' || input[1] > 'z') && input[1] != '!') goto just_a_normal_operator; input++; spl_lex_pragma(); goto next_symbol; case '.': if (input[1] < '0' || input[1] > '9') goto just_a_normal_operator; case '0' ... '9': if (input[0] == '0' && input[1] == 'x') { char *buffer; my_asprintf(&buffer, "%ld", strtol(input+2, (char**)&input, 16)); lex_new(VALUE, buffer); } else if (input[0] == '0' && input[1] == 'o') { char *buffer; my_asprintf(&buffer, "%ld", strtol(input+2, (char**)&input, 8)); lex_new(VALUE, buffer); } else if (input[0] == '0' && input[1] == 'b') { char *buffer; my_asprintf(&buffer, "%ld", strtol(input+2, (char**)&input, 2)); lex_new(VALUE, buffer); } else { int len = strspn(input, "0123456789."); while (input[len-1] == '.') len--; lex_new(VALUE, my_strndup(input, len)); input += len; } goto next_symbol; case '$': { char *regex_result_id; int len = 0; switch (input[1]) { case '<': input += 2; len = strcspn(input, ">"); my_asprintf(®ex_result_id, "#reres.%.*s", len++, input); break; case '$': len = 2; regex_result_id = strdup("#reres"); break; case '-': len = 2; regex_result_id = strdup("#reres.=NC"); break; case '+': len = 2; regex_result_id = strdup("#reres.=LC"); break; case '0' ... '9': input += 1; len = 1; /* strspn(input, "0123456789"); */ my_asprintf(®ex_result_id, "#reres.%.*s", len, input); break; case '@': len = 2; regex_result_id = strdup("#array"); break; case '#': len = 2; regex_result_id = strdup("#index"); break; case '[': case ']': len = 2; lex_new('(', 0); lex_new(LNOT, 0); lex_new(DEFINED, 0); lex_new('(', 0); if (input[1] == '[') lex_new(PREV, 0); else lex_new(NEXT, 0); lex_new(ID, strdup("#array")); lex_new(',', 0); lex_new(ID, strdup("#index")); lex_new(')', 0); lex_new(')', 0); goto ignore_regex_result_id; default: goto just_a_normal_operator; } lex_new(ID, regex_result_id); ignore_regex_result_id: input += len; last_was_id = 2; goto next_symbol; } case 'a' ... 'z': case 'A' ... 'Z': case '_': { int len = 0; while (1) { if (input[len] >= 'a' && input[len] <= 'z') len++; else if (input[len] >= 'A' && input[len] <= 'Z') len++; else if (input[len] >= '0' && input[len] <= '9') len++; else if (input[len] == '_') len++; else break; } char *text = my_strndup(input, len); input += len; if (!lex_item_list_last || lex_item_list_last->lex != '.' ) for (int i=0; lex_keywords[i].text; i++) if ( !strcmp(lex_keywords[i].text, text) ) { lex_new(lex_keywords[i].lex, 0); free(text); goto next_symbol; } if (!in_pragma_arg) for (struct define *def = define_list; def; def=def->next) { if ((!def->active || strcmp(current_define, def->name)) && !strcmp(def->name, text)) { char *expanded_text = strdup(def->text); free(text); if (define_recursion > 1000) { my_asprintf(&lex_errstr, "Endless recursion in macro expansion."); longjmp(lex_goterr, __LINE__); } struct define *args_start = 0; struct define *args_stop = 0; if (def->args) { char *this_args = strdup(def->args); char *this_arg, *this_args_p = this_args; input += strcspn(input, "("); if (*input) input++; this_arg = my_strsep(&this_args_p, ","); while (this_arg) { struct define *adef = calloc(1, sizeof(struct define)); adef->isarg = 1; adef->name = strdup(this_arg); in_pragma_arg=1; const char *begin = input; spl_lex_prog(this_args_p ? "," : ")"); adef->text=my_strndup(begin, input-begin); if (*input) input++; in_pragma_arg=0; adef->next = define_list; define_list = args_start = adef; if (!args_stop) args_stop = adef; this_arg = my_strsep(&this_args_p, ","); } free(this_args); int new_expanded_len = 1; for (int i=0; expanded_text[i]; i++) { if (expanded_text[i] == '<') { struct define *idef = args_start; while (idef) { if (!strncmp(expanded_text+i+1, idef->name, strlen(idef->name)) && expanded_text[i+1+strlen(idef->name)] == '>') { new_expanded_len += strlen(idef->text); i += strlen(idef->name) + 1; break; } if (idef == args_stop) break; idef = idef->next; } } new_expanded_len++; } char *new_expanded_text = malloc(new_expanded_len); int new_expanded_text_pos = 0; for (int i=0; expanded_text[i]; i++) { if (expanded_text[i] == '<') { struct define *idef = args_start; while (idef) { if (!strncmp(expanded_text+i+1, idef->name, strlen(idef->name)) && expanded_text[i+1+strlen(idef->name)] == '>') { strcpy(new_expanded_text+new_expanded_text_pos, idef->text); new_expanded_text_pos += strlen(idef->text); i += strlen(idef->name) + 1; goto do_not_copy_char; } if (idef == args_stop) break; idef = idef->next; } } new_expanded_text[new_expanded_text_pos++] = expanded_text[i]; do_not_copy_char:; } free(expanded_text); new_expanded_text[new_expanded_text_pos] = 0; expanded_text = new_expanded_text; } def->active = 1; define_recursion++; char *old_current_define = current_define; current_define = def->name; spl_lex_prog_string(expanded_text); current_define = old_current_define; define_recursion--; def->active = 0; struct define *idef = define_list; struct define **lastp = &define_list; while (idef) { if (idef == args_start) { *lastp = idef->next; free(idef->name); free(idef->text); if (idef->args) free(idef->args); free(idef); if (idef == args_stop) break; idef = args_start = *lastp; } else { lastp = &idef->next; idef = idef->next; } } goto next_symbol; } } lex_new(ID, text); last_was_id = 2; goto next_symbol; } case ']': lex_new(']', 0); input++; last_was_id = 2; goto next_symbol; case '}': case ')': if ( term && !strncmp(input, term, tlen) ) goto lex_prog_return; my_asprintf(&lex_errstr, "Unexpected '%c'.", *input); longjmp(lex_goterr, __LINE__); case '{': if (input[1] == '[') { lex_new(BLK_BEGIN_NOCTX, 0); input += 2; } else { lex_new('{', 0); input++; } spl_lex_prog("}"); lex_new('}', 0); input++; goto next_symbol; case '(': for (int i=0; lex_ops[i].text; i++) if ( !strncmp(input, lex_ops[i].text, strlen(lex_ops[i].text)) ) goto just_a_normal_operator; if ( input[1] == '{' ) { lex_new(EF_BEGIN, 0); input+=2; spl_lex_prog("})"); lex_new(EF_END, 0); input+=2; } else { if ( lex_item_list_last && lex_item_list_last->lex == ID ) { if ( lex_item_list_last->prev && lex_item_list_last->prev->lex != '.' && lex_item_list_last->prev->lex != ']' && lex_item_list_last->prev->lex != '&' && lex_item_list_last->prev->lex != '$' && lex_item_list_last->prev->lex != MUL && lex_item_list_last->prev->lex != FUNCTION && lex_item_list_last->prev->lex != METHOD && lex_item_list_last->prev->lex != FOREACH && lex_item_list_last->prev->lex != NEW ) lex_item_list_last->lex = FUNC_ID; if ( lex_item_list_last->prev && lex_item_list_last->prev->prev && lex_item_list_last->prev->lex == MUL && (lex_item_list_last->prev->prev->lex == ID || lex_item_list_last->prev->prev->lex == VALUE || lex_item_list_last->prev->prev->lex == ')' || lex_item_list_last->prev->prev->lex == ']' )) lex_item_list_last->lex = FUNC_ID; if ( !lex_item_list_last->prev ) lex_item_list_last->lex = FUNC_ID; } lex_new('(', 0); input++; spl_lex_prog(")"); lex_new(')', 0); input++; } goto next_symbol; case '=': case '!': { if (input[1] != '~') goto just_a_normal_operator; int not_mode = *input == '!'; int eval_mode = 0; int len = 0; input += 2; input += strspn(input, " \t\r\n"); static char seplist[] = "/:,!%@"; char sepstr[] = "X"; struct lex_item *subst_lex = 0; if ( input[0] == 's' && strchr(seplist, input[1]) ) { sepstr[0] = input[1]; subst_lex = lex_new(not_mode ? NREGEX_SUBST : REGEX_SUBST, 0); input += 2; spl_lex_string(sepstr, LEX_STRING_REGEX, 0); lex_new(REGEX_SEP, 0); spl_lex_string(sepstr, LEX_STRING_REGEX, 0); lex_new(REGEX_SEP, 0); } else if ( input[0] == 'e' && strchr(seplist, input[1]) ) { eval_mode = 1; sepstr[0] = input[1]; subst_lex = lex_new(not_mode ? NREGEX_EVAL : REGEX_EVAL, 0); input += 2; spl_lex_string(sepstr, LEX_STRING_REGEX, 0); lex_new(REGEX_SEP, 0); } else if ( strchr(seplist, input[0]) ) { sepstr[0] = input[0]; lex_new(not_mode ? NREGEX : REGEX, 0); input++; spl_lex_string(sepstr, LEX_STRING_REGEX, 0); lex_new(REGEX_SEP, 0); } else { my_asprintf(&lex_errstr, "Error in regex syntax."); longjmp(lex_goterr, __LINE__); } while ( isalpha((unsigned char)input[len]) ) len++; char *mod = my_strndup(input, len); if (subst_lex && strchr(mod, 'R')) { if (subst_lex->lex == REGEX_SUBST) subst_lex->lex = REGEX_SUBST_R; if (subst_lex->lex == NREGEX_SUBST) subst_lex->lex = NREGEX_SUBST_R; if (subst_lex->lex == REGEX_EVAL) subst_lex->lex = REGEX_EVAL_R; if (subst_lex->lex == NREGEX_EVAL) subst_lex->lex = NREGEX_EVAL_R; } if (eval_mode) { char *new_mod; if (strchr(mod, 'N') || strchr(mod, 'P') || strchr(mod, 'A') || strchr(mod, 'I') || strchr(mod, 'E') || strchr(mod, 'L')) { my_asprintf(&lex_errstr, "Error in regex syntax."); longjmp(lex_goterr, __LINE__); } my_asprintf(&new_mod, "%sEANP", mod); free(mod); mod = new_mod; } lex_new(VALUE, mod); input += len; lex_new(REGEX_SEP, 0); goto next_symbol; } case '/': if (input[1] == '/') { while (*input && *input != '\r' && *input != '\n') input++; goto next_symbol; } if (input[1] == '*') { while (input[0] && input[1] && (input[0] != '*' || input[1] != '/')) input++; if (*input) input++; if (*input) input++; goto next_symbol; } goto just_a_normal_operator; case '<': { int i = 1, with_indent = 0; if (input[i] == ':') { with_indent = 1; i++; } while (isalpha((unsigned char)input[i])) i++; if (input[i] == '>') { char endtag[i+32]; snprintf(endtag, i+32, "", i-(1+with_indent), input+1+with_indent); input += i+1; if (with_indent) input += strspn(input, " \t\r\n"); spl_lex_string(endtag, LEX_STRING_SPLTAGS, with_indent ? ':' : 0); goto next_symbol; } goto just_a_normal_operator; } case '?': if (php_like_tags_active && input[1] == '>') { if (!strcmp(term, "?>")) goto lex_prog_return; input += 2; spl_lex_string("", LEX_STRING_SPLTAGS, 0); goto next_symbol; } goto just_a_normal_operator; just_a_normal_operator: default: { if ( term && !strncmp(input, term, tlen) ) goto lex_prog_return; for (int i=0; lex_ops[i].text; i++) if ( !strncmp(input, lex_ops[i].text, strlen(lex_ops[i].text)) ) { input += strlen(lex_ops[i].text); switch ( lex_ops[i].lex ) { case STRING_EOL: { if ( *input == ' ' || *input == '\t' ) input++; int len = strcspn(input, "\r\n"); if ( input[len] == '\r' ) len++; if ( input[len] == '\n' ) len++; lex_new(VALUE, my_strndup(input, len)); input += len; goto next_symbol; } case STRING_EOL_S: { if ( *input == ' ' || *input == '\t' ) input++; spl_lex_string("\n", LEX_STRING_BACKSLASHES, 0); goto next_symbol; } case STRING_LABEL: { input += strspn(input, " \t\r\n"); int len = strspn(input, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); char *label = my_strndupa(input, len); char indenting_delim = 0; input += len; if ( *input == ' ' || *input == '\t' || *input == '\r' || *input == '\n' ) input++; else { indenting_delim = *(input++); if ( *input == ' ' || *input == '\t' || *input == '\r' || *input == '\n' ) input++; } char *end = strstr(input, label); if (!end) { my_asprintf(&lex_errstr, "End label missing."); longjmp(lex_goterr, __LINE__); } int id_status = 0; lex_new(VALUE, strndup_with_indenting_delim(input, end-input, indenting_delim, &id_status)); input = end + len; goto next_symbol; } case STRING_LABEL_S: { input += strspn(input, " \t\r\n"); int len = strspn(input, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); char *label = my_strndupa(input, len); char indenting_delim = 0; input += len; if ( *input == ' ' || *input == '\t' || *input == '\r' || *input == '\n' ) input++; else { indenting_delim = *(input++); if ( *input == ' ' || *input == '\t' || *input == '\r' || *input == '\n' ) input++; } spl_lex_string(label, LEX_STRING_BACKSLASHES, indenting_delim); goto next_symbol; } default: if (lex_ops[i].lex == SPECIALREF && lex_item_list_last && (lex_item_list_last->lex == ID || lex_item_list_last->lex == ']' || lex_item_list_last->lex == SPECIALREF)) lex_new('.', 0); if (lex_ops[i].lex == SPECIALREF) { char *lookupcode = ""; if (input[-2] == '*') lookupcode = ""; if (input[-2] == '+') lookupcode = "!CLS"; if (input[-2] == '/') lookupcode = "!ROOT"; if (input[-2] == '.') lookupcode = "!THIS"; lex_new(lex_ops[i].lex, strdup(lookupcode)); } else lex_new(lex_ops[i].lex, 0); goto next_symbol; } } if (*input == '[' && lex_item_list_last && (lex_item_list_last->lex == ID || lex_item_list_last->lex == ')' || lex_item_list_last->lex == ']' || lex_item_list_last->lex == SPECIALREF)) lex_new('.', 0); lex_new(*(input++), 0); goto next_symbol; } } longjmp(lex_goterr, __LINE__); lex_prog_return: lex_translate_ptr = old_lex_translate_ptr; lex_translate_count = old_lex_translate_count; } static char *last_debug_info; static void create_debug_op(int force) { char *newinfo; if (!gen_debug_info) return; int lineno = 1, charno = 1; const char *c = lex_last_item->src->text; while (c < lex_last_item->pos) if (*(c++) == '\n' ) lineno++, charno=1; else charno++; my_asprintf(&newinfo, "%d:%d:%s", lineno, charno, lex_last_item->src->name); if (!force && last_debug_info && !strcmp(last_debug_info, newinfo)) { free(newinfo); return; } if (last_debug_info) free(last_debug_info); last_debug_info = newinfo; spl_asm_add(as, SPL_OP_DBGSYM, newinfo); } static char *get_encoding_pragma(const char *text) { char *token = "#encoding "; int token_size = strlen(token); const char *begin = strstr(text, token); if ( !begin ) return 0; begin += token_size; token_size = strcspn(begin, " \r\n\t"); if ( token_size <= 0 ) return 0; return my_strndup(begin, token_size); } extern int spl_compiler(struct spl_asm *a, const char *prog, const char *name, spl_malloc_file_function *mff, int gd) { #ifdef ENABLE_PTHREAD_SUPPORT pthread_mutex_lock(&compiler_lck); #endif as = a; malloc_file_func = mff; gen_debug_info = gd; no_checkp_insn = 0; php_like_tags_active = 0; php_like_tags_term = 0; define_list = 0; current_define = ""; define_recursion = 0; in_pragma_arg = 0; rvtolv_counter = 0; import_asm_label_counter = 0; if ( as->labels ) { spl_report(SPL_REPORT_COMPILER, as, "Compiler called with an assembler with non-empty label list!\n"); #ifdef ENABLE_PTHREAD_SUPPORT pthread_mutex_unlock(&compiler_lck); #endif return -1; } encoding = get_encoding_pragma(prog); if (encoding) { prog = spl_utf8_import(prog, encoding); if (!prog) { free(encoding); spl_report(SPL_REPORT_COMPILER, as, "Character set (#encoding) '%s' is unknown!\n", encoding); #ifdef ENABLE_PTHREAD_SUPPORT pthread_mutex_unlock(&compiler_lck); #endif return -1; } } if ( spl_utf8_check(prog) ) { spl_report(SPL_REPORT_COMPILER, as, "Compiler called with non-utf8 encoded program code!\n" "A decoder bug or just a missing '#encoding' pragma?\n"); if (encoding) { free(encoding); free((char*)prog); } #ifdef ENABLE_PTHREAD_SUPPORT pthread_mutex_unlock(&compiler_lck); #endif return -1; } input = prog; lex_srcfile_current = malloc(sizeof(struct lex_srcfile)); lex_srcfile_current->next = 0; lex_srcfile_current->text = input; lex_srcfile_current->name = name; lex_srcfile_list = lex_srcfile_current; lex_item_list_first = 0; lex_item_list_last = 0; lex_last_item = 0; lex_errstr = strdup("Generic lexer error"); label_stack_index = 0; label_stack_counter = 0; label_stack[label_stack_index] = label_stack_counter; breakcont_stack_index = 0; breakcont_stack_counter = 0; breakcont_stack[breakcont_stack_index] = breakcont_stack_counter; packpatch_stack_index = 0; last_debug_info = 0; // the 'volatile' is to make the compiler happy. // (a volatile variable can't be clobbered by a 'longjmp') volatile int ret = 1; int errlnr = 0; // this is to make the compiler happy. // (the new prog_free_ptr can't be clobbered by a 'longjmp') void * volatile prog_free_ptr = (void *)prog; if ( !(errlnr = setjmp(lex_goterr)) ) { spl_lex_prog(0); ret = spl_yyparse (); } else { int lineno = 1, charno = 1, position = 0; const char *c = lex_srcfile_current->text; while (c < input) { if (*(c++) == '\n' ) lineno++, charno=1; else charno++; if (position < 30) position += 1; } char *code; my_asprintf(&code, "%.40s", (input-position)); for (int i=0; code[i]; i++) if ( *input == '\r' || code[i] == '\n' || code[i] == '\t' ) code[i] = ' '; spl_report(SPL_REPORT_LEXER, as, "[%d] near line %d, char %d in %s: %s\n>> %s\n %*s^\n", errlnr, lineno, charno, lex_srcfile_current->name, lex_errstr, code, position, ""); free(code); } if ( !ret && packpatch_stack_index ) { spl_yyerror("Parser returned with non-empty packpatch stack!"); ret = 1; } if ( !ret && label_stack_index ) { spl_yyerror("Parser returned with non-empty label stack!"); ret = 1; } while ( define_list ) { struct define *next = define_list->next; free(define_list->name); free(define_list->text); if (define_list->args) free(define_list->args); free(define_list); define_list = next; } while ( lex_srcfile_list ) { struct lex_srcfile *next = lex_srcfile_list->next; if (next) { // we allocated those, so we can cast them // to non-const and free them. free((char*)lex_srcfile_list->text); free((char*)lex_srcfile_list->name); } free(lex_srcfile_list); lex_srcfile_list = next; } if (last_debug_info) free(last_debug_info); if (lex_last_item) free(lex_last_item); free(lex_errstr); spl_asm_resolve_labels(as); if (encoding) { free(encoding); free(prog_free_ptr); } #ifdef ENABLE_PTHREAD_SUPPORT pthread_mutex_unlock(&compiler_lck); #endif return ret; } static void spl_yyerror (char const *err) { int lineno = 1, charno = 1, position = 0; const char *c = lex_last_item->src->text; while (c < lex_last_item->pos) { if (*(c++) == '\n' ) lineno++, charno=1; else charno++; if (position < 30) position += 1; } char *code; my_asprintf(&code, "%.40s", (lex_last_item->pos-position)); for (int i=0; code[i]; i++) if ( *input == '\r' || code[i] == '\n' || code[i] == '\t' ) code[i] = ' '; spl_report(SPL_REPORT_COMPILER, as, "near line %d, char %d in %s: %s\n>> %s\n %*s^\n", lineno, charno, lex_last_item->src->name, err, code, position, ""); free(code); }