--- /dev/null
+/* A Bison parser, made by GNU Bison 2.7. */\r
+\r
+/* Bison implementation for Yacc-like parsers in C\r
+ \r
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.\r
+ \r
+ This program is free software: you can redistribute it and/or modify\r
+ it under the terms of the GNU General Public License as published by\r
+ the Free Software Foundation, either version 3 of the License, or\r
+ (at your option) any later version.\r
+ \r
+ This program is distributed in the hope that it will be useful,\r
+ but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ GNU General Public License for more details.\r
+ \r
+ You should have received a copy of the GNU General Public License\r
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */\r
+\r
+/* As a special exception, you may create a larger work that contains\r
+ part or all of the Bison parser skeleton and distribute that work\r
+ under terms of your choice, so long as that work isn't itself a\r
+ parser generator using the skeleton or a modified version thereof\r
+ as a parser skeleton. Alternatively, if you modify or redistribute\r
+ the parser skeleton itself, you may (at your option) remove this\r
+ special exception, which will cause the skeleton and the resulting\r
+ Bison output files to be licensed under the GNU General Public\r
+ License without this special exception.\r
+ \r
+ This special exception was added by the Free Software Foundation in\r
+ version 2.2 of Bison. */\r
+\r
+/* C LALR(1) parser skeleton written by Richard Stallman, by\r
+ simplifying the original so-called "semantic" parser. */\r
+\r
+/* All symbols defined below should begin with yy or YY, to avoid\r
+ infringing on user name space. This should be done even for local\r
+ variables, as they might otherwise be expanded by user macros.\r
+ There are some unavoidable exceptions within include files to\r
+ define necessary library symbols; they are noted "INFRINGES ON\r
+ USER NAME SPACE" below. */\r
+\r
+/* Identify Bison output. */\r
+#define YYBISON 1\r
+\r
+/* Bison version. */\r
+#define YYBISON_VERSION "2.7"\r
+\r
+/* Skeleton name. */\r
+#define YYSKELETON_NAME "yacc.c"\r
+\r
+/* Pure parsers. */\r
+#define YYPURE 2\r
+\r
+/* Push parsers. */\r
+#define YYPUSH 0\r
+\r
+/* Pull parsers. */\r
+#define YYPULL 1\r
+\r
+/* Substitute the type names. */\r
+#define YYSTYPE YYFMI1STYPE\r
+/* Substitute the variable and function names. */\r
+#define yyparse yyfmi1parse\r
+#define yylex yyfmi1lex\r
+#define yyerror yyfmi1error\r
+#define yylval yyfmi1lval\r
+#define yychar yyfmi1char\r
+#define yydebug yyfmi1debug\r
+#define yynerrs yyfmi1nerrs\r
+\r
+/* Copy the first part of user declarations. */\r
+\r
+\r
+\r
+/*\r
+#define YYDEBUG 1\r
+int yydebug = 1;\r
+*/\r
+\r
+#include <stdio.h>\r
+#include "fmi1_xml_variable_name_parser.tab.h"\r
+#include "fmi1_xml_variable_name_lex.h"\r
+\r
+#define MODULE "FMI1XML"\r
+#include <JM/jm_portability.h>\r
+\r
+void yyfmi1error(yyscan_t* scanner, jm_callbacks* cb, char* name, char const *msg)\r
+{\r
+ jm_log_error(cb, MODULE, "Invalid structured ScalarVariable name \"%s\": %s", name, msg);\r
+}\r
+\r
+\r
+\r
+\r
+# ifndef YY_NULL\r
+# if defined __cplusplus && 201103L <= __cplusplus\r
+# define YY_NULL nullptr\r
+# else\r
+# define YY_NULL 0\r
+# endif\r
+# endif\r
+\r
+/* Enabling verbose error messages. */\r
+#ifdef YYERROR_VERBOSE\r
+# undef YYERROR_VERBOSE\r
+# define YYERROR_VERBOSE 1\r
+#else\r
+# define YYERROR_VERBOSE 1\r
+#endif\r
+\r
+/* In a future release of Bison, this section will be replaced\r
+ by #include "fmi1_xml_variable_name_parser.tab.h". */\r
+#ifndef YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED\r
+# define YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED\r
+/* Enabling traces. */\r
+#ifndef YYFMI1DEBUG\r
+# if defined YYDEBUG\r
+# if YYDEBUG\r
+# define YYFMI1DEBUG 1\r
+# else\r
+# define YYFMI1DEBUG 0\r
+# endif\r
+# else /* ! defined YYDEBUG */\r
+# define YYFMI1DEBUG 0\r
+# endif /* ! defined YYDEBUG */\r
+#endif /* ! defined YYFMI1DEBUG */\r
+#if YYFMI1DEBUG\r
+extern int yyfmi1debug;\r
+#endif\r
+\r
+/* Tokens. */\r
+#ifndef YYFMI1TOKENTYPE\r
+# define YYFMI1TOKENTYPE\r
+ /* Put the tokens into the symbol table, so that GDB and other debuggers\r
+ know about them. */\r
+ enum yyfmi1tokentype {\r
+ DER = 258,\r
+ UNSIGNED_INTEGER = 259,\r
+ NONDIGIT = 260,\r
+ Q_NAME = 261\r
+ };\r
+#endif\r
+\r
+\r
+#if ! defined YYFMI1STYPE && ! defined YYFMI1STYPE_IS_DECLARED\r
+typedef int YYFMI1STYPE;\r
+# define YYFMI1STYPE_IS_TRIVIAL 1\r
+# define yyfmi1stype YYFMI1STYPE /* obsolescent; will be withdrawn */\r
+# define YYFMI1STYPE_IS_DECLARED 1\r
+#endif\r
+\r
+\r
+#ifdef YYPARSE_PARAM\r
+#if defined __STDC__ || defined __cplusplus\r
+int yyfmi1parse (void *YYPARSE_PARAM);\r
+#else\r
+int yyfmi1parse ();\r
+#endif\r
+#else /* ! YYPARSE_PARAM */\r
+#if defined __STDC__ || defined __cplusplus\r
+int yyfmi1parse (void* scanner, void* cb, char* name);\r
+#else\r
+int yyfmi1parse ();\r
+#endif\r
+#endif /* ! YYPARSE_PARAM */\r
+\r
+#endif /* !YY_YYFMI1_FMI1_XML_VARIABLE_NAME_PARSER_TAB_H_INCLUDED */\r
+\r
+/* Copy the second part of user declarations. */\r
+\r
+\r
+\r
+#ifdef short\r
+# undef short\r
+#endif\r
+\r
+#ifdef YYTYPE_UINT8\r
+typedef YYTYPE_UINT8 yytype_uint8;\r
+#else\r
+typedef unsigned char yytype_uint8;\r
+#endif\r
+\r
+#ifdef YYTYPE_INT8\r
+typedef YYTYPE_INT8 yytype_int8;\r
+#elif (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+typedef signed char yytype_int8;\r
+#else\r
+typedef short int yytype_int8;\r
+#endif\r
+\r
+#ifdef YYTYPE_UINT16\r
+typedef YYTYPE_UINT16 yytype_uint16;\r
+#else\r
+typedef unsigned short int yytype_uint16;\r
+#endif\r
+\r
+#ifdef YYTYPE_INT16\r
+typedef YYTYPE_INT16 yytype_int16;\r
+#else\r
+typedef short int yytype_int16;\r
+#endif\r
+\r
+#ifndef YYSIZE_T\r
+# ifdef __SIZE_TYPE__\r
+# define YYSIZE_T __SIZE_TYPE__\r
+# elif defined size_t\r
+# define YYSIZE_T size_t\r
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */\r
+# define YYSIZE_T size_t\r
+# else\r
+# define YYSIZE_T unsigned int\r
+# endif\r
+#endif\r
+\r
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)\r
+\r
+#ifndef YY_\r
+# if defined YYENABLE_NLS && YYENABLE_NLS\r
+# if ENABLE_NLS\r
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */\r
+# define YY_(Msgid) dgettext ("bison-runtime", Msgid)\r
+# endif\r
+# endif\r
+# ifndef YY_\r
+# define YY_(Msgid) Msgid\r
+# endif\r
+#endif\r
+\r
+/* Suppress unused-variable warnings by "using" E. */\r
+#if ! defined lint || defined __GNUC__\r
+# define YYUSE(E) ((void) (E))\r
+#else\r
+# define YYUSE(E) /* empty */\r
+#endif\r
+\r
+/* Identity function, used to suppress warnings about constant conditions. */\r
+#ifndef lint\r
+# define YYID(N) (N)\r
+#else\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static int\r
+YYID (int yyi)\r
+#else\r
+static int\r
+YYID (yyi)\r
+ int yyi;\r
+#endif\r
+{\r
+ return yyi;\r
+}\r
+#endif\r
+\r
+#if ! defined yyoverflow || YYERROR_VERBOSE\r
+\r
+/* The parser invokes alloca or malloc; define the necessary symbols. */\r
+\r
+# ifdef YYSTACK_USE_ALLOCA\r
+# if YYSTACK_USE_ALLOCA\r
+# ifdef __GNUC__\r
+# define YYSTACK_ALLOC __builtin_alloca\r
+# elif defined __BUILTIN_VA_ARG_INCR\r
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */\r
+# elif defined _AIX\r
+# define YYSTACK_ALLOC __alloca\r
+# elif defined _MSC_VER\r
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */\r
+# define alloca _alloca\r
+# else\r
+# define YYSTACK_ALLOC alloca\r
+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */\r
+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */\r
+# ifndef EXIT_SUCCESS\r
+# define EXIT_SUCCESS 0\r
+# endif\r
+# endif\r
+# endif\r
+# endif\r
+# endif\r
+\r
+# ifdef YYSTACK_ALLOC\r
+ /* Pacify GCC's `empty if-body' warning. */\r
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))\r
+# ifndef YYSTACK_ALLOC_MAXIMUM\r
+ /* The OS might guarantee only one guard page at the bottom of the stack,\r
+ and a page size can be as small as 4096 bytes. So we cannot safely\r
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number\r
+ to allow for a few compiler-allocated temporary stack slots. */\r
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */\r
+# endif\r
+# else\r
+# define YYSTACK_ALLOC YYMALLOC\r
+# define YYSTACK_FREE YYFREE\r
+# ifndef YYSTACK_ALLOC_MAXIMUM\r
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM\r
+# endif\r
+# if (defined __cplusplus && ! defined EXIT_SUCCESS \\r
+ && ! ((defined YYMALLOC || defined malloc) \\r
+ && (defined YYFREE || defined free)))\r
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */\r
+# ifndef EXIT_SUCCESS\r
+# define EXIT_SUCCESS 0\r
+# endif\r
+# endif\r
+# ifndef YYMALLOC\r
+# define YYMALLOC malloc\r
+# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */\r
+# endif\r
+# endif\r
+# ifndef YYFREE\r
+# define YYFREE free\r
+# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+void free (void *); /* INFRINGES ON USER NAME SPACE */\r
+# endif\r
+# endif\r
+# endif\r
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */\r
+\r
+\r
+#if (! defined yyoverflow \\r
+ && (! defined __cplusplus \\r
+ || (defined YYFMI1STYPE_IS_TRIVIAL && YYFMI1STYPE_IS_TRIVIAL)))\r
+\r
+/* A type that is properly aligned for any stack member. */\r
+union yyalloc\r
+{\r
+ yytype_int16 yyss_alloc;\r
+ YYSTYPE yyvs_alloc;\r
+};\r
+\r
+/* The size of the maximum gap between one aligned stack and the next. */\r
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)\r
+\r
+/* The size of an array large to enough to hold all stacks, each with\r
+ N elements. */\r
+# define YYSTACK_BYTES(N) \\r
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \\r
+ + YYSTACK_GAP_MAXIMUM)\r
+\r
+# define YYCOPY_NEEDED 1\r
+\r
+/* Relocate STACK from its old location to the new one. The\r
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of\r
+ elements in the stack, and YYPTR gives the new location of the\r
+ stack. Advance YYPTR to a properly aligned location for the next\r
+ stack. */\r
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \\r
+ do \\r
+ { \\r
+ YYSIZE_T yynewbytes; \\r
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \\r
+ Stack = &yyptr->Stack_alloc; \\r
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \\r
+ yyptr += yynewbytes / sizeof (*yyptr); \\r
+ } \\r
+ while (YYID (0))\r
+\r
+#endif\r
+\r
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED\r
+/* Copy COUNT objects from SRC to DST. The source and destination do\r
+ not overlap. */\r
+# ifndef YYCOPY\r
+# if defined __GNUC__ && 1 < __GNUC__\r
+# define YYCOPY(Dst, Src, Count) \\r
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))\r
+# else\r
+# define YYCOPY(Dst, Src, Count) \\r
+ do \\r
+ { \\r
+ YYSIZE_T yyi; \\r
+ for (yyi = 0; yyi < (Count); yyi++) \\r
+ (Dst)[yyi] = (Src)[yyi]; \\r
+ } \\r
+ while (YYID (0))\r
+# endif\r
+# endif\r
+#endif /* !YYCOPY_NEEDED */\r
+\r
+/* YYFINAL -- State number of the termination state. */\r
+#define YYFINAL 12\r
+/* YYLAST -- Last index in YYTABLE. */\r
+#define YYLAST 22\r
+\r
+/* YYNTOKENS -- Number of terminals. */\r
+#define YYNTOKENS 12\r
+/* YYNNTS -- Number of nonterminals. */\r
+#define YYNNTS 7\r
+/* YYNRULES -- Number of rules. */\r
+#define YYNRULES 15\r
+/* YYNRULES -- Number of states. */\r
+#define YYNSTATES 27\r
+\r
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */\r
+#define YYUNDEFTOK 2\r
+#define YYMAXUTOK 261\r
+\r
+#define YYTRANSLATE(YYX) \\r
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)\r
+\r
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */\r
+static const yytype_uint8 yytranslate[] =\r
+{\r
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 7, 2, 2, 8, 2, 9, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 10, 2, 11, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,\r
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,\r
+ 5, 6\r
+};\r
+\r
+#if YYFMI1DEBUG\r
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in\r
+ YYRHS. */\r
+static const yytype_uint8 yyprhs[] =\r
+{\r
+ 0, 0, 3, 5, 9, 15, 17, 21, 23, 28,\r
+ 31, 33, 34, 37, 40, 42\r
+};\r
+\r
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */\r
+static const yytype_int8 yyrhs[] =\r
+{\r
+ 13, 0, -1, 14, -1, 3, 14, 7, -1, 3,\r
+ 14, 8, 4, 7, -1, 15, -1, 14, 9, 15,\r
+ -1, 16, -1, 16, 10, 18, 11, -1, 5, 17,\r
+ -1, 6, -1, -1, 4, 17, -1, 5, 17, -1,\r
+ 4, -1, 18, 8, 4, -1\r
+};\r
+\r
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */\r
+static const yytype_uint8 yyrline[] =\r
+{\r
+ 0, 58, 58, 59, 60, 64, 65, 69, 70, 74,\r
+ 75, 78, 80, 81, 85, 86\r
+};\r
+#endif\r
+\r
+#if YYFMI1DEBUG || YYERROR_VERBOSE || 1\r
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.\r
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */\r
+static const char *const yytname[] =\r
+{\r
+ "$end", "error", "$undefined", "DER", "UNSIGNED_INTEGER", "NONDIGIT",\r
+ "Q_NAME", "')'", "','", "'.'", "'['", "']'", "$accept", "name",\r
+ "identifier_list", "identifier", "bname", "nondigit_or_digit",\r
+ "arrayIndices", YY_NULL\r
+};\r
+#endif\r
+\r
+# ifdef YYPRINT\r
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to\r
+ token YYLEX-NUM. */\r
+static const yytype_uint16 yytoknum[] =\r
+{\r
+ 0, 256, 257, 258, 259, 260, 261, 41, 44, 46,\r
+ 91, 93\r
+};\r
+# endif\r
+\r
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */\r
+static const yytype_uint8 yyr1[] =\r
+{\r
+ 0, 12, 13, 13, 13, 14, 14, 15, 15, 16,\r
+ 16, 17, 17, 17, 18, 18\r
+};\r
+\r
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */\r
+static const yytype_uint8 yyr2[] =\r
+{\r
+ 0, 2, 1, 3, 5, 1, 3, 1, 4, 2,\r
+ 1, 0, 2, 2, 1, 3\r
+};\r
+\r
+/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.\r
+ Performed when YYTABLE doesn't specify something else to do. Zero\r
+ means the default is an error. */\r
+static const yytype_uint8 yydefact[] =\r
+{\r
+ 0, 0, 11, 10, 0, 2, 5, 7, 0, 11,\r
+ 11, 9, 1, 0, 0, 3, 0, 12, 13, 6,\r
+ 14, 0, 0, 0, 8, 4, 15\r
+};\r
+\r
+/* YYDEFGOTO[NTERM-NUM]. */\r
+static const yytype_int8 yydefgoto[] =\r
+{\r
+ -1, 4, 5, 6, 7, 11, 21\r
+};\r
+\r
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing\r
+ STATE-NUM. */\r
+#define YYPACT_NINF -8\r
+static const yytype_int8 yypact[] =\r
+{\r
+ -3, 3, 6, -8, 12, 7, -8, 5, -2, 6,\r
+ 6, -8, -8, 3, 13, -8, 14, -8, -8, -8,\r
+ -8, -7, 15, 16, -8, -8, -8\r
+};\r
+\r
+/* YYPGOTO[NTERM-NUM]. */\r
+static const yytype_int8 yypgoto[] =\r
+{\r
+ -8, -8, 18, 8, -8, 4, -8\r
+};\r
+\r
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If\r
+ positive, shift that token. If negative, reduce the rule which\r
+ number is the opposite. If YYTABLE_NINF, syntax error. */\r
+#define YYTABLE_NINF -1\r
+static const yytype_uint8 yytable[] =\r
+{\r
+ 1, 23, 2, 3, 24, 15, 16, 13, 2, 3,\r
+ 9, 10, 12, 17, 18, 14, 13, 20, 22, 8,\r
+ 26, 19, 25\r
+};\r
+\r
+#define yypact_value_is_default(Yystate) \\r
+ (!!((Yystate) == (-8)))\r
+\r
+#define yytable_value_is_error(Yytable_value) \\r
+ YYID (0)\r
+\r
+static const yytype_uint8 yycheck[] =\r
+{\r
+ 3, 8, 5, 6, 11, 7, 8, 9, 5, 6,\r
+ 4, 5, 0, 9, 10, 10, 9, 4, 4, 1,\r
+ 4, 13, 7\r
+};\r
+\r
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing\r
+ symbol of state STATE-NUM. */\r
+static const yytype_uint8 yystos[] =\r
+{\r
+ 0, 3, 5, 6, 13, 14, 15, 16, 14, 4,\r
+ 5, 17, 0, 9, 10, 7, 8, 17, 17, 15,\r
+ 4, 18, 4, 8, 11, 7, 4\r
+};\r
+\r
+#define yyerrok (yyerrstatus = 0)\r
+#define yyclearin (yychar = YYEMPTY)\r
+#define YYEMPTY (-2)\r
+#define YYEOF 0\r
+\r
+#define YYACCEPT goto yyacceptlab\r
+#define YYABORT goto yyabortlab\r
+#define YYERROR goto yyerrorlab\r
+\r
+\r
+/* Like YYERROR except do call yyerror. This remains here temporarily\r
+ to ease the transition to the new meaning of YYERROR, for GCC.\r
+ Once GCC version 2 has supplanted version 1, this can go. However,\r
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated\r
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is\r
+ discussed. */\r
+\r
+#define YYFAIL goto yyerrlab\r
+#if defined YYFAIL\r
+ /* This is here to suppress warnings from the GCC cpp's\r
+ -Wunused-macros. Normally we don't worry about that warning, but\r
+ some users do, and we want to make it easy for users to remove\r
+ YYFAIL uses, which will produce warnings from Bison 2.5. */\r
+#endif\r
+\r
+#define YYRECOVERING() (!!yyerrstatus)\r
+\r
+#define YYBACKUP(Token, Value) \\r
+do \\r
+ if (yychar == YYEMPTY) \\r
+ { \\r
+ yychar = (Token); \\r
+ yylval = (Value); \\r
+ YYPOPSTACK (yylen); \\r
+ yystate = *yyssp; \\r
+ goto yybackup; \\r
+ } \\r
+ else \\r
+ { \\r
+ yyerror (scanner, cb, name, YY_("syntax error: cannot back up")); \\r
+ YYERROR; \\r
+ } \\r
+while (YYID (0))\r
+\r
+/* Error token number */\r
+#define YYTERROR 1\r
+#define YYERRCODE 256\r
+\r
+\r
+/* This macro is provided for backward compatibility. */\r
+#ifndef YY_LOCATION_PRINT\r
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)\r
+#endif\r
+\r
+\r
+/* YYLEX -- calling `yylex' with the right arguments. */\r
+#ifdef YYLEX_PARAM\r
+# define YYLEX yylex (&yylval, YYLEX_PARAM)\r
+#else\r
+# define YYLEX yylex (&yylval, scanner)\r
+#endif\r
+\r
+/* Enable debugging if requested. */\r
+#if YYFMI1DEBUG\r
+\r
+# ifndef YYFPRINTF\r
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */\r
+# define YYFPRINTF fprintf\r
+# endif\r
+\r
+# define YYDPRINTF(Args) \\r
+do { \\r
+ if (yydebug) \\r
+ YYFPRINTF Args; \\r
+} while (YYID (0))\r
+\r
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \\r
+do { \\r
+ if (yydebug) \\r
+ { \\r
+ YYFPRINTF (stderr, "%s ", Title); \\r
+ yy_symbol_print (stderr, \\r
+ Type, Value, scanner, cb, name); \\r
+ YYFPRINTF (stderr, "\n"); \\r
+ } \\r
+} while (YYID (0))\r
+\r
+\r
+/*--------------------------------.\r
+| Print this symbol on YYOUTPUT. |\r
+`--------------------------------*/\r
+\r
+/*ARGSUSED*/\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static void\r
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* scanner, void* cb, char* name)\r
+#else\r
+static void\r
+yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, cb, name)\r
+ FILE *yyoutput;\r
+ int yytype;\r
+ YYSTYPE const * const yyvaluep;\r
+ void* scanner;\r
+ void* cb;\r
+ char* name;\r
+#endif\r
+{\r
+ FILE *yyo = yyoutput;\r
+ YYUSE (yyo);\r
+ if (!yyvaluep)\r
+ return;\r
+ YYUSE (scanner);\r
+ YYUSE (cb);\r
+ YYUSE (name);\r
+# ifdef YYPRINT\r
+ if (yytype < YYNTOKENS)\r
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);\r
+# else\r
+ YYUSE (yyoutput);\r
+# endif\r
+ switch (yytype)\r
+ {\r
+ default:\r
+ break;\r
+ }\r
+}\r
+\r
+\r
+/*--------------------------------.\r
+| Print this symbol on YYOUTPUT. |\r
+`--------------------------------*/\r
+\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static void\r
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* scanner, void* cb, char* name)\r
+#else\r
+static void\r
+yy_symbol_print (yyoutput, yytype, yyvaluep, scanner, cb, name)\r
+ FILE *yyoutput;\r
+ int yytype;\r
+ YYSTYPE const * const yyvaluep;\r
+ void* scanner;\r
+ void* cb;\r
+ char* name;\r
+#endif\r
+{\r
+ if (yytype < YYNTOKENS)\r
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);\r
+ else\r
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);\r
+\r
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner, cb, name);\r
+ YYFPRINTF (yyoutput, ")");\r
+}\r
+\r
+/*------------------------------------------------------------------.\r
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |\r
+| TOP (included). |\r
+`------------------------------------------------------------------*/\r
+\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static void\r
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)\r
+#else\r
+static void\r
+yy_stack_print (yybottom, yytop)\r
+ yytype_int16 *yybottom;\r
+ yytype_int16 *yytop;\r
+#endif\r
+{\r
+ YYFPRINTF (stderr, "Stack now");\r
+ for (; yybottom <= yytop; yybottom++)\r
+ {\r
+ int yybot = *yybottom;\r
+ YYFPRINTF (stderr, " %d", yybot);\r
+ }\r
+ YYFPRINTF (stderr, "\n");\r
+}\r
+\r
+# define YY_STACK_PRINT(Bottom, Top) \\r
+do { \\r
+ if (yydebug) \\r
+ yy_stack_print ((Bottom), (Top)); \\r
+} while (YYID (0))\r
+\r
+\r
+/*------------------------------------------------.\r
+| Report that the YYRULE is going to be reduced. |\r
+`------------------------------------------------*/\r
+\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static void\r
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void* scanner, void* cb, char* name)\r
+#else\r
+static void\r
+yy_reduce_print (yyvsp, yyrule, scanner, cb, name)\r
+ YYSTYPE *yyvsp;\r
+ int yyrule;\r
+ void* scanner;\r
+ void* cb;\r
+ char* name;\r
+#endif\r
+{\r
+ int yynrhs = yyr2[yyrule];\r
+ int yyi;\r
+ unsigned long int yylno = yyrline[yyrule];\r
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",\r
+ yyrule - 1, yylno);\r
+ /* The symbols being reduced. */\r
+ for (yyi = 0; yyi < yynrhs; yyi++)\r
+ {\r
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);\r
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],\r
+ &(yyvsp[(yyi + 1) - (yynrhs)])\r
+ , scanner, cb, name);\r
+ YYFPRINTF (stderr, "\n");\r
+ }\r
+}\r
+\r
+# define YY_REDUCE_PRINT(Rule) \\r
+do { \\r
+ if (yydebug) \\r
+ yy_reduce_print (yyvsp, Rule, scanner, cb, name); \\r
+} while (YYID (0))\r
+\r
+/* Nonzero means print parse trace. It is left uninitialized so that\r
+ multiple parsers can coexist. */\r
+int yydebug;\r
+#else /* !YYFMI1DEBUG */\r
+# define YYDPRINTF(Args)\r
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)\r
+# define YY_STACK_PRINT(Bottom, Top)\r
+# define YY_REDUCE_PRINT(Rule)\r
+#endif /* !YYFMI1DEBUG */\r
+\r
+\r
+/* YYINITDEPTH -- initial size of the parser's stacks. */\r
+#ifndef YYINITDEPTH\r
+# define YYINITDEPTH 200\r
+#endif\r
+\r
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only\r
+ if the built-in stack extension method is used).\r
+\r
+ Do not make this value too large; the results are undefined if\r
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)\r
+ evaluated with infinite-precision integer arithmetic. */\r
+\r
+#ifndef YYMAXDEPTH\r
+# define YYMAXDEPTH 10000\r
+#endif\r
+\r
+\r
+#if YYERROR_VERBOSE\r
+\r
+# ifndef yystrlen\r
+# if defined __GLIBC__ && defined _STRING_H\r
+# define yystrlen strlen\r
+# else\r
+/* Return the length of YYSTR. */\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static YYSIZE_T\r
+yystrlen (const char *yystr)\r
+#else\r
+static YYSIZE_T\r
+yystrlen (yystr)\r
+ const char *yystr;\r
+#endif\r
+{\r
+ YYSIZE_T yylen;\r
+ for (yylen = 0; yystr[yylen]; yylen++)\r
+ continue;\r
+ return yylen;\r
+}\r
+# endif\r
+# endif\r
+\r
+# ifndef yystpcpy\r
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE\r
+# define yystpcpy stpcpy\r
+# else\r
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in\r
+ YYDEST. */\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static char *\r
+yystpcpy (char *yydest, const char *yysrc)\r
+#else\r
+static char *\r
+yystpcpy (yydest, yysrc)\r
+ char *yydest;\r
+ const char *yysrc;\r
+#endif\r
+{\r
+ char *yyd = yydest;\r
+ const char *yys = yysrc;\r
+\r
+ while ((*yyd++ = *yys++) != '\0')\r
+ continue;\r
+\r
+ return yyd - 1;\r
+}\r
+# endif\r
+# endif\r
+\r
+# ifndef yytnamerr\r
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary\r
+ quotes and backslashes, so that it's suitable for yyerror. The\r
+ heuristic is that double-quoting is unnecessary unless the string\r
+ contains an apostrophe, a comma, or backslash (other than\r
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is\r
+ null, do not copy; instead, return the length of what the result\r
+ would have been. */\r
+static YYSIZE_T\r
+yytnamerr (char *yyres, const char *yystr)\r
+{\r
+ if (*yystr == '"')\r
+ {\r
+ YYSIZE_T yyn = 0;\r
+ char const *yyp = yystr;\r
+\r
+ for (;;)\r
+ switch (*++yyp)\r
+ {\r
+ case '\'':\r
+ case ',':\r
+ goto do_not_strip_quotes;\r
+\r
+ case '\\':\r
+ if (*++yyp != '\\')\r
+ goto do_not_strip_quotes;\r
+ /* Fall through. */\r
+ default:\r
+ if (yyres)\r
+ yyres[yyn] = *yyp;\r
+ yyn++;\r
+ break;\r
+\r
+ case '"':\r
+ if (yyres)\r
+ yyres[yyn] = '\0';\r
+ return yyn;\r
+ }\r
+ do_not_strip_quotes: ;\r
+ }\r
+\r
+ if (! yyres)\r
+ return yystrlen (yystr);\r
+\r
+ return yystpcpy (yyres, yystr) - yyres;\r
+}\r
+# endif\r
+\r
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message\r
+ about the unexpected token YYTOKEN for the state stack whose top is\r
+ YYSSP.\r
+\r
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is\r
+ not large enough to hold the message. In that case, also set\r
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the\r
+ required number of bytes is too large to store. */\r
+static int\r
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,\r
+ yytype_int16 *yyssp, int yytoken)\r
+{\r
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);\r
+ YYSIZE_T yysize = yysize0;\r
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };\r
+ /* Internationalized format string. */\r
+ const char *yyformat = YY_NULL;\r
+ /* Arguments of yyformat. */\r
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];\r
+ /* Number of reported tokens (one for the "unexpected", one per\r
+ "expected"). */\r
+ int yycount = 0;\r
+\r
+ /* There are many possibilities here to consider:\r
+ - Assume YYFAIL is not used. It's too flawed to consider. See\r
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>\r
+ for details. YYERROR is fine as it does not invoke this\r
+ function.\r
+ - If this state is a consistent state with a default action, then\r
+ the only way this function was invoked is if the default action\r
+ is an error action. In that case, don't check for expected\r
+ tokens because there are none.\r
+ - The only way there can be no lookahead present (in yychar) is if\r
+ this state is a consistent state with a default action. Thus,\r
+ detecting the absence of a lookahead is sufficient to determine\r
+ that there is no unexpected or expected token to report. In that\r
+ case, just report a simple "syntax error".\r
+ - Don't assume there isn't a lookahead just because this state is a\r
+ consistent state with a default action. There might have been a\r
+ previous inconsistent state, consistent state with a non-default\r
+ action, or user semantic action that manipulated yychar.\r
+ - Of course, the expected token list depends on states to have\r
+ correct lookahead information, and it depends on the parser not\r
+ to perform extra reductions after fetching a lookahead from the\r
+ scanner and before detecting a syntax error. Thus, state merging\r
+ (from LALR or IELR) and default reductions corrupt the expected\r
+ token list. However, the list is correct for canonical LR with\r
+ one exception: it will still contain any token that will not be\r
+ accepted due to an error action in a later state.\r
+ */\r
+ if (yytoken != YYEMPTY)\r
+ {\r
+ int yyn = yypact[*yyssp];\r
+ yyarg[yycount++] = yytname[yytoken];\r
+ if (!yypact_value_is_default (yyn))\r
+ {\r
+ /* Start YYX at -YYN if negative to avoid negative indexes in\r
+ YYCHECK. In other words, skip the first -YYN actions for\r
+ this state because they are default actions. */\r
+ int yyxbegin = yyn < 0 ? -yyn : 0;\r
+ /* Stay within bounds of both yycheck and yytname. */\r
+ int yychecklim = YYLAST - yyn + 1;\r
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;\r
+ int yyx;\r
+\r
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)\r
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR\r
+ && !yytable_value_is_error (yytable[yyx + yyn]))\r
+ {\r
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)\r
+ {\r
+ yycount = 1;\r
+ yysize = yysize0;\r
+ break;\r
+ }\r
+ yyarg[yycount++] = yytname[yyx];\r
+ {\r
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);\r
+ if (! (yysize <= yysize1\r
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))\r
+ return 2;\r
+ yysize = yysize1;\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ switch (yycount)\r
+ {\r
+# define YYCASE_(N, S) \\r
+ case N: \\r
+ yyformat = S; \\r
+ break\r
+ YYCASE_(0, YY_("syntax error"));\r
+ YYCASE_(1, YY_("syntax error, unexpected %s"));\r
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));\r
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));\r
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));\r
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));\r
+# undef YYCASE_\r
+ }\r
+\r
+ {\r
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);\r
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))\r
+ return 2;\r
+ yysize = yysize1;\r
+ }\r
+\r
+ if (*yymsg_alloc < yysize)\r
+ {\r
+ *yymsg_alloc = 2 * yysize;\r
+ if (! (yysize <= *yymsg_alloc\r
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))\r
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;\r
+ return 1;\r
+ }\r
+\r
+ /* Avoid sprintf, as that infringes on the user's name space.\r
+ Don't have undefined behavior even if the translation\r
+ produced a string with the wrong number of "%s"s. */\r
+ {\r
+ char *yyp = *yymsg;\r
+ int yyi = 0;\r
+ while ((*yyp = *yyformat) != '\0')\r
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)\r
+ {\r
+ yyp += yytnamerr (yyp, yyarg[yyi++]);\r
+ yyformat += 2;\r
+ }\r
+ else\r
+ {\r
+ yyp++;\r
+ yyformat++;\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+#endif /* YYERROR_VERBOSE */\r
+\r
+/*-----------------------------------------------.\r
+| Release the memory associated to this symbol. |\r
+`-----------------------------------------------*/\r
+\r
+/*ARGSUSED*/\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+static void\r
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void* scanner, void* cb, char* name)\r
+#else\r
+static void\r
+yydestruct (yymsg, yytype, yyvaluep, scanner, cb, name)\r
+ const char *yymsg;\r
+ int yytype;\r
+ YYSTYPE *yyvaluep;\r
+ void* scanner;\r
+ void* cb;\r
+ char* name;\r
+#endif\r
+{\r
+ YYUSE (yyvaluep);\r
+ YYUSE (scanner);\r
+ YYUSE (cb);\r
+ YYUSE (name);\r
+\r
+ if (!yymsg)\r
+ yymsg = "Deleting";\r
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);\r
+\r
+ switch (yytype)\r
+ {\r
+\r
+ default:\r
+ break;\r
+ }\r
+}\r
+\r
+\r
+\r
+\r
+/*----------.\r
+| yyparse. |\r
+`----------*/\r
+\r
+#ifdef YYPARSE_PARAM\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+int\r
+yyparse (void *YYPARSE_PARAM)\r
+#else\r
+int\r
+yyparse (YYPARSE_PARAM)\r
+ void *YYPARSE_PARAM;\r
+#endif\r
+#else /* ! YYPARSE_PARAM */\r
+#if (defined __STDC__ || defined __C99__FUNC__ \\r
+ || defined __cplusplus || defined _MSC_VER)\r
+int\r
+yyparse (void* scanner, void* cb, char* name)\r
+#else\r
+int\r
+yyparse (scanner, cb, name)\r
+ void* scanner;\r
+ void* cb;\r
+ char* name;\r
+#endif\r
+#endif\r
+{\r
+/* The lookahead symbol. */\r
+int yychar;\r
+\r
+\r
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__\r
+/* Suppress an incorrect diagnostic about yylval being uninitialized. */\r
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \\r
+ _Pragma ("GCC diagnostic push") \\r
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\\r
+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")\r
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \\r
+ _Pragma ("GCC diagnostic pop")\r
+#else\r
+/* Default value used for initialization, for pacifying older GCCs\r
+ or non-GCC compilers. */\r
+static YYSTYPE yyval_default;\r
+# define YY_INITIAL_VALUE(Value) = Value\r
+#endif\r
+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN\r
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN\r
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END\r
+#endif\r
+#ifndef YY_INITIAL_VALUE\r
+# define YY_INITIAL_VALUE(Value) /* Nothing. */\r
+#endif\r
+\r
+/* The semantic value of the lookahead symbol. */\r
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);\r
+\r
+ /* Number of syntax errors so far. */\r
+ int yynerrs;\r
+\r
+ int yystate;\r
+ /* Number of tokens to shift before error messages enabled. */\r
+ int yyerrstatus;\r
+\r
+ /* The stacks and their tools:\r
+ `yyss': related to states.\r
+ `yyvs': related to semantic values.\r
+\r
+ Refer to the stacks through separate pointers, to allow yyoverflow\r
+ to reallocate them elsewhere. */\r
+\r
+ /* The state stack. */\r
+ yytype_int16 yyssa[YYINITDEPTH];\r
+ yytype_int16 *yyss;\r
+ yytype_int16 *yyssp;\r
+\r
+ /* The semantic value stack. */\r
+ YYSTYPE yyvsa[YYINITDEPTH];\r
+ YYSTYPE *yyvs;\r
+ YYSTYPE *yyvsp;\r
+\r
+ YYSIZE_T yystacksize;\r
+\r
+ int yyn;\r
+ int yyresult;\r
+ /* Lookahead token as an internal (translated) token number. */\r
+ int yytoken = 0;\r
+ /* The variables used to return semantic value and location from the\r
+ action routines. */\r
+ YYSTYPE yyval;\r
+\r
+#if YYERROR_VERBOSE\r
+ /* Buffer for error messages, and its allocated size. */\r
+ char yymsgbuf[128];\r
+ char *yymsg = yymsgbuf;\r
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;\r
+#endif\r
+\r
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))\r
+\r
+ /* The number of symbols on the RHS of the reduced rule.\r
+ Keep to zero when no symbol should be popped. */\r
+ int yylen = 0;\r
+\r
+ yyssp = yyss = yyssa;\r
+ yyvsp = yyvs = yyvsa;\r
+ yystacksize = YYINITDEPTH;\r
+\r
+ YYDPRINTF ((stderr, "Starting parse\n"));\r
+\r
+ yystate = 0;\r
+ yyerrstatus = 0;\r
+ yynerrs = 0;\r
+ yychar = YYEMPTY; /* Cause a token to be read. */\r
+ goto yysetstate;\r
+\r
+/*------------------------------------------------------------.\r
+| yynewstate -- Push a new state, which is found in yystate. |\r
+`------------------------------------------------------------*/\r
+ yynewstate:\r
+ /* In all cases, when you get here, the value and location stacks\r
+ have just been pushed. So pushing a state here evens the stacks. */\r
+ yyssp++;\r
+\r
+ yysetstate:\r
+ *yyssp = yystate;\r
+\r
+ if (yyss + yystacksize - 1 <= yyssp)\r
+ {\r
+ /* Get the current used size of the three stacks, in elements. */\r
+ YYSIZE_T yysize = yyssp - yyss + 1;\r
+\r
+#ifdef yyoverflow\r
+ {\r
+ /* Give user a chance to reallocate the stack. Use copies of\r
+ these so that the &'s don't force the real ones into\r
+ memory. */\r
+ YYSTYPE *yyvs1 = yyvs;\r
+ yytype_int16 *yyss1 = yyss;\r
+\r
+ /* Each stack pointer address is followed by the size of the\r
+ data in use in that stack, in bytes. This used to be a\r
+ conditional around just the two extra args, but that might\r
+ be undefined if yyoverflow is a macro. */\r
+ yyoverflow (YY_("memory exhausted"),\r
+ &yyss1, yysize * sizeof (*yyssp),\r
+ &yyvs1, yysize * sizeof (*yyvsp),\r
+ &yystacksize);\r
+\r
+ yyss = yyss1;\r
+ yyvs = yyvs1;\r
+ }\r
+#else /* no yyoverflow */\r
+# ifndef YYSTACK_RELOCATE\r
+ goto yyexhaustedlab;\r
+# else\r
+ /* Extend the stack our own way. */\r
+ if (YYMAXDEPTH <= yystacksize)\r
+ goto yyexhaustedlab;\r
+ yystacksize *= 2;\r
+ if (YYMAXDEPTH < yystacksize)\r
+ yystacksize = YYMAXDEPTH;\r
+\r
+ {\r
+ yytype_int16 *yyss1 = yyss;\r
+ union yyalloc *yyptr =\r
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));\r
+ if (! yyptr)\r
+ goto yyexhaustedlab;\r
+ YYSTACK_RELOCATE (yyss_alloc, yyss);\r
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);\r
+# undef YYSTACK_RELOCATE\r
+ if (yyss1 != yyssa)\r
+ YYSTACK_FREE (yyss1);\r
+ }\r
+# endif\r
+#endif /* no yyoverflow */\r
+\r
+ yyssp = yyss + yysize - 1;\r
+ yyvsp = yyvs + yysize - 1;\r
+\r
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",\r
+ (unsigned long int) yystacksize));\r
+\r
+ if (yyss + yystacksize - 1 <= yyssp)\r
+ YYABORT;\r
+ }\r
+\r
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));\r
+\r
+ if (yystate == YYFINAL)\r
+ YYACCEPT;\r
+\r
+ goto yybackup;\r
+\r
+/*-----------.\r
+| yybackup. |\r
+`-----------*/\r
+yybackup:\r
+\r
+ /* Do appropriate processing given the current state. Read a\r
+ lookahead token if we need one and don't already have one. */\r
+\r
+ /* First try to decide what to do without reference to lookahead token. */\r
+ yyn = yypact[yystate];\r
+ if (yypact_value_is_default (yyn))\r
+ goto yydefault;\r
+\r
+ /* Not known => get a lookahead token if don't already have one. */\r
+\r
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */\r
+ if (yychar == YYEMPTY)\r
+ {\r
+ YYDPRINTF ((stderr, "Reading a token: "));\r
+ yychar = YYLEX;\r
+ }\r
+\r
+ if (yychar <= YYEOF)\r
+ {\r
+ yychar = yytoken = YYEOF;\r
+ YYDPRINTF ((stderr, "Now at end of input.\n"));\r
+ }\r
+ else\r
+ {\r
+ yytoken = YYTRANSLATE (yychar);\r
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);\r
+ }\r
+\r
+ /* If the proper action on seeing token YYTOKEN is to reduce or to\r
+ detect an error, take that action. */\r
+ yyn += yytoken;\r
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)\r
+ goto yydefault;\r
+ yyn = yytable[yyn];\r
+ if (yyn <= 0)\r
+ {\r
+ if (yytable_value_is_error (yyn))\r
+ goto yyerrlab;\r
+ yyn = -yyn;\r
+ goto yyreduce;\r
+ }\r
+\r
+ /* Count tokens shifted since error; after three, turn off error\r
+ status. */\r
+ if (yyerrstatus)\r
+ yyerrstatus--;\r
+\r
+ /* Shift the lookahead token. */\r
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);\r
+\r
+ /* Discard the shifted token. */\r
+ yychar = YYEMPTY;\r
+\r
+ yystate = yyn;\r
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN\r
+ *++yyvsp = yylval;\r
+ YY_IGNORE_MAYBE_UNINITIALIZED_END\r
+\r
+ goto yynewstate;\r
+\r
+\r
+/*-----------------------------------------------------------.\r
+| yydefault -- do the default action for the current state. |\r
+`-----------------------------------------------------------*/\r
+yydefault:\r
+ yyn = yydefact[yystate];\r
+ if (yyn == 0)\r
+ goto yyerrlab;\r
+ goto yyreduce;\r
+\r
+\r
+/*-----------------------------.\r
+| yyreduce -- Do a reduction. |\r
+`-----------------------------*/\r
+yyreduce:\r
+ /* yyn is the number of a rule to reduce with. */\r
+ yylen = yyr2[yyn];\r
+\r
+ /* If YYLEN is nonzero, implement the default value of the action:\r
+ `$$ = $1'.\r
+\r
+ Otherwise, the following line sets YYVAL to garbage.\r
+ This behavior is undocumented and Bison\r
+ users should not rely upon it. Assigning to YYVAL\r
+ unconditionally makes the parser a bit smaller, and it avoids a\r
+ GCC warning that YYVAL may be used uninitialized. */\r
+ yyval = yyvsp[1-yylen];\r
+\r
+\r
+ YY_REDUCE_PRINT (yyn);\r
+ switch (yyn)\r
+ {\r
+ \r
+\r
+ default: break;\r
+ }\r
+ /* User semantic actions sometimes alter yychar, and that requires\r
+ that yytoken be updated with the new translation. We take the\r
+ approach of translating immediately before every use of yytoken.\r
+ One alternative is translating here after every semantic action,\r
+ but that translation would be missed if the semantic action invokes\r
+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or\r
+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an\r
+ incorrect destructor might then be invoked immediately. In the\r
+ case of YYERROR or YYBACKUP, subsequent parser actions might lead\r
+ to an incorrect destructor call or verbose syntax error message\r
+ before the lookahead is translated. */\r
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);\r
+\r
+ YYPOPSTACK (yylen);\r
+ yylen = 0;\r
+ YY_STACK_PRINT (yyss, yyssp);\r
+\r
+ *++yyvsp = yyval;\r
+\r
+ /* Now `shift' the result of the reduction. Determine what state\r
+ that goes to, based on the state we popped back to and the rule\r
+ number reduced by. */\r
+\r
+ yyn = yyr1[yyn];\r
+\r
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;\r
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)\r
+ yystate = yytable[yystate];\r
+ else\r
+ yystate = yydefgoto[yyn - YYNTOKENS];\r
+\r
+ goto yynewstate;\r
+\r
+\r
+/*------------------------------------.\r
+| yyerrlab -- here on detecting error |\r
+`------------------------------------*/\r
+yyerrlab:\r
+ /* Make sure we have latest lookahead translation. See comments at\r
+ user semantic actions for why this is necessary. */\r
+ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);\r
+\r
+ /* If not already recovering from an error, report this error. */\r
+ if (!yyerrstatus)\r
+ {\r
+ ++yynerrs;\r
+#if ! YYERROR_VERBOSE\r
+ yyerror (scanner, cb, name, YY_("syntax error"));\r
+#else\r
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \\r
+ yyssp, yytoken)\r
+ {\r
+ char const *yymsgp = YY_("syntax error");\r
+ int yysyntax_error_status;\r
+ yysyntax_error_status = YYSYNTAX_ERROR;\r
+ if (yysyntax_error_status == 0)\r
+ yymsgp = yymsg;\r
+ else if (yysyntax_error_status == 1)\r
+ {\r
+ if (yymsg != yymsgbuf)\r
+ YYSTACK_FREE (yymsg);\r
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);\r
+ if (!yymsg)\r
+ {\r
+ yymsg = yymsgbuf;\r
+ yymsg_alloc = sizeof yymsgbuf;\r
+ yysyntax_error_status = 2;\r
+ }\r
+ else\r
+ {\r
+ yysyntax_error_status = YYSYNTAX_ERROR;\r
+ yymsgp = yymsg;\r
+ }\r
+ }\r
+ yyerror (scanner, cb, name, yymsgp);\r
+ if (yysyntax_error_status == 2)\r
+ goto yyexhaustedlab;\r
+ }\r
+# undef YYSYNTAX_ERROR\r
+#endif\r
+ }\r
+\r
+\r
+\r
+ if (yyerrstatus == 3)\r
+ {\r
+ /* If just tried and failed to reuse lookahead token after an\r
+ error, discard it. */\r
+\r
+ if (yychar <= YYEOF)\r
+ {\r
+ /* Return failure if at end of input. */\r
+ if (yychar == YYEOF)\r
+ YYABORT;\r
+ }\r
+ else\r
+ {\r
+ yydestruct ("Error: discarding",\r
+ yytoken, &yylval, scanner, cb, name);\r
+ yychar = YYEMPTY;\r
+ }\r
+ }\r
+\r
+ /* Else will try to reuse lookahead token after shifting the error\r
+ token. */\r
+ goto yyerrlab1;\r
+\r
+\r
+/*---------------------------------------------------.\r
+| yyerrorlab -- error raised explicitly by YYERROR. |\r
+`---------------------------------------------------*/\r
+yyerrorlab:\r
+\r
+ /* Pacify compilers like GCC when the user code never invokes\r
+ YYERROR and the label yyerrorlab therefore never appears in user\r
+ code. */\r
+ if (/*CONSTCOND*/ 0)\r
+ goto yyerrorlab;\r
+\r
+ /* Do not reclaim the symbols of the rule which action triggered\r
+ this YYERROR. */\r
+ YYPOPSTACK (yylen);\r
+ yylen = 0;\r
+ YY_STACK_PRINT (yyss, yyssp);\r
+ yystate = *yyssp;\r
+ goto yyerrlab1;\r
+\r
+\r
+/*-------------------------------------------------------------.\r
+| yyerrlab1 -- common code for both syntax error and YYERROR. |\r
+`-------------------------------------------------------------*/\r
+yyerrlab1:\r
+ yyerrstatus = 3; /* Each real token shifted decrements this. */\r
+\r
+ for (;;)\r
+ {\r
+ yyn = yypact[yystate];\r
+ if (!yypact_value_is_default (yyn))\r
+ {\r
+ yyn += YYTERROR;\r
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)\r
+ {\r
+ yyn = yytable[yyn];\r
+ if (0 < yyn)\r
+ break;\r
+ }\r
+ }\r
+\r
+ /* Pop the current state because it cannot handle the error token. */\r
+ if (yyssp == yyss)\r
+ YYABORT;\r
+\r
+\r
+ yydestruct ("Error: popping",\r
+ yystos[yystate], yyvsp, scanner, cb, name);\r
+ YYPOPSTACK (1);\r
+ yystate = *yyssp;\r
+ YY_STACK_PRINT (yyss, yyssp);\r
+ }\r
+\r
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN\r
+ *++yyvsp = yylval;\r
+ YY_IGNORE_MAYBE_UNINITIALIZED_END\r
+\r
+\r
+ /* Shift the error token. */\r
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);\r
+\r
+ yystate = yyn;\r
+ goto yynewstate;\r
+\r
+\r
+/*-------------------------------------.\r
+| yyacceptlab -- YYACCEPT comes here. |\r
+`-------------------------------------*/\r
+yyacceptlab:\r
+ yyresult = 0;\r
+ goto yyreturn;\r
+\r
+/*-----------------------------------.\r
+| yyabortlab -- YYABORT comes here. |\r
+`-----------------------------------*/\r
+yyabortlab:\r
+ yyresult = 1;\r
+ goto yyreturn;\r
+\r
+#if !defined yyoverflow || YYERROR_VERBOSE\r
+/*-------------------------------------------------.\r
+| yyexhaustedlab -- memory exhaustion comes here. |\r
+`-------------------------------------------------*/\r
+yyexhaustedlab:\r
+ yyerror (scanner, cb, name, YY_("memory exhausted"));\r
+ yyresult = 2;\r
+ /* Fall through. */\r
+#endif\r
+\r
+yyreturn:\r
+ if (yychar != YYEMPTY)\r
+ {\r
+ /* Make sure we have latest lookahead translation. See comments at\r
+ user semantic actions for why this is necessary. */\r
+ yytoken = YYTRANSLATE (yychar);\r
+ yydestruct ("Cleanup: discarding lookahead",\r
+ yytoken, &yylval, scanner, cb, name);\r
+ }\r
+ /* Do not reclaim the symbols of the rule which action triggered\r
+ this YYABORT or YYACCEPT. */\r
+ YYPOPSTACK (yylen);\r
+ YY_STACK_PRINT (yyss, yyssp);\r
+ while (yyssp != yyss)\r
+ {\r
+ yydestruct ("Cleanup: popping",\r
+ yystos[*yyssp], yyvsp, scanner, cb, name);\r
+ YYPOPSTACK (1);\r
+ }\r
+#ifndef yyoverflow\r
+ if (yyss != yyssa)\r
+ YYSTACK_FREE (yyss);\r
+#endif\r
+#if YYERROR_VERBOSE\r
+ if (yymsg != yymsgbuf)\r
+ YYSTACK_FREE (yymsg);\r
+#endif\r
+ /* Make sure YYID is used. */\r
+ return YYID (yyresult);\r
+}\r
+\r
+\r
+\r