From 34135e5d2ecb330ab4c4890ce8656d7ab3443bd9 Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Sat, 27 Feb 2016 21:52:12 +0100 Subject: [PATCH] Expressions: Turned off debug output/tracing for expression parser. --- src/App/Expression.cpp | 2 - src/App/ExpressionParser.tab.c | 1505 +++++++++++++------------------- src/App/lex.ExpressionParser.c | 328 +------ 3 files changed, 628 insertions(+), 1207 deletions(-) diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index 149de08a7..0c7ace3ef 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -1397,8 +1397,6 @@ Expression * App::ExpressionParser::parse(const App::DocumentObject *owner, cons initParser(owner); - yydebug = 0; - // run the parser int result = ExpressionParser::ExpressionParser_yyparse (); diff --git a/src/App/ExpressionParser.tab.c b/src/App/ExpressionParser.tab.c index 19eae8c2e..97abced29 100644 --- a/src/App/ExpressionParser.tab.c +++ b/src/App/ExpressionParser.tab.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 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 . */ @@ -26,7 +26,7 @@ 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. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,15 +58,11 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 7 "ExpressionParser.y" +#line 7 "ExpressionParser.y" /* yacc.c:339 */ #define YYSTYPE semantic_type @@ -77,14 +73,15 @@ std::stack functions; /**< Function #define yyparse ExpressionParser_yyparse #define yyerror ExpressionParser_yyerror +#line 77 "ExpressionParser.tab.c" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 83 "ExpressionParser.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 1 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -94,57 +91,57 @@ std::stack functions; /**< Function # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - FUNC = 258, - ONE = 259, - NUM = 260, - IDENTIFIER = 261, - UNIT = 262, - INTEGER = 263, - CONSTANT = 264, - CELLADDRESS = 265, - EQ = 266, - NEQ = 267, - LT = 268, - GT = 269, - GTE = 270, - LTE = 271, - STRING = 272, - MINUSSIGN = 273, - PROPERTY_REF = 274, - DOCUMENT = 275, - OBJECT = 276, - EXPONENT = 277, - NEG = 278, - POS = 279 - }; + enum yytokentype + { + FUNC = 258, + ONE = 259, + NUM = 260, + IDENTIFIER = 261, + UNIT = 262, + INTEGER = 263, + CONSTANT = 264, + CELLADDRESS = 265, + EQ = 266, + NEQ = 267, + LT = 268, + GT = 269, + GTE = 270, + LTE = 271, + STRING = 272, + MINUSSIGN = 273, + PROPERTY_REF = 274, + DOCUMENT = 275, + OBJECT = 276, + EXPONENT = 277, + NEG = 278, + POS = 279 + }; #endif +/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +extern YYSTYPE yylval; + +int yyparse (void); -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif /* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 148 "ExpressionParser.tab.c" +#line 145 "ExpressionParser.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -158,11 +155,8 @@ typedef unsigned char yytype_uint8; #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; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -182,8 +176,7 @@ typedef short int yytype_int16; # 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) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -197,38 +190,67 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#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 yyoverflow || YYERROR_VERBOSE @@ -247,9 +269,9 @@ YYID (yyi) # 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) +# 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 @@ -259,8 +281,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* 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 @@ -276,7 +298,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -284,15 +306,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# 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 && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -302,7 +322,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -327,35 +347,35 @@ union yyalloc 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)) +# 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 (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. 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))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -371,17 +391,19 @@ union yyalloc #define YYNNTS 14 /* YYNRULES -- Number of rules. */ #define YYNRULES 69 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 125 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 279 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -415,51 +437,7 @@ static const yytype_uint8 yytranslate[] = }; #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, 9, 11, 13, 16, 19, - 23, 27, 31, 35, 39, 43, 47, 51, 57, 59, - 61, 63, 65, 67, 70, 73, 75, 79, 83, 87, - 91, 95, 99, 103, 107, 109, 113, 117, 121, 125, - 130, 134, 136, 140, 144, 150, 152, 154, 156, 158, - 163, 170, 175, 180, 187, 194, 198, 200, 202, 204, - 209, 216, 221, 226, 233, 240, 244, 246, 248, 250 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 40, 0, -1, 41, -1, 46, -1, 43, -1, 17, - -1, 47, -1, 18, 41, -1, 23, 41, -1, 41, - 23, 41, -1, 41, 18, 41, -1, 41, 24, 41, - -1, 41, 25, 41, -1, 41, 25, 46, -1, 41, - 30, 41, -1, 31, 41, 32, -1, 3, 44, 32, - -1, 45, 26, 41, 27, 41, -1, 4, -1, 5, - -1, 8, -1, 42, -1, 9, -1, 42, 46, -1, - 9, 46, -1, 41, -1, 44, 33, 41, -1, 44, - 34, 41, -1, 41, 11, 41, -1, 41, 12, 41, - -1, 41, 13, 41, -1, 41, 14, 41, -1, 41, - 15, 41, -1, 41, 16, 41, -1, 7, -1, 4, - 25, 46, -1, 46, 25, 46, -1, 46, 24, 46, - -1, 46, 30, 42, -1, 46, 30, 18, 42, -1, - 31, 46, 32, -1, 49, -1, 52, 35, 49, -1, - 51, 36, 49, -1, 51, 36, 52, 35, 49, -1, - 8, -1, 4, -1, 6, -1, 10, -1, 6, 37, - 48, 38, -1, 6, 37, 48, 38, 35, 50, -1, - 6, 37, 17, 38, -1, 6, 37, 6, 38, -1, - 6, 37, 17, 38, 35, 50, -1, 6, 37, 6, - 38, 35, 50, -1, 6, 35, 50, -1, 6, -1, - 17, -1, 10, -1, 6, 37, 48, 38, -1, 6, - 37, 48, 38, 35, 50, -1, 6, 37, 17, 38, - -1, 6, 37, 6, 38, -1, 6, 37, 17, 38, - 35, 50, -1, 6, 37, 6, 38, 35, 50, -1, - 6, 35, 50, -1, 17, -1, 6, -1, 17, -1, - 10, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 67, 67, 68, 71, 72, 73, 74, 75, 76, @@ -472,7 +450,7 @@ static const yytype_uint8 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -483,13 +461,13 @@ static const char *const yytname[] = "OBJECT", "EXPONENT", "'+'", "'*'", "'/'", "'?'", "':'", "NEG", "POS", "'^'", "'('", "')'", "','", "';'", "'.'", "'#'", "'['", "']'", "$accept", "input", "exp", "basic_num", "num", "args", "cond", "unit_exp", - "identifier", "integer", "path", "subpath", "document", "object", 0 + "identifier", "integer", "path", "subpath", "document", "object", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -499,60 +477,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 39, 40, 40, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, - 42, 43, 43, 43, 43, 44, 44, 44, 45, 45, - 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, - 46, 47, 47, 47, 47, 48, 48, 49, 49, 49, - 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 51, 51, 52, 52 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 2, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 5, 1, 1, - 1, 1, 1, 2, 2, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 3, 3, 3, 3, 4, - 3, 1, 3, 3, 5, 1, 1, 1, 1, 4, - 6, 4, 4, 6, 6, 3, 1, 1, 1, 4, - 6, 4, 4, 6, 6, 3, 1, 1, 1, 1 -}; - -/* 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[] = -{ - 0, 0, 18, 19, 47, 34, 20, 22, 48, 5, - 0, 0, 0, 0, 2, 21, 4, 0, 3, 6, - 41, 0, 0, 18, 0, 25, 0, 0, 0, 0, - 0, 0, 24, 7, 8, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 0, 0, 0, 0, 0, 0, 16, 0, 0, 35, - 56, 58, 57, 55, 46, 0, 45, 0, 0, 15, - 40, 28, 29, 30, 31, 32, 33, 10, 9, 11, - 12, 13, 14, 0, 37, 36, 0, 38, 47, 68, - 43, 0, 48, 42, 26, 27, 0, 0, 52, 51, - 49, 0, 39, 0, 65, 0, 0, 0, 0, 0, - 0, 17, 44, 62, 61, 59, 54, 53, 50, 0, - 0, 0, 64, 63, 60 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 13, 35, 15, 16, 26, 17, 36, 19, 68, - 20, 63, 21, 22 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ #define YYPACT_NINF -85 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-85))) + +#define YYTABLE_NINF -70 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 56, 72, -12, -85, 32, -85, -85, 1, -21, -29, @@ -570,17 +506,43 @@ static const yytype_int16 yypact[] = 104, 104, -85, -85, -85 }; -/* YYPGOTO[NTERM-NUM]. */ + /* 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[] = +{ + 0, 0, 18, 19, 47, 34, 20, 22, 48, 5, + 0, 0, 0, 0, 2, 21, 4, 0, 3, 6, + 41, 0, 0, 18, 0, 25, 0, 0, 0, 0, + 0, 0, 24, 7, 8, 0, 0, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 35, + 56, 58, 57, 55, 46, 0, 45, 0, 0, 15, + 40, 28, 29, 30, 31, 32, 33, 10, 9, 11, + 12, 13, 14, 0, 37, 36, 0, 38, 47, 68, + 43, 0, 48, 42, 26, 27, 0, 0, 52, 51, + 49, 0, 39, 0, 65, 0, 0, 0, 0, 0, + 0, 17, 44, 62, 61, 59, 54, 53, 50, 0, + 0, 0, 64, 63, 60 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -85, -85, 0, -35, -85, -85, -85, 2, -85, 57, -51, -84, -85, 101 }; -/* 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 -70 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 13, 35, 15, 16, 26, 17, 36, 19, 68, + 20, 63, 21, 22 +}; + + /* 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_int8 yytable[] = { 14, 25, 18, 90, 93, 30, -68, -66, 5, 32, @@ -605,12 +567,6 @@ static const yytype_int8 yytable[] = 0, 48, 0, 0, 0, 106 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-85)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 0, 1, 0, 54, 55, 4, 35, 36, 7, 7, @@ -635,8 +591,8 @@ static const yytype_int8 yycheck[] = -1, 30, -1, -1, -1, 17 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 17, @@ -654,94 +610,65 @@ static const yytype_uint8 yystos[] = 35, 35, 50, 50, 50 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 39, 40, 40, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, + 42, 43, 43, 43, 43, 44, 44, 44, 45, 45, + 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, + 46, 47, 47, 47, 47, 48, 48, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 51, 51, 52, 52 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 2, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 5, 1, 1, + 1, 1, 1, 2, 2, 1, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 3, 3, 3, 3, 4, + 3, 1, 3, 3, 5, 1, 1, 1, 1, 4, + 6, 4, 4, 6, 6, 3, 1, 1, 1, 4, + 6, 4, 4, 6, 6, 3, 1, 1, 1, 1 +}; -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#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 (YYID (0)) + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* This macro is provided for backward compatibility. */ - -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -751,54 +678,46 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -806,22 +725,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -832,16 +740,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -852,49 +752,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# 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. */ @@ -908,7 +801,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -931,15 +824,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -955,16 +841,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -994,27 +872,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1037,12 +915,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1050,10 +927,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1102,11 +975,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1126,10 +1001,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1166,84 +1043,49 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 41: /* "exp" */ + case 41: /* exp */ +#line 60 "ExpressionParser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).expr); } +#line 1061 "ExpressionParser.tab.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 60 "ExpressionParser.y" - { delete (yyvaluep->expr); }; + case 44: /* args */ +#line 61 "ExpressionParser.y" /* yacc.c:1257 */ + { std::vector::const_iterator i = ((*yyvaluep).arguments).begin(); while (i != ((*yyvaluep).arguments).end()) { delete *i; ++i; } } +#line 1067 "ExpressionParser.tab.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 1198 "ExpressionParser.tab.c" - break; - case 44: /* "args" */ + case 45: /* cond */ +#line 60 "ExpressionParser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).expr); } +#line 1073 "ExpressionParser.tab.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 61 "ExpressionParser.y" - { std::vector::const_iterator i = (yyvaluep->arguments).begin(); while (i != (yyvaluep->arguments).end()) { delete *i; ++i; } }; + case 46: /* unit_exp */ +#line 60 "ExpressionParser.y" /* yacc.c:1257 */ + { delete ((*yyvaluep).expr); } +#line 1079 "ExpressionParser.tab.c" /* yacc.c:1257 */ + break; -/* Line 1391 of yacc.c */ -#line 1207 "ExpressionParser.tab.c" - break; - case 45: /* "cond" */ - -/* Line 1391 of yacc.c */ -#line 60 "ExpressionParser.y" - { delete (yyvaluep->expr); }; - -/* Line 1391 of yacc.c */ -#line 1216 "ExpressionParser.tab.c" - break; - case 46: /* "unit_exp" */ - -/* Line 1391 of yacc.c */ -#line 60 "ExpressionParser.y" - { delete (yyvaluep->expr); }; - -/* Line 1391 of yacc.c */ -#line 1225 "ExpressionParser.tab.c" - break; default: - break; + break; } + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ @@ -1251,7 +1093,6 @@ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; @@ -1260,37 +1101,18 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1308,7 +1130,7 @@ yyparse () int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1326,9 +1148,8 @@ yyparse () Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1337,14 +1158,6 @@ yyparse () yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1365,23 +1178,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1389,22 +1202,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1413,10 +1226,10 @@ yyparse () yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1445,7 +1258,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1485,7 +1298,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1508,7 +1323,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1522,501 +1337,431 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 67 "ExpressionParser.y" - { ScanResult = (yyvsp[(1) - (1)].expr); valueExpression = true; } +#line 67 "ExpressionParser.y" /* yacc.c:1646 */ + { ScanResult = (yyvsp[0].expr); valueExpression = true; } +#line 1343 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 3: - -/* Line 1806 of yacc.c */ -#line 68 "ExpressionParser.y" - { ScanResult = (yyvsp[(1) - (1)].expr); unitExpression = true; } +#line 68 "ExpressionParser.y" /* yacc.c:1646 */ + { ScanResult = (yyvsp[0].expr); unitExpression = true; } +#line 1349 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 71 "ExpressionParser.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 71 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1355 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 72 "ExpressionParser.y" - { (yyval.expr) = new StringExpression(DocumentObject, (yyvsp[(1) - (1)].string)); } +#line 72 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new StringExpression(DocumentObject, (yyvsp[0].string)); } +#line 1361 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 73 "ExpressionParser.y" - { (yyval.expr) = new VariableExpression(DocumentObject, (yyvsp[(1) - (1)].path)); } +#line 73 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new VariableExpression(DocumentObject, (yyvsp[0].path)); } +#line 1367 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 74 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(2) - (2)].expr), OperatorExpression::NEG, new NumberExpression(DocumentObject, -1)); } +#line 74 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[0].expr), OperatorExpression::NEG, new NumberExpression(DocumentObject, -1)); } +#line 1373 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 75 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(2) - (2)].expr), OperatorExpression::POS, new NumberExpression(DocumentObject, 1)); } +#line 75 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[0].expr), OperatorExpression::POS, new NumberExpression(DocumentObject, 1)); } +#line 1379 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 76 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::ADD, (yyvsp[(3) - (3)].expr)); } +#line 76 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::ADD, (yyvsp[0].expr)); } +#line 1385 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 77 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::SUB, (yyvsp[(3) - (3)].expr)); } +#line 77 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::SUB, (yyvsp[0].expr)); } +#line 1391 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 78 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::MUL, (yyvsp[(3) - (3)].expr)); } +#line 78 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::MUL, (yyvsp[0].expr)); } +#line 1397 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 79 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::DIV, (yyvsp[(3) - (3)].expr)); } +#line 79 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::DIV, (yyvsp[0].expr)); } +#line 1403 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 80 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::DIV, (yyvsp[(3) - (3)].expr)); } +#line 80 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::DIV, (yyvsp[0].expr)); } +#line 1409 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 81 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::POW, (yyvsp[(3) - (3)].expr)); } +#line 81 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::POW, (yyvsp[0].expr)); } +#line 1415 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 82 "ExpressionParser.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); } +#line 82 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[-1].expr); } +#line 1421 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 83 "ExpressionParser.y" - { (yyval.expr) = new FunctionExpression(DocumentObject, (yyvsp[(1) - (3)].func), (yyvsp[(2) - (3)].arguments)); } +#line 83 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new FunctionExpression(DocumentObject, (yyvsp[-2].func), (yyvsp[-1].arguments)); } +#line 1427 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 84 "ExpressionParser.y" - { (yyval.expr) = new ConditionalExpression(DocumentObject, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); } +#line 84 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new ConditionalExpression(DocumentObject, (yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 1433 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 87 "ExpressionParser.y" - { (yyval.expr) = new NumberExpression(DocumentObject, (yyvsp[(1) - (1)].fvalue)); } +#line 87 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new NumberExpression(DocumentObject, (yyvsp[0].fvalue)); } +#line 1439 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 88 "ExpressionParser.y" - { (yyval.expr) = new NumberExpression(DocumentObject, (yyvsp[(1) - (1)].fvalue)); } +#line 88 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new NumberExpression(DocumentObject, (yyvsp[0].fvalue)); } +#line 1445 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 89 "ExpressionParser.y" - { (yyval.expr) = new NumberExpression(DocumentObject, (double)(yyvsp[(1) - (1)].ivalue)); } +#line 89 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new NumberExpression(DocumentObject, (double)(yyvsp[0].ivalue)); } +#line 1451 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 92 "ExpressionParser.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } +#line 92 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 1457 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 93 "ExpressionParser.y" - { (yyval.expr) = new ConstantExpression(DocumentObject, (yyvsp[(1) - (1)].constant).name, (yyvsp[(1) - (1)].constant).fvalue); } +#line 93 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new ConstantExpression(DocumentObject, (yyvsp[0].constant).name, (yyvsp[0].constant).fvalue); } +#line 1463 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 94 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (2)].expr), OperatorExpression::UNIT, (yyvsp[(2) - (2)].expr)); } +#line 94 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-1].expr), OperatorExpression::UNIT, (yyvsp[0].expr)); } +#line 1469 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 95 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, new ConstantExpression(DocumentObject, (yyvsp[(1) - (2)].constant).name, (yyvsp[(1) - (2)].constant).fvalue), OperatorExpression::UNIT, (yyvsp[(2) - (2)].expr)); } +#line 95 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, new ConstantExpression(DocumentObject, (yyvsp[-1].constant).name, (yyvsp[-1].constant).fvalue), OperatorExpression::UNIT, (yyvsp[0].expr)); } +#line 1475 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 98 "ExpressionParser.y" - { (yyval.arguments).push_back((yyvsp[(1) - (1)].expr)); } +#line 98 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.arguments).push_back((yyvsp[0].expr)); } +#line 1481 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 99 "ExpressionParser.y" - { (yyvsp[(1) - (3)].arguments).push_back((yyvsp[(3) - (3)].expr)); (yyval.arguments) = (yyvsp[(1) - (3)].arguments); } +#line 99 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[-2].arguments).push_back((yyvsp[0].expr)); (yyval.arguments) = (yyvsp[-2].arguments); } +#line 1487 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 100 "ExpressionParser.y" - { (yyvsp[(1) - (3)].arguments).push_back((yyvsp[(3) - (3)].expr)); (yyval.arguments) = (yyvsp[(1) - (3)].arguments); } +#line 100 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[-2].arguments).push_back((yyvsp[0].expr)); (yyval.arguments) = (yyvsp[-2].arguments); } +#line 1493 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 103 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::EQ, (yyvsp[(3) - (3)].expr)); } +#line 103 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::EQ, (yyvsp[0].expr)); } +#line 1499 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 104 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::NEQ, (yyvsp[(3) - (3)].expr)); } +#line 104 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::NEQ, (yyvsp[0].expr)); } +#line 1505 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 105 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::LT, (yyvsp[(3) - (3)].expr)); } +#line 105 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::LT, (yyvsp[0].expr)); } +#line 1511 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 106 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::GT, (yyvsp[(3) - (3)].expr)); } +#line 106 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::GT, (yyvsp[0].expr)); } +#line 1517 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 107 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::GTE, (yyvsp[(3) - (3)].expr)); } +#line 107 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::GTE, (yyvsp[0].expr)); } +#line 1523 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 108 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::LTE, (yyvsp[(3) - (3)].expr)); } +#line 108 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::LTE, (yyvsp[0].expr)); } +#line 1529 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 111 "ExpressionParser.y" - { (yyval.expr) = new UnitExpression(DocumentObject, (yyvsp[(1) - (1)].quantity).scaler, (yyvsp[(1) - (1)].quantity).unitStr ); } +#line 111 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new UnitExpression(DocumentObject, (yyvsp[0].quantity).scaler, (yyvsp[0].quantity).unitStr ); } +#line 1535 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 112 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, new NumberExpression(DocumentObject, (yyvsp[(1) - (3)].fvalue)), OperatorExpression::DIV, (yyvsp[(3) - (3)].expr)); } +#line 112 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, new NumberExpression(DocumentObject, (yyvsp[-2].fvalue)), OperatorExpression::DIV, (yyvsp[0].expr)); } +#line 1541 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 113 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::DIV, (yyvsp[(3) - (3)].expr)); } +#line 113 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::DIV, (yyvsp[0].expr)); } +#line 1547 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 37: - -/* Line 1806 of yacc.c */ -#line 114 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::MUL, (yyvsp[(3) - (3)].expr)); } +#line 114 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::MUL, (yyvsp[0].expr)); } +#line 1553 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 38: - -/* Line 1806 of yacc.c */ -#line 115 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (3)].expr), OperatorExpression::POW, (yyvsp[(3) - (3)].expr)); } +#line 115 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-2].expr), OperatorExpression::POW, (yyvsp[0].expr)); } +#line 1559 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 116 "ExpressionParser.y" - { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[(1) - (4)].expr), OperatorExpression::POW, new OperatorExpression(DocumentObject, (yyvsp[(4) - (4)].expr), OperatorExpression::NEG, new NumberExpression(DocumentObject, -1))); } +#line 116 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = new OperatorExpression(DocumentObject, (yyvsp[-3].expr), OperatorExpression::POW, new OperatorExpression(DocumentObject, (yyvsp[0].expr), OperatorExpression::NEG, new NumberExpression(DocumentObject, -1))); } +#line 1565 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 117 "ExpressionParser.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); } +#line 117 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.expr) = (yyvsp[-1].expr); } +#line 1571 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 120 "ExpressionParser.y" +#line 120 "ExpressionParser.y" /* yacc.c:1646 */ { /* Path to property within document object */ (yyval.path) = ObjectIdentifier(DocumentObject); - (yyval.path).addComponents((yyvsp[(1) - (1)].components)); + (yyval.path).addComponents((yyvsp[0].components)); } +#line 1580 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 124 "ExpressionParser.y" +#line 124 "ExpressionParser.y" /* yacc.c:1646 */ { /* Path to property within document object */ (yyval.path) = ObjectIdentifier(DocumentObject); - (yyval.path).setDocumentObjectName((yyvsp[(1) - (3)].string_or_identifier), true); - (yyval.path).addComponents((yyvsp[(3) - (3)].components)); + (yyval.path).setDocumentObjectName((yyvsp[-2].string_or_identifier), true); + (yyval.path).addComponents((yyvsp[0].components)); } +#line 1590 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 43: - -/* Line 1806 of yacc.c */ -#line 129 "ExpressionParser.y" +#line 129 "ExpressionParser.y" /* yacc.c:1646 */ { /* Path to property from an external document, within a named document object */ (yyval.path) = ObjectIdentifier(DocumentObject); - (yyval.path).setDocumentName((yyvsp[(1) - (3)].string_or_identifier), true); - (yyval.path).addComponents((yyvsp[(3) - (3)].components)); + (yyval.path).setDocumentName((yyvsp[-2].string_or_identifier), true); + (yyval.path).addComponents((yyvsp[0].components)); } +#line 1600 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 134 "ExpressionParser.y" +#line 134 "ExpressionParser.y" /* yacc.c:1646 */ { /* Path to property from an external document, within a named document object */ (yyval.path) = ObjectIdentifier(DocumentObject); - (yyval.path).setDocumentName((yyvsp[(1) - (5)].string_or_identifier), true); - (yyval.path).setDocumentObjectName((yyvsp[(3) - (5)].string_or_identifier), true); - (yyval.path).addComponents((yyvsp[(5) - (5)].components)); + (yyval.path).setDocumentName((yyvsp[-4].string_or_identifier), true); + (yyval.path).setDocumentObjectName((yyvsp[-2].string_or_identifier), true); + (yyval.path).addComponents((yyvsp[0].components)); } +#line 1611 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 142 "ExpressionParser.y" - { (yyval.ivalue) = (yyvsp[(1) - (1)].ivalue); } +#line 142 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.ivalue) = (yyvsp[0].ivalue); } +#line 1617 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 46: - -/* Line 1806 of yacc.c */ -#line 143 "ExpressionParser.y" - { (yyval.ivalue) = (yyvsp[(1) - (1)].fvalue); } +#line 143 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.ivalue) = (yyvsp[0].fvalue); } +#line 1623 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 147 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (1)].string))); } +#line 147 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[0].string))); } +#line 1629 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 148 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (1)].string))); } +#line 148 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[0].string))); } +#line 1635 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 149 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].ivalue))); } +#line 149 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[-3].string), (yyvsp[-1].ivalue))); } +#line 1641 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 150 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[(1) - (6)].string), (yyvsp[(3) - (6)].ivalue))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 150 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[-5].string), (yyvsp[-3].ivalue))); (yyval.components) = (yyvsp[0].components); } +#line 1647 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 51: - -/* Line 1806 of yacc.c */ -#line 151 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (4)].string), ObjectIdentifier::String((yyvsp[(3) - (4)].string), true))); } +#line 151 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-3].string), ObjectIdentifier::String((yyvsp[-1].string), true))); } +#line 1653 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 152 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].string))); } +#line 152 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-3].string), (yyvsp[-1].string))); } +#line 1659 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 153 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (6)].string), ObjectIdentifier::String((yyvsp[(3) - (6)].string), true))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 153 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-5].string), ObjectIdentifier::String((yyvsp[-3].string), true))); (yyval.components) = (yyvsp[0].components); } +#line 1665 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 54: - -/* Line 1806 of yacc.c */ -#line 154 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (6)].string), (yyvsp[(3) - (6)].string))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 154 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-5].string), (yyvsp[-3].string))); (yyval.components) = (yyvsp[0].components); } +#line 1671 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 55: - -/* Line 1806 of yacc.c */ -#line 155 "ExpressionParser.y" - { (yyvsp[(3) - (3)].components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (3)].string))); (yyval.components) = (yyvsp[(3) - (3)].components); } +#line 155 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[-2].string))); (yyval.components) = (yyvsp[0].components); } +#line 1677 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 56: - -/* Line 1806 of yacc.c */ -#line 158 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (1)].string))); } +#line 158 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[0].string))); } +#line 1683 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 57: - -/* Line 1806 of yacc.c */ -#line 159 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (1)].string))); } +#line 159 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[0].string))); } +#line 1689 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 58: - -/* Line 1806 of yacc.c */ -#line 160 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (1)].string))); } +#line 160 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[0].string))); } +#line 1695 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 59: - -/* Line 1806 of yacc.c */ -#line 161 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].ivalue))); } +#line 161 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[-3].string), (yyvsp[-1].ivalue))); } +#line 1701 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 60: - -/* Line 1806 of yacc.c */ -#line 162 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[(1) - (6)].string), (yyvsp[(3) - (6)].ivalue))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 162 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::ArrayComponent((yyvsp[-5].string), (yyvsp[-3].ivalue))); (yyval.components) = (yyvsp[0].components); } +#line 1707 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 61: - -/* Line 1806 of yacc.c */ -#line 163 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (4)].string), ObjectIdentifier::String((yyvsp[(3) - (4)].string), true))); } +#line 163 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-3].string), ObjectIdentifier::String((yyvsp[-1].string), true))); } +#line 1713 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 62: - -/* Line 1806 of yacc.c */ -#line 164 "ExpressionParser.y" - { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].string))); } +#line 164 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-3].string), (yyvsp[-1].string))); } +#line 1719 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 63: - -/* Line 1806 of yacc.c */ -#line 165 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (6)].string), ObjectIdentifier::String((yyvsp[(3) - (6)].string), true))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 165 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-5].string), ObjectIdentifier::String((yyvsp[-3].string), true))); (yyval.components) = (yyvsp[0].components); } +#line 1725 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 64: - -/* Line 1806 of yacc.c */ -#line 166 "ExpressionParser.y" - { (yyvsp[(6) - (6)].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[(1) - (6)].string), (yyvsp[(3) - (6)].string))); (yyval.components) = (yyvsp[(6) - (6)].components); } +#line 166 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::MapComponent((yyvsp[-5].string), (yyvsp[-3].string))); (yyval.components) = (yyvsp[0].components); } +#line 1731 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 65: - -/* Line 1806 of yacc.c */ -#line 167 "ExpressionParser.y" - { (yyvsp[(3) - (3)].components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[(1) - (3)].string))); (yyval.components) = (yyvsp[(3) - (3)].components); } +#line 167 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyvsp[0].components).push_front(ObjectIdentifier::Component::SimpleComponent((yyvsp[-2].string))); (yyval.components) = (yyvsp[0].components); } +#line 1737 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 66: - -/* Line 1806 of yacc.c */ -#line 170 "ExpressionParser.y" - { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[(1) - (1)].string), true); } +#line 170 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[0].string), true); } +#line 1743 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 67: - -/* Line 1806 of yacc.c */ -#line 171 "ExpressionParser.y" - { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[(1) - (1)].string)); } +#line 171 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[0].string)); } +#line 1749 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 68: - -/* Line 1806 of yacc.c */ -#line 174 "ExpressionParser.y" - { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[(1) - (1)].string), true); } +#line 174 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[0].string), true); } +#line 1755 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; case 69: - -/* Line 1806 of yacc.c */ -#line 175 "ExpressionParser.y" - { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[(1) - (1)].string), true); } +#line 175 "ExpressionParser.y" /* yacc.c:1646 */ + { (yyval.string_or_identifier) = ObjectIdentifier::String((yyvsp[0].string), true); } +#line 1761 "ExpressionParser.tab.c" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 2020 "ExpressionParser.tab.c" +#line 1765 "ExpressionParser.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2038,7 +1783,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* 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. */ @@ -2053,9 +1798,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2106,20 +1851,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2138,7 +1883,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2151,35 +1896,37 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[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. */ @@ -2203,7 +1950,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2222,14 +1969,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } - /* Do not reclaim the symbols of the rule which action triggered + /* 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", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2240,13 +1987,7 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 178 "ExpressionParser.y" - +#line 178 "ExpressionParser.y" /* yacc.c:1906 */ diff --git a/src/App/lex.ExpressionParser.c b/src/App/lex.ExpressionParser.c index 5c50e9805..9543f8acc 100644 --- a/src/App/lex.ExpressionParser.c +++ b/src/App/lex.ExpressionParser.c @@ -5,10 +5,6 @@ /* A lexical scanner generated by flex */ -/* %not-for-header */ - -/* %if-c-only */ -/* %if-not-reentrant */ #define yy_create_buffer ExpressionParser_create_buffer #define yy_delete_buffer ExpressionParser_delete_buffer #define yy_flex_debug ExpressionParser_flex_debug @@ -28,10 +24,6 @@ #define yyrealloc ExpressionParserrealloc #define yyfree ExpressionParserfree -/* %endif */ -/* %endif */ -/* %ok-for-header */ - #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 @@ -40,32 +32,16 @@ #define FLEX_BETA #endif -/* %if-c++-only */ -/* %endif */ - -/* %if-c-only */ - -/* %endif */ - -/* %if-c-only */ - -/* %endif */ - /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ -/* %if-c-only */ #include #include #include #include -/* %endif */ -/* %if-tables-serialization */ -/* %endif */ /* end standard C headers. */ -/* %if-c-or-c++ */ /* flex integer type definitions */ #ifndef FLEXINT_H @@ -130,11 +106,6 @@ typedef unsigned int flex_uint32_t; #endif /* ! FLEXINT_H */ -/* %endif */ - -/* %if-c++-only */ -/* %endif */ - #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ @@ -156,13 +127,8 @@ typedef unsigned int flex_uint32_t; #define yyconst #endif -/* %not-for-header */ - /* Returned upon end-of-file. */ #define YY_NULL 0 -/* %ok-for-header */ - -/* %not-for-header */ /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, @@ -170,14 +136,6 @@ typedef unsigned int flex_uint32_t; * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) -/* %ok-for-header */ - -/* %if-reentrant */ -/* %endif */ - -/* %if-not-reentrant */ - -/* %endif */ /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less @@ -222,15 +180,9 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -/* %if-not-reentrant */ extern int ExpressionParserleng; -/* %endif */ -/* %if-c-only */ -/* %if-not-reentrant */ extern FILE *ExpressionParserin, *ExpressionParserout; -/* %endif */ -/* %endif */ #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 @@ -263,12 +215,7 @@ typedef size_t yy_size_t; #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { -/* %if-c-only */ FILE *yy_input_file; -/* %endif */ - -/* %if-c++-only */ -/* %endif */ char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ @@ -329,19 +276,10 @@ struct yy_buffer_state }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ -/* %if-c-only Standard (non-C++) definition */ -/* %not-for-header */ - -/* %if-not-reentrant */ - /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ -/* %endif */ -/* %ok-for-header */ - -/* %endif */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -358,11 +296,6 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] -/* %if-c-only Standard (non-C++) definition */ - -/* %if-not-reentrant */ -/* %not-for-header */ - /* yy_hold_char holds the character lost when ExpressionParsertext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ @@ -377,9 +310,6 @@ static int yy_start = 0; /* start state number */ * instead of setting up a fresh ExpressionParserin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -/* %ok-for-header */ - -/* %endif */ void ExpressionParserrestart (FILE *input_file ); void ExpressionParser_switch_to_buffer (YY_BUFFER_STATE new_buffer ); @@ -399,8 +329,6 @@ YY_BUFFER_STATE ExpressionParser_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE ExpressionParser_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE ExpressionParser_scan_bytes (yyconst char *bytes,int len ); -/* %endif */ - void *ExpressionParseralloc (yy_size_t ); void *ExpressionParserrealloc (void *,yy_size_t ); void ExpressionParserfree (void * ); @@ -429,13 +357,9 @@ void ExpressionParserfree (void * ); #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) -/* %% [1.0] ExpressionParsertext/ExpressionParserin/ExpressionParserout/yy_state_type/ExpressionParserlineno etc. def's & init go here */ - #define ExpressionParserwrap(n) 1 #define YY_SKIP_YYWRAP -#define FLEX_DEBUG - typedef unsigned char YY_CHAR; FILE *ExpressionParserin = (FILE *) 0, *ExpressionParserout = (FILE *) 0; @@ -449,28 +373,21 @@ int ExpressionParserlineno = 1; extern char *ExpressionParsertext; #define yytext_ptr ExpressionParsertext -/* %if-c-only Standard (non-C++) definition */ - static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); -/* %endif */ - /* Done after the current pattern has been matched and before the * corresponding action - sets up ExpressionParsertext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ -/* %% [2.0] code to fiddle ExpressionParsertext and ExpressionParserleng for yymore() goes here \ */\ ExpressionParserleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ -/* %% [3.0] code to copy yytext_ptr to ExpressionParsertext[] goes here, if %array \ */\ (yy_c_buf_p) = yy_cp; -/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ #define YY_NUM_RULES 91 #define YY_END_OF_BUFFER 92 /* This struct is not used in this scanner, @@ -5669,20 +5586,7 @@ static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int ExpressionParser_flex_debug; -int ExpressionParser_flex_debug = 1; - -static yyconst flex_int16_t yy_rule_linenum[91] = - { 0, - 144, 145, 147, 149, 151, 152, 153, 154, 155, 156, - 158, 159, 161, 162, 163, 164, 165, 166, 167, 168, - 170, 172, 173, 174, 175, 176, 177, 179, 180, 181, - 183, 184, 185, 186, 188, 189, 190, 191, 193, 195, - 197, 198, 199, 200, 201, 202, 203, 204, 208, 209, - 210, 211, 212, 214, 216, 217, 218, 219, 221, 222, - 223, 224, 226, 227, 228, 229, 231, 232, 234, 235, - 237, 238, 239, 240, 241, 243, 244, 245, 246, 248, - 249, 250, 251, 253, 254, 256, 257, 258, 260, 275 - } ; +int ExpressionParser_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -5718,7 +5622,7 @@ extern int column; /* the manual says "somewhat more optimized" */ /* no support for include files is planned */ /* UTF-8 unicode regular expressions. */ -#line 5722 "lex.ExpressionParser.c" +#line 5626 "lex.ExpressionParser.c" #define INITIAL 0 @@ -5727,28 +5631,15 @@ extern int column; * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ -/* %if-c-only */ #include -/* %endif */ -/* %if-c++-only */ -/* %endif */ #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif -/* %if-c-only Reentrant structure and macros (non-C++). */ -/* %if-reentrant */ -/* %if-c-only */ - static int yy_init_globals (void ); -/* %endif */ -/* %if-reentrant */ -/* %endif */ -/* %endif End reentrant structures and macros. */ - /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ @@ -5778,9 +5669,6 @@ int ExpressionParserget_lineno (void ); void ExpressionParserset_lineno (int line_number ); -/* %if-bison-bridge */ -/* %endif */ - /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -5793,12 +5681,6 @@ extern int ExpressionParserwrap (void ); #endif #endif -/* %not-for-header */ - -/* %ok-for-header */ - -/* %endif */ - #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -5808,23 +5690,15 @@ static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT -/* %if-c-only Standard (non-C++) definition */ -/* %not-for-header */ #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif -/* %ok-for-header */ -/* %endif */ #endif -/* %if-c-only */ - -/* %endif */ - /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ @@ -5837,14 +5711,10 @@ static int input (void ); /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO -/* %if-c-only Standard (non-C++) definition */ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( ExpressionParsertext, ExpressionParserleng, 1, ExpressionParserout )) {} } while (0) -/* %endif */ -/* %if-c++-only C++ definition */ -/* %endif */ #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -5852,7 +5722,6 @@ static int input (void ); */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ -/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ @@ -5881,8 +5750,6 @@ static int input (void ); } \ }\ \ -/* %if-c++-only C++ definition \ */\ -/* %endif */ #endif @@ -5901,39 +5768,20 @@ static int input (void ); /* Report a fatal error. */ #ifndef YY_FATAL_ERROR -/* %if-c-only */ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ #endif -/* %if-tables-serialization structures and prototypes */ -/* %not-for-header */ - -/* %ok-for-header */ - -/* %not-for-header */ - -/* %tables-yydmap generated elements */ -/* %endif */ /* end tables serialization structures and prototypes */ -/* %ok-for-header */ - /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 -/* %if-c-only Standard (non-C++) definition */ extern int ExpressionParserlex (void); #define YY_DECL int ExpressionParserlex (void) -/* %endif */ -/* %if-c++-only C++ definition */ -/* %endif */ #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after ExpressionParsertext and ExpressionParserleng @@ -5948,12 +5796,9 @@ extern int ExpressionParserlex (void); #define YY_BREAK break; #endif -/* %% [6.0] YY_RULE_SETUP definition goes here */ #define YY_RULE_SETUP \ YY_USER_ACTION -/* %not-for-header */ - /** The main scanner function which does all the work. */ YY_DECL @@ -5962,11 +5807,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -/* %% [7.0] user's declarations go here */ #line 142 "ExpressionParser.l" -#line 5970 "lex.ExpressionParser.c" +#line 5814 "lex.ExpressionParser.c" if ( !(yy_init) ) { @@ -5980,18 +5824,10 @@ YY_DECL (yy_start) = 1; /* first start state */ if ( ! ExpressionParserin ) -/* %if-c-only */ ExpressionParserin = stdin; -/* %endif */ -/* %if-c++-only */ -/* %endif */ if ( ! ExpressionParserout ) -/* %if-c-only */ ExpressionParserout = stdout; -/* %endif */ -/* %if-c++-only */ -/* %endif */ if ( ! YY_CURRENT_BUFFER ) { ExpressionParserensure_buffer_stack (); @@ -6004,7 +5840,6 @@ YY_DECL while ( 1 ) /* loops until end-of-file is reached */ { -/* %% [8.0] yymore()-related code goes here */ yy_cp = (yy_c_buf_p); /* Support of ExpressionParsertext. */ @@ -6015,7 +5850,6 @@ YY_DECL */ yy_bp = yy_cp; -/* %% [9.0] code to set up and find next match goes here */ yy_current_state = (yy_start); yy_match: do @@ -6040,35 +5874,14 @@ yy_match: yy_current_state = (yy_last_accepting_state); yy_find_action: -/* %% [10.0] code to find the action number goes here */ yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; -/* %% [11.0] code for ExpressionParserlineno update goes here */ - do_action: /* This label is used only to access EOF actions. */ -/* %% [12.0] debug code goes here */ - if ( ExpressionParser_flex_debug ) - { - if ( yy_act == 0 ) - fprintf( stderr, "--scanner backing up\n" ); - else if ( yy_act < 91 ) - fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n", - (long)yy_rule_linenum[yy_act], ExpressionParsertext ); - else if ( yy_act == 91 ) - fprintf( stderr, "--accepting default rule (\"%s\")\n", - ExpressionParsertext ); - else if ( yy_act == 92 ) - fprintf( stderr, "--(end of buffer or a NUL)\n" ); - else - fprintf( stderr, "--EOF (start condition %d)\n", YY_START ); - } - switch ( yy_act ) { /* beginning of action switch */ -/* %% [13.0] actions go here */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); @@ -6546,7 +6359,7 @@ YY_RULE_SETUP #line 276 "ExpressionParser.l" ECHO; YY_BREAK -#line 6550 "lex.ExpressionParser.c" +#line 6363 "lex.ExpressionParser.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -6613,7 +6426,6 @@ case YY_STATE_EOF(INITIAL): else { -/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; @@ -6680,14 +6492,6 @@ case YY_STATE_EOF(INITIAL): } /* end of action switch */ } /* end of scanning one token */ } /* end of ExpressionParserlex */ -/* %ok-for-header */ - -/* %if-c++-only */ -/* %not-for-header */ - -/* %ok-for-header */ - -/* %endif */ /* yy_get_next_buffer - try to read in a new buffer * @@ -6696,11 +6500,7 @@ case YY_STATE_EOF(INITIAL): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ -/* %if-c-only */ static int yy_get_next_buffer (void) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); @@ -6834,23 +6634,15 @@ static int yy_get_next_buffer (void) /* yy_get_previous_state - get the state just before the EOB char was reached */ -/* %if-c-only */ -/* %not-for-header */ - static yy_state_type yy_get_previous_state (void) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { register yy_state_type yy_current_state; register char *yy_cp; -/* %% [15.0] code to get the start state into yy_current_state goes here */ yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { -/* %% [16.0] code to find the next state goes here */ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { @@ -6874,15 +6666,10 @@ static int yy_get_next_buffer (void) * synopsis * next_state = yy_try_NUL_trans( current_state ); */ -/* %if-c-only */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { register int yy_is_jam; - /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ - register char *yy_cp = (yy_c_buf_p); + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) @@ -6902,11 +6689,6 @@ static int yy_get_next_buffer (void) return yy_is_jam ? 0 : yy_current_state; } -/* %if-c-only */ - -/* %endif */ - -/* %if-c-only */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -6914,9 +6696,6 @@ static int yy_get_next_buffer (void) static int input (void) #endif -/* %endif */ -/* %if-c++-only */ -/* %endif */ { int c; @@ -6980,24 +6759,16 @@ static int yy_get_next_buffer (void) *(yy_c_buf_p) = '\0'; /* preserve ExpressionParsertext */ (yy_hold_char) = *++(yy_c_buf_p); -/* %% [19.0] update BOL and ExpressionParserlineno */ - return c; } -/* %if-c-only */ #endif /* ifndef YY_NO_INPUT */ -/* %endif */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ -/* %if-c-only */ void ExpressionParserrestart (FILE * input_file ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { if ( ! YY_CURRENT_BUFFER ){ @@ -7014,11 +6785,7 @@ static int yy_get_next_buffer (void) * @param new_buffer The new input buffer. * */ -/* %if-c-only */ void ExpressionParser_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { /* TODO. We should be able to replace this entire function body @@ -7049,11 +6816,7 @@ static int yy_get_next_buffer (void) (yy_did_buffer_switch_on_eof) = 1; } -/* %if-c-only */ static void ExpressionParser_load_buffer_state (void) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; @@ -7067,11 +6830,7 @@ static void ExpressionParser_load_buffer_state (void) * * @return the allocated buffer state. */ -/* %if-c-only */ YY_BUFFER_STATE ExpressionParser_create_buffer (FILE * file, int size ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { YY_BUFFER_STATE b; @@ -7099,11 +6858,7 @@ static void ExpressionParser_load_buffer_state (void) * @param b a buffer created with ExpressionParser_create_buffer() * */ -/* %if-c-only */ void ExpressionParser_delete_buffer (YY_BUFFER_STATE b ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { if ( ! b ) @@ -7118,22 +6873,11 @@ static void ExpressionParser_load_buffer_state (void) ExpressionParserfree((void *) b ); } -/* %if-c-only */ - -/* %endif */ - -/* %if-c++-only */ -/* %endif */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a ExpressionParserrestart() or at EOF. */ -/* %if-c-only */ static void ExpressionParser_init_buffer (YY_BUFFER_STATE b, FILE * file ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { int oerrno = errno; @@ -7152,13 +6896,8 @@ static void ExpressionParser_load_buffer_state (void) b->yy_bs_column = 0; } -/* %if-c-only */ - b->yy_is_interactive = 0; -/* %endif */ -/* %if-c++-only */ -/* %endif */ errno = oerrno; } @@ -7166,11 +6905,7 @@ static void ExpressionParser_load_buffer_state (void) * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ -/* %if-c-only */ void ExpressionParser_flush_buffer (YY_BUFFER_STATE b ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { if ( ! b ) return; @@ -7193,18 +6928,13 @@ static void ExpressionParser_load_buffer_state (void) ExpressionParser_load_buffer_state( ); } -/* %if-c-or-c++ */ /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ -/* %if-c-only */ void ExpressionParserpush_buffer_state (YY_BUFFER_STATE new_buffer ) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { if (new_buffer == NULL) return; @@ -7229,18 +6959,12 @@ void ExpressionParserpush_buffer_state (YY_BUFFER_STATE new_buffer ) ExpressionParser_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } -/* %endif */ -/* %if-c-or-c++ */ /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ -/* %if-c-only */ void ExpressionParserpop_buffer_state (void) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { if (!YY_CURRENT_BUFFER) return; @@ -7255,17 +6979,11 @@ void ExpressionParserpop_buffer_state (void) (yy_did_buffer_switch_on_eof) = 1; } } -/* %endif */ -/* %if-c-or-c++ */ /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ -/* %if-c-only */ static void ExpressionParserensure_buffer_stack (void) -/* %endif */ -/* %if-c++-only */ -/* %endif */ { int num_to_alloc; @@ -7307,9 +7025,7 @@ static void ExpressionParserensure_buffer_stack (void) (yy_buffer_stack_max) = num_to_alloc; } } -/* %endif */ -/* %if-c-only */ /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer @@ -7344,9 +7060,7 @@ YY_BUFFER_STATE ExpressionParser_scan_buffer (char * base, yy_size_t size ) return b; } -/* %endif */ -/* %if-c-only */ /** Setup the input buffer state to scan a string. The next call to ExpressionParserlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan @@ -7360,9 +7074,7 @@ YY_BUFFER_STATE ExpressionParser_scan_string (yyconst char * yystr ) return ExpressionParser_scan_bytes(yystr,strlen(yystr) ); } -/* %endif */ -/* %if-c-only */ /** Setup the input buffer state to scan the given bytes. The next call to ExpressionParserlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan @@ -7399,21 +7111,16 @@ YY_BUFFER_STATE ExpressionParser_scan_bytes (yyconst char * yybytes, int _yyby return b; } -/* %endif */ #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif -/* %if-c-only */ static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } -/* %endif */ -/* %if-c++-only */ -/* %endif */ /* Redefine yyless() so it works in section 3 code. */ @@ -7434,10 +7141,6 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ -/* %if-c-only */ -/* %if-reentrant */ -/* %endif */ - /** Get the current line number. * */ @@ -7480,9 +7183,6 @@ char *ExpressionParserget_text (void) return ExpressionParsertext; } -/* %if-reentrant */ -/* %endif */ - /** Set the current line number. * @param line_number * @@ -7519,14 +7219,6 @@ void ExpressionParserset_debug (int bdebug ) ExpressionParser_flex_debug = bdebug ; } -/* %endif */ - -/* %if-reentrant */ -/* %if-bison-bridge */ -/* %endif */ -/* %endif if-c-only */ - -/* %if-c-only */ static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. @@ -7554,9 +7246,7 @@ static int yy_init_globals (void) */ return 0; } -/* %endif */ -/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */ /* ExpressionParserlex_destroy is for both reentrant and non-reentrant scanners. */ int ExpressionParserlex_destroy (void) { @@ -7576,11 +7266,8 @@ int ExpressionParserlex_destroy (void) * ExpressionParserlex() is called, initialization will occur. */ yy_init_globals( ); -/* %if-reentrant */ -/* %endif */ return 0; } -/* %endif */ /* * Internal utility routines. @@ -7628,11 +7315,6 @@ void ExpressionParserfree (void * ptr ) free( (char *) ptr ); /* see ExpressionParserrealloc() for (char *) cast */ } -/* %if-tables-serialization definitions */ -/* %define-yytables The name for this specific scanner's tables. */ #define YYTABLES_NAME "yytables" -/* %endif */ - -/* %ok-for-header */ #line 276 "ExpressionParser.l"