/* A Bison parser, made by GNU Bison 2.1. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. This special exception was added by the Free Software Foundation in version 1.24 of Bison. */ /* 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.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse dvdvmparse #define yylex dvdvmlex #define yyerror dvdvmerror #define yylval dvdvmlval #define yychar dvdvmchar #define yydebug dvdvmdebug #define yynerrs dvdvmnerrs /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { NUM_TOK = 258, G_TOK = 259, S_TOK = 260, ID_TOK = 261, ANGLE_TOK = 262, AUDIO_TOK = 263, BREAK_TOK = 264, BUTTON_TOK = 265, CALL_TOK = 266, CELL_TOK = 267, CHAPTER_TOK = 268, CLOSEBRACE_TOK = 269, CLOSEPAREN_TOK = 270, COUNTER_TOK = 271, ELSE_TOK = 272, ENTRY_TOK = 273, EXIT_TOK = 274, FPC_TOK = 275, GOTO_TOK = 276, IF_TOK = 277, JUMP_TOK = 278, MENU_TOK = 279, NEXT_TOK = 280, OPENBRACE_TOK = 281, OPENPAREN_TOK = 282, PREV_TOK = 283, PROGRAM_TOK = 284, PTT_TOK = 285, REGION_TOK = 286, RESUME_TOK = 287, RND_TOK = 288, ROOT_TOK = 289, SET_TOK = 290, SUBTITLE_TOK = 291, TAIL_TOK = 292, TITLE_TOK = 293, TITLESET_TOK = 294, TOP_TOK = 295, VMGM_TOK = 296, BOR_TOK = 297, LOR_TOK = 298, XOR_TOK = 299, _OR_TOK = 300, BAND_TOK = 301, LAND_TOK = 302, _AND_TOK = 303, NOT_TOK = 304, NE_TOK = 305, EQ_TOK = 306, LT_TOK = 307, LE_TOK = 308, GT_TOK = 309, GE_TOK = 310, SUB_TOK = 311, ADD_TOK = 312, MOD_TOK = 313, DIV_TOK = 314, MUL_TOK = 315, ADDSET_TOK = 316, SUBSET_TOK = 317, MULSET_TOK = 318, DIVSET_TOK = 319, MODSET_TOK = 320, ANDSET_TOK = 321, ORSET_TOK = 322, XORSET_TOK = 323, SEMICOLON_TOK = 324, COLON_TOK = 325, ERROR_TOK = 326 }; #endif /* Tokens. */ #define NUM_TOK 258 #define G_TOK 259 #define S_TOK 260 #define ID_TOK 261 #define ANGLE_TOK 262 #define AUDIO_TOK 263 #define BREAK_TOK 264 #define BUTTON_TOK 265 #define CALL_TOK 266 #define CELL_TOK 267 #define CHAPTER_TOK 268 #define CLOSEBRACE_TOK 269 #define CLOSEPAREN_TOK 270 #define COUNTER_TOK 271 #define ELSE_TOK 272 #define ENTRY_TOK 273 #define EXIT_TOK 274 #define FPC_TOK 275 #define GOTO_TOK 276 #define IF_TOK 277 #define JUMP_TOK 278 #define MENU_TOK 279 #define NEXT_TOK 280 #define OPENBRACE_TOK 281 #define OPENPAREN_TOK 282 #define PREV_TOK 283 #define PROGRAM_TOK 284 #define PTT_TOK 285 #define REGION_TOK 286 #define RESUME_TOK 287 #define RND_TOK 288 #define ROOT_TOK 289 #define SET_TOK 290 #define SUBTITLE_TOK 291 #define TAIL_TOK 292 #define TITLE_TOK 293 #define TITLESET_TOK 294 #define TOP_TOK 295 #define VMGM_TOK 296 #define BOR_TOK 297 #define LOR_TOK 298 #define XOR_TOK 299 #define _OR_TOK 300 #define BAND_TOK 301 #define LAND_TOK 302 #define _AND_TOK 303 #define NOT_TOK 304 #define NE_TOK 305 #define EQ_TOK 306 #define LT_TOK 307 #define LE_TOK 308 #define GT_TOK 309 #define GE_TOK 310 #define SUB_TOK 311 #define ADD_TOK 312 #define MOD_TOK 313 #define DIV_TOK 314 #define MUL_TOK 315 #define ADDSET_TOK 316 #define SUBSET_TOK 317 #define MULSET_TOK 318 #define DIVSET_TOK 319 #define MODSET_TOK 320 #define ANDSET_TOK 321 #define ORSET_TOK 322 #define XORSET_TOK 323 #define SEMICOLON_TOK 324 #define COLON_TOK 325 #define ERROR_TOK 326 /* Copy the first part of user declarations. */ #line 1 "dvdvmy.y" /* * Copyright (C) 2002 Scott Smith (trckjunky@users.sourceforge.net) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "dvdvm.h" #define YYERROR_VERBOSE /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) #line 88 "dvdvmy.y" typedef union YYSTYPE { unsigned int int_val; char *str_val; struct vm_statement *statement; } YYSTYPE; /* Line 196 of yacc.c. */ #line 269 "dvdvmy.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 219 of yacc.c. */ #line 281 "dvdvmy.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ #endif #if ! defined (YYSIZE_T) && defined (size_t) # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t #endif #if ! defined (YYSIZE_T) # define YYSIZE_T unsigned int #endif #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 #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 # else # define YYSTACK_ALLOC alloca # if defined (__STDC__) || defined (__cplusplus) # include /* INFRINGES ON USER NAME SPACE */ # define YYINCLUDED_STDLIB_H # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) # endif # ifdef __cplusplus extern "C" { # endif # ifndef YYMALLOC # define YYMALLOC malloc # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ && (defined (__STDC__) || defined (__cplusplus))) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ && (defined (__STDC__) || defined (__cplusplus))) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifdef __cplusplus } # 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 { short int yyss; YYSTYPE yyvs; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (short int) + 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 (0) # endif # endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0) #endif #if defined (__STDC__) || defined (__cplusplus) typedef signed char yysigned_char; #else typedef short int yysigned_char; #endif /* YYFINAL -- State number of the termination state. */ #define YYFINAL 42 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 397 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 72 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 18 /* YYNRULES -- Number of rules. */ #define YYNRULES 84 /* YYNRULES -- Number of states. */ #define YYNSTATES 163 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 326 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const unsigned char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const unsigned short int yyprhs[] = { 0, 0, 3, 5, 7, 10, 12, 14, 17, 20, 24, 27, 30, 32, 36, 38, 41, 43, 44, 47, 49, 53, 57, 61, 65, 69, 73, 75, 78, 79, 82, 83, 89, 94, 99, 102, 103, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 132, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 226, 228, 231, 236, 241, 246, 251, 256, 261, 266, 271, 276, 282, 284 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yysigned_char yyrhs[] = { 73, 0, -1, 74, -1, 75, -1, 75, 74, -1, 79, -1, 81, -1, 19, 69, -1, 32, 69, -1, 21, 6, 69, -1, 6, 70, -1, 9, 69, -1, 87, -1, 26, 74, 14, -1, 89, -1, 39, 3, -1, 41, -1, -1, 24, 3, -1, 24, -1, 24, 18, 38, -1, 24, 18, 34, -1, 24, 18, 36, -1, 24, 18, 8, -1, 24, 18, 7, -1, 24, 18, 30, -1, 20, -1, 38, 3, -1, -1, 13, 3, -1, -1, 23, 76, 77, 78, 69, -1, 23, 12, 3, 69, -1, 23, 29, 3, 69, -1, 32, 3, -1, -1, 11, 76, 77, 78, 80, 69, -1, 4, -1, 5, -1, 8, -1, 36, -1, 7, -1, 10, -1, 31, -1, 82, -1, 3, -1, 27, 84, 15, -1, 83, -1, 84, 57, 84, -1, 84, 56, 84, -1, 84, 60, 84, -1, 84, 59, 84, -1, 84, 58, 84, -1, 84, 46, 84, -1, 84, 42, 84, -1, 84, 48, 84, -1, 84, 45, 84, -1, 84, 44, 84, -1, 33, 27, 84, 15, -1, 27, 85, 15, -1, 84, 51, 84, -1, 84, 50, 84, -1, 84, 55, 84, -1, 84, 54, 84, -1, 84, 53, 84, -1, 84, 52, 84, -1, 85, 43, 85, -1, 85, 47, 85, -1, 85, 45, 85, -1, 85, 48, 85, -1, 49, 85, -1, 82, -1, 16, 4, -1, 86, 35, 84, 69, -1, 82, 61, 84, 69, -1, 82, 62, 84, 69, -1, 82, 63, 84, 69, -1, 82, 64, 84, 69, -1, 82, 65, 84, 69, -1, 82, 66, 84, 69, -1, 82, 67, 84, 69, -1, 82, 68, 84, 69, -1, 22, 27, 85, 15, 75, -1, 88, -1, 88, 17, 75, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { 0, 99, 99, 104, 107, 113, 116, 119, 123, 127, 132, 137, 141, 144, 147, 152, 155, 158, 163, 166, 169, 172, 175, 178, 181, 184, 187, 190, 193, 198, 201, 206, 213, 218, 225, 228, 233, 243, 246, 249, 252, 255, 258, 261, 266, 269, 274, 277, 282, 285, 288, 291, 294, 297, 300, 303, 306, 309, 312, 319, 322, 325, 328, 331, 334, 337, 340, 343, 346, 349, 352, 359, 362, 367, 373, 376, 379, 382, 385, 388, 391, 394, 399, 409, 412 }; #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", "NUM_TOK", "G_TOK", "S_TOK", "ID_TOK", "ANGLE_TOK", "AUDIO_TOK", "BREAK_TOK", "BUTTON_TOK", "CALL_TOK", "CELL_TOK", "CHAPTER_TOK", "CLOSEBRACE_TOK", "CLOSEPAREN_TOK", "COUNTER_TOK", "ELSE_TOK", "ENTRY_TOK", "EXIT_TOK", "FPC_TOK", "GOTO_TOK", "IF_TOK", "JUMP_TOK", "MENU_TOK", "NEXT_TOK", "OPENBRACE_TOK", "OPENPAREN_TOK", "PREV_TOK", "PROGRAM_TOK", "PTT_TOK", "REGION_TOK", "RESUME_TOK", "RND_TOK", "ROOT_TOK", "SET_TOK", "SUBTITLE_TOK", "TAIL_TOK", "TITLE_TOK", "TITLESET_TOK", "TOP_TOK", "VMGM_TOK", "BOR_TOK", "LOR_TOK", "XOR_TOK", "_OR_TOK", "BAND_TOK", "LAND_TOK", "_AND_TOK", "NOT_TOK", "NE_TOK", "EQ_TOK", "LT_TOK", "LE_TOK", "GT_TOK", "GE_TOK", "SUB_TOK", "ADD_TOK", "MOD_TOK", "DIV_TOK", "MUL_TOK", "ADDSET_TOK", "SUBSET_TOK", "MULSET_TOK", "DIVSET_TOK", "MODSET_TOK", "ANDSET_TOK", "ORSET_TOK", "XORSET_TOK", "SEMICOLON_TOK", "COLON_TOK", "ERROR_TOK", "$accept", "finalparse", "statements", "statement", "jtsl", "jtml", "jcl", "jumpstatement", "resumel", "callstatement", "reg", "regornum", "expression", "boolexpr", "regorcounter", "setstatement", "ifstatement", "ifelsestatement", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const unsigned short int yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { 0, 72, 73, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, 78, 79, 79, 79, 80, 80, 81, 82, 82, 82, 82, 82, 82, 82, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 86, 86, 87, 87, 87, 87, 87, 87, 87, 87, 87, 88, 89, 89 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { 0, 2, 1, 1, 2, 1, 1, 2, 2, 3, 2, 2, 1, 3, 1, 2, 1, 0, 2, 1, 3, 3, 3, 3, 3, 3, 1, 2, 0, 2, 0, 5, 4, 4, 2, 0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const unsigned char yydefact[] = { 0, 37, 38, 0, 41, 39, 0, 42, 17, 0, 0, 0, 0, 17, 0, 43, 0, 40, 0, 2, 3, 5, 6, 71, 0, 12, 83, 14, 10, 11, 0, 16, 28, 72, 7, 0, 0, 0, 0, 28, 0, 8, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 26, 19, 0, 30, 9, 45, 0, 0, 0, 44, 47, 0, 0, 0, 0, 30, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 18, 0, 27, 0, 35, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 33, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 73, 24, 23, 25, 21, 22, 20, 29, 0, 0, 46, 59, 0, 54, 57, 56, 53, 55, 61, 60, 65, 64, 63, 62, 49, 48, 52, 51, 50, 82, 66, 68, 67, 69, 31, 34, 36, 58 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { -1, 18, 19, 20, 32, 58, 87, 21, 134, 22, 64, 65, 66, 67, 24, 25, 26, 27 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -69 static const short int yypact[] = { 195, -69, -69, -68, -69, -69, -60, -69, -33, 14, -19, 45, 25, 142, 195, -69, -15, -69, 55, -69, 195, -69, -69, 39, 22, -69, 47, -69, -69, -69, 59, -69, -7, -69, -69, -4, 82, 63, 65, -7, 74, -69, -69, -69, 162, 162, 162, 162, 162, 162, 162, 162, 162, 195, -69, -69, 1, 91, 85, -69, -69, 82, 70, 82, -69, -69, 332, -8, 41, 42, 85, -69, 162, 188, 193, 219, 224, 250, 255, 281, 286, 312, -69, -69, 117, -69, 109, 88, 84, 48, 162, -69, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 195, 82, 82, 82, 82, -69, -69, 52, -12, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, 111, 53, -69, -69, 104, 128, 128, 128, 337, 337, 305, 305, 305, 305, 305, 305, -17, -17, -69, -69, -69, -69, -32, -32, -69, -69, -69, -69, -69, -69 }; /* YYPGOTO[NTERM-NUM]. */ static const yysigned_char yypgoto[] = { -69, -69, -9, -52, 103, 78, 57, -69, -69, -69, 0, -69, -23, -51, -69, -69, -69, -69 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const unsigned char yytable[] = { 23, 82, 28, 135, 83, 40, 30, 108, 31, 29, 89, 43, 91, 55, 23, 111, 112, 56, 33, 84, 23, 73, 74, 75, 76, 77, 78, 79, 80, 81, 92, 57, 93, 94, 95, 109, 96, 110, 88, 111, 112, 105, 106, 107, 103, 104, 105, 106, 107, 116, 34, 35, 36, 23, 41, 42, 154, 52, 155, 156, 157, 158, 54, 136, 53, 59, 68, 137, 69, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 60, 1, 2, 71, 4, 5, 109, 7, 110, 85, 111, 112, 90, 86, 135, 44, 45, 46, 47, 48, 49, 50, 51, 23, 61, 113, 114, 132, 15, 160, 62, 39, 70, 17, 162, 133, 159, 161, 0, 126, 127, 92, 115, 93, 94, 95, 63, 96, 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 0, 92, 128, 93, 94, 95, 129, 96, 130, 37, 131, 0, 0, 0, 0, 103, 104, 105, 106, 107, 60, 1, 2, 0, 4, 5, 38, 7, 0, 95, 0, 96, 0, 0, 0, 0, 30, 0, 31, 103, 104, 105, 106, 107, 72, 0, 0, 0, 15, 0, 62, 0, 0, 17, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 9, 0, 0, 10, 0, 11, 12, 13, 0, 0, 14, 0, 0, 0, 0, 15, 16, 0, 0, 92, 17, 93, 94, 95, 92, 96, 93, 94, 95, 0, 96, 0, 0, 103, 104, 105, 106, 107, 103, 104, 105, 106, 107, 0, 0, 0, 117, 0, 0, 0, 92, 118, 93, 94, 95, 92, 96, 93, 94, 95, 0, 96, 0, 0, 103, 104, 105, 106, 107, 103, 104, 105, 106, 107, 0, 0, 0, 119, 0, 0, 0, 92, 120, 93, 94, 95, 92, 96, 93, 94, 95, 0, 96, 0, 0, 103, 104, 105, 106, 107, 103, 104, 105, 106, 107, 0, 0, 0, 121, 0, 0, 0, 92, 122, 93, 94, 95, 92, 96, 93, 94, 95, 0, 96, 0, 0, 103, 104, 105, 106, 107, 103, 104, 105, 106, 107, 92, 0, 93, 123, 95, 0, 0, 92, 124, 93, 94, 95, 0, 96, 103, 104, 105, 106, 107, 0, 0, 103, 104, 105, 106, 107, 0, 92, 0, 93, 94, 95, 0, 96, 125, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 103, 104, 105, 106, 107 }; static const yysigned_char yycheck[] = { 0, 53, 70, 15, 3, 14, 39, 15, 41, 69, 61, 20, 63, 20, 14, 47, 48, 24, 4, 18, 20, 44, 45, 46, 47, 48, 49, 50, 51, 52, 42, 38, 44, 45, 46, 43, 48, 45, 61, 47, 48, 58, 59, 60, 56, 57, 58, 59, 60, 72, 69, 6, 27, 53, 69, 0, 108, 35, 109, 110, 111, 112, 3, 15, 17, 69, 3, 90, 3, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 3, 4, 5, 14, 7, 8, 43, 10, 45, 3, 47, 48, 27, 13, 15, 61, 62, 63, 64, 65, 66, 67, 68, 108, 27, 69, 69, 3, 31, 3, 33, 13, 39, 36, 15, 32, 69, 69, -1, 7, 8, 42, 70, 44, 45, 46, 49, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 42, 30, 44, 45, 46, 34, 48, 36, 12, 38, -1, -1, -1, -1, 56, 57, 58, 59, 60, 3, 4, 5, -1, 7, 8, 29, 10, -1, 46, -1, 48, -1, -1, -1, -1, 39, -1, 41, 56, 57, 58, 59, 60, 27, -1, -1, -1, 31, -1, 33, -1, -1, 36, 4, 5, 6, 7, 8, 9, 10, 11, -1, -1, -1, -1, 16, -1, -1, 19, -1, 21, 22, 23, -1, -1, 26, -1, -1, -1, -1, 31, 32, -1, -1, 42, 36, 44, 45, 46, 42, 48, 44, 45, 46, -1, 48, -1, -1, 56, 57, 58, 59, 60, 56, 57, 58, 59, 60, -1, -1, -1, 69, -1, -1, -1, 42, 69, 44, 45, 46, 42, 48, 44, 45, 46, -1, 48, -1, -1, 56, 57, 58, 59, 60, 56, 57, 58, 59, 60, -1, -1, -1, 69, -1, -1, -1, 42, 69, 44, 45, 46, 42, 48, 44, 45, 46, -1, 48, -1, -1, 56, 57, 58, 59, 60, 56, 57, 58, 59, 60, -1, -1, -1, 69, -1, -1, -1, 42, 69, 44, 45, 46, 42, 48, 44, 45, 46, -1, 48, -1, -1, 56, 57, 58, 59, 60, 56, 57, 58, 59, 60, 42, -1, 44, 69, 46, -1, -1, 42, 69, 44, 45, 46, -1, 48, 56, 57, 58, 59, 60, -1, -1, 56, 57, 58, 59, 60, -1, 42, -1, 44, 45, 46, -1, 48, 69, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 56, 57, 58, 59, 60 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 16, 19, 21, 22, 23, 26, 31, 32, 36, 73, 74, 75, 79, 81, 82, 86, 87, 88, 89, 70, 69, 39, 41, 76, 4, 69, 6, 27, 12, 29, 76, 74, 69, 0, 74, 61, 62, 63, 64, 65, 66, 67, 68, 35, 17, 3, 20, 24, 38, 77, 69, 3, 27, 33, 49, 82, 83, 84, 85, 3, 3, 77, 14, 27, 84, 84, 84, 84, 84, 84, 84, 84, 84, 75, 3, 18, 3, 13, 78, 84, 85, 27, 85, 42, 44, 45, 46, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 15, 43, 45, 47, 48, 69, 69, 78, 84, 69, 69, 69, 69, 69, 69, 69, 69, 69, 7, 8, 30, 34, 36, 38, 3, 32, 80, 15, 15, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 75, 85, 85, 85, 85, 69, 3, 69, 15 }; #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; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (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 (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 (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 (0) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yysymprint (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_stack_print (short int *bottom, short int *top) #else static void yy_stack_print (bottom, top) short int *bottom; short int *top; #endif { YYFPRINTF (stderr, "Stack now"); for (/* Nothing. */; bottom <= top; ++bottom) YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yy_reduce_print (int yyrule) #else static void yy_reduce_print (yyrule) int yyrule; #endif { int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", yyrule - 1, yylno); /* Print the symbols being reduced, and their result. */ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (Rule); \ } while (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. */ static YYSIZE_T # if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) # else yystrlen (yystr) const char *yystr; # endif { const char *yys = yystr; while (*yys++ != '\0') continue; return yys - yystr - 1; } # 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. */ static char * # if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) # else 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 == '"') { size_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 #endif /* YYERROR_VERBOSE */ #if YYDEBUG /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) static void yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) #else static void yysymprint (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE *yyvaluep; #endif { /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # endif switch (yytype) { default: break; } YYFPRINTF (yyoutput, ")"); } #endif /* ! YYDEBUG */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ #if defined (__STDC__) || defined (__cplusplus) 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 { /* Pacify ``unused variable'' warnings. */ (void) 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 look-ahead symbol. */ int yychar; /* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM # if defined (__STDC__) || defined (__cplusplus) int yyparse (void *YYPARSE_PARAM) # else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; # endif #else /* ! YYPARSE_PARAM */ #if defined (__STDC__) || defined (__cplusplus) int yyparse (void) #else int yyparse () ; #endif #endif { int yystate; int yyn; int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: `yyss': related to states, `yyvs': related to semantic values, `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ short int yyssa[YYINITDEPTH]; short int *yyss = yyssa; short int *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp; #define YYPOPSTACK (yyvsp--, yyssp--) YYSIZE_T yystacksize = YYINITDEPTH; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; /* When reducing, the number of symbols on the RHS of the reduced rule. */ int yylen; 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; short int *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; { short int *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss); YYSTACK_RELOCATE (yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + 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)); goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. */ /* Read a look-ahead token if we need one and don't already have one. */ /* yyresume: */ /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a look-ahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead 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; } if (yyn == YYFINAL) YYACCEPT; /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; yystate = yyn; 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 2: #line 99 "dvdvmy.y" { dvd_vm_parsed_cmd=(yyval.statement); ;} break; case 3: #line 104 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 4: #line 107 "dvdvmy.y" { (yyval.statement)=(yyvsp[-1].statement); (yyval.statement)->next=(yyvsp[0].statement); ;} break; case 5: #line 113 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 6: #line 116 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 7: #line 119 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_EXIT; ;} break; case 8: #line 123 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_RESUME; ;} break; case 9: #line 127 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_GOTO; (yyval.statement)->s1=(yyvsp[-1].str_val); ;} break; case 10: #line 132 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_LABEL; (yyval.statement)->s1=(yyvsp[-1].str_val); ;} break; case 11: #line 137 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_BREAK; ;} break; case 12: #line 141 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 13: #line 144 "dvdvmy.y" { (yyval.statement)=(yyvsp[-1].statement); ;} break; case 14: #line 147 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 15: #line 152 "dvdvmy.y" { (yyval.int_val)=((yyvsp[0].int_val))+1; ;} break; case 16: #line 155 "dvdvmy.y" { (yyval.int_val)=1; ;} break; case 17: #line 158 "dvdvmy.y" { (yyval.int_val)=0; ;} break; case 18: #line 163 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 19: #line 166 "dvdvmy.y" { (yyval.int_val)=120; // default entry ;} break; case 20: #line 169 "dvdvmy.y" { (yyval.int_val)=122; ;} break; case 21: #line 172 "dvdvmy.y" { (yyval.int_val)=123; ;} break; case 22: #line 175 "dvdvmy.y" { (yyval.int_val)=124; ;} break; case 23: #line 178 "dvdvmy.y" { (yyval.int_val)=125; ;} break; case 24: #line 181 "dvdvmy.y" { (yyval.int_val)=126; ;} break; case 25: #line 184 "dvdvmy.y" { (yyval.int_val)=127; ;} break; case 26: #line 187 "dvdvmy.y" { (yyval.int_val)=121; ;} break; case 27: #line 190 "dvdvmy.y" { (yyval.int_val)=((yyvsp[0].int_val))|128; ;} break; case 28: #line 193 "dvdvmy.y" { (yyval.int_val)=0; ;} break; case 29: #line 198 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 30: #line 201 "dvdvmy.y" { (yyval.int_val)=0; ;} break; case 31: #line 206 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_JUMP; (yyval.statement)->i1=(yyvsp[-3].int_val); (yyval.statement)->i2=(yyvsp[-2].int_val); (yyval.statement)->i3=(yyvsp[-1].int_val); ;} break; case 32: #line 213 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_JUMP; (yyval.statement)->i3=2*65536+(yyvsp[-1].int_val); ;} break; case 33: #line 218 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_JUMP; (yyval.statement)->i3=65536+(yyvsp[-1].int_val); ;} break; case 34: #line 225 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 35: #line 228 "dvdvmy.y" { (yyval.int_val)=0; ;} break; case 36: #line 233 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_CALL; (yyval.statement)->i1=(yyvsp[-4].int_val); (yyval.statement)->i2=(yyvsp[-3].int_val); (yyval.statement)->i3=(yyvsp[-2].int_val); (yyval.statement)->i4=(yyvsp[-1].int_val); ;} break; case 37: #line 243 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 38: #line 246 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val)+0x80; ;} break; case 39: #line 249 "dvdvmy.y" { (yyval.int_val)=0x81; ;} break; case 40: #line 252 "dvdvmy.y" { (yyval.int_val)=0x82; ;} break; case 41: #line 255 "dvdvmy.y" { (yyval.int_val)=0x83; ;} break; case 42: #line 258 "dvdvmy.y" { (yyval.int_val)=0x88; ;} break; case 43: #line 261 "dvdvmy.y" { (yyval.int_val)=0x80+20; ;} break; case 44: #line 266 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val)-256; ;} break; case 45: #line 269 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 46: #line 274 "dvdvmy.y" { (yyval.statement)=(yyvsp[-1].statement); ;} break; case 47: #line 277 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_VAL; (yyval.statement)->i1=(yyvsp[0].int_val); ;} break; case 48: #line 282 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_ADD,(yyvsp[0].statement)); ;} break; case 49: #line 285 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_SUB,(yyvsp[0].statement)); ;} break; case 50: #line 288 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_MUL,(yyvsp[0].statement)); ;} break; case 51: #line 291 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_DIV,(yyvsp[0].statement)); ;} break; case 52: #line 294 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_MOD,(yyvsp[0].statement)); ;} break; case 53: #line 297 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_AND,(yyvsp[0].statement)); ;} break; case 54: #line 300 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_OR, (yyvsp[0].statement)); ;} break; case 55: #line 303 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_AND,(yyvsp[0].statement)); ;} break; case 56: #line 306 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_OR, (yyvsp[0].statement)); ;} break; case 57: #line 309 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_XOR,(yyvsp[0].statement)); ;} break; case 58: #line 312 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_RND; (yyval.statement)->param=(yyvsp[-1].statement); ;} break; case 59: #line 319 "dvdvmy.y" { (yyval.statement)=(yyvsp[-1].statement); ;} break; case 60: #line 322 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_EQ,(yyvsp[0].statement)); ;} break; case 61: #line 325 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_NE,(yyvsp[0].statement)); ;} break; case 62: #line 328 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_GTE,(yyvsp[0].statement)); ;} break; case 63: #line 331 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_GT,(yyvsp[0].statement)); ;} break; case 64: #line 334 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LTE,(yyvsp[0].statement)); ;} break; case 65: #line 337 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LT,(yyvsp[0].statement)); ;} break; case 66: #line 340 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LOR,(yyvsp[0].statement)); ;} break; case 67: #line 343 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LAND,(yyvsp[0].statement)); ;} break; case 68: #line 346 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LOR,(yyvsp[0].statement)); ;} break; case 69: #line 349 "dvdvmy.y" { (yyval.statement)=statement_expression((yyvsp[-2].statement),VM_LAND,(yyvsp[0].statement)); ;} break; case 70: #line 352 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_NOT; (yyval.statement)->param=(yyvsp[0].statement); ;} break; case 71: #line 359 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val); ;} break; case 72: #line 362 "dvdvmy.y" { (yyval.int_val)=(yyvsp[0].int_val)+0x20; ;} break; case 73: #line 367 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_SET; (yyval.statement)->i1=(yyvsp[-3].int_val); (yyval.statement)->param=(yyvsp[-1].statement); ;} break; case 74: #line 373 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_ADD,(yyvsp[-1].statement)); ;} break; case 75: #line 376 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_SUB,(yyvsp[-1].statement)); ;} break; case 76: #line 379 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_MUL,(yyvsp[-1].statement)); ;} break; case 77: #line 382 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_DIV,(yyvsp[-1].statement)); ;} break; case 78: #line 385 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_MOD,(yyvsp[-1].statement)); ;} break; case 79: #line 388 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_AND,(yyvsp[-1].statement)); ;} break; case 80: #line 391 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_OR,(yyvsp[-1].statement)); ;} break; case 81: #line 394 "dvdvmy.y" { (yyval.statement)=statement_setop((yyvsp[-3].int_val),VM_XOR,(yyvsp[-1].statement)); ;} break; case 82: #line 399 "dvdvmy.y" { (yyval.statement)=statement_new(); (yyval.statement)->op=VM_IF; (yyval.statement)->param=(yyvsp[-2].statement); (yyvsp[-2].statement)->next=statement_new(); (yyvsp[-2].statement)->next->op=VM_IF; (yyvsp[-2].statement)->next->param=(yyvsp[0].statement); ;} break; case 83: #line 409 "dvdvmy.y" { (yyval.statement)=(yyvsp[0].statement); ;} break; case 84: #line 412 "dvdvmy.y" { (yyval.statement)=(yyvsp[-2].statement); (yyval.statement)->param->next->next=(yyvsp[0].statement); ;} break; default: break; } /* Line 1126 of yacc.c. */ #line 2088 "dvdvmy.c" yyvsp -= yylen; yyssp -= yylen; 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 yyn = yypact[yystate]; if (YYPACT_NINF < yyn && yyn < YYLAST) { int yytype = YYTRANSLATE (yychar); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; int yysize_overflow = 0; char *yymsg = 0; # define YYERROR_VERBOSE_ARGS_MAXIMUM 5 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; int yyx; #if 0 /* This is so xgettext sees the translatable formats that are constructed on the fly. */ YY_("syntax error, unexpected %s"); YY_("syntax error, unexpected %s, expecting %s"); YY_("syntax error, unexpected %s, expecting %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s"); YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); #endif char *yyfmt; char const *yyf; static char const yyunexpected[] = "syntax error, unexpected %s"; static char const yyexpecting[] = ", expecting %s"; static char const yyor[] = " or %s"; char yyformat[sizeof yyunexpected + sizeof yyexpecting - 1 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) * (sizeof yyor - 1))]; char const *yyprefix = yyexpecting; /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yycount = 1; yyarg[0] = yytname[yytype]; yyfmt = yystpcpy (yyformat, yyunexpected); for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; yyformat[sizeof yyunexpected - 1] = '\0'; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); yysize_overflow |= yysize1 < yysize; yysize = yysize1; yyfmt = yystpcpy (yyfmt, yyprefix); yyprefix = yyor; } yyf = YY_(yyformat); yysize1 = yysize + yystrlen (yyf); yysize_overflow |= yysize1 < yysize; yysize = yysize1; if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) yymsg = (char *) YYSTACK_ALLOC (yysize); if (yymsg) { /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ char *yyp = yymsg; int yyi = 0; while ((*yyp = *yyf)) { if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyf += 2; } else { yyp++; yyf++; } } yyerror (yymsg); YYSTACK_FREE (yymsg); } else { yyerror (YY_("syntax error")); goto yyexhaustedlab; } } else #endif /* YYERROR_VERBOSE */ yyerror (YY_("syntax error")); } if (yyerrstatus == 3) { /* If just tried and failed to reuse look-ahead 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 look-ahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (0) goto yyerrorlab; yyvsp -= yylen; yyssp -= yylen; 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; yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } if (yyn == YYFINAL) YYACCEPT; *++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; #ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEOF && yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK; } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; }