diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-10-21 19:52:16 +0100 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-10-21 19:52:16 +0100 |
commit | 95a0074edf1b4d6bffb8592ae39f4715561fe67c (patch) | |
tree | a15bedb0cfcc58827c2818cd006d33d86e9362ee /parser.gen.c | |
parent | 32e1b114df3067b000b26d11030fd265d2fee17a (diff) |
Check in a bunch of autogenerated files.
These seem not to build with the version of bison, etc. on OS X.
This is a hack for now, I'll fix the OS X build when I get access
to a mac.
Diffstat (limited to 'parser.gen.c')
-rw-r--r-- | parser.gen.c | 2830 |
1 files changed, 2830 insertions, 0 deletions
diff --git a/parser.gen.c b/parser.gen.c new file mode 100644 index 00000000..346a94b9 --- /dev/null +++ b/parser.gen.c @@ -0,0 +1,2830 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 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 <http://www.gnu.org/licenses/>. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 1 + + + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 1 "parser.y" + +#include <stdio.h> +#include <string.h> +#include "compile.h" + + +/* Line 268 of yacc.c */ +#line 78 "parser.gen.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +/* "%code requires" blocks. */ + +/* Line 288 of yacc.c */ +#line 6 "parser.y" + +#include "locfile.h" +#define YYLTYPE location +#define YYLLOC_DEFAULT(Loc, Rhs, N) \ + do { \ + if (N) { \ + (Loc).start = YYRHSLOC(Rhs, 1).start; \ + (Loc).end = YYRHSLOC(Rhs, N).end; \ + } else { \ + (Loc).start = YYRHSLOC(Rhs, 0).end; \ + (Loc).end = YYRHSLOC(Rhs, 0).end; \ + } \ + } while (0) + + + +/* Line 288 of yacc.c */ +#line 119 "parser.gen.c" + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + INVALID_CHARACTER = 258, + IDENT = 259, + LITERAL = 260, + EQ = 261, + DEFINEDOR = 262, + AS = 263, + DEF = 264, + IF = 265, + THEN = 266, + ELSE = 267, + ELSE_IF = 268, + END = 269, + AND = 270, + OR = 271, + SETPIPE = 272, + SETPLUS = 273, + SETMINUS = 274, + SETMULT = 275, + SETDIV = 276, + SETDEFINEDOR = 277, + LESSEQ = 278, + GREATEREQ = 279, + QQSTRING_START = 280, + QQSTRING_TEXT = 281, + QQSTRING_INTERP_START = 282, + QQSTRING_INTERP_END = 283, + QQSTRING_END = 284 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 24 "parser.y" + + jv literal; + block blk; + + + +/* Line 293 of yacc.c */ +#line 172 "parser.gen.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + + +/* Copy the second part of user declarations. */ + +/* Line 343 of yacc.c */ +#line 85 "parser.y" + +#include "lexer.gen.h" +#define FAIL(loc, msg) \ + do { \ + location l = loc; \ + yyerror(&l, answer, errors, locations, lexer, msg); \ + /*YYERROR*/; \ + } while (0) + +void yyerror(YYLTYPE* loc, block* answer, int* errors, + struct locfile* locations, yyscan_t lexer, const char *s){ + (*errors)++; + locfile_locate(locations, *loc, "error: %s", s); +} + +int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, block* answer, int* errors, + struct locfile* locations, yyscan_t lexer) { + while (1) { + int tok = jq_yylex(yylval, yylloc, lexer); + if (tok == INVALID_CHARACTER) { + FAIL(*yylloc, "Invalid character"); + } else { + if ((tok == LITERAL || tok == QQSTRING_TEXT) && !jv_is_valid(yylval->literal)) { + jv msg = jv_invalid_get_msg(jv_copy(yylval->literal)); + if (jv_get_kind(msg) == JV_KIND_STRING) { + FAIL(*yylloc, jv_string_value(msg)); + } else { + FAIL(*yylloc, "Invalid literal"); + } + jv_free(msg); + jv_free(yylval->literal); + yylval->literal = jv_null(); + } + return tok; + } + } +} + +static block gen_dictpair(block k, block v) { + block b = gen_subexp(k); + block_append(&b, gen_subexp(v)); + block_append(&b, gen_op_simple(INSERT)); + return b; +} + +static block gen_index(block obj, block key) { + return block_join(obj, block_join(gen_subexp(key), gen_op_simple(INDEX))); +} + +static block gen_binop(block a, block b, int op) { + const char* funcname = 0; + switch (op) { + case '+': funcname = "_plus"; break; + case '-': funcname = "_minus"; break; + case '*': funcname = "_multiply"; break; + case '/': funcname = "_divide"; break; + case EQ: funcname = "_equal"; break; + case '<': funcname = "_less"; break; + case '>': funcname = "_greater"; break; + case LESSEQ: funcname = "_lesseq"; break; + case GREATEREQ: funcname = "_greatereq"; break; + } + assert(funcname); + + block c = gen_noop(); + block_append(&c, gen_subexp(a)); + block_append(&c, gen_subexp(b)); + block_append(&c, gen_op_call(CALL_1_1, gen_op_block_unbound(CLOSURE_REF, funcname))); + return c; +} + +static block gen_format(block a) { + return block_join(a, gen_op_call(CALL_1_1, gen_op_block_unbound(CLOSURE_REF, "tostring"))); +} + +static block gen_update(block a, block op, int optype) { + block assign = a; + block_append(&assign, gen_op_simple(DUP)); + if (optype) { + op = gen_binop(gen_noop(), op, optype); + } + block_append(&assign, op); + return gen_assign(assign); +} + + + +/* Line 343 of yacc.c */ +#line 285 "parser.gen.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# 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 (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* 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 && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * 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 \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 35 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 808 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 49 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 12 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 68 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 147 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 284 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 40, 2, 2, 2, + 42, 43, 38, 36, 32, 37, 44, 39, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 41, 30, + 34, 33, 35, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 45, 2, 46, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 47, 31, 48, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 7, 8, 11, 14, 21, 27, + 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, + 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, + 111, 115, 117, 119, 123, 129, 138, 139, 142, 147, + 153, 157, 161, 163, 165, 169, 172, 177, 181, 183, + 187, 191, 194, 198, 201, 203, 208, 212, 216, 221, + 225, 226, 228, 232, 236, 240, 244, 246, 252 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 50, 0, -1, 52, -1, 51, -1, -1, 54, 51, + -1, 54, 52, -1, 58, 8, 40, 4, 31, 52, + -1, 10, 52, 11, 52, 56, -1, 10, 52, 1, + -1, 52, 33, 52, -1, 52, 16, 52, -1, 52, + 15, 52, -1, 52, 7, 52, -1, 52, 22, 52, + -1, 52, 17, 52, -1, 52, 31, 52, -1, 52, + 32, 52, -1, 52, 36, 52, -1, 52, 18, 52, + -1, 52, 37, 52, -1, 52, 19, 52, -1, 52, + 38, 52, -1, 52, 20, 52, -1, 52, 39, 52, + -1, 52, 21, 52, -1, 52, 6, 52, -1, 52, + 34, 52, -1, 52, 35, 52, -1, 52, 23, 52, + -1, 52, 24, 52, -1, 53, -1, 58, -1, 25, + 55, 29, -1, 9, 4, 41, 52, 30, -1, 9, + 4, 42, 4, 43, 41, 52, 30, -1, -1, 55, + 26, -1, 55, 27, 52, 28, -1, 13, 52, 11, + 52, 56, -1, 12, 52, 14, -1, 57, 31, 57, + -1, 58, -1, 44, -1, 58, 44, 4, -1, 44, + 4, -1, 58, 45, 52, 46, -1, 58, 45, 46, + -1, 5, -1, 42, 52, 43, -1, 45, 52, 46, + -1, 45, 46, -1, 47, 59, 48, -1, 40, 4, + -1, 4, -1, 4, 42, 52, 43, -1, 42, 1, + 43, -1, 45, 1, 46, -1, 58, 45, 1, 46, + -1, 47, 1, 48, -1, -1, 60, -1, 60, 32, + 59, -1, 1, 32, 59, -1, 4, 41, 57, -1, + 53, 41, 57, -1, 4, -1, 42, 52, 43, 41, + 57, -1, 42, 1, 43, 41, 57, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 174, 174, 177, 182, 185, 190, 194, 201, 204, + 209, 218, 222, 226, 230, 234, 238, 242, 246, 250, + 254, 258, 262, 266, 270, 274, 278, 282, 286, 290, + 294, 298, 302, 307, 312, 318, 326, 329, 332, 338, + 341, 346, 350, 356, 359, 362, 366, 369, 372, 375, + 378, 381, 384, 389, 393, 397, 407, 408, 409, 410, + 413, 416, 417, 418, 421, 424, 427, 431, 434 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "INVALID_CHARACTER", "IDENT", "LITERAL", + "\"==\"", "\"//\"", "\"as\"", "\"def\"", "\"if\"", "\"then\"", + "\"else\"", "\"elif\"", "\"end\"", "\"and\"", "\"or\"", "\"|=\"", + "\"+=\"", "\"-=\"", "\"*=\"", "\"/=\"", "\"//=\"", "\"<=\"", "\">=\"", + "QQSTRING_START", "QQSTRING_TEXT", "QQSTRING_INTERP_START", + "QQSTRING_INTERP_END", "QQSTRING_END", "';'", "'|'", "','", "'='", "'<'", + "'>'", "'+'", "'-'", "'*'", "'/'", "'$'", "':'", "'('", "')'", "'.'", + "'['", "']'", "'{'", "'}'", "$accept", "TopLevel", "FuncDefs", "Exp", + "String", "FuncDef", "QQString", "ElseBody", "ExpD", "Term", "MkDict", + "MkDictPair", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 59, 124, 44, 61, 60, 62, 43, 45, 42, 47, + 36, 58, 40, 41, 46, 91, 93, 123, 125 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 49, 50, 50, 51, 51, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 53, 54, 54, 55, 55, 55, 56, + 56, 57, 57, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 59, 59, 59, 59, 60, 60, 60, 60, 60 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 0, 2, 2, 6, 5, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 1, 1, 3, 5, 8, 0, 2, 4, 5, + 3, 3, 1, 1, 3, 2, 4, 3, 1, 3, + 3, 2, 3, 2, 1, 4, 3, 3, 4, 3, + 0, 1, 3, 3, 3, 3, 1, 5, 5 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 4, 54, 48, 0, 0, 36, 0, 0, 43, 0, + 0, 0, 3, 2, 31, 4, 32, 0, 0, 0, + 0, 0, 53, 0, 0, 45, 0, 51, 0, 0, + 66, 0, 0, 0, 61, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 6, 0, + 0, 0, 0, 0, 0, 9, 0, 37, 0, 33, + 56, 49, 57, 50, 0, 59, 0, 0, 0, 0, + 52, 0, 26, 13, 12, 11, 15, 19, 21, 23, + 25, 14, 29, 30, 16, 17, 10, 27, 28, 18, + 20, 22, 24, 0, 44, 0, 47, 0, 55, 0, + 0, 0, 0, 0, 63, 64, 42, 0, 0, 65, + 62, 0, 58, 46, 34, 0, 0, 0, 8, 38, + 0, 0, 0, 0, 0, 0, 0, 41, 68, 67, + 7, 0, 40, 0, 35, 0, 39 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 11, 12, 58, 14, 20, 21, 128, 115, 16, + 33, 34 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -74 +static const yytype_int16 yypact[] = +{ + 194, -40, -74, 10, 194, -74, 16, 137, 18, 77, + 63, 28, -74, 651, -74, 194, 54, 194, -26, 311, + 194, -16, -74, -13, 345, -74, -17, -74, 236, -27, + -8, 150, -7, 12, 3, -74, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 194, -74, 651, 34, + 71, 127, 379, 194, 73, -74, 194, -74, 194, -74, + -74, -74, -74, -74, 72, -74, 181, -11, 413, 181, + -74, 72, 177, 719, 763, 769, 744, 744, 744, 744, + 744, 744, 177, 177, 685, 719, 744, 177, 177, -14, + -14, -74, -74, 75, -74, 37, -74, 270, -74, 481, + 41, 447, 515, 48, -74, 58, -18, 44, 49, 58, + -74, 60, -74, -74, -74, 51, 194, 194, -74, -74, + 181, 181, 181, 194, 194, 549, 583, -74, 58, 58, + 685, 617, -74, 194, -74, 447, -74 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -74, -74, 78, 0, -9, 8, -74, -51, -61, -73, + -62, -74 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -61 +static const yytype_int16 yytable[] = +{ + 13, 32, 17, 116, 19, 74, 116, 24, 15, 28, + 67, 68, 114, 69, 18, 63, 64, 62, 119, 120, + 22, 75, 25, 15, 55, 56, 60, 61, 35, 72, + 70, 78, 117, 76, 79, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 116, 116, 116, + 80, 107, 59, 109, 29, 32, 111, 30, 112, 137, + 138, 139, 32, 113, 103, 104, 30, 110, 26, 121, + 74, 1, 2, 122, 125, 131, 3, 4, 5, 130, + 132, 133, 134, 57, 146, 0, 0, 5, 60, 61, + 0, 0, 5, 0, 0, 31, 0, 0, 0, 0, + 0, -60, 0, 0, 31, 0, 0, 6, 0, 7, + -60, 8, 9, 27, 10, 0, 135, 136, 105, 0, + 0, 1, 2, 140, 141, 0, 3, 4, 23, 0, + 0, 1, 2, 145, 0, 0, 3, 4, 0, 0, + 0, 77, 5, 0, 1, 2, 0, 0, 0, 3, + 4, 0, 5, 0, 0, 0, 0, 6, 0, 7, + 0, 8, 9, 106, 10, 5, 0, 6, 0, 7, + 0, 8, 9, -61, 10, 1, 2, 0, 0, 0, + 6, 0, 7, 0, 8, 9, 0, 10, 1, 2, + -61, -61, 0, 3, 4, 0, 0, 0, 0, 0, + 0, -61, -61, 53, 54, 55, 56, 0, 0, 5, + 0, 6, 0, 7, 0, 8, 9, 0, 10, 0, + 0, 0, 0, 0, 6, 0, 7, 0, 8, 9, + 0, 10, 36, 37, 0, 0, 0, 0, 0, 0, + 0, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 0, 0, 0, 0, 0, 0, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 36, 37, 0, 0, + 0, 0, 73, 0, 0, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 0, 0, 0, 0, 0, + 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 0, 0, 65, 0, 0, 0, 123, 36, 37, 0, + 0, 0, 66, 0, 0, 0, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, + 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 36, 37, 0, 0, 0, 0, 0, 0, 0, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 0, 0, 0, 0, 0, 0, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 36, 37, 0, 71, 0, + 0, 0, 0, 0, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 36, + 37, 0, 108, 0, 0, 0, 0, 0, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, + 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 36, 37, 0, 118, 0, 0, 126, + 127, 0, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 0, 0, 0, 0, 0, 0, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 36, 37, 0, + 0, 0, 0, 0, 0, 0, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, + 0, 124, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 36, 37, 0, 0, 0, 0, 0, 0, 0, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 0, 0, 0, 129, 0, 0, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 36, 37, 0, 0, 0, + 0, 0, 0, 142, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 36, + 37, 0, 0, 0, 143, 0, 0, 0, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, + 0, 0, 0, 0, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 36, 37, 0, 0, 0, 0, 0, + 0, 0, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 0, 0, 0, 0, 0, 144, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 36, 37, 0, + 0, 0, 0, 0, 0, 0, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, + 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 36, 37, 0, 0, 0, 0, 0, 0, 0, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 0, 0, 0, 0, 0, 0, 0, 49, 50, 51, + 52, 53, 54, 55, 56, 36, 37, 0, 0, 0, + 0, 0, 0, 0, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 0, 0, + 36, 0, 50, 51, 52, 53, 54, 55, 56, 38, + 39, -61, -61, -61, -61, -61, -61, 46, 47, 36, + 0, 0, 0, 0, 0, 36, 0, -61, 51, 52, + 53, 54, 55, 56, 38, 0, 46, 47, 0, 0, + 0, 0, 46, 47, 0, 0, 0, 51, 52, 53, + 54, 55, 56, 51, 52, 53, 54, 55, 56 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-74)) + +#define yytable_value_is_error(yytable_value) \ + ((yytable_value) == (-61)) + +static const yytype_int16 yycheck[] = +{ + 0, 10, 42, 76, 4, 32, 79, 7, 0, 9, + 26, 27, 74, 29, 4, 41, 42, 17, 79, 81, + 4, 48, 4, 15, 38, 39, 44, 45, 0, 46, + 43, 31, 43, 41, 41, 32, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 130, 131, 132, + 48, 61, 8, 63, 1, 74, 66, 4, 68, 130, + 131, 132, 81, 1, 40, 4, 4, 4, 1, 4, + 32, 4, 5, 46, 43, 41, 9, 10, 25, 31, + 41, 31, 41, 15, 145, -1, -1, 25, 44, 45, + -1, -1, 25, -1, -1, 42, -1, -1, -1, -1, + -1, 48, -1, -1, 42, -1, -1, 40, -1, 42, + 48, 44, 45, 46, 47, -1, 126, 127, 1, -1, + -1, 4, 5, 133, 134, -1, 9, 10, 1, -1, + -1, 4, 5, 143, -1, -1, 9, 10, -1, -1, + -1, 1, 25, -1, 4, 5, -1, -1, -1, 9, + 10, -1, 25, -1, -1, -1, -1, 40, -1, 42, + -1, 44, 45, 46, 47, 25, -1, 40, -1, 42, + -1, 44, 45, 6, 47, 4, 5, -1, -1, -1, + 40, -1, 42, -1, 44, 45, -1, 47, 4, 5, + 23, 24, -1, 9, 10, -1, -1, -1, -1, -1, + -1, 34, 35, 36, 37, 38, 39, -1, -1, 25, + -1, 40, -1, 42, -1, 44, 45, -1, 47, -1, + -1, -1, -1, -1, 40, -1, 42, -1, 44, 45, + -1, 47, 6, 7, -1, -1, -1, -1, -1, -1, + -1, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, -1, -1, -1, -1, -1, -1, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 6, 7, -1, -1, + -1, -1, 46, -1, -1, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, -1, -1, -1, -1, -1, + -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, + -1, -1, 1, -1, -1, -1, 46, 6, 7, -1, + -1, -1, 11, -1, -1, -1, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, -1, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 6, 7, -1, -1, -1, -1, -1, -1, -1, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + -1, -1, -1, -1, -1, -1, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 6, 7, -1, 43, -1, + -1, -1, -1, -1, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, -1, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 6, + 7, -1, 43, -1, -1, -1, -1, -1, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 6, 7, -1, 43, -1, -1, 12, + 13, -1, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, -1, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 6, 7, -1, + -1, -1, -1, -1, -1, -1, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 6, 7, -1, -1, -1, -1, -1, -1, -1, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + -1, -1, -1, 28, -1, -1, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 6, 7, -1, -1, -1, + -1, -1, -1, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, -1, -1, -1, -1, -1, -1, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 6, + 7, -1, -1, -1, 11, -1, -1, -1, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, -1, -1, + -1, -1, -1, -1, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 6, 7, -1, -1, -1, -1, -1, + -1, -1, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 6, 7, -1, + -1, -1, -1, -1, -1, -1, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, -1, -1, -1, -1, + -1, -1, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 6, 7, -1, -1, -1, -1, -1, -1, -1, + 15, 16, 17, |