/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ /* 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, and Bison version. */ #define YYBISON 30802 /* Bison version string. */ #define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* First part of user prologue. */ #line 1 "camp.y" /***** * camp.y * Andy Hammerlindl 08/12/2002 * * The grammar of the camp language. *****/ #include "errormsg.h" #include "exp.h" #include "newexp.h" #include "dec.h" #include "fundec.h" #include "stm.h" #include "modifier.h" #include "opsymbols.h" // Avoid error messages with unpatched bison-1.875: #ifndef __attribute__ #define __attribute__(x) #endif #ifndef YYDEBUG #ifdef _WIN32 #define YYDEBUG 0 #else #define YYDEBUG 1 #endif #endif // Used when a position needs to be determined and no token is // available. Defined in camp.l. position lexerPos(); bool lexerEOF(); int yylex(void); /* function prototype */ void yyerror(const char *s) { if (!lexerEOF()) { em.error(lexerPos()); em << s; em.cont(); } } // Check if the symbol given is "keyword". Returns true in this case and // returns false and reports an error otherwise. bool checkKeyword(position pos, symbol sym) { if (sym != symbol::trans("keyword")) { em.error(pos); em << "expected 'keyword' here"; return false; } return true; } namespace absyntax { file *root; } using namespace absyntax; using sym::symbol; using mem::string; #line 138 "camp.tab.cc" # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif #include "camp.tab.h" /* Symbol kind. */ enum yysymbol_kind_t { YYSYMBOL_YYEMPTY = -2, YYSYMBOL_YYEOF = 0, /* "end of file" */ YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_ID = 3, /* ID */ YYSYMBOL_SELFOP = 4, /* SELFOP */ YYSYMBOL_DOTS = 5, /* DOTS */ YYSYMBOL_COLONS = 6, /* COLONS */ YYSYMBOL_DASHES = 7, /* DASHES */ YYSYMBOL_INCR = 8, /* INCR */ YYSYMBOL_LONGDASH = 9, /* LONGDASH */ YYSYMBOL_CONTROLS = 10, /* CONTROLS */ YYSYMBOL_TENSION = 11, /* TENSION */ YYSYMBOL_ATLEAST = 12, /* ATLEAST */ YYSYMBOL_CURL = 13, /* CURL */ YYSYMBOL_COR = 14, /* COR */ YYSYMBOL_CAND = 15, /* CAND */ YYSYMBOL_BAR = 16, /* BAR */ YYSYMBOL_AMPERSAND = 17, /* AMPERSAND */ YYSYMBOL_EQ = 18, /* EQ */ YYSYMBOL_NEQ = 19, /* NEQ */ YYSYMBOL_LT = 20, /* LT */ YYSYMBOL_LE = 21, /* LE */ YYSYMBOL_GT = 22, /* GT */ YYSYMBOL_GE = 23, /* GE */ YYSYMBOL_CARETS = 24, /* CARETS */ YYSYMBOL_25_ = 25, /* '+' */ YYSYMBOL_26_ = 26, /* '-' */ YYSYMBOL_27_ = 27, /* '*' */ YYSYMBOL_28_ = 28, /* '/' */ YYSYMBOL_29_ = 29, /* '%' */ YYSYMBOL_30_ = 30, /* '#' */ YYSYMBOL_31_ = 31, /* '^' */ YYSYMBOL_OPERATOR = 32, /* OPERATOR */ YYSYMBOL_LOOSE = 33, /* LOOSE */ YYSYMBOL_ASSIGN = 34, /* ASSIGN */ YYSYMBOL_35_ = 35, /* '?' */ YYSYMBOL_36_ = 36, /* ':' */ YYSYMBOL_DIRTAG = 37, /* DIRTAG */ YYSYMBOL_JOIN_PREC = 38, /* JOIN_PREC */ YYSYMBOL_AND = 39, /* AND */ YYSYMBOL_40_ = 40, /* '{' */ YYSYMBOL_41_ = 41, /* '}' */ YYSYMBOL_42_ = 42, /* '(' */ YYSYMBOL_43_ = 43, /* ')' */ YYSYMBOL_44_ = 44, /* '.' */ YYSYMBOL_45_ = 45, /* ',' */ YYSYMBOL_46_ = 46, /* '[' */ YYSYMBOL_47_ = 47, /* ']' */ YYSYMBOL_48_ = 48, /* ';' */ YYSYMBOL_ELLIPSIS = 49, /* ELLIPSIS */ YYSYMBOL_ACCESS = 50, /* ACCESS */ YYSYMBOL_UNRAVEL = 51, /* UNRAVEL */ YYSYMBOL_IMPORT = 52, /* IMPORT */ YYSYMBOL_INCLUDE = 53, /* INCLUDE */ YYSYMBOL_FROM = 54, /* FROM */ YYSYMBOL_QUOTE = 55, /* QUOTE */ YYSYMBOL_STRUCT = 56, /* STRUCT */ YYSYMBOL_TYPEDEF = 57, /* TYPEDEF */ YYSYMBOL_USING = 58, /* USING */ YYSYMBOL_NEW = 59, /* NEW */ YYSYMBOL_IF = 60, /* IF */ YYSYMBOL_ELSE = 61, /* ELSE */ YYSYMBOL_WHILE = 62, /* WHILE */ YYSYMBOL_DO = 63, /* DO */ YYSYMBOL_FOR = 64, /* FOR */ YYSYMBOL_BREAK = 65, /* BREAK */ YYSYMBOL_CONTINUE = 66, /* CONTINUE */ YYSYMBOL_RETURN_ = 67, /* RETURN_ */ YYSYMBOL_THIS_TOK = 68, /* THIS_TOK */ YYSYMBOL_EXPLICIT = 69, /* EXPLICIT */ YYSYMBOL_GARBAGE = 70, /* GARBAGE */ YYSYMBOL_LIT = 71, /* LIT */ YYSYMBOL_STRING = 72, /* STRING */ YYSYMBOL_PERM = 73, /* PERM */ YYSYMBOL_MODIFIER = 74, /* MODIFIER */ YYSYMBOL_UNARY = 75, /* UNARY */ YYSYMBOL_EXP_IN_PARENS_RULE = 76, /* EXP_IN_PARENS_RULE */ YYSYMBOL_YYACCEPT = 77, /* $accept */ YYSYMBOL_file = 78, /* file */ YYSYMBOL_fileblock = 79, /* fileblock */ YYSYMBOL_bareblock = 80, /* bareblock */ YYSYMBOL_name = 81, /* name */ YYSYMBOL_runnable = 82, /* runnable */ YYSYMBOL_modifiers = 83, /* modifiers */ YYSYMBOL_dec = 84, /* dec */ YYSYMBOL_optionalcomma = 85, /* optionalcomma */ YYSYMBOL_decdec = 86, /* decdec */ YYSYMBOL_decdeclist = 87, /* decdeclist */ YYSYMBOL_typeparam = 88, /* typeparam */ YYSYMBOL_typeparamlist = 89, /* typeparamlist */ YYSYMBOL_idpair = 90, /* idpair */ YYSYMBOL_idpairlist = 91, /* idpairlist */ YYSYMBOL_strid = 92, /* strid */ YYSYMBOL_stridpair = 93, /* stridpair */ YYSYMBOL_stridpairlist = 94, /* stridpairlist */ YYSYMBOL_vardec = 95, /* vardec */ YYSYMBOL_barevardec = 96, /* barevardec */ YYSYMBOL_type = 97, /* type */ YYSYMBOL_celltype = 98, /* celltype */ YYSYMBOL_dims = 99, /* dims */ YYSYMBOL_dimexps = 100, /* dimexps */ YYSYMBOL_decidlist = 101, /* decidlist */ YYSYMBOL_decid = 102, /* decid */ YYSYMBOL_decidstart = 103, /* decidstart */ YYSYMBOL_varinit = 104, /* varinit */ YYSYMBOL_block = 105, /* block */ YYSYMBOL_arrayinit = 106, /* arrayinit */ YYSYMBOL_basearrayinit = 107, /* basearrayinit */ YYSYMBOL_varinits = 108, /* varinits */ YYSYMBOL_formals = 109, /* formals */ YYSYMBOL_explicitornot = 110, /* explicitornot */ YYSYMBOL_formal = 111, /* formal */ YYSYMBOL_fundec = 112, /* fundec */ YYSYMBOL_typedec = 113, /* typedec */ YYSYMBOL_slice = 114, /* slice */ YYSYMBOL_value = 115, /* value */ YYSYMBOL_argument = 116, /* argument */ YYSYMBOL_arglist = 117, /* arglist */ YYSYMBOL_tuple = 118, /* tuple */ YYSYMBOL_exp = 119, /* exp */ YYSYMBOL_join = 120, /* join */ YYSYMBOL_dir = 121, /* dir */ YYSYMBOL_basicjoin = 122, /* basicjoin */ YYSYMBOL_tension = 123, /* tension */ YYSYMBOL_controls = 124, /* controls */ YYSYMBOL_stm = 125, /* stm */ YYSYMBOL_stmexp = 126, /* stmexp */ YYSYMBOL_blockstm = 127, /* blockstm */ YYSYMBOL_forinit = 128, /* forinit */ YYSYMBOL_fortest = 129, /* fortest */ YYSYMBOL_forupdate = 130, /* forupdate */ YYSYMBOL_stmexplist = 131 /* stmexplist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; #ifdef short # undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure and (if available) are included so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ # include /* INFRINGES ON USER NAME SPACE */ # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YY_STDINT_H # endif #endif /* Narrow types that promote to a signed type and that can represent a signed or unsigned integer of at least N bits. In tables they can save space and decrease cache pressure. Promoting to a signed type helps avoid bugs in integer arithmetic. */ #ifdef __INT_LEAST8_MAX__ typedef __INT_LEAST8_TYPE__ yytype_int8; #elif defined YY_STDINT_H typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef __INT_LEAST16_MAX__ typedef __INT_LEAST16_TYPE__ yytype_int16; #elif defined YY_STDINT_H typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif /* Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants. This workaround can likely be removed in 2023, as HPE has promised support for HP-UX 11.23 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux # undef UINT_LEAST8_MAX # undef UINT_LEAST16_MAX # define UINT_LEAST8_MAX 255 # define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; #else typedef short yytype_uint8; #endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; #else typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ # define YYPTRDIFF_T __PTRDIFF_TYPE__ # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ # elif defined PTRDIFF_MAX # ifndef ptrdiff_t # include /* INFRINGES ON USER NAME SPACE */ # endif # define YYPTRDIFF_T ptrdiff_t # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX # else # define YYPTRDIFF_T long # define YYPTRDIFF_MAXIMUM LONG_MAX # endif #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned # endif #endif #define YYSIZE_MAXIMUM \ YY_CAST (YYPTRDIFF_T, \ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ ? YYPTRDIFF_MAXIMUM \ : YY_CAST (YYSIZE_T, -1))) #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) /* Stored state numbers (used for stacks). */ typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YY_USE(E) ((void) (E)) #else # define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") # else # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif #define YY_ASSERT(E) ((void) (0 && (E))) #if !defined yyoverflow /* 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 EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # 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 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 EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* 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 \ { \ YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 2004 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 77 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 55 /* YYNRULES -- Number of rules. */ #define YYNRULES 218 /* YYNSTATES -- Number of states. */ #define YYNSTATES 428 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 313 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ (0 <= (YYX) && (YYX) <= YYMAXUTOK \ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ static const yytype_int8 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, 30, 2, 29, 2, 2, 42, 43, 27, 25, 45, 26, 44, 28, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 36, 48, 2, 2, 2, 35, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 46, 2, 47, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 40, 2, 41, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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, 32, 33, 34, 37, 38, 39, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { 0, 203, 203, 207, 208, 213, 214, 219, 220, 221, 226, 227, 228, 230, 235, 236, 237, 239, 244, 245, 246, 247, 249, 251, 253, 254, 256, 258, 260, 261, 265, 267, 272, 276, 278, 284, 289, 290, 295, 299, 303, 305, 310, 314, 316, 321, 323, 327, 328, 333, 335, 340, 345, 349, 350, 355, 359, 363, 364, 368, 372, 373, 377, 378, 383, 384, 389, 390, 395, 396, 397, 399, 404, 405, 409, 414, 415, 417, 419, 424, 425, 426, 430, 432, 437, 438, 439, 441, 446, 447, 451, 453, 455, 458, 461, 467, 469, 474, 475, 480, 483, 487, 493, 494, 495, 496, 500, 501, 503, 504, 506, 507, 510, 514, 515, 517, 519, 521, 525, 526, 530, 531, 533, 535, 541, 542, 546, 547, 548, 549, 551, 552, 554, 556, 558, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 583, 585, 587, 589, 591, 593, 598, 600, 605, 607, 608, 609, 611, 617, 619, 622, 624, 625, 632, 633, 635, 638, 641, 647, 648, 649, 652, 658, 659, 661, 663, 664, 668, 670, 673, 676, 682, 683, 688, 689, 690, 691, 693, 695, 697, 699, 701, 703, 704, 705, 706, 710, 714, 718, 719, 720, 724, 725, 729, 730, 734, 735 }; #endif /** Accessing symbol of state STATE. */ #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if YYDEBUG || 0 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "ID", "SELFOP", "DOTS", "COLONS", "DASHES", "INCR", "LONGDASH", "CONTROLS", "TENSION", "ATLEAST", "CURL", "COR", "CAND", "BAR", "AMPERSAND", "EQ", "NEQ", "LT", "LE", "GT", "GE", "CARETS", "'+'", "'-'", "'*'", "'/'", "'%'", "'#'", "'^'", "OPERATOR", "LOOSE", "ASSIGN", "'?'", "':'", "DIRTAG", "JOIN_PREC", "AND", "'{'", "'}'", "'('", "')'", "'.'", "','", "'['", "']'", "';'", "ELLIPSIS", "ACCESS", "UNRAVEL", "IMPORT", "INCLUDE", "FROM", "QUOTE", "STRUCT", "TYPEDEF", "USING", "NEW", "IF", "ELSE", "WHILE", "DO", "FOR", "BREAK", "CONTINUE", "RETURN_", "THIS_TOK", "EXPLICIT", "GARBAGE", "LIT", "STRING", "PERM", "MODIFIER", "UNARY", "EXP_IN_PARENS_RULE", "$accept", "file", "fileblock", "bareblock", "name", "runnable", "modifiers", "dec", "optionalcomma", "decdec", "decdeclist", "typeparam", "typeparamlist", "idpair", "idpairlist", "strid", "stridpair", "stridpairlist", "vardec", "barevardec", "type", "celltype", "dims", "dimexps", "decidlist", "decid", "decidstart", "varinit", "block", "arrayinit", "basearrayinit", "varinits", "formals", "explicitornot", "formal", "fundec", "typedec", "slice", "value", "argument", "arglist", "tuple", "exp", "join", "dir", "basicjoin", "tension", "controls", "stm", "stmexp", "blockstm", "forinit", "fortest", "forupdate", "stmexplist", YY_NULLPTR }; static const char * yysymbol_name (yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-312) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-60) #define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { -312, 89, 513, -312, -312, 915, 915, 915, 915, -312, 915, -312, 915, -312, 27, 33, 25, 30, 27, 53, 158, 13, 182, 33, 98, 136, 179, 149, 161, 201, 738, -312, 193, -312, -312, -312, 29, -312, 585, -312, -312, 237, 194, -312, -312, -312, -312, 186, 1606, -312, 241, -312, 214, 259, 259, 259, 259, 1964, 369, 180, 111, 1207, -312, 192, 32, -312, 90, 154, 220, 35, 248, 263, 267, 47, 42, -312, 282, 265, 15, -312, 324, 294, 286, 164, 915, 915, 270, 915, -312, -312, -312, 1022, 259, 657, 331, 672, 289, -312, -312, -312, -312, -312, 187, 291, -312, 303, 710, 335, 769, 915, 258, -312, -312, 193, -312, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 915, 800, 915, -312, 300, -312, 769, -312, -312, 193, 137, -312, 915, -312, 915, 339, 57, 27, -312, -312, 341, 57, -312, -312, -312, 36, 57, 45, 441, -312, 341, 298, 225, 33, -2, 828, 148, 302, 1333, 1373, 304, -312, 346, -312, 306, 305, -312, 323, -312, 953, -312, 125, 1606, -312, 915, -312, 311, 1059, 312, 0, 289, 324, 866, -312, 175, -312, 313, 1096, 1606, 915, 904, 361, 362, 425, 1824, 1852, 1880, 1908, 1936, 1936, 356, 356, 356, 356, 665, 185, 185, 259, 259, 259, 259, 259, 1964, 1606, 1569, 915, 1249, 425, 300, -312, -312, 915, 1606, 1606, -312, 336, -312, 212, -312, 366, -312, -312, -312, 239, 243, 368, 325, -312, 230, 250, 326, 231, -312, 254, 94, 52, 282, 320, -312, 257, 33, -312, 1133, 284, 124, -312, 828, 289, 179, 179, 915, 9, 915, 915, 915, -312, -312, 953, 342, 1606, -312, 915, -312, -312, 282, 261, -312, -312, -312, 1606, -312, -312, -312, 1641, 915, 1678, -312, -312, 915, 1493, -312, 915, -312, -312, 33, 16, 57, 327, 341, 349, 396, -312, 399, -312, 353, -312, -312, 357, -312, 269, 132, -312, -312, -312, 282, 1, 358, 403, -312, -312, -312, 866, -312, 117, 363, 282, 275, 1170, 351, -312, 1413, 915, 1606, 365, -312, 1606, -312, 953, 1606, -312, 282, 915, 1715, 915, 1788, -312, 1291, -312, 411, -312, -312, -312, -312, -312, -312, -312, 399, -312, -312, 370, 278, -312, -312, 320, 41, 382, 389, -312, 866, 866, -312, 282, -312, 179, 390, 1453, 915, -312, -312, 1752, 915, 1752, -312, 915, 391, 235, -312, 397, -312, 412, 866, -312, 406, -312, -312, -312, -312, 179, 414, 305, 1752, 1531, -312, -312, -312, 866, -312, -312, -312, 179, -312, -312, -312 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 3, 0, 2, 1, 7, 0, 0, 0, 0, 9, 0, 5, 0, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 128, 129, 15, 14, 126, 4, 0, 10, 18, 0, 0, 57, 209, 19, 20, 127, 208, 11, 0, 196, 126, 171, 170, 133, 134, 135, 0, 126, 0, 0, 50, 49, 0, 53, 0, 0, 0, 0, 0, 0, 0, 49, 0, 3, 0, 0, 59, 98, 0, 0, 59, 156, 0, 0, 0, 210, 204, 205, 206, 0, 130, 0, 0, 0, 58, 17, 16, 12, 13, 55, 68, 56, 64, 66, 0, 0, 0, 0, 184, 187, 175, 172, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 169, 176, 197, 0, 74, 6, 116, 0, 167, 0, 115, 0, 0, 0, 0, 21, 24, 0, 0, 27, 28, 29, 0, 0, 0, 0, 97, 0, 0, 68, 0, 89, 0, 159, 157, 0, 0, 0, 212, 0, 217, 0, 211, 207, 7, 111, 0, 120, 37, 118, 8, 102, 60, 0, 0, 0, 89, 69, 0, 0, 113, 37, 106, 0, 0, 173, 0, 0, 0, 0, 155, 150, 149, 153, 152, 147, 148, 143, 144, 145, 146, 151, 136, 137, 138, 139, 140, 141, 142, 154, 166, 0, 0, 0, 168, 177, 178, 131, 0, 125, 124, 52, 7, 40, 0, 39, 0, 54, 42, 43, 0, 0, 45, 0, 47, 0, 0, 0, 0, 174, 0, 89, 0, 0, 89, 88, 37, 0, 84, 0, 0, 89, 160, 0, 158, 0, 0, 0, 68, 213, 0, 0, 121, 112, 36, 0, 104, 109, 103, 107, 61, 70, 37, 65, 67, 73, 72, 114, 110, 108, 193, 0, 189, 185, 186, 0, 0, 181, 0, 179, 132, 0, 0, 0, 0, 0, 0, 0, 23, 0, 22, 0, 26, 25, 0, 70, 37, 89, 99, 161, 85, 0, 89, 0, 90, 62, 75, 79, 0, 82, 0, 80, 0, 37, 0, 198, 200, 0, 0, 214, 0, 218, 119, 122, 0, 105, 95, 71, 0, 191, 0, 165, 180, 0, 38, 0, 33, 41, 31, 44, 34, 46, 48, 0, 30, 71, 0, 37, 163, 86, 89, 68, 91, 0, 77, 0, 81, 162, 0, 63, 0, 0, 0, 215, 123, 96, 194, 0, 190, 182, 0, 0, 0, 100, 0, 87, 93, 0, 76, 0, 83, 164, 199, 201, 0, 0, 216, 192, 0, 32, 35, 101, 0, 92, 78, 203, 0, 183, 94, 202 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -312, -312, 383, -312, 8, 401, -312, 422, -90, 150, -104, 151, 297, 146, -154, -4, -3, -312, 447, 384, -6, 446, -25, -312, -312, 276, -311, -231, 398, 307, -312, -312, -118, -312, -245, -312, -312, 367, -312, -175, 371, -312, -5, -312, -99, 338, -312, -312, -20, -83, -183, -312, -312, -312, 88 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { 0, 1, 2, 58, 52, 37, 38, 39, 331, 241, 242, 247, 248, 252, 253, 64, 65, 66, 40, 41, 42, 43, 195, 172, 103, 104, 105, 292, 44, 293, 338, 339, 264, 265, 266, 45, 46, 191, 47, 185, 186, 60, 48, 137, 138, 139, 206, 207, 49, 50, 51, 179, 348, 413, 180 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 53, 54, 55, 56, 178, 57, 86, 61, 256, 280, 36, 96, 69, 70, 74, 80, 4, 328, 100, 363, 59, 380, 63, 67, 63, 91, 73, 92, 4, 78, 4, 82, -59, 71, 145, 150, 4, 337, 150, 250, 234, 261, 9, 289, 167, 346, 36, 262, 250, 262, -36, 259, 249, 96, 9, 166, 9, 254, 171, 94, 240, 166, 9, 251, 364, 77, 36, 263, 404, 263, 263, 93, 255, 94, 151, 95, 290, 156, 327, 173, 174, 177, 68, 259, 161, 377, 9, 166, 187, 3, 192, 94, 162, 75, 325, 36, 283, 62, 160, 62, 326, 187, 72, 202, 203, 381, 354, 351, 208, 283, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 231, 232, 403, 307, 152, 192, 323, 153, 235, 84, 324, 237, 262, 238, 243, 376, 272, 244, 245, 243, 341, 407, 408, 146, 243, 147, 385, 382, 78, 63, 76, 260, 263, 78, 267, 383, 340, 281, 78, 282, 36, 393, 262, 421, 374, 78, 392, 85, 187, 236, 262, 4, 193, 284, 81, 5, 6, 268, 426, 269, 87, 294, 263, 193, 349, 4, 102, 94, 298, 300, 263, 154, 409, 7, 8, 169, 375, 9, 88, 170, 10, 128, 129, 130, 131, 132, 400, 295, 11, 282, 12, 93, 144, 94, 304, 95, 13, 106, 194, 107, 308, 108, 166, 19, 12, 94, -51, 23, 24, -51, 25, 26, 27, 28, 29, 30, 31, 19, 89, 32, 33, 23, 343, 344, 310, 93, 311, 94, 332, 141, 31, 155, 294, 32, 33, 342, 259, 204, 205, 345, 166, 347, 78, 350, 317, 317, 187, 318, 321, 317, 353, 312, 418, 313, 101, 314, 4, 311, 140, 132, 5, 6, 319, 357, 311, 157, 322, 359, 313, 329, 361, 330, 362, 355, 243, 330, 165, 178, 7, 8, 158, 373, 9, 330, 159, 10, 78, 386, 78, 330, 402, 11, 330, 268, 334, 12, 167, 168, 335, 94, 294, 175, 336, 188, 193, 196, 197, 200, 19, 136, 390, 239, 23, 246, 190, 275, 187, 271, 276, 278, 394, 31, 396, 277, 32, 33, 279, 285, 288, 296, 110, 111, 112, 113, 114, 301, 302, 410, 150, 309, 315, 4, 316, 320, 366, 5, 6, 294, 294, 125, 126, 127, 128, 129, 130, 131, 132, 133, 263, 415, 352, 423, 416, 7, 8, 136, 368, 9, 369, 294, 10, 250, 371, 427, 372, 379, 378, 384, 11, 142, 12, 388, 391, 399, 294, 405, 13, 401, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 406, 25, 26, 27, 28, 29, 30, 31, 411, 417, 32, 33, 34, 35, 4, 419, 420, 422, 5, 6, 126, 127, 128, 129, 130, 131, 132, 424, 163, 143, 99, 365, 258, 370, 367, 136, 7, 8, 79, 83, 9, 176, 291, 10, 164, 201, 233, 199, 270, 414, 0, 11, 257, 12, 0, 0, 0, 0, 0, 13, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 25, 26, 27, 28, 29, 30, 31, 0, 0, 32, 33, 34, 35, 4, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 9, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 11, 0, 12, 0, 0, 0, 0, 0, 13, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 25, 26, 27, 28, 29, 30, 31, 0, 0, 32, 33, 34, 35, 4, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 9, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 11, 0, 12, 0, 0, 0, 0, 0, 13, 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 25, 26, 27, 28, 29, 30, 31, 0, 0, 32, 33, 97, 98, 182, 0, 0, 0, 5, 6, 0, 0, 0, 0, 110, 111, 112, 113, 114, 4, 0, 0, 0, 5, 6, 0, 7, 8, 0, 0, 9, 0, 0, 10, 126, 127, 128, 129, 130, 131, 132, 7, 8, 12, 183, 9, 0, 0, 10, 136, 184, 0, 189, 0, 0, 0, 19, 182, 12, 0, 23, 5, 6, 190, 0, 0, 0, 0, 0, 31, 0, 19, 32, 33, 0, 23, 0, 0, 0, 7, 8, 0, 0, 9, 31, 4, 10, 32, 33, 5, 6, 0, 0, 0, 0, 0, 12, 198, 0, 0, 0, 0, 0, 184, 0, 0, 0, 7, 8, 19, 0, 9, 0, 23, 10, 0, 4, 0, 0, 0, 5, 6, 31, 0, 12, 32, 33, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 19, 7, 8, 0, 23, 9, 0, 0, 10, 0, 4, 0, 189, 31, 5, 6, 32, 33, 12, 0, 230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 7, 8, 0, 23, 9, 0, 4, 10, 0, 0, 5, 6, 31, 0, 0, 32, 33, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 19, 0, 9, 0, 23, 10, 0, 0, 0, 0, 0, 0, 0, 31, 4, 12, 32, 33, 5, 6, 190, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 23, 0, 0, 0, 7, 8, 0, 0, 9, 31, 0, 10, 32, 33, 0, 0, 0, 0, 0, 268, 4, 12, 0, 0, 5, 6, 0, 0, 0, 299, 0, 4, 0, 0, 19, 5, 6, 0, 23, 0, 0, 0, 7, 8, 0, 0, 9, 31, 0, 10, 32, 33, 0, 7, 8, 0, 0, 9, 0, 12, 10, 0, 0, 0, 0, 0, 0, 0, 0, 182, 12, 0, 19, 5, 6, 0, 23, 0, 0, 0, 0, 0, 0, 19, 0, 31, 0, 23, 32, 33, 0, 7, 8, 0, 0, 9, 31, 0, 10, 32, 33, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 32, 33, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 0, 181, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 286, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 287, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 286, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 297, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 333, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 387, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 0, 0, 148, 0, 149, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 305, 0, 0, 0, 306, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 397, 0, 0, 0, 398, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 0, 0, 273, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 0, 0, 274, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 0, 0, 389, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 0, 0, 412, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 360, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 425, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 303, 0, 0, 0, 136, 109, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 109, 136, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 356, 136, 109, 0, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 358, 136, 109, 0, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 395, 136, 109, 0, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 134, 135, 0, 0, 0, 0, 136, 110, 111, 112, 113, 114, 0, 0, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 0, 0, 135, 0, 0, 0, 0, 136, 110, 111, 112, 113, 114, 0, 0, 0, 0, 0, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 110, 111, 112, 113, 114, 0, 0, 136, 0, 0, 0, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 110, 111, 112, 113, 114, 0, 0, 136, 0, 0, 0, 0, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 110, 111, 112, 113, 114, 0, 0, 136, 0, 0, 0, 0, 0, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 110, 111, 112, 113, 114, 0, 0, 136, 0, 0, 0, 0, 0, 0, 0, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 110, 111, 112, 113, 114, 0, 0, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125, 126, 127, 128, 129, 130, 131, 132, 0, 0, 0, 0, 0, 0, 0, 0, 136 }; static const yytype_int16 yycheck[] = { 5, 6, 7, 8, 87, 10, 26, 12, 162, 184, 2, 36, 16, 16, 18, 21, 3, 262, 38, 3, 12, 332, 14, 15, 16, 30, 18, 32, 3, 21, 3, 23, 3, 3, 59, 3, 3, 268, 3, 3, 139, 43, 29, 43, 3, 36, 38, 49, 3, 49, 49, 42, 156, 78, 29, 46, 29, 161, 83, 44, 3, 46, 29, 27, 48, 52, 58, 69, 379, 69, 69, 42, 27, 44, 42, 46, 194, 42, 261, 84, 85, 87, 57, 42, 42, 330, 29, 46, 93, 0, 95, 44, 50, 40, 42, 87, 186, 72, 51, 72, 48, 106, 72, 108, 109, 336, 289, 282, 113, 199, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 378, 233, 45, 141, 43, 48, 144, 42, 259, 147, 49, 149, 151, 329, 172, 152, 152, 156, 269, 383, 384, 43, 161, 45, 340, 41, 151, 152, 3, 168, 69, 156, 170, 49, 43, 43, 161, 45, 163, 355, 49, 405, 43, 168, 352, 42, 184, 43, 49, 3, 46, 189, 3, 7, 8, 40, 420, 42, 42, 197, 69, 46, 278, 3, 3, 44, 204, 205, 69, 48, 386, 25, 26, 42, 325, 29, 48, 46, 32, 27, 28, 29, 30, 31, 371, 43, 40, 45, 42, 42, 43, 44, 230, 46, 48, 42, 42, 44, 236, 46, 46, 55, 42, 44, 45, 59, 60, 48, 62, 63, 64, 65, 66, 67, 68, 55, 48, 71, 72, 59, 273, 274, 43, 42, 45, 44, 265, 46, 68, 42, 268, 71, 72, 271, 42, 10, 11, 275, 46, 277, 265, 279, 45, 45, 282, 48, 48, 45, 286, 43, 48, 45, 48, 43, 3, 45, 48, 31, 7, 8, 43, 299, 45, 48, 43, 303, 45, 43, 306, 45, 309, 43, 311, 45, 42, 391, 25, 26, 48, 43, 29, 45, 48, 32, 309, 43, 311, 45, 43, 40, 45, 40, 41, 42, 3, 34, 45, 44, 336, 62, 49, 3, 46, 45, 34, 3, 55, 40, 346, 3, 59, 3, 47, 42, 352, 46, 3, 45, 356, 68, 358, 48, 71, 72, 34, 47, 47, 47, 5, 6, 7, 8, 9, 5, 5, 388, 3, 34, 3, 3, 48, 48, 48, 7, 8, 383, 384, 24, 25, 26, 27, 28, 29, 30, 31, 32, 69, 395, 49, 412, 398, 25, 26, 40, 48, 29, 3, 405, 32, 3, 50, 424, 48, 3, 49, 45, 40, 41, 42, 61, 48, 3, 420, 34, 48, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 41, 62, 63, 64, 65, 66, 67, 68, 48, 48, 71, 72, 73, 74, 3, 48, 34, 41, 7, 8, 25, 26, 27, 28, 29, 30, 31, 43, 75, 58, 38, 311, 165, 317, 313, 40, 25, 26, 21, 23, 29, 87, 196, 32, 76, 108, 138, 106, 171, 391, -1, 40, 41, 42, -1, -1, -1, -1, -1, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, -1, -1, 71, 72, 73, 74, 3, -1, -1, -1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, 29, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, 40, -1, 42, -1, -1, -1, -1, -1, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, -1, -1, 71, 72, 73, 74, 3, -1, -1, -1, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, 29, -1, -1, 32, -1, -1, -1, -1, -1, -1, -1, 40, -1, 42, -1, -1, -1, -1, -1, 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 62, 63, 64, 65, 66, 67, 68, -1, -1, 71, 72, 73, 74, 3, -1, -1, -1, 7, 8, -1, -1, -1, -1, 5, 6, 7, 8, 9, 3, -1, -1, -1, 7, 8, -1, 25, 26, -1, -1, 29, -1, -1, 32, 25, 26, 27, 28, 29, 30, 31, 25, 26, 42, 43, 29, -1, -1, 32, 40, 49, -1, 36, -1, -1, -1, 55, 3, 42, -1, 59, 7, 8, 47, -1, -1, -1, -1, -1, 68, -1, 55, 71, 72, -1, 59, -1, -1, -1, 25, 26, -1, -1, 29, 68, 3, 32, 71, 72, 7, 8, -1, -1, -1, -1, -1, 42, 43, -1, -1, -1, -1, -1, 49, -1, -1, -1, 25, 26, 55, -1, 29, -1, 59, 32, -1, 3, -1, -1, -1, 7, 8, 68, -1, 42, 71, 72, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, 55, 25, 26, -1, 59, 29, -1, -1, 32, -1, 3, -1, 36, 68, 7, 8, 71, 72, 42, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 25, 26, -1, 59, 29, -1, 3, 32, -1, -1, 7, 8, 68, -1, -1, 71, 72, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, 26, 55, -1, 29, -1, 59, 32, -1, -1, -1, -1, -1, -1, -1, 68, 3, 42, 71, 72, 7, 8, 47, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, -1, -1, -1, 25, 26, -1, -1, 29, 68, -1, 32, 71, 72, -1, -1, -1, -1, -1, 40, 3, 42, -1, -1, 7, 8, -1, -1, -1, 12, -1, 3, -1, -1, 55, 7, 8, -1, 59, -1, -1, -1, 25, 26, -1, -1, 29, 68, -1, 32, 71, 72, -1, 25, 26, -1, -1, 29, -1, 42, 32, -1, -1, -1, -1, -1, -1, -1, -1, 3, 42, -1, 55, 7, 8, -1, 59, -1, -1, -1, -1, -1, -1, 55, -1, 68, -1, 59, 71, 72, -1, 25, 26, -1, -1, 29, 68, -1, 32, 71, 72, -1, -1, -1, -1, -1, -1, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, 71, 72, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, -1, 48, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, 47, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, 47, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, 47, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, 47, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, -1, -1, 43, -1, 45, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 41, -1, -1, -1, 45, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 41, -1, -1, -1, 45, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, -1, -1, 43, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, -1, -1, 43, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, -1, -1, 43, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, -1, -1, 43, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 41, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 41, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, 36, -1, -1, -1, 40, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, 4, 40, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, 39, 40, 4, -1, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, 39, 40, 4, -1, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, 39, 40, 4, -1, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, 34, 35, -1, -1, -1, -1, 40, 5, 6, 7, 8, 9, -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, 35, -1, -1, -1, -1, 40, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 5, 6, 7, 8, 9, -1, -1, 40, -1, -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 5, 6, 7, 8, 9, -1, -1, 40, -1, -1, -1, -1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 5, 6, 7, 8, 9, -1, -1, 40, -1, -1, -1, -1, -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 5, 6, 7, 8, 9, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 5, 6, 7, 8, 9, -1, -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, 40 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 78, 79, 0, 3, 7, 8, 25, 26, 29, 32, 40, 42, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74, 81, 82, 83, 84, 95, 96, 97, 98, 105, 112, 113, 115, 119, 125, 126, 127, 81, 119, 119, 119, 119, 119, 80, 81, 118, 119, 72, 81, 92, 93, 94, 81, 57, 92, 93, 3, 72, 81, 92, 40, 3, 52, 81, 95, 97, 3, 81, 98, 42, 42, 125, 42, 48, 48, 48, 119, 119, 42, 44, 46, 99, 73, 74, 84, 125, 48, 3, 101, 102, 103, 42, 44, 46, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 40, 120, 121, 122, 48, 46, 41, 82, 43, 99, 43, 45, 43, 45, 3, 42, 45, 48, 48, 42, 42, 48, 48, 48, 51, 42, 50, 79, 105, 42, 46, 3, 34, 42, 46, 99, 100, 119, 119, 62, 96, 97, 126, 128, 131, 48, 3, 43, 49, 116, 117, 119, 3, 36, 47, 114, 119, 46, 42, 99, 45, 34, 43, 117, 3, 114, 119, 119, 10, 11, 123, 124, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 13, 119, 119, 122, 121, 119, 43, 119, 119, 3, 3, 86, 87, 97, 92, 93, 3, 88, 89, 87, 3, 27, 90, 91, 87, 27, 91, 41, 89, 42, 97, 43, 49, 69, 109, 110, 111, 119, 40, 42, 106, 46, 99, 43, 43, 42, 3, 48, 45, 34, 116, 43, 45, 85, 119, 47, 36, 47, 47, 43, 109, 102, 104, 106, 119, 43, 47, 47, 119, 12, 119, 5, 5, 36, 119, 41, 45, 121, 119, 34, 43, 45, 43, 45, 43, 3, 48, 45, 48, 43, 48, 48, 43, 43, 109, 42, 48, 127, 111, 43, 45, 85, 97, 47, 41, 45, 49, 104, 107, 108, 43, 109, 119, 125, 125, 119, 36, 119, 129, 126, 119, 116, 49, 119, 127, 43, 39, 119, 39, 119, 41, 119, 97, 3, 48, 86, 48, 88, 48, 3, 90, 50, 48, 43, 43, 109, 127, 111, 49, 3, 103, 104, 41, 49, 45, 127, 43, 47, 61, 43, 119, 48, 116, 127, 119, 39, 119, 41, 45, 3, 91, 48, 43, 111, 103, 34, 41, 104, 104, 127, 125, 48, 43, 130, 131, 119, 119, 48, 48, 48, 34, 104, 41, 125, 43, 41, 104, 125 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_uint8 yyr1[] = { 0, 77, 78, 79, 79, 80, 80, 81, 81, 81, 82, 82, 82, 82, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 85, 86, 86, 87, 87, 88, 89, 89, 90, 90, 91, 91, 92, 92, 93, 93, 94, 94, 95, 96, 97, 97, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 103, 103, 103, 104, 104, 105, 106, 106, 106, 106, 107, 107, 107, 108, 108, 109, 109, 109, 109, 110, 110, 111, 111, 111, 111, 111, 112, 112, 113, 113, 113, 113, 113, 114, 114, 114, 114, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 116, 117, 117, 117, 117, 118, 118, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 120, 120, 120, 120, 120, 121, 121, 121, 121, 122, 122, 122, 122, 122, 123, 123, 123, 123, 124, 124, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 126, 127, 128, 128, 128, 129, 129, 130, 130, 131, 131 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 1, 0, 2, 0, 2, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 3, 5, 5, 3, 5, 5, 3, 3, 3, 6, 6, 8, 6, 6, 8, 1, 0, 3, 1, 1, 3, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 2, 2, 1, 2, 1, 2, 3, 3, 4, 1, 3, 1, 3, 1, 2, 3, 4, 1, 1, 3, 2, 4, 3, 5, 1, 1, 2, 1, 3, 1, 2, 3, 4, 1, 0, 2, 3, 5, 4, 6, 5, 6, 3, 2, 5, 7, 8, 1, 2, 2, 3, 3, 4, 4, 4, 4, 3, 4, 3, 4, 3, 3, 1, 1, 3, 1, 2, 3, 4, 3, 3, 1, 1, 1, 1, 2, 4, 5, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 4, 3, 4, 5, 6, 6, 7, 5, 3, 3, 3, 2, 2, 2, 2, 3, 4, 1, 1, 2, 2, 3, 4, 3, 5, 7, 1, 3, 3, 1, 1, 2, 4, 3, 5, 2, 4, 1, 1, 2, 5, 7, 5, 7, 9, 8, 2, 2, 2, 3, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 3 }; enum { YYENOMEM = -2 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Backward compatibility with an undocumented macro. Use YYerror or YYUNDEF. */ #define YYERRCODE YYUNDEF /* 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, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ static void yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; YY_USE (yyoutput); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ static void yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { 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 (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, 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) ((void) 0) # define YY_SYMBOL_PRINT(Title, Kind, 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 /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus = 0; /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* Their size. */ YYPTRDIFF_T yystacksize = YYINITDEPTH; /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; yy_state_t *yyss = yyssa; yy_state_t *yyssp = yyss; /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp = yyvs; int yyn; /* The return value of yyparse. */ int yyresult; /* Lookahead symbol kind. */ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #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; YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ 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 -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined 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. */ yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; /* 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 * YYSIZEOF (*yyssp), &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yy_state_t *yyss1 = yyss; union yyalloc *yyptr = YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YY_IGNORE_USELESS_CAST_BEGIN YYDPRINTF ((stderr, "Stack size increased to %ld\n", YY_CAST (long, yystacksize))); YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 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 (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = YYEOF; yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else if (yychar == YYerror) { /* The scanner already issued an error message, process directly to error recovery. But do not keep the error token as lookahead, it is too special and may lead us to an endless loop in error recovery. */ yychar = YYUNDEF; yytoken = YYSYMBOL_YYerror; goto yyerrlab1; } 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 (yytable_value_is_error (yyn)) 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); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Discard the shifted token. */ yychar = YYEMPTY; 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: /* file: fileblock */ #line 203 "camp.y" { absyntax::root = (yyvsp[0].b); } #line 1864 "camp.tab.cc" break; case 3: /* fileblock: %empty */ #line 207 "camp.y" { (yyval.b) = new file(lexerPos(), false); } #line 1870 "camp.tab.cc" break; case 4: /* fileblock: fileblock runnable */ #line 209 "camp.y" { (yyval.b) = (yyvsp[-1].b); (yyval.b)->add((yyvsp[0].run)); } #line 1876 "camp.tab.cc" break; case 5: /* bareblock: %empty */ #line 213 "camp.y" { (yyval.b) = new block(lexerPos(), true); } #line 1882 "camp.tab.cc" break; case 6: /* bareblock: bareblock runnable */ #line 215 "camp.y" { (yyval.b) = (yyvsp[-1].b); (yyval.b)->add((yyvsp[0].run)); } #line 1888 "camp.tab.cc" break; case 7: /* name: ID */ #line 219 "camp.y" { (yyval.n) = new simpleName((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 1894 "camp.tab.cc" break; case 8: /* name: name '.' ID */ #line 220 "camp.y" { (yyval.n) = new qualifiedName((yyvsp[-1].pos), (yyvsp[-2].n), (yyvsp[0].ps).sym); } #line 1900 "camp.tab.cc" break; case 9: /* name: '%' */ #line 221 "camp.y" { (yyval.n) = new simpleName((yyvsp[0].ps).pos, symbol::trans("operator answer")); } #line 1907 "camp.tab.cc" break; case 10: /* runnable: dec */ #line 226 "camp.y" { (yyval.run) = (yyvsp[0].d); } #line 1913 "camp.tab.cc" break; case 11: /* runnable: stm */ #line 227 "camp.y" { (yyval.run) = (yyvsp[0].s); } #line 1919 "camp.tab.cc" break; case 12: /* runnable: modifiers dec */ #line 229 "camp.y" { (yyval.run) = new modifiedRunnable((yyvsp[-1].ml)->getPos(), (yyvsp[-1].ml), (yyvsp[0].d)); } #line 1925 "camp.tab.cc" break; case 13: /* runnable: modifiers stm */ #line 231 "camp.y" { (yyval.run) = new modifiedRunnable((yyvsp[-1].ml)->getPos(), (yyvsp[-1].ml), (yyvsp[0].s)); } #line 1931 "camp.tab.cc" break; case 14: /* modifiers: MODIFIER */ #line 235 "camp.y" { (yyval.ml) = new modifierList((yyvsp[0].mod).pos); (yyval.ml)->add((yyvsp[0].mod).val); } #line 1937 "camp.tab.cc" break; case 15: /* modifiers: PERM */ #line 236 "camp.y" { (yyval.ml) = new modifierList((yyvsp[0].perm).pos); (yyval.ml)->add((yyvsp[0].perm).val); } #line 1943 "camp.tab.cc" break; case 16: /* modifiers: modifiers MODIFIER */ #line 238 "camp.y" { (yyval.ml) = (yyvsp[-1].ml); (yyval.ml)->add((yyvsp[0].mod).val); } #line 1949 "camp.tab.cc" break; case 17: /* modifiers: modifiers PERM */ #line 240 "camp.y" { (yyval.ml) = (yyvsp[-1].ml); (yyval.ml)->add((yyvsp[0].perm).val); } #line 1955 "camp.tab.cc" break; case 18: /* dec: vardec */ #line 244 "camp.y" { (yyval.d) = (yyvsp[0].vd); } #line 1961 "camp.tab.cc" break; case 19: /* dec: fundec */ #line 245 "camp.y" { (yyval.d) = (yyvsp[0].d); } #line 1967 "camp.tab.cc" break; case 20: /* dec: typedec */ #line 246 "camp.y" { (yyval.d) = (yyvsp[0].d); } #line 1973 "camp.tab.cc" break; case 21: /* dec: ACCESS stridpairlist ';' */ #line 248 "camp.y" { (yyval.d) = new accessdec((yyvsp[-2].pos), (yyvsp[-1].ipl)); } #line 1979 "camp.tab.cc" break; case 22: /* dec: FROM name UNRAVEL idpairlist ';' */ #line 250 "camp.y" { (yyval.d) = new unraveldec((yyvsp[-4].pos), (yyvsp[-3].n), (yyvsp[-1].ipl)); } #line 1985 "camp.tab.cc" break; case 23: /* dec: FROM name UNRAVEL '*' ';' */ #line 252 "camp.y" { (yyval.d) = new unraveldec((yyvsp[-4].pos), (yyvsp[-3].n), WILDCARD); } #line 1991 "camp.tab.cc" break; case 24: /* dec: UNRAVEL name ';' */ #line 253 "camp.y" { (yyval.d) = new unraveldec((yyvsp[-2].pos), (yyvsp[-1].n), WILDCARD); } #line 1997 "camp.tab.cc" break; case 25: /* dec: FROM strid ACCESS idpairlist ';' */ #line 255 "camp.y" { (yyval.d) = new fromaccessdec((yyvsp[-4].pos), (yyvsp[-3].ps).sym, (yyvsp[-1].ipl)); } #line 2003 "camp.tab.cc" break; case 26: /* dec: FROM strid ACCESS '*' ';' */ #line 257 "camp.y" { (yyval.d) = new fromaccessdec((yyvsp[-4].pos), (yyvsp[-3].ps).sym, WILDCARD); } #line 2009 "camp.tab.cc" break; case 27: /* dec: IMPORT stridpair ';' */ #line 259 "camp.y" { (yyval.d) = new importdec((yyvsp[-2].pos), (yyvsp[-1].ip)); } #line 2015 "camp.tab.cc" break; case 28: /* dec: INCLUDE ID ';' */ #line 260 "camp.y" { (yyval.d) = new includedec((yyvsp[-2].pos), (yyvsp[-1].ps).sym); } #line 2021 "camp.tab.cc" break; case 29: /* dec: INCLUDE STRING ';' */ #line 262 "camp.y" { (yyval.d) = new includedec((yyvsp[-2].pos), (yyvsp[-1].stre)->getString()); } #line 2027 "camp.tab.cc" break; case 30: /* dec: TYPEDEF IMPORT '(' typeparamlist ')' ';' */ #line 266 "camp.y" { (yyval.d) = new receiveTypedefDec((yyvsp[-5].pos), (yyvsp[-2].tps)); } #line 2033 "camp.tab.cc" break; case 31: /* dec: IMPORT TYPEDEF '(' typeparamlist ')' ';' */ #line 268 "camp.y" { (yyval.d) = new badDec((yyvsp[-5].pos), (yyvsp[-5].pos), "Expected 'typedef import();'"); } #line 2041 "camp.tab.cc" break; case 32: /* dec: ACCESS strid '(' decdeclist ')' ID ID ';' */ #line 273 "camp.y" { (yyval.d) = new templateAccessDec( (yyvsp[-7].pos), (yyvsp[-6].ps).sym, (yyvsp[-4].fls), (yyvsp[-2].ps).sym, (yyvsp[-1].ps).sym, (yyvsp[-2].ps).pos ); } #line 2049 "camp.tab.cc" break; case 33: /* dec: ACCESS strid '(' decdeclist ')' ';' */ #line 277 "camp.y" { (yyval.d) = new badDec((yyvsp[-5].pos), (yyvsp[0].pos), "expected 'as'"); } #line 2055 "camp.tab.cc" break; case 34: /* dec: IMPORT strid '(' decdeclist ')' ';' */ #line 279 "camp.y" { (yyval.d) = new badDec((yyvsp[-5].pos), (yyvsp[-5].pos), "Parametrized imports disallowed to reduce naming " "conflicts. Try " "'access () as ;'." ); } #line 2065 "camp.tab.cc" break; case 35: /* dec: FROM strid '(' decdeclist ')' ACCESS idpairlist ';' */ #line 285 "camp.y" { (yyval.d) = new fromaccessdec((yyvsp[-7].pos), (yyvsp[-6].ps).sym, (yyvsp[-1].ipl), (yyvsp[-4].fls)); } #line 2071 "camp.tab.cc" break; case 36: /* optionalcomma: ',' */ #line 289 "camp.y" { (yyval.boo) = true; } #line 2077 "camp.tab.cc" break; case 37: /* optionalcomma: %empty */ #line 290 "camp.y" { (yyval.boo) = false; } #line 2083 "camp.tab.cc" break; case 38: /* decdec: ID ASSIGN type */ #line 296 "camp.y" { (yyval.fl) = new formal( (yyvsp[-2].ps).pos, (yyvsp[0].t), new decidstart((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym) ); } #line 2091 "camp.tab.cc" break; case 39: /* decdec: type */ #line 299 "camp.y" { (yyval.fl) = new formal((yyvsp[0].t)->getPos(), (yyvsp[0].t), nullptr); } #line 2097 "camp.tab.cc" break; case 40: /* decdeclist: decdec */ #line 304 "camp.y" { (yyval.fls) = new formals((yyvsp[0].fl)->getPos()); (yyval.fls)->add((yyvsp[0].fl)); } #line 2103 "camp.tab.cc" break; case 41: /* decdeclist: decdeclist ',' decdec */ #line 306 "camp.y" { (yyval.fls) = (yyvsp[-2].fls); (yyval.fls)->add((yyvsp[0].fl)); } #line 2109 "camp.tab.cc" break; case 42: /* typeparam: ID */ #line 310 "camp.y" { (yyval.tp) = new typeParam((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 2115 "camp.tab.cc" break; case 43: /* typeparamlist: typeparam */ #line 315 "camp.y" { (yyval.tps) = new typeParamList((yyvsp[0].tp)->getPos()); (yyval.tps)->add((yyvsp[0].tp)); } #line 2121 "camp.tab.cc" break; case 44: /* typeparamlist: typeparamlist ',' typeparam */ #line 317 "camp.y" { (yyval.tps) = (yyvsp[-2].tps); (yyval.tps)->add((yyvsp[0].tp)); } #line 2127 "camp.tab.cc" break; case 45: /* idpair: ID */ #line 321 "camp.y" { (yyval.ip) = new idpair((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 2133 "camp.tab.cc" break; case 46: /* idpair: ID ID ID */ #line 323 "camp.y" { (yyval.ip) = new idpair((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym, (yyvsp[-1].ps).sym , (yyvsp[0].ps).sym); } #line 2139 "camp.tab.cc" break; case 47: /* idpairlist: idpair */ #line 327 "camp.y" { (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[0].ip)); } #line 2145 "camp.tab.cc" break; case 48: /* idpairlist: idpairlist ',' idpair */ #line 329 "camp.y" { (yyval.ipl) = (yyvsp[-2].ipl); (yyval.ipl)->add((yyvsp[0].ip)); } #line 2151 "camp.tab.cc" break; case 49: /* strid: name */ #line 333 "camp.y" { (yyval.ps).pos = (yyvsp[0].n)->getPos(); (yyval.ps).sym = (yyvsp[0].n)->asPath(); } #line 2158 "camp.tab.cc" break; case 50: /* strid: STRING */ #line 335 "camp.y" { (yyval.ps).pos = (yyvsp[0].stre)->getPos(); (yyval.ps).sym = symbol::literalTrans((yyvsp[0].stre)->getString()); } #line 2165 "camp.tab.cc" break; case 51: /* stridpair: name */ #line 340 "camp.y" { (yyval.ip) = new idpair((yyvsp[0].n)->getPos(), (yyvsp[0].n)->asPath(), symbol::trans("as"), (yyvsp[0].n)->getName()); } #line 2174 "camp.tab.cc" break; case 52: /* stridpair: strid ID ID */ #line 345 "camp.y" { (yyval.ip) = new idpair((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym, (yyvsp[-1].ps).sym , (yyvsp[0].ps).sym); } #line 2180 "camp.tab.cc" break; case 53: /* stridpairlist: stridpair */ #line 349 "camp.y" { (yyval.ipl) = new idpairlist(); (yyval.ipl)->add((yyvsp[0].ip)); } #line 2186 "camp.tab.cc" break; case 54: /* stridpairlist: stridpairlist ',' stridpair */ #line 351 "camp.y" { (yyval.ipl) = (yyvsp[-2].ipl); (yyval.ipl)->add((yyvsp[0].ip)); } #line 2192 "camp.tab.cc" break; case 55: /* vardec: barevardec ';' */ #line 355 "camp.y" { (yyval.vd) = (yyvsp[-1].vd); } #line 2198 "camp.tab.cc" break; case 56: /* barevardec: type decidlist */ #line 359 "camp.y" { (yyval.vd) = new vardec((yyvsp[-1].t)->getPos(), (yyvsp[-1].t), (yyvsp[0].dil)); } #line 2204 "camp.tab.cc" break; case 57: /* type: celltype */ #line 363 "camp.y" { (yyval.t) = (yyvsp[0].t); } #line 2210 "camp.tab.cc" break; case 58: /* type: name dims */ #line 364 "camp.y" { (yyval.t) = new arrayTy((yyvsp[-1].n), (yyvsp[0].dim)); } #line 2216 "camp.tab.cc" break; case 59: /* celltype: name */ #line 368 "camp.y" { (yyval.t) = new nameTy((yyvsp[0].n)); } #line 2222 "camp.tab.cc" break; case 60: /* dims: '[' ']' */ #line 372 "camp.y" { (yyval.dim) = new dimensions((yyvsp[-1].pos)); } #line 2228 "camp.tab.cc" break; case 61: /* dims: dims '[' ']' */ #line 373 "camp.y" { (yyval.dim) = (yyvsp[-2].dim); (yyval.dim)->increase(); } #line 2234 "camp.tab.cc" break; case 62: /* dimexps: '[' exp ']' */ #line 377 "camp.y" { (yyval.elist) = new explist((yyvsp[-2].pos)); (yyval.elist)->add((yyvsp[-1].e)); } #line 2240 "camp.tab.cc" break; case 63: /* dimexps: dimexps '[' exp ']' */ #line 379 "camp.y" { (yyval.elist) = (yyvsp[-3].elist); (yyval.elist)->add((yyvsp[-1].e)); } #line 2246 "camp.tab.cc" break; case 64: /* decidlist: decid */ #line 383 "camp.y" { (yyval.dil) = new decidlist((yyvsp[0].di)->getPos()); (yyval.dil)->add((yyvsp[0].di)); } #line 2252 "camp.tab.cc" break; case 65: /* decidlist: decidlist ',' decid */ #line 385 "camp.y" { (yyval.dil) = (yyvsp[-2].dil); (yyval.dil)->add((yyvsp[0].di)); } #line 2258 "camp.tab.cc" break; case 66: /* decid: decidstart */ #line 389 "camp.y" { (yyval.di) = new decid((yyvsp[0].dis)->getPos(), (yyvsp[0].dis)); } #line 2264 "camp.tab.cc" break; case 67: /* decid: decidstart ASSIGN varinit */ #line 391 "camp.y" { (yyval.di) = new decid((yyvsp[-2].dis)->getPos(), (yyvsp[-2].dis), (yyvsp[0].vi)); } #line 2270 "camp.tab.cc" break; case 68: /* decidstart: ID */ #line 395 "camp.y" { (yyval.dis) = new decidstart((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 2276 "camp.tab.cc" break; case 69: /* decidstart: ID dims */ #line 396 "camp.y" { (yyval.dis) = new decidstart((yyvsp[-1].ps).pos, (yyvsp[-1].ps).sym, (yyvsp[0].dim)); } #line 2282 "camp.tab.cc" break; case 70: /* decidstart: ID '(' ')' */ #line 397 "camp.y" { (yyval.dis) = new fundecidstart((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym, 0, new formals((yyvsp[-1].pos))); } #line 2289 "camp.tab.cc" break; case 71: /* decidstart: ID '(' formals ')' */ #line 400 "camp.y" { (yyval.dis) = new fundecidstart((yyvsp[-3].ps).pos, (yyvsp[-3].ps).sym, 0, (yyvsp[-1].fls)); } #line 2295 "camp.tab.cc" break; case 72: /* varinit: exp */ #line 404 "camp.y" { (yyval.vi) = (yyvsp[0].e); } #line 2301 "camp.tab.cc" break; case 73: /* varinit: arrayinit */ #line 405 "camp.y" { (yyval.vi) = (yyvsp[0].ai); } #line 2307 "camp.tab.cc" break; case 74: /* block: '{' bareblock '}' */ #line 410 "camp.y" { (yyval.b) = (yyvsp[-1].b); } #line 2313 "camp.tab.cc" break; case 75: /* arrayinit: '{' '}' */ #line 414 "camp.y" { (yyval.ai) = new arrayinit((yyvsp[-1].pos)); } #line 2319 "camp.tab.cc" break; case 76: /* arrayinit: '{' ELLIPSIS varinit '}' */ #line 416 "camp.y" { (yyval.ai) = new arrayinit((yyvsp[-3].pos)); (yyval.ai)->addRest((yyvsp[-1].vi)); } #line 2325 "camp.tab.cc" break; case 77: /* arrayinit: '{' basearrayinit '}' */ #line 418 "camp.y" { (yyval.ai) = (yyvsp[-1].ai); } #line 2331 "camp.tab.cc" break; case 78: /* arrayinit: '{' basearrayinit ELLIPSIS varinit '}' */ #line 420 "camp.y" { (yyval.ai) = (yyvsp[-3].ai); (yyval.ai)->addRest((yyvsp[-1].vi)); } #line 2337 "camp.tab.cc" break; case 79: /* basearrayinit: ',' */ #line 424 "camp.y" { (yyval.ai) = new arrayinit((yyvsp[0].pos)); } #line 2343 "camp.tab.cc" break; case 80: /* basearrayinit: varinits */ #line 425 "camp.y" { (yyval.ai) = (yyvsp[0].ai); } #line 2349 "camp.tab.cc" break; case 81: /* basearrayinit: varinits ',' */ #line 426 "camp.y" { (yyval.ai) = (yyvsp[-1].ai); } #line 2355 "camp.tab.cc" break; case 82: /* varinits: varinit */ #line 430 "camp.y" { (yyval.ai) = new arrayinit((yyvsp[0].vi)->getPos()); (yyval.ai)->add((yyvsp[0].vi));} #line 2362 "camp.tab.cc" break; case 83: /* varinits: varinits ',' varinit */ #line 433 "camp.y" { (yyval.ai) = (yyvsp[-2].ai); (yyval.ai)->add((yyvsp[0].vi)); } #line 2368 "camp.tab.cc" break; case 84: /* formals: formal */ #line 437 "camp.y" { (yyval.fls) = new formals((yyvsp[0].fl)->getPos()); (yyval.fls)->add((yyvsp[0].fl)); } #line 2374 "camp.tab.cc" break; case 85: /* formals: ELLIPSIS formal */ #line 438 "camp.y" { (yyval.fls) = new formals((yyvsp[-1].pos)); (yyval.fls)->addRest((yyvsp[0].fl)); } #line 2380 "camp.tab.cc" break; case 86: /* formals: formals ',' formal */ #line 440 "camp.y" { (yyval.fls) = (yyvsp[-2].fls); (yyval.fls)->add((yyvsp[0].fl)); } #line 2386 "camp.tab.cc" break; case 87: /* formals: formals optionalcomma ELLIPSIS formal */ #line 442 "camp.y" { (yyval.fls) = (yyvsp[-3].fls); (yyval.fls)->addRest((yyvsp[0].fl)); } #line 2392 "camp.tab.cc" break; case 88: /* explicitornot: EXPLICIT */ #line 446 "camp.y" { (yyval.boo) = true; } #line 2398 "camp.tab.cc" break; case 89: /* explicitornot: %empty */ #line 447 "camp.y" { (yyval.boo) = false; } #line 2404 "camp.tab.cc" break; case 90: /* formal: explicitornot type */ #line 452 "camp.y" { (yyval.fl) = new formal((yyvsp[0].t)->getPos(), (yyvsp[0].t), 0, 0, (yyvsp[-1].boo), 0); } #line 2410 "camp.tab.cc" break; case 91: /* formal: explicitornot type decidstart */ #line 454 "camp.y" { (yyval.fl) = new formal((yyvsp[-1].t)->getPos(), (yyvsp[-1].t), (yyvsp[0].dis), 0, (yyvsp[-2].boo), 0); } #line 2416 "camp.tab.cc" break; case 92: /* formal: explicitornot type decidstart ASSIGN varinit */ #line 456 "camp.y" { (yyval.fl) = new formal((yyvsp[-3].t)->getPos(), (yyvsp[-3].t), (yyvsp[-2].dis), (yyvsp[0].vi), (yyvsp[-4].boo), 0); } #line 2422 "camp.tab.cc" break; case 93: /* formal: explicitornot type ID decidstart */ #line 459 "camp.y" { bool k = checkKeyword((yyvsp[-1].ps).pos, (yyvsp[-1].ps).sym); (yyval.fl) = new formal((yyvsp[-2].t)->getPos(), (yyvsp[-2].t), (yyvsp[0].dis), 0, (yyvsp[-3].boo), k); } #line 2429 "camp.tab.cc" break; case 94: /* formal: explicitornot type ID decidstart ASSIGN varinit */ #line 462 "camp.y" { bool k = checkKeyword((yyvsp[-3].ps).pos, (yyvsp[-3].ps).sym); (yyval.fl) = new formal((yyvsp[-4].t)->getPos(), (yyvsp[-4].t), (yyvsp[-2].dis), (yyvsp[0].vi), (yyvsp[-5].boo), k); } #line 2436 "camp.tab.cc" break; case 95: /* fundec: type ID '(' ')' blockstm */ #line 468 "camp.y" { (yyval.d) = new fundec((yyvsp[-2].pos), (yyvsp[-4].t), (yyvsp[-3].ps).sym, new formals((yyvsp[-2].pos)), (yyvsp[0].s)); } #line 2442 "camp.tab.cc" break; case 96: /* fundec: type ID '(' formals ')' blockstm */ #line 470 "camp.y" { (yyval.d) = new fundec((yyvsp[-3].pos), (yyvsp[-5].t), (yyvsp[-4].ps).sym, (yyvsp[-2].fls), (yyvsp[0].s)); } #line 2448 "camp.tab.cc" break; case 97: /* typedec: STRUCT ID block */ #line 474 "camp.y" { (yyval.d) = new recorddec((yyvsp[-2].pos), (yyvsp[-1].ps).sym, (yyvsp[0].b)); } #line 2454 "camp.tab.cc" break; case 98: /* typedec: TYPEDEF vardec */ #line 475 "camp.y" { (yyval.d) = new typedec((yyvsp[-1].pos), (yyvsp[0].vd)); } #line 2460 "camp.tab.cc" break; case 99: /* typedec: USING ID ASSIGN type ';' */ #line 481 "camp.y" { decidstart *dis = new decidstart((yyvsp[-3].ps).pos, (yyvsp[-3].ps).sym); (yyval.d) = new typedec((yyvsp[-4].pos), dis, (yyvsp[-1].t)); } #line 2467 "camp.tab.cc" break; case 100: /* typedec: USING ID ASSIGN type '(' ')' ';' */ #line 484 "camp.y" { decidstart *dis = new fundecidstart((yyvsp[-5].ps).pos, (yyvsp[-5].ps).sym, 0, new formals((yyvsp[-2].pos))); (yyval.d) = new typedec((yyvsp[-6].pos), dis, (yyvsp[-3].t)); } #line 2475 "camp.tab.cc" break; case 101: /* typedec: USING ID ASSIGN type '(' formals ')' ';' */ #line 488 "camp.y" { decidstart *dis = new fundecidstart((yyvsp[-6].ps).pos, (yyvsp[-6].ps).sym, 0, (yyvsp[-2].fls)); (yyval.d) = new typedec((yyvsp[-7].pos), dis, (yyvsp[-4].t)); } #line 2482 "camp.tab.cc" break; case 102: /* slice: ':' */ #line 493 "camp.y" { (yyval.slice) = new slice((yyvsp[0].pos), 0, 0); } #line 2488 "camp.tab.cc" break; case 103: /* slice: exp ':' */ #line 494 "camp.y" { (yyval.slice) = new slice((yyvsp[0].pos), (yyvsp[-1].e), 0); } #line 2494 "camp.tab.cc" break; case 104: /* slice: ':' exp */ #line 495 "camp.y" { (yyval.slice) = new slice((yyvsp[-1].pos), 0, (yyvsp[0].e)); } #line 2500 "camp.tab.cc" break; case 105: /* slice: exp ':' exp */ #line 496 "camp.y" { (yyval.slice) = new slice((yyvsp[-1].pos), (yyvsp[-2].e), (yyvsp[0].e)); } #line 2506 "camp.tab.cc" break; case 106: /* value: value '.' ID */ #line 500 "camp.y" { (yyval.e) = new fieldExp((yyvsp[-1].pos), (yyvsp[-2].e), (yyvsp[0].ps).sym); } #line 2512 "camp.tab.cc" break; case 107: /* value: name '[' exp ']' */ #line 501 "camp.y" { (yyval.e) = new subscriptExp((yyvsp[-2].pos), new nameExp((yyvsp[-3].n)->getPos(), (yyvsp[-3].n)), (yyvsp[-1].e)); } #line 2519 "camp.tab.cc" break; case 108: /* value: value '[' exp ']' */ #line 503 "camp.y" { (yyval.e) = new subscriptExp((yyvsp[-2].pos), (yyvsp[-3].e), (yyvsp[-1].e)); } #line 2525 "camp.tab.cc" break; case 109: /* value: name '[' slice ']' */ #line 504 "camp.y" { (yyval.e) = new sliceExp((yyvsp[-2].pos), new nameExp((yyvsp[-3].n)->getPos(), (yyvsp[-3].n)), (yyvsp[-1].slice)); } #line 2532 "camp.tab.cc" break; case 110: /* value: value '[' slice ']' */ #line 506 "camp.y" { (yyval.e) = new sliceExp((yyvsp[-2].pos), (yyvsp[-3].e), (yyvsp[-1].slice)); } #line 2538 "camp.tab.cc" break; case 111: /* value: name '(' ')' */ #line 507 "camp.y" { (yyval.e) = new callExp((yyvsp[-1].pos), new nameExp((yyvsp[-2].n)->getPos(), (yyvsp[-2].n)), new arglist()); } #line 2546 "camp.tab.cc" break; case 112: /* value: name '(' arglist ')' */ #line 511 "camp.y" { (yyval.e) = new callExp((yyvsp[-2].pos), new nameExp((yyvsp[-3].n)->getPos(), (yyvsp[-3].n)), (yyvsp[-1].alist)); } #line 2554 "camp.tab.cc" break; case 113: /* value: value '(' ')' */ #line 514 "camp.y" { (yyval.e) = new callExp((yyvsp[-1].pos), (yyvsp[-2].e), new arglist()); } #line 2560 "camp.tab.cc" break; case 114: /* value: value '(' arglist ')' */ #line 516 "camp.y" { (yyval.e) = new callExp((yyvsp[-2].pos), (yyvsp[-3].e), (yyvsp[-1].alist)); } #line 2566 "camp.tab.cc" break; case 115: /* value: '(' exp ')' */ #line 518 "camp.y" { (yyval.e) = (yyvsp[-1].e); } #line 2572 "camp.tab.cc" break; case 116: /* value: '(' name ')' */ #line 520 "camp.y" { (yyval.e) = new nameExp((yyvsp[-1].n)->getPos(), (yyvsp[-1].n)); } #line 2578 "camp.tab.cc" break; case 117: /* value: THIS_TOK */ #line 521 "camp.y" { (yyval.e) = new thisExp((yyvsp[0].pos)); } #line 2584 "camp.tab.cc" break; case 118: /* argument: exp */ #line 525 "camp.y" { (yyval.arg).name = symbol::nullsym; (yyval.arg).val=(yyvsp[0].e); } #line 2590 "camp.tab.cc" break; case 119: /* argument: ID ASSIGN exp */ #line 526 "camp.y" { (yyval.arg).name = (yyvsp[-2].ps).sym; (yyval.arg).val=(yyvsp[0].e); } #line 2596 "camp.tab.cc" break; case 120: /* arglist: argument */ #line 530 "camp.y" { (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[0].arg)); } #line 2602 "camp.tab.cc" break; case 121: /* arglist: ELLIPSIS argument */ #line 532 "camp.y" { (yyval.alist) = new arglist(); (yyval.alist)->addRest((yyvsp[0].arg)); } #line 2608 "camp.tab.cc" break; case 122: /* arglist: arglist ',' argument */ #line 534 "camp.y" { (yyval.alist) = (yyvsp[-2].alist); (yyval.alist)->add((yyvsp[0].arg)); } #line 2614 "camp.tab.cc" break; case 123: /* arglist: arglist optionalcomma ELLIPSIS argument */ #line 536 "camp.y" { (yyval.alist) = (yyvsp[-3].alist); (yyval.alist)->addRest((yyvsp[0].arg)); } #line 2620 "camp.tab.cc" break; case 124: /* tuple: exp ',' exp */ #line 541 "camp.y" { (yyval.alist) = new arglist(); (yyval.alist)->add((yyvsp[-2].e)); (yyval.alist)->add((yyvsp[0].e)); } #line 2626 "camp.tab.cc" break; case 125: /* tuple: tuple ',' exp */ #line 542 "camp.y" { (yyval.alist) = (yyvsp[-2].alist); (yyval.alist)->add((yyvsp[0].e)); } #line 2632 "camp.tab.cc" break; case 126: /* exp: name */ #line 546 "camp.y" { (yyval.e) = new nameExp((yyvsp[0].n)->getPos(), (yyvsp[0].n)); } #line 2638 "camp.tab.cc" break; case 127: /* exp: value */ #line 547 "camp.y" { (yyval.e) = (yyvsp[0].e); } #line 2644 "camp.tab.cc" break; case 128: /* exp: LIT */ #line 548 "camp.y" { (yyval.e) = (yyvsp[0].e); } #line 2650 "camp.tab.cc" break; case 129: /* exp: STRING */ #line 549 "camp.y" { (yyval.e) = (yyvsp[0].stre); } #line 2656 "camp.tab.cc" break; case 130: /* exp: LIT exp */ #line 551 "camp.y" { (yyval.e) = new scaleExp((yyvsp[-1].e)->getPos(), (yyvsp[-1].e), (yyvsp[0].e)); } #line 2662 "camp.tab.cc" break; case 131: /* exp: '(' name ')' exp */ #line 553 "camp.y" { (yyval.e) = new castExp((yyvsp[-2].n)->getPos(), new nameTy((yyvsp[-2].n)), (yyvsp[0].e)); } #line 2668 "camp.tab.cc" break; case 132: /* exp: '(' name dims ')' exp */ #line 555 "camp.y" { (yyval.e) = new castExp((yyvsp[-3].n)->getPos(), new arrayTy((yyvsp[-3].n), (yyvsp[-2].dim)), (yyvsp[0].e)); } #line 2674 "camp.tab.cc" break; case 133: /* exp: '+' exp */ #line 557 "camp.y" { (yyval.e) = new unaryExp((yyvsp[-1].ps).pos, (yyvsp[0].e), (yyvsp[-1].ps).sym); } #line 2680 "camp.tab.cc" break; case 134: /* exp: '-' exp */ #line 559 "camp.y" { (yyval.e) = new unaryExp((yyvsp[-1].ps).pos, (yyvsp[0].e), (yyvsp[-1].ps).sym); } #line 2686 "camp.tab.cc" break; case 135: /* exp: OPERATOR exp */ #line 560 "camp.y" { (yyval.e) = new unaryExp((yyvsp[-1].ps).pos, (yyvsp[0].e), (yyvsp[-1].ps).sym); } #line 2692 "camp.tab.cc" break; case 136: /* exp: exp '+' exp */ #line 561 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2698 "camp.tab.cc" break; case 137: /* exp: exp '-' exp */ #line 562 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2704 "camp.tab.cc" break; case 138: /* exp: exp '*' exp */ #line 563 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2710 "camp.tab.cc" break; case 139: /* exp: exp '/' exp */ #line 564 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2716 "camp.tab.cc" break; case 140: /* exp: exp '%' exp */ #line 565 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2722 "camp.tab.cc" break; case 141: /* exp: exp '#' exp */ #line 566 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2728 "camp.tab.cc" break; case 142: /* exp: exp '^' exp */ #line 567 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2734 "camp.tab.cc" break; case 143: /* exp: exp LT exp */ #line 568 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2740 "camp.tab.cc" break; case 144: /* exp: exp LE exp */ #line 569 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2746 "camp.tab.cc" break; case 145: /* exp: exp GT exp */ #line 570 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2752 "camp.tab.cc" break; case 146: /* exp: exp GE exp */ #line 571 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2758 "camp.tab.cc" break; case 147: /* exp: exp EQ exp */ #line 572 "camp.y" { (yyval.e) = new equalityExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2764 "camp.tab.cc" break; case 148: /* exp: exp NEQ exp */ #line 573 "camp.y" { (yyval.e) = new equalityExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2770 "camp.tab.cc" break; case 149: /* exp: exp CAND exp */ #line 574 "camp.y" { (yyval.e) = new andExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2776 "camp.tab.cc" break; case 150: /* exp: exp COR exp */ #line 575 "camp.y" { (yyval.e) = new orExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2782 "camp.tab.cc" break; case 151: /* exp: exp CARETS exp */ #line 576 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2788 "camp.tab.cc" break; case 152: /* exp: exp AMPERSAND exp */ #line 577 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2794 "camp.tab.cc" break; case 153: /* exp: exp BAR exp */ #line 578 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2800 "camp.tab.cc" break; case 154: /* exp: exp OPERATOR exp */ #line 579 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2806 "camp.tab.cc" break; case 155: /* exp: exp INCR exp */ #line 580 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2812 "camp.tab.cc" break; case 156: /* exp: NEW celltype */ #line 582 "camp.y" { (yyval.e) = new newRecordExp((yyvsp[-1].pos), (yyvsp[0].t)); } #line 2818 "camp.tab.cc" break; case 157: /* exp: NEW celltype dimexps */ #line 584 "camp.y" { (yyval.e) = new newArrayExp((yyvsp[-2].pos), (yyvsp[-1].t), (yyvsp[0].elist), 0, 0); } #line 2824 "camp.tab.cc" break; case 158: /* exp: NEW celltype dimexps dims */ #line 586 "camp.y" { (yyval.e) = new newArrayExp((yyvsp[-3].pos), (yyvsp[-2].t), (yyvsp[-1].elist), (yyvsp[0].dim), 0); } #line 2830 "camp.tab.cc" break; case 159: /* exp: NEW celltype dims */ #line 588 "camp.y" { (yyval.e) = new newArrayExp((yyvsp[-2].pos), (yyvsp[-1].t), 0, (yyvsp[0].dim), 0); } #line 2836 "camp.tab.cc" break; case 160: /* exp: NEW celltype dims arrayinit */ #line 590 "camp.y" { (yyval.e) = new newArrayExp((yyvsp[-3].pos), (yyvsp[-2].t), 0, (yyvsp[-1].dim), (yyvsp[0].ai)); } #line 2842 "camp.tab.cc" break; case 161: /* exp: NEW celltype '(' ')' blockstm */ #line 592 "camp.y" { (yyval.e) = new newFunctionExp((yyvsp[-4].pos), (yyvsp[-3].t), new formals((yyvsp[-2].pos)), (yyvsp[0].s)); } #line 2848 "camp.tab.cc" break; case 162: /* exp: NEW celltype dims '(' ')' blockstm */ #line 594 "camp.y" { (yyval.e) = new newFunctionExp((yyvsp[-5].pos), new arrayTy((yyvsp[-4].t)->getPos(), (yyvsp[-4].t), (yyvsp[-3].dim)), new formals((yyvsp[-2].pos)), (yyvsp[0].s)); } #line 2857 "camp.tab.cc" break; case 163: /* exp: NEW celltype '(' formals ')' blockstm */ #line 599 "camp.y" { (yyval.e) = new newFunctionExp((yyvsp[-5].pos), (yyvsp[-4].t), (yyvsp[-2].fls), (yyvsp[0].s)); } #line 2863 "camp.tab.cc" break; case 164: /* exp: NEW celltype dims '(' formals ')' blockstm */ #line 601 "camp.y" { (yyval.e) = new newFunctionExp((yyvsp[-6].pos), new arrayTy((yyvsp[-5].t)->getPos(), (yyvsp[-5].t), (yyvsp[-4].dim)), (yyvsp[-2].fls), (yyvsp[0].s)); } #line 2872 "camp.tab.cc" break; case 165: /* exp: exp '?' exp ':' exp */ #line 606 "camp.y" { (yyval.e) = new conditionalExp((yyvsp[-3].pos), (yyvsp[-4].e), (yyvsp[-2].e), (yyvsp[0].e)); } #line 2878 "camp.tab.cc" break; case 166: /* exp: exp ASSIGN exp */ #line 607 "camp.y" { (yyval.e) = new assignExp((yyvsp[-1].pos), (yyvsp[-2].e), (yyvsp[0].e)); } #line 2884 "camp.tab.cc" break; case 167: /* exp: '(' tuple ')' */ #line 608 "camp.y" { (yyval.e) = new callExp((yyvsp[-2].pos), new nameExp((yyvsp[-2].pos), SYM_TUPLE), (yyvsp[-1].alist)); } #line 2890 "camp.tab.cc" break; case 168: /* exp: exp join exp */ #line 610 "camp.y" { (yyvsp[-1].j)->pushFront((yyvsp[-2].e)); (yyvsp[-1].j)->pushBack((yyvsp[0].e)); (yyval.e) = (yyvsp[-1].j); } #line 2896 "camp.tab.cc" break; case 169: /* exp: exp dir */ #line 612 "camp.y" { (yyvsp[0].se)->setSide(camp::OUT); joinExp *jexp = new joinExp((yyvsp[0].se)->getPos(), SYM_DOTS); (yyval.e)=jexp; jexp->pushBack((yyvsp[-1].e)); jexp->pushBack((yyvsp[0].se)); } #line 2906 "camp.tab.cc" break; case 170: /* exp: INCR exp */ #line 618 "camp.y" { (yyval.e) = new prefixExp((yyvsp[-1].ps).pos, (yyvsp[0].e), SYM_PLUS); } #line 2912 "camp.tab.cc" break; case 171: /* exp: DASHES exp */ #line 620 "camp.y" { (yyval.e) = new prefixExp((yyvsp[-1].ps).pos, (yyvsp[0].e), SYM_MINUS); } #line 2918 "camp.tab.cc" break; case 172: /* exp: exp INCR */ #line 623 "camp.y" { (yyval.e) = new postfixExp((yyvsp[0].ps).pos, (yyvsp[-1].e), SYM_PLUS); } #line 2924 "camp.tab.cc" break; case 173: /* exp: exp SELFOP exp */ #line 624 "camp.y" { (yyval.e) = new selfExp((yyvsp[-1].ps).pos, (yyvsp[-2].e), (yyvsp[-1].ps).sym, (yyvsp[0].e)); } #line 2930 "camp.tab.cc" break; case 174: /* exp: QUOTE '{' fileblock '}' */ #line 626 "camp.y" { (yyval.e) = new quoteExp((yyvsp[-3].pos), (yyvsp[-1].b)); } #line 2936 "camp.tab.cc" break; case 175: /* join: DASHES */ #line 632 "camp.y" { (yyval.j) = new joinExp((yyvsp[0].ps).pos,(yyvsp[0].ps).sym); } #line 2942 "camp.tab.cc" break; case 176: /* join: basicjoin */ #line 634 "camp.y" { (yyval.j) = (yyvsp[0].j); } #line 2948 "camp.tab.cc" break; case 177: /* join: dir basicjoin */ #line 636 "camp.y" { (yyvsp[-1].se)->setSide(camp::OUT); (yyval.j) = (yyvsp[0].j); (yyval.j)->pushFront((yyvsp[-1].se)); } #line 2955 "camp.tab.cc" break; case 178: /* join: basicjoin dir */ #line 639 "camp.y" { (yyvsp[0].se)->setSide(camp::IN); (yyval.j) = (yyvsp[-1].j); (yyval.j)->pushBack((yyvsp[0].se)); } #line 2962 "camp.tab.cc" break; case 179: /* join: dir basicjoin dir */ #line 642 "camp.y" { (yyvsp[-2].se)->setSide(camp::OUT); (yyvsp[0].se)->setSide(camp::IN); (yyval.j) = (yyvsp[-1].j); (yyval.j)->pushFront((yyvsp[-2].se)); (yyval.j)->pushBack((yyvsp[0].se)); } #line 2969 "camp.tab.cc" break; case 180: /* dir: '{' CURL exp '}' */ #line 647 "camp.y" { (yyval.se) = new specExp((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym, (yyvsp[-1].e)); } #line 2975 "camp.tab.cc" break; case 181: /* dir: '{' exp '}' */ #line 648 "camp.y" { (yyval.se) = new specExp((yyvsp[-2].pos), symbol::opTrans("spec"), (yyvsp[-1].e)); } #line 2981 "camp.tab.cc" break; case 182: /* dir: '{' exp ',' exp '}' */ #line 650 "camp.y" { (yyval.se) = new specExp((yyvsp[-4].pos), symbol::opTrans("spec"), new pairExp((yyvsp[-2].pos), (yyvsp[-3].e), (yyvsp[-1].e))); } #line 2988 "camp.tab.cc" break; case 183: /* dir: '{' exp ',' exp ',' exp '}' */ #line 653 "camp.y" { (yyval.se) = new specExp((yyvsp[-6].pos), symbol::opTrans("spec"), new tripleExp((yyvsp[-4].pos), (yyvsp[-5].e), (yyvsp[-3].e), (yyvsp[-1].e))); } #line 2995 "camp.tab.cc" break; case 184: /* basicjoin: DOTS */ #line 658 "camp.y" { (yyval.j) = new joinExp((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 3001 "camp.tab.cc" break; case 185: /* basicjoin: DOTS tension DOTS */ #line 660 "camp.y" { (yyval.j) = new joinExp((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym); (yyval.j)->pushBack((yyvsp[-1].e)); } #line 3007 "camp.tab.cc" break; case 186: /* basicjoin: DOTS controls DOTS */ #line 662 "camp.y" { (yyval.j) = new joinExp((yyvsp[-2].ps).pos, (yyvsp[-2].ps).sym); (yyval.j)->pushBack((yyvsp[-1].e)); } #line 3013 "camp.tab.cc" break; case 187: /* basicjoin: COLONS */ #line 663 "camp.y" { (yyval.j) = new joinExp((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 3019 "camp.tab.cc" break; case 188: /* basicjoin: LONGDASH */ #line 664 "camp.y" { (yyval.j) = new joinExp((yyvsp[0].ps).pos, (yyvsp[0].ps).sym); } #line 3025 "camp.tab.cc" break; case 189: /* tension: TENSION exp */ #line 668 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-1].ps).pos, (yyvsp[0].e), (yyvsp[-1].ps).sym, new booleanExp((yyvsp[-1].ps).pos, false)); } #line 3032 "camp.tab.cc" break; case 190: /* tension: TENSION exp AND exp */ #line 671 "camp.y" { (yyval.e) = new ternaryExp((yyvsp[-3].ps).pos, (yyvsp[-2].e), (yyvsp[-3].ps).sym, (yyvsp[0].e), new booleanExp((yyvsp[-3].ps).pos, false)); } #line 3039 "camp.tab.cc" break; case 191: /* tension: TENSION ATLEAST exp */ #line 674 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-2].ps).pos, (yyvsp[0].e), (yyvsp[-2].ps).sym, new booleanExp((yyvsp[-1].ps).pos, true)); } #line 3046 "camp.tab.cc" break; case 192: /* tension: TENSION ATLEAST exp AND exp */ #line 677 "camp.y" { (yyval.e) = new ternaryExp((yyvsp[-4].ps).pos, (yyvsp[-2].e), (yyvsp[-4].ps).sym, (yyvsp[0].e), new booleanExp((yyvsp[-3].ps).pos, true)); } #line 3053 "camp.tab.cc" break; case 193: /* controls: CONTROLS exp */ #line 682 "camp.y" { (yyval.e) = new unaryExp((yyvsp[-1].ps).pos, (yyvsp[0].e), (yyvsp[-1].ps).sym); } #line 3059 "camp.tab.cc" break; case 194: /* controls: CONTROLS exp AND exp */ #line 684 "camp.y" { (yyval.e) = new binaryExp((yyvsp[-3].ps).pos, (yyvsp[-2].e), (yyvsp[-3].ps).sym, (yyvsp[0].e)); } #line 3065 "camp.tab.cc" break; case 195: /* stm: ';' */ #line 688 "camp.y" { (yyval.s) = new emptyStm((yyvsp[0].pos)); } #line 3071 "camp.tab.cc" break; case 196: /* stm: blockstm */ #line 689 "camp.y" { (yyval.s) = (yyvsp[0].s); } #line 3077 "camp.tab.cc" break; case 197: /* stm: stmexp ';' */ #line 690 "camp.y" { (yyval.s) = (yyvsp[-1].s); } #line 3083 "camp.tab.cc" break; case 198: /* stm: IF '(' exp ')' stm */ #line 692 "camp.y" { (yyval.s) = new ifStm((yyvsp[-4].pos), (yyvsp[-2].e), (yyvsp[0].s)); } #line 3089 "camp.tab.cc" break; case 199: /* stm: IF '(' exp ')' stm ELSE stm */ #line 694 "camp.y" { (yyval.s) = new ifStm((yyvsp[-6].pos), (yyvsp[-4].e), (yyvsp[-2].s), (yyvsp[0].s)); } #line 3095 "camp.tab.cc" break; case 200: /* stm: WHILE '(' exp ')' stm */ #line 696 "camp.y" { (yyval.s) = new whileStm((yyvsp[-4].pos), (yyvsp[-2].e), (yyvsp[0].s)); } #line 3101 "camp.tab.cc" break; case 201: /* stm: DO stm WHILE '(' exp ')' ';' */ #line 698 "camp.y" { (yyval.s) = new doStm((yyvsp[-6].pos), (yyvsp[-5].s), (yyvsp[-2].e)); } #line 3107 "camp.tab.cc" break; case 202: /* stm: FOR '(' forinit ';' fortest ';' forupdate ')' stm */ #line 700 "camp.y" { (yyval.s) = new forStm((yyvsp[-8].pos), (yyvsp[-6].run), (yyvsp[-4].e), (yyvsp[-2].sel), (yyvsp[0].s)); } #line 3113 "camp.tab.cc" break; case 203: /* stm: FOR '(' type ID ':' exp ')' stm */ #line 702 "camp.y" { (yyval.s) = new extendedForStm((yyvsp[-7].pos), (yyvsp[-5].t), (yyvsp[-4].ps).sym, (yyvsp[-2].e), (yyvsp[0].s)); } #line 3119 "camp.tab.cc" break; case 204: /* stm: BREAK ';' */ #line 703 "camp.y" { (yyval.s) = new breakStm((yyvsp[-1].pos)); } #line 3125 "camp.tab.cc" break; case 205: /* stm: CONTINUE ';' */ #line 704 "camp.y" { (yyval.s) = new continueStm((yyvsp[-1].pos)); } #line 3131 "camp.tab.cc" break; case 206: /* stm: RETURN_ ';' */ #line 705 "camp.y" { (yyval.s) = new returnStm((yyvsp[-1].pos)); } #line 3137 "camp.tab.cc" break; case 207: /* stm: RETURN_ exp ';' */ #line 706 "camp.y" { (yyval.s) = new returnStm((yyvsp[-2].pos), (yyvsp[-1].e)); } #line 3143 "camp.tab.cc" break; case 208: /* stmexp: exp */ #line 710 "camp.y" { (yyval.s) = new expStm((yyvsp[0].e)->getPos(), (yyvsp[0].e)); } #line 3149 "camp.tab.cc" break; case 209: /* blockstm: block */ #line 714 "camp.y" { (yyval.s) = new blockStm((yyvsp[0].b)->getPos(), (yyvsp[0].b)); } #line 3155 "camp.tab.cc" break; case 210: /* forinit: %empty */ #line 718 "camp.y" { (yyval.run) = 0; } #line 3161 "camp.tab.cc" break; case 211: /* forinit: stmexplist */ #line 719 "camp.y" { (yyval.run) = (yyvsp[0].sel); } #line 3167 "camp.tab.cc" break; case 212: /* forinit: barevardec */ #line 720 "camp.y" { (yyval.run) = (yyvsp[0].vd); } #line 3173 "camp.tab.cc" break; case 213: /* fortest: %empty */ #line 724 "camp.y" { (yyval.e) = 0; } #line 3179 "camp.tab.cc" break; case 214: /* fortest: exp */ #line 725 "camp.y" { (yyval.e) = (yyvsp[0].e); } #line 3185 "camp.tab.cc" break; case 215: /* forupdate: %empty */ #line 729 "camp.y" { (yyval.sel) = 0; } #line 3191 "camp.tab.cc" break; case 216: /* forupdate: stmexplist */ #line 730 "camp.y" { (yyval.sel) = (yyvsp[0].sel); } #line 3197 "camp.tab.cc" break; case 217: /* stmexplist: stmexp */ #line 734 "camp.y" { (yyval.sel) = new stmExpList((yyvsp[0].s)->getPos()); (yyval.sel)->add((yyvsp[0].s)); } #line 3203 "camp.tab.cc" break; case 218: /* stmexplist: stmexplist ',' stmexp */ #line 736 "camp.y" { (yyval.sel) = (yyvsp[-2].sel); (yyval.sel)->add((yyvsp[0].s)); } #line 3209 "camp.tab.cc" break; #line 3213 "camp.tab.cc" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; *++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. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; const int yyi = yypgoto[yylhs] + *yyssp; yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; yyerror (YY_("syntax error")); } 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 when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; ++yynerrs; /* Do not reclaim the symbols of the rule whose 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. */ /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYSYMBOL_YYerror; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { 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", YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturnlab; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturnlab; /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; }