diff --git a/src/main/gram.c b/src/main/gram.c index 4bfc6a91011..27107df2f38 100644 --- a/src/main/gram.c +++ b/src/main/gram.c @@ -1,13 +1,14 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 2.3. */ -/* Bison implementation for Yacc-like parsers in C +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify + 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. + the Free Software Foundation; either version 2, or (at your option) + any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,7 +16,9 @@ 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 . */ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -44,7 +47,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "2.3" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -52,11 +55,124 @@ /* Pure parsers. */ #define YYPURE 0 -/* Push parsers. */ -#define YYPUSH 0 +/* Using locations. */ +#define YYLSP_NEEDED 1 -/* Pull parsers. */ -#define YYPULL 1 + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + END_OF_INPUT = 258, + ERROR = 259, + STR_CONST = 260, + NUM_CONST = 261, + NULL_CONST = 262, + SYMBOL = 263, + FUNCTION = 264, + INCOMPLETE_STRING = 265, + LEFT_ASSIGN = 266, + EQ_ASSIGN = 267, + RIGHT_ASSIGN = 268, + LBB = 269, + FOR = 270, + IN = 271, + IF = 272, + ELSE = 273, + WHILE = 274, + NEXT = 275, + BREAK = 276, + REPEAT = 277, + GT = 278, + GE = 279, + LT = 280, + LE = 281, + EQ = 282, + NE = 283, + AND = 284, + OR = 285, + AND2 = 286, + OR2 = 287, + NS_GET = 288, + NS_GET_INT = 289, + COMMENT = 290, + LINE_DIRECTIVE = 291, + SYMBOL_FORMALS = 292, + EQ_FORMALS = 293, + EQ_SUB = 294, + SYMBOL_SUB = 295, + SYMBOL_FUNCTION_CALL = 296, + SYMBOL_PACKAGE = 297, + SLOT = 298, + PIPE = 299, + PIPE_ASSIGN = 300, + PLACEHOLDER = 301, + PIPEBIND = 302, + LOW = 303, + TILDE = 304, + NOT = 305, + UNOT = 306, + SPECIAL = 307, + UPLUS = 308, + UMINUS = 309 + }; +#endif +/* Tokens. */ +#define END_OF_INPUT 258 +#define ERROR 259 +#define STR_CONST 260 +#define NUM_CONST 261 +#define NULL_CONST 262 +#define SYMBOL 263 +#define FUNCTION 264 +#define INCOMPLETE_STRING 265 +#define LEFT_ASSIGN 266 +#define EQ_ASSIGN 267 +#define RIGHT_ASSIGN 268 +#define LBB 269 +#define FOR 270 +#define IN 271 +#define IF 272 +#define ELSE 273 +#define WHILE 274 +#define NEXT 275 +#define BREAK 276 +#define REPEAT 277 +#define GT 278 +#define GE 279 +#define LT 280 +#define LE 281 +#define EQ 282 +#define NE 283 +#define AND 284 +#define OR 285 +#define AND2 286 +#define OR2 287 +#define NS_GET 288 +#define NS_GET_INT 289 +#define COMMENT 290 +#define LINE_DIRECTIVE 291 +#define SYMBOL_FORMALS 292 +#define EQ_FORMALS 293 +#define EQ_SUB 294 +#define SYMBOL_SUB 295 +#define SYMBOL_FUNCTION_CALL 296 +#define SYMBOL_PACKAGE 297 +#define SLOT 298 +#define PIPE 299 +#define PIPE_ASSIGN 300 +#define PLACEHOLDER 301 +#define PIPEBIND 302 +#define LOW 303 +#define TILDE 304 +#define NOT 305 +#define UNOT 306 +#define SPECIAL 307 +#define UPLUS 308 +#define UMINUS 309 @@ -446,6 +562,7 @@ static SEXP xxrepeat(SEXP, SEXP); static SEXP xxnxtbrk(SEXP); static SEXP xxfuncall(SEXP, SEXP); static SEXP xxdefun(SEXP, SEXP, SEXP, YYLTYPE *); +static SEXP xxpipeassign(SEXP, SEXP, YYLTYPE *); static SEXP xxpipe(SEXP, SEXP, YYLTYPE *); static SEXP xxpipebind(SEXP, SEXP, SEXP, YYLTYPE *); static SEXP xxunary(SEXP, SEXP); @@ -459,14 +576,10 @@ static int xxvalue(SEXP, int, YYLTYPE *); - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -476,157 +589,37 @@ static int xxvalue(SEXP, int, YYLTYPE *); # define YYERROR_VERBOSE 0 #endif - -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 1 #endif -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - END_OF_INPUT = 258, - ERROR = 259, - STR_CONST = 260, - NUM_CONST = 261, - NULL_CONST = 262, - SYMBOL = 263, - FUNCTION = 264, - INCOMPLETE_STRING = 265, - LEFT_ASSIGN = 266, - EQ_ASSIGN = 267, - RIGHT_ASSIGN = 268, - LBB = 269, - FOR = 270, - IN = 271, - IF = 272, - ELSE = 273, - WHILE = 274, - NEXT = 275, - BREAK = 276, - REPEAT = 277, - GT = 278, - GE = 279, - LT = 280, - LE = 281, - EQ = 282, - NE = 283, - AND = 284, - OR = 285, - AND2 = 286, - OR2 = 287, - NS_GET = 288, - NS_GET_INT = 289, - COMMENT = 290, - LINE_DIRECTIVE = 291, - SYMBOL_FORMALS = 292, - EQ_FORMALS = 293, - EQ_SUB = 294, - SYMBOL_SUB = 295, - SYMBOL_FUNCTION_CALL = 296, - SYMBOL_PACKAGE = 297, - SLOT = 298, - PIPE = 299, - PLACEHOLDER = 300, - PIPEBIND = 301, - LOW = 302, - TILDE = 303, - UNOT = 304, - NOT = 305, - SPECIAL = 306, - UMINUS = 307, - UPLUS = 308 - }; -#endif -/* Tokens. */ -#define END_OF_INPUT 258 -#define ERROR 259 -#define STR_CONST 260 -#define NUM_CONST 261 -#define NULL_CONST 262 -#define SYMBOL 263 -#define FUNCTION 264 -#define INCOMPLETE_STRING 265 -#define LEFT_ASSIGN 266 -#define EQ_ASSIGN 267 -#define RIGHT_ASSIGN 268 -#define LBB 269 -#define FOR 270 -#define IN 271 -#define IF 272 -#define ELSE 273 -#define WHILE 274 -#define NEXT 275 -#define BREAK 276 -#define REPEAT 277 -#define GT 278 -#define GE 279 -#define LT 280 -#define LE 281 -#define EQ 282 -#define NE 283 -#define AND 284 -#define OR 285 -#define AND2 286 -#define OR2 287 -#define NS_GET 288 -#define NS_GET_INT 289 -#define COMMENT 290 -#define LINE_DIRECTIVE 291 -#define SYMBOL_FORMALS 292 -#define EQ_FORMALS 293 -#define EQ_SUB 294 -#define SYMBOL_SUB 295 -#define SYMBOL_FUNCTION_CALL 296 -#define SYMBOL_PACKAGE 297 -#define SLOT 298 -#define PIPE 299 -#define PLACEHOLDER 300 -#define PIPEBIND 301 -#define LOW 302 -#define TILDE 303 -#define UNOT 304 -#define NOT 305 -#define SPECIAL 306 -#define UMINUS 307 -#define UPLUS 308 - -/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE YYLTYPE; -struct YYLTYPE +typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -}; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif -extern YYSTYPE yylval; -extern YYLTYPE yylloc; -int yyparse (void); - - - /* Copy the second part of user declarations. */ +/* Line 216 of yacc.c. */ + #ifdef short # undef short @@ -640,8 +633,11 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#else +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; +#else +typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -661,7 +657,8 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -675,68 +672,39 @@ 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 -# 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__)) +# define YY_(msgid) msgid # 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 -#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") +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) #else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; #endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ +{ + return i; +} #endif - #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -754,11 +722,11 @@ typedef short int yytype_int16; # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -766,8 +734,8 @@ typedef short int yytype_int16; # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -781,23 +749,25 @@ typedef short int yytype_int16; # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((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 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -807,15 +777,15 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; + yytype_int16 yyss; + YYSTYPE yyvs; + YYLTYPE yyls; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -827,85 +797,79 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# 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 */ - /* YYFINAL -- State number of the termination state. */ #define YYFINAL 48 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 572 +#define YYLAST 583 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 75 +#define YYNTOKENS 76 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 13 /* YYNRULES -- Number of rules. */ -#define YYNRULES 94 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 174 +#define YYNRULES 95 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 176 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 308 +#define YYMAXUTOK 309 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 67, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 71, 2, 2, 62, 2, 2, 2, - 64, 70, 55, 53, 74, 54, 2, 56, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 58, 67, - 2, 2, 2, 47, 63, 2, 2, 2, 2, 2, + 2, 2, 2, 72, 2, 2, 63, 2, 2, 2, + 65, 71, 56, 54, 75, 55, 2, 57, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 59, 68, + 2, 2, 2, 48, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 65, 72, 73, 61, 2, 2, 2, 2, 2, + 2, 66, 73, 74, 62, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 68, 2, 69, 49, 2, 2, 2, + 2, 2, 2, 69, 2, 70, 50, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -923,27 +887,82 @@ static const yytype_uint8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 48, 50, 51, 52, 57, 59, 60 + 45, 46, 47, 49, 51, 52, 53, 58, 60, 61 }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 13, 15, 17, 21, + 25, 27, 31, 33, 35, 37, 39, 41, 45, 49, + 52, 55, 58, 61, 64, 68, 72, 76, 80, 84, + 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, + 128, 132, 136, 140, 144, 148, 152, 156, 163, 170, + 175, 179, 185, 189, 193, 196, 202, 207, 211, 215, + 219, 223, 227, 231, 235, 239, 243, 247, 251, 255, + 257, 259, 263, 267, 273, 274, 276, 280, 283, 287, + 290, 292, 297, 298, 300, 303, 307, 310, 314, 317, + 321, 322, 324, 328, 332, 338 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 77, 0, -1, 3, -1, 67, -1, 78, 67, -1, + 78, 68, -1, 1, -1, 80, -1, 78, 12, 78, + -1, 78, 48, 78, -1, 80, -1, 79, 48, 79, + -1, 6, -1, 5, -1, 7, -1, 46, -1, 8, + -1, 69, 84, 70, -1, 65, 78, 71, -1, 55, + 80, -1, 54, 80, -1, 72, 80, -1, 50, 80, + -1, 48, 78, -1, 80, 59, 80, -1, 80, 54, + 80, -1, 80, 55, 80, -1, 80, 56, 80, -1, + 80, 57, 80, -1, 80, 62, 80, -1, 80, 58, + 80, -1, 80, 50, 80, -1, 80, 25, 80, -1, + 80, 26, 80, -1, 80, 27, 80, -1, 80, 28, + 80, -1, 80, 24, 80, -1, 80, 23, 80, -1, + 80, 29, 80, -1, 80, 30, 80, -1, 80, 31, + 80, -1, 80, 32, 80, -1, 80, 44, 80, -1, + 80, 47, 80, -1, 80, 45, 80, -1, 80, 11, + 80, -1, 80, 13, 80, -1, 9, 65, 87, 71, + 88, 78, -1, 73, 65, 87, 71, 88, 78, -1, + 80, 65, 85, 71, -1, 17, 82, 78, -1, 17, + 82, 78, 18, 78, -1, 15, 83, 78, -1, 19, + 81, 78, -1, 22, 78, -1, 80, 14, 85, 74, + 74, -1, 80, 66, 85, 74, -1, 8, 33, 8, + -1, 8, 33, 5, -1, 5, 33, 8, -1, 5, + 33, 5, -1, 8, 34, 8, -1, 8, 34, 5, + -1, 5, 34, 8, -1, 5, 34, 5, -1, 80, + 63, 8, -1, 80, 63, 5, -1, 80, 64, 8, + -1, 80, 64, 5, -1, 20, -1, 21, -1, 65, + 79, 71, -1, 65, 79, 71, -1, 65, 8, 16, + 79, 71, -1, -1, 78, -1, 84, 68, 78, -1, + 84, 68, -1, 84, 67, 78, -1, 84, 67, -1, + 86, -1, 85, 88, 75, 86, -1, -1, 79, -1, + 8, 12, -1, 8, 12, 79, -1, 5, 12, -1, + 5, 12, 79, -1, 7, 12, -1, 7, 12, 79, + -1, -1, 8, -1, 8, 12, 79, -1, 87, 75, + 8, -1, 87, 75, 8, 12, 79, -1, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 444, 444, 445, 446, 447, 448, 451, 452, 453, - 456, 457, 460, 461, 462, 463, 464, 466, 467, 469, - 470, 471, 472, 473, 475, 476, 477, 478, 479, 480, - 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, - 491, 492, 493, 494, 495, 496, 497, 499, 500, 501, - 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, - 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, - 525, 528, 531, 535, 536, 537, 538, 539, 540, 543, - 544, 547, 548, 549, 550, 551, 552, 553, 554, 557, - 558, 559, 560, 561, 565 + 0, 447, 447, 448, 449, 450, 451, 454, 455, 456, + 459, 460, 463, 464, 465, 466, 467, 469, 470, 472, + 473, 474, 475, 476, 478, 479, 480, 481, 482, 483, + 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, + 494, 495, 496, 497, 498, 499, 500, 501, 503, 504, + 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, + 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, + 525, 529, 532, 535, 539, 540, 541, 542, 543, 544, + 547, 548, 551, 552, 553, 554, 555, 556, 557, 558, + 561, 562, 563, 564, 565, 569 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 1 +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -954,362 +973,346 @@ static const char *const yytname[] = "ELSE", "WHILE", "NEXT", "BREAK", "REPEAT", "GT", "GE", "LT", "LE", "EQ", "NE", "AND", "OR", "AND2", "OR2", "NS_GET", "NS_GET_INT", "COMMENT", "LINE_DIRECTIVE", "SYMBOL_FORMALS", "EQ_FORMALS", "EQ_SUB", "SYMBOL_SUB", - "SYMBOL_FUNCTION_CALL", "SYMBOL_PACKAGE", "SLOT", "PIPE", "PLACEHOLDER", - "PIPEBIND", "'?'", "LOW", "'~'", "TILDE", "UNOT", "NOT", "'+'", "'-'", - "'*'", "'/'", "SPECIAL", "':'", "UMINUS", "UPLUS", "'^'", "'$'", "'@'", - "'('", "'['", "'\\n'", "';'", "'{'", "'}'", "')'", "'!'", "'\\\\'", - "']'", "','", "$accept", "prog", "expr_or_assign_or_help", + "SYMBOL_FUNCTION_CALL", "SYMBOL_PACKAGE", "SLOT", "PIPE", "PIPE_ASSIGN", + "PLACEHOLDER", "PIPEBIND", "'?'", "LOW", "'~'", "TILDE", "NOT", "UNOT", + "'+'", "'-'", "'*'", "'/'", "SPECIAL", "':'", "UPLUS", "UMINUS", "'^'", + "'$'", "'@'", "'('", "'['", "'\\n'", "';'", "'{'", "'}'", "')'", "'!'", + "'\\\\'", "']'", "','", "$accept", "prog", "expr_or_assign_or_help", "expr_or_help", "expr", "cond", "ifcond", "forcond", "exprlist", - "sublist", "sub", "formlist", "cr", YY_NULLPTR + "sublist", "sub", "formlist", "cr", 0 }; #endif # ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 63, 302, 126, - 303, 304, 305, 43, 45, 42, 47, 306, 58, 307, - 308, 94, 36, 64, 40, 91, 10, 59, 123, 125, - 41, 33, 92, 93, 44 + 295, 296, 297, 298, 299, 300, 301, 302, 63, 303, + 126, 304, 305, 306, 43, 45, 42, 47, 307, 58, + 308, 309, 94, 36, 64, 40, 91, 10, 59, 123, + 125, 41, 33, 92, 93, 44 }; # endif -#define YYPACT_NINF -130 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-130))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-1))) +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 76, 77, 77, 77, 77, 77, 78, 78, 78, + 79, 79, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 81, 82, 83, 84, 84, 84, 84, 84, 84, + 85, 85, 86, 86, 86, 86, 86, 86, 86, 86, + 87, 87, 87, 87, 87, 88 +}; - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = { - 139, -130, -130, -11, -130, -130, 2, -49, 10, 27, - 29, -130, -130, 209, -130, 209, 209, 209, 209, 209, - -130, 209, 209, 30, 95, 14, 281, 16, 70, 71, - 77, 88, 89, 209, 209, 209, 209, 209, 86, 86, - 371, 225, 225, 13, 18, -53, 440, 88, -130, 209, - 209, -130, -130, 209, 209, 229, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 82, 84, 229, 229, - -130, -130, -130, -130, -130, -130, -130, -130, 87, -3, - 90, 86, -43, 281, -1, -39, 86, -130, 209, 209, - -130, 3, 86, 86, 281, 326, -5, 91, 0, 55, - 31, -130, 485, 485, 485, 485, 485, 485, 440, 416, - 440, 416, 206, 107, 371, 118, 118, 507, 507, 206, - 225, 225, -130, -130, -130, -130, 35, 36, 209, -130, - 100, 209, 209, -130, 209, -130, 18, 18, -130, 209, - 209, 209, 39, 40, -130, -130, 55, 209, 101, -38, - -130, 86, 209, 55, 55, 55, -130, 229, 86, 209, - -130, 86, -130, 55 + 0, 2, 1, 1, 2, 2, 1, 1, 3, 3, + 1, 3, 1, 1, 1, 1, 1, 3, 3, 2, + 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 6, 6, 4, + 3, 5, 3, 3, 2, 5, 4, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, + 1, 3, 3, 5, 0, 1, 3, 2, 3, 2, + 1, 4, 0, 1, 2, 3, 2, 3, 2, 3, + 0, 1, 3, 3, 5, 0 }; - /* 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. */ +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 6, 2, 13, 12, 14, 16, 0, 0, 0, - 0, 68, 69, 0, 15, 0, 0, 0, 0, 0, - 3, 73, 0, 0, 0, 0, 7, 0, 0, 0, - 0, 89, 0, 0, 0, 0, 0, 0, 53, 23, - 22, 20, 19, 0, 74, 0, 21, 89, 1, 0, - 0, 4, 5, 0, 0, 81, 0, 0, 0, 0, + 0, 69, 70, 0, 15, 0, 0, 0, 0, 0, + 3, 74, 0, 0, 0, 0, 7, 0, 0, 0, + 0, 90, 0, 0, 0, 0, 0, 0, 54, 23, + 22, 20, 19, 0, 75, 0, 21, 90, 1, 0, + 0, 4, 5, 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 81, 81, - 59, 58, 63, 62, 57, 56, 61, 60, 90, 0, - 0, 51, 0, 10, 49, 0, 52, 18, 78, 76, - 17, 0, 8, 9, 44, 45, 13, 14, 16, 82, - 94, 79, 37, 36, 32, 33, 34, 35, 38, 39, - 40, 41, 42, 43, 31, 25, 26, 27, 28, 30, - 24, 29, 65, 64, 67, 66, 94, 94, 0, 94, - 0, 0, 0, 71, 0, 70, 77, 75, 94, 85, - 87, 83, 0, 0, 48, 55, 91, 0, 92, 0, - 11, 50, 0, 86, 88, 84, 54, 81, 46, 0, - 72, 47, 80, 93 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, + 82, 60, 59, 64, 63, 58, 57, 62, 61, 91, + 0, 0, 52, 0, 10, 50, 0, 53, 18, 79, + 77, 17, 0, 8, 9, 45, 46, 13, 14, 16, + 83, 95, 80, 37, 36, 32, 33, 34, 35, 38, + 39, 40, 41, 42, 44, 43, 31, 25, 26, 27, + 28, 30, 24, 29, 66, 65, 68, 67, 95, 95, + 0, 95, 0, 0, 0, 72, 0, 71, 78, 76, + 95, 86, 88, 84, 0, 0, 49, 56, 92, 0, + 93, 0, 11, 51, 0, 87, 89, 85, 55, 82, + 47, 0, 73, 48, 81, 94 }; - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = { - -130, -130, 51, -31, -16, -130, -130, -130, -130, -10, - -52, 69, -129 + -1, 24, 25, 110, 26, 37, 35, 33, 45, 111, + 112, 90, 155 }; - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -132 +static const yytype_int16 yypact[] = { - -1, 24, 25, 109, 26, 37, 35, 33, 45, 110, - 111, 89, 153 + 141, -132, -132, -11, -132, -132, 2, -50, 10, 27, + 29, -132, -132, 212, -132, 212, 212, 212, 212, 212, + -132, 212, 212, 30, 96, 14, 285, 16, 71, 72, + 78, 89, 90, 212, 212, 212, 212, 212, 87, 87, + 377, 180, 180, 13, 18, -54, 448, 89, -132, 212, + 212, -132, -132, 212, 212, 232, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 212, 212, 212, 212, 212, 83, 85, 232, + 232, -132, -132, -132, -132, -132, -132, -132, -132, 88, + -3, 91, 87, -44, 285, -1, -40, 87, -132, 212, + 212, -132, 3, 87, 87, 285, 331, -5, 92, 0, + 55, 31, -132, 494, 494, 494, 494, 494, 494, 448, + 423, 448, 423, 209, 331, 109, 377, 120, 120, 517, + 517, 209, 180, 180, -132, -132, -132, -132, 35, 34, + 212, -132, 102, 212, 212, -132, 212, -132, 18, 18, + -132, 212, 212, 212, 37, 39, -132, -132, 55, 212, + 103, -39, -132, 87, 212, 55, 55, 55, -132, 232, + 87, 212, -132, 87, -132, 55 }; - /* 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. */ +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -132, -132, 52, -31, -16, -132, -132, -132, -132, -10, + -53, 70, -131 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 static const yytype_int16 yytable[] = { - 40, 41, 42, 92, 142, 95, 46, 149, 142, 142, - 157, 49, 151, 98, 99, 31, 100, 144, 93, 162, - 93, 80, 27, 28, 81, 49, 49, 143, 27, 28, - 49, 145, 170, 29, 30, 29, 30, 104, 105, 93, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 50, 50, 93, 93, 38, 50, 39, 139, 136, 137, - 43, 140, 44, 148, 32, 82, 84, 140, 83, 85, - 51, 52, 86, 97, 91, 87, 94, 132, 96, 134, - 133, 34, 135, 36, 47, 48, 88, 90, 49, 138, - 102, 103, 142, 150, 152, 154, 141, 156, 158, 155, - 159, 160, 166, 169, 167, 172, 101, 0, 163, 164, - 165, 55, 93, 0, 0, 93, 93, 0, 0, 0, - 0, 0, 55, 93, 93, 93, 0, 0, 173, 0, - 1, 0, 2, 0, 3, 4, 5, 6, 7, 146, - 147, 93, 0, 93, 8, 0, 9, 0, 10, 11, - 12, 13, 66, 0, 67, 74, 0, 0, 75, 76, - 77, 78, 79, 71, 72, 73, 74, 0, 0, 75, - 76, 77, 78, 79, 14, 0, 15, 0, 16, 0, - 0, 0, 17, 18, 0, 161, 0, 0, 0, 0, - 0, 0, 0, 19, 0, 20, 0, 21, 168, 0, - 22, 23, 0, 171, 3, 4, 5, 6, 7, 0, - 55, 0, 0, 0, 8, 0, 9, 0, 10, 11, - 12, 13, 0, 0, 106, 4, 107, 108, 7, 55, - 0, 0, 0, 0, 8, 0, 9, 0, 10, 11, - 12, 13, 67, 0, 14, 0, 15, 0, 16, 0, - 0, 0, 17, 18, 74, 0, 0, 75, 76, 77, - 78, 79, 0, 19, 14, 0, 15, 21, 16, 0, - 22, 23, 17, 18, 0, 0, 75, 76, 77, 78, - 79, 0, 53, 19, 54, 55, 0, 21, 0, 0, - 22, 23, 0, 0, 56, 57, 58, 59, 60, 61, + 40, 41, 42, 93, 144, 96, 46, 151, 144, 144, + 159, 49, 153, 99, 100, 31, 101, 146, 94, 164, + 94, 81, 27, 28, 82, 49, 49, 145, 27, 28, + 49, 147, 172, 29, 30, 29, 30, 105, 106, 94, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 50, 50, 94, 94, 38, 50, 39, 141, 138, + 139, 43, 142, 44, 150, 32, 83, 85, 142, 84, + 86, 51, 52, 87, 98, 92, 88, 95, 134, 97, + 136, 135, 34, 137, 36, 47, 48, 89, 91, 49, + 140, 103, 104, 144, 152, 154, 156, 143, 157, 158, + 160, 168, 161, 162, 169, 171, 174, 102, 0, 0, + 165, 166, 167, 55, 94, 0, 0, 94, 94, 0, + 0, 0, 0, 0, 55, 94, 94, 94, 0, 0, + 175, 0, 1, 0, 2, 0, 3, 4, 5, 6, + 7, 148, 149, 94, 0, 94, 8, 0, 9, 0, + 10, 11, 12, 13, 66, 0, 0, 68, 75, 0, + 0, 76, 77, 78, 79, 80, 72, 73, 74, 75, + 0, 0, 76, 77, 78, 79, 80, 14, 0, 15, + 0, 16, 0, 0, 55, 17, 18, 0, 163, 0, + 0, 0, 0, 0, 0, 0, 19, 0, 20, 0, + 21, 170, 0, 22, 23, 0, 173, 3, 4, 5, + 6, 7, 0, 55, 0, 0, 0, 8, 0, 9, + 0, 10, 11, 12, 13, 0, 0, 107, 4, 108, + 109, 7, 76, 77, 78, 79, 80, 8, 0, 9, + 0, 10, 11, 12, 13, 0, 68, 0, 14, 0, + 15, 0, 16, 0, 0, 0, 17, 18, 75, 0, + 0, 76, 77, 78, 79, 80, 0, 19, 14, 0, + 15, 21, 16, 0, 22, 23, 17, 18, 0, 0, + 0, 0, 0, 0, 0, 0, 53, 19, 54, 55, + 0, 21, 0, 0, 22, 23, 0, 0, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, + 67, 0, 68, 0, 0, 69, 0, 0, 0, 70, + 71, 72, 73, 74, 75, 55, 0, 76, 77, 78, + 79, 80, 0, 0, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66, 0, 67, 0, 0, - 68, 0, 0, 0, 69, 70, 71, 72, 73, 74, - 55, 0, 75, 76, 77, 78, 79, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, + 0, 0, 0, 0, 0, 66, 67, 0, 68, 0, + 0, 69, 0, 0, 0, 70, 71, 72, 73, 74, + 75, 55, 0, 76, 77, 78, 79, 80, 0, 0, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 66, 0, 67, 0, 0, 68, 0, 0, 0, 69, - 70, 71, 72, 73, 74, 55, 0, 75, 76, 77, - 78, 79, 0, 0, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66, 0, 67, 0, 0, - 0, 0, 0, 0, 69, 70, 71, 72, 73, 74, - 55, 0, 75, 76, 77, 78, 79, 0, 0, 56, - 57, 58, 59, 60, 61, 62, 0, 64, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 66, 0, 67, 56, 57, 58, 59, 60, 61, 69, - 70, 71, 72, 73, 74, 0, 0, 75, 76, 77, - 78, 79, 0, 0, 66, 0, 67, 0, 0, 0, - 0, 0, 0, 69, 70, 71, 72, 73, 74, 55, - 0, 75, 76, 77, 78, 79, 0, 0, -1, -1, - -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, - 0, 55, 0, 0, 0, 0, 0, 0, 0, 66, - 0, 67, 0, 0, 0, 0, 0, 0, 69, 70, - 71, 72, 73, 74, 0, 0, 75, 76, 77, 78, - 79, 66, 0, 67, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 73, 74, 0, 0, 75, 76, - 77, 78, 79 + 0, 66, 0, 0, 68, 0, 0, 0, 0, 0, + 0, 70, 71, 72, 73, 74, 75, 55, 0, 76, + 77, 78, 79, 80, 0, 0, 56, 57, 58, 59, + 60, 61, 62, 0, 64, 0, 0, 0, 0, 0, + 0, 0, 55, 0, 0, 0, 0, 66, 0, 0, + 68, 56, 57, 58, 59, 60, 61, 70, 71, 72, + 73, 74, 75, 0, 0, 76, 77, 78, 79, 80, + 0, 0, 66, 0, 0, 68, 0, 0, 0, 0, + 0, 0, 70, 71, 72, 73, 74, 75, 55, 0, + 76, 77, 78, 79, 80, 0, 0, -1, -1, -1, + -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 66, 0, + 0, 68, 0, 0, 0, 0, 0, 0, 70, 71, + 72, 73, 74, 75, 0, 0, 76, 77, 78, 79, + 80, 66, 0, 0, 68, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 74, 75, 0, 0, 76, + 77, 78, 79, 80 }; static const yytype_int16 yycheck[] = { - 16, 17, 18, 34, 47, 36, 22, 12, 47, 47, - 139, 12, 12, 66, 67, 64, 69, 18, 34, 148, - 36, 5, 33, 34, 8, 12, 12, 70, 33, 34, - 12, 70, 70, 33, 34, 33, 34, 53, 54, 55, + 16, 17, 18, 34, 48, 36, 22, 12, 48, 48, + 141, 12, 12, 67, 68, 65, 70, 18, 34, 150, + 36, 5, 33, 34, 8, 12, 12, 71, 33, 34, + 12, 71, 71, 33, 34, 33, 34, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 47, 47, 78, 79, 13, 47, 15, 70, 78, 79, - 19, 74, 21, 70, 64, 5, 5, 74, 8, 8, - 66, 67, 5, 70, 33, 8, 35, 5, 37, 5, - 8, 64, 8, 64, 64, 0, 8, 8, 12, 12, - 49, 50, 47, 12, 73, 70, 16, 138, 8, 73, - 141, 142, 73, 12, 74, 167, 47, -1, 149, 150, - 151, 14, 138, -1, -1, 141, 142, -1, -1, -1, - -1, -1, 14, 149, 150, 151, -1, -1, 169, -1, - 1, -1, 3, -1, 5, 6, 7, 8, 9, 98, - 99, 167, -1, 169, 15, -1, 17, -1, 19, 20, - 21, 22, 44, -1, 46, 58, -1, -1, 61, 62, - 63, 64, 65, 55, 56, 57, 58, -1, -1, 61, - 62, 63, 64, 65, 45, -1, 47, -1, 49, -1, - -1, -1, 53, 54, -1, 144, -1, -1, -1, -1, - -1, -1, -1, 64, -1, 66, -1, 68, 157, -1, - 71, 72, -1, 162, 5, 6, 7, 8, 9, -1, - 14, -1, -1, -1, 15, -1, 17, -1, 19, 20, - 21, 22, -1, -1, 5, 6, 7, 8, 9, 14, - -1, -1, -1, -1, 15, -1, 17, -1, 19, 20, - 21, 22, 46, -1, 45, -1, 47, -1, 49, -1, - -1, -1, 53, 54, 58, -1, -1, 61, 62, 63, - 64, 65, -1, 64, 45, -1, 47, 68, 49, -1, - 71, 72, 53, 54, -1, -1, 61, 62, 63, 64, - 65, -1, 11, 64, 13, 14, -1, 68, -1, -1, - 71, 72, -1, -1, 23, 24, 25, 26, 27, 28, + 76, 48, 48, 79, 80, 13, 48, 15, 71, 79, + 80, 19, 75, 21, 71, 65, 5, 5, 75, 8, + 8, 67, 68, 5, 71, 33, 8, 35, 5, 37, + 5, 8, 65, 8, 65, 65, 0, 8, 8, 12, + 12, 49, 50, 48, 12, 74, 71, 16, 74, 140, + 8, 74, 143, 144, 75, 12, 169, 47, -1, -1, + 151, 152, 153, 14, 140, -1, -1, 143, 144, -1, + -1, -1, -1, -1, 14, 151, 152, 153, -1, -1, + 171, -1, 1, -1, 3, -1, 5, 6, 7, 8, + 9, 99, 100, 169, -1, 171, 15, -1, 17, -1, + 19, 20, 21, 22, 44, -1, -1, 47, 59, -1, + -1, 62, 63, 64, 65, 66, 56, 57, 58, 59, + -1, -1, 62, 63, 64, 65, 66, 46, -1, 48, + -1, 50, -1, -1, 14, 54, 55, -1, 146, -1, + -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, + 69, 159, -1, 72, 73, -1, 164, 5, 6, 7, + 8, 9, -1, 14, -1, -1, -1, 15, -1, 17, + -1, 19, 20, 21, 22, -1, -1, 5, 6, 7, + 8, 9, 62, 63, 64, 65, 66, 15, -1, 17, + -1, 19, 20, 21, 22, -1, 47, -1, 46, -1, + 48, -1, 50, -1, -1, -1, 54, 55, 59, -1, + -1, 62, 63, 64, 65, 66, -1, 65, 46, -1, + 48, 69, 50, -1, 72, 73, 54, 55, -1, -1, + -1, -1, -1, -1, -1, -1, 11, 65, 13, 14, + -1, 69, -1, -1, 72, 73, -1, -1, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 44, + 45, -1, 47, -1, -1, 50, -1, -1, -1, 54, + 55, 56, 57, 58, 59, 14, -1, 62, 63, 64, + 65, 66, -1, -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 44, -1, 46, -1, -1, - 49, -1, -1, -1, 53, 54, 55, 56, 57, 58, - 14, -1, 61, 62, 63, 64, 65, -1, -1, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, + -1, -1, -1, -1, -1, 44, 45, -1, 47, -1, + -1, 50, -1, -1, -1, 54, 55, 56, 57, 58, + 59, 14, -1, 62, 63, 64, 65, 66, -1, -1, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 44, -1, 46, -1, -1, 49, -1, -1, -1, 53, - 54, 55, 56, 57, 58, 14, -1, 61, 62, 63, - 64, 65, -1, -1, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 44, -1, 46, -1, -1, - -1, -1, -1, -1, 53, 54, 55, 56, 57, 58, - 14, -1, 61, 62, 63, 64, 65, -1, -1, 23, - 24, 25, 26, 27, 28, 29, -1, 31, -1, -1, - -1, -1, -1, -1, 14, -1, -1, -1, -1, -1, - 44, -1, 46, 23, 24, 25, 26, 27, 28, 53, - 54, 55, 56, 57, 58, -1, -1, 61, 62, 63, - 64, 65, -1, -1, 44, -1, 46, -1, -1, -1, - -1, -1, -1, 53, 54, 55, 56, 57, 58, 14, - -1, 61, 62, 63, 64, 65, -1, -1, 23, 24, - 25, 26, 27, 28, -1, -1, -1, -1, -1, -1, - -1, 14, -1, -1, -1, -1, -1, -1, -1, 44, - -1, 46, -1, -1, -1, -1, -1, -1, 53, 54, - 55, 56, 57, 58, -1, -1, 61, 62, 63, 64, - 65, 44, -1, 46, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 57, 58, -1, -1, 61, 62, - 63, 64, 65 + -1, 44, -1, -1, 47, -1, -1, -1, -1, -1, + -1, 54, 55, 56, 57, 58, 59, 14, -1, 62, + 63, 64, 65, 66, -1, -1, 23, 24, 25, 26, + 27, 28, 29, -1, 31, -1, -1, -1, -1, -1, + -1, -1, 14, -1, -1, -1, -1, 44, -1, -1, + 47, 23, 24, 25, 26, 27, 28, 54, 55, 56, + 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, + -1, -1, 44, -1, -1, 47, -1, -1, -1, -1, + -1, -1, 54, 55, 56, 57, 58, 59, 14, -1, + 62, 63, 64, 65, 66, -1, -1, 23, 24, 25, + 26, 27, 28, -1, -1, -1, -1, -1, -1, -1, + -1, 14, -1, -1, -1, -1, -1, -1, 44, -1, + -1, 47, -1, -1, -1, -1, -1, -1, 54, 55, + 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, + 66, 44, -1, -1, 47, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 58, 59, -1, -1, 62, + 63, 64, 65, 66 }; - /* 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, 1, 3, 5, 6, 7, 8, 9, 15, 17, - 19, 20, 21, 22, 45, 47, 49, 53, 54, 64, - 66, 68, 71, 72, 76, 77, 79, 33, 34, 33, - 34, 64, 64, 82, 64, 81, 64, 80, 77, 77, - 79, 79, 79, 77, 77, 83, 79, 64, 0, 12, - 47, 66, 67, 11, 13, 14, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 44, 46, 49, 53, - 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, - 5, 8, 5, 8, 5, 8, 5, 8, 8, 86, - 8, 77, 78, 79, 77, 78, 77, 70, 66, 67, - 69, 86, 77, 77, 79, 79, 5, 7, 8, 78, - 84, 85, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 5, 8, 5, 8, 84, 84, 12, 70, - 74, 16, 47, 70, 18, 70, 77, 77, 70, 12, - 12, 12, 73, 87, 70, 73, 78, 87, 8, 78, - 78, 77, 87, 78, 78, 78, 73, 74, 77, 12, - 70, 77, 85, 78 + 19, 20, 21, 22, 46, 48, 50, 54, 55, 65, + 67, 69, 72, 73, 77, 78, 80, 33, 34, 33, + 34, 65, 65, 83, 65, 82, 65, 81, 78, 78, + 80, 80, 80, 78, 78, 84, 80, 65, 0, 12, + 48, 67, 68, 11, 13, 14, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 44, 45, 47, 50, + 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, + 66, 5, 8, 5, 8, 5, 8, 5, 8, 8, + 87, 8, 78, 79, 80, 78, 79, 78, 71, 67, + 68, 70, 87, 78, 78, 80, 80, 5, 7, 8, + 79, 85, 86, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 5, 8, 5, 8, 85, 85, + 12, 71, 75, 16, 48, 71, 18, 71, 78, 78, + 71, 12, 12, 12, 74, 88, 71, 74, 79, 88, + 8, 79, 79, 78, 88, 79, 79, 79, 74, 75, + 78, 12, 71, 78, 86, 79 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 75, 76, 76, 76, 76, 76, 77, 77, 77, - 78, 78, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 80, 81, 82, 83, 83, 83, 83, 83, 83, 84, - 84, 85, 85, 85, 85, 85, 85, 85, 85, 86, - 86, 86, 86, 86, 87 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 2, 1, 1, 3, 3, - 1, 3, 1, 1, 1, 1, 1, 3, 3, 2, - 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 6, 6, 4, 3, - 5, 3, 3, 2, 5, 4, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, - 3, 3, 5, 0, 1, 3, 2, 3, 2, 1, - 4, 0, 1, 2, 3, 2, 3, 2, 3, 0, - 1, 3, 3, 5, 0 -}; +#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 yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) + YYERROR; \ + } \ +while (YYID (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 (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) +# 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 -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know @@ -1317,73 +1320,82 @@ do { \ #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -YY_ATTRIBUTE_UNUSED -static unsigned -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -{ - unsigned res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } - return res; - } +/* YYLEX -- calling `yylex' with the right arguments. */ -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf # endif -#endif +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*--------------------------------. +| Print this symbol 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, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif { - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yylocationp); if (!yyvaluep) return; + YYUSE (yylocationp); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); # endif - YYUSE (yytype); + switch (yytype) + { + default: + break; + } } @@ -1391,11 +1403,23 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue | 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, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif { - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -1408,54 +1432,67 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYL | TOP (included). | `------------------------------------------------------------------*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif { YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (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, YYLTYPE *yylsp, int yyrule) +#else static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +yy_reduce_print (yyvsp, yylsp, yyrule) + YYSTYPE *yyvsp; + YYLTYPE *yylsp; + int yyrule; +#endif { - 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, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); - YYFPRINTF (stderr, "\n"); + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); + fprintf (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ -} while (0) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, yylsp, Rule); \ +} while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1469,7 +1506,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1484,6 +1521,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1492,8 +1530,15 @@ 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++) @@ -1509,8 +1554,16 @@ yystrlen (const char *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; @@ -1540,27 +1593,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1571,251 +1624,281 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - 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 - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - 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 - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; - if (*yymsg_alloc < yysize) + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | 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, YYLTYPE *yylocationp) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, yylocationp) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; +#endif { YYUSE (yyvaluep); YYUSE (yylocationp); + if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END + switch (yytype) + { + + default: + break; + } } + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ -/* The lookahead symbol. */ +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; + /* Number of syntax errors so far. */ int yynerrs; +/* Location data for the look-ahead symbol. */ +YYLTYPE yylloc; + /*----------. | 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; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - 'yyls': related to locations. + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - YYSIZE_T yystacksize; + YYSIZE_T yystacksize = YYINITDEPTH; - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - yylsp[0] = yylloc; + 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; + yylsp = yyls; +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + /* Initialize the default location before parsing starts. */ + yylloc.first_line = yylloc.last_line = 1; + yylloc.first_column = yylloc.last_column = 0; +#endif + goto yysetstate; /*------------------------------------------------------------. @@ -1836,26 +1919,25 @@ yyparse (void) #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; - YYLTYPE *yyls1 = yyls; - - /* 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), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + /* 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; + YYLTYPE *yyls1 = yyls; + + /* 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), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1863,23 +1945,23 @@ yyparse (void) # 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); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + YYSTACK_RELOCATE (yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1889,17 +1971,14 @@ yyparse (void) yylsp = yyls + 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)); - if (yystate == YYFINAL) - YYACCEPT; - goto yybackup; /*-----------. @@ -1908,20 +1987,20 @@ yyparse (void) yybackup: /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ + look-ahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (); + yychar = YYLEX; } if (yychar <= YYEOF) @@ -1943,27 +2022,29 @@ yyparse (void) yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } + if (yyn == YYFINAL) + YYACCEPT; + /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the lookahead token. */ + /* Shift the look-ahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token. */ - yychar = YYEMPTY; + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END *++yylsp = yylloc; goto yynewstate; @@ -1986,7 +2067,7 @@ yyparse (void) 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 @@ -2003,576 +2084,478 @@ yyparse (void) case 2: { Status = 0; YYACCEPT; } - break; case 3: { Status = 2; yyresult = xxvalue(NULL,2,NULL); YYACCEPT; } - break; case 4: - { Status = 3; yyresult = xxvalue((yyvsp[-1]),3,&(yylsp[-1])); YYACCEPT; } - + { Status = 3; yyresult = xxvalue((yyvsp[(1) - (2)]),3,&(yylsp[(1) - (2)])); YYACCEPT; } break; case 5: - { Status = 4; yyresult = xxvalue((yyvsp[-1]),4,&(yylsp[-1])); YYACCEPT; } - + { Status = 4; yyresult = xxvalue((yyvsp[(1) - (2)]),4,&(yylsp[(1) - (2)])); YYACCEPT; } break; case 6: { Status = 1; YYABORT; } - break; case 7: - { (yyval) = (yyvsp[0]); } - + { (yyval) = (yyvsp[(1) - (1)]); } break; case 8: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 9: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 10: - { (yyval) = (yyvsp[0]); } - + { (yyval) = (yyvsp[(1) - (1)]); } break; case 11: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 12: - { (yyval) = (yyvsp[0]); setId((yyloc)); } - + { (yyval) = (yyvsp[(1) - (1)]); setId((yyloc)); } break; case 13: - { (yyval) = (yyvsp[0]); setId((yyloc)); } - + { (yyval) = (yyvsp[(1) - (1)]); setId((yyloc)); } break; case 14: - { (yyval) = (yyvsp[0]); setId((yyloc)); } - + { (yyval) = (yyvsp[(1) - (1)]); setId((yyloc)); } break; case 15: - { (yyval) = (yyvsp[0]); setId((yyloc)); } - + { (yyval) = (yyvsp[(1) - (1)]); setId((yyloc)); } break; case 16: - { (yyval) = (yyvsp[0]); setId((yyloc)); } - + { (yyval) = (yyvsp[(1) - (1)]); setId((yyloc)); } break; case 17: - { (yyval) = xxexprlist((yyvsp[-2]),&(yylsp[-2]),(yyvsp[-1])); setId((yyloc)); } - + { (yyval) = xxexprlist((yyvsp[(1) - (3)]),&(yylsp[(1) - (3)]),(yyvsp[(2) - (3)])); setId((yyloc)); } break; case 18: - { (yyval) = xxparen((yyvsp[-2]),(yyvsp[-1])); setId((yyloc)); } - + { (yyval) = xxparen((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)])); setId((yyloc)); } break; case 19: - { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 20: - { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 21: - { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 22: - { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 23: - { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 24: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 25: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 26: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 27: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 28: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 29: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 30: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 31: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 32: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 33: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 34: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 35: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 36: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 37: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 38: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 39: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 40: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 41: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 42: - { (yyval) = xxpipe((yyvsp[-2]),(yyvsp[0]),&(yylsp[0])); setId((yyloc)); } - + { (yyval) = xxpipe((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),&(yylsp[(3) - (3)])); setId((yyloc)); } break; case 43: - { (yyval) = xxpipebind((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0]),&(yylsp[-1])); setId((yyloc)); } - + { (yyval) = xxpipebind((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),&(yylsp[(2) - (3)])); setId((yyloc)); } break; case 44: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxpipeassign((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]),&(yylsp[(3) - (3)])); setId((yyloc)); } break; case 45: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[0]),(yyvsp[-2])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 46: - { (yyval) = xxdefun((yyvsp[-5]),(yyvsp[-3]),(yyvsp[0]),&(yyloc)); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(3) - (3)]),(yyvsp[(1) - (3)])); setId((yyloc)); } break; case 47: - { (yyval) = xxdefun(R_FunctionSymbol,(yyvsp[-3]),(yyvsp[0]),&(yyloc)); setId((yyloc)); } - + { (yyval) = xxdefun((yyvsp[(1) - (6)]),(yyvsp[(3) - (6)]),(yyvsp[(6) - (6)]),&(yyloc)); setId((yyloc)); } break; case 48: - { (yyval) = xxfuncall((yyvsp[-3]),(yyvsp[-1])); setId((yyloc)); modif_token( &(yylsp[-3]), SYMBOL_FUNCTION_CALL ) ; } - + { (yyval) = xxdefun(R_FunctionSymbol,(yyvsp[(3) - (6)]),(yyvsp[(6) - (6)]),&(yyloc)); setId((yyloc)); } break; case 49: - { (yyval) = xxif((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxfuncall((yyvsp[(1) - (4)]),(yyvsp[(3) - (4)])); setId((yyloc)); modif_token( &(yylsp[(1) - (4)]), SYMBOL_FUNCTION_CALL ) ; } break; case 50: - { (yyval) = xxifelse((yyvsp[-4]),(yyvsp[-3]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxif((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 51: - { (yyval) = xxfor((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxifelse((yyvsp[(1) - (5)]),(yyvsp[(2) - (5)]),(yyvsp[(3) - (5)]),(yyvsp[(5) - (5)])); setId((yyloc)); } break; case 52: - { (yyval) = xxwhile((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxfor((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 53: - { (yyval) = xxrepeat((yyvsp[-1]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxwhile((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 54: - { (yyval) = xxsubscript((yyvsp[-4]),(yyvsp[-3]),(yyvsp[-2])); setId((yyloc)); } - + { (yyval) = xxrepeat((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId((yyloc)); } break; case 55: - { (yyval) = xxsubscript((yyvsp[-3]),(yyvsp[-2]),(yyvsp[-1])); setId((yyloc)); } - + { (yyval) = xxsubscript((yyvsp[(1) - (5)]),(yyvsp[(2) - (5)]),(yyvsp[(3) - (5)])); setId((yyloc)); } break; case 56: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ; } - + { (yyval) = xxsubscript((yyvsp[(1) - (4)]),(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)])); setId((yyloc)); } break; case 57: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ; } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ; } break; case 58: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ; } break; case 59: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 60: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ;} - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 61: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ;} - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ;} break; case 62: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ;} break; case 63: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 64: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 65: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 66: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); modif_token( &(yylsp[0]), SLOT ) ; } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 67: - { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); modif_token( &(yylsp[(3) - (3)]), SLOT ) ; } break; case 68: - { (yyval) = xxnxtbrk((yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId((yyloc)); } break; case 69: - { (yyval) = xxnxtbrk((yyvsp[0])); setId((yyloc)); } - + { (yyval) = xxnxtbrk((yyvsp[(1) - (1)])); setId((yyloc)); } break; case 70: - { (yyval) = xxcond((yyvsp[-1])); } - + { (yyval) = xxnxtbrk((yyvsp[(1) - (1)])); setId((yyloc)); } break; case 71: - { (yyval) = xxifcond((yyvsp[-1])); } - + { (yyval) = xxcond((yyvsp[(2) - (3)])); } break; case 72: - { (yyval) = xxforcond((yyvsp[-3]),(yyvsp[-1])); setId((yyloc)); } - + { (yyval) = xxifcond((yyvsp[(2) - (3)])); } break; case 73: - { (yyval) = xxexprlist0(); setId((yyloc)); } - + { (yyval) = xxforcond((yyvsp[(2) - (5)]),(yyvsp[(4) - (5)])); setId((yyloc)); } break; case 74: - { (yyval) = xxexprlist1((yyvsp[0]), &(yylsp[0])); } - + { (yyval) = xxexprlist0(); setId((yyloc)); } break; case 75: - { (yyval) = xxexprlist2((yyvsp[-2]), (yyvsp[0]), &(yylsp[0])); } - + { (yyval) = xxexprlist1((yyvsp[(1) - (1)]), &(yylsp[(1) - (1)])); } break; case 76: - { (yyval) = (yyvsp[-1]); setId((yyloc)); } - + { (yyval) = xxexprlist2((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); } break; case 77: - { (yyval) = xxexprlist2((yyvsp[-2]), (yyvsp[0]), &(yylsp[0])); } - + { (yyval) = (yyvsp[(1) - (2)]); setId((yyloc)); } break; case 78: - { (yyval) = (yyvsp[-1]);} - + { (yyval) = xxexprlist2((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); } break; case 79: - { (yyval) = xxsublist1((yyvsp[0])); } - + { (yyval) = (yyvsp[(1) - (2)]);} break; case 80: - { (yyval) = xxsublist2((yyvsp[-3]),(yyvsp[0])); } - + { (yyval) = xxsublist1((yyvsp[(1) - (1)])); } break; case 81: - { (yyval) = xxsub0(); } - + { (yyval) = xxsublist2((yyvsp[(1) - (4)]),(yyvsp[(4) - (4)])); } break; case 82: - { (yyval) = xxsub1((yyvsp[0]), &(yylsp[0])); } - + { (yyval) = xxsub0(); } break; case 83: - { (yyval) = xxsymsub0((yyvsp[-1]), &(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; modif_token( &(yylsp[-1]), SYMBOL_SUB ) ; } - + { (yyval) = xxsub1((yyvsp[(1) - (1)]), &(yylsp[(1) - (1)])); } break; case 84: - { (yyval) = xxsymsub1((yyvsp[-2]),(yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; modif_token( &(yylsp[-2]), SYMBOL_SUB ) ; } - + { (yyval) = xxsymsub0((yyvsp[(1) - (2)]), &(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; modif_token( &(yylsp[(1) - (2)]), SYMBOL_SUB ) ; } break; case 85: - { (yyval) = xxsymsub0((yyvsp[-1]), &(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; } - + { (yyval) = xxsymsub1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; modif_token( &(yylsp[(1) - (3)]), SYMBOL_SUB ) ; } break; case 86: - { (yyval) = xxsymsub1((yyvsp[-2]),(yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; } - + { (yyval) = xxsymsub0((yyvsp[(1) - (2)]), &(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; } break; case 87: - { (yyval) = xxnullsub0(&(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; } - + { (yyval) = xxsymsub1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; } break; case 88: - { (yyval) = xxnullsub1((yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; } - + { (yyval) = xxnullsub0(&(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; } break; case 89: - { (yyval) = xxnullformal(); } - + { (yyval) = xxnullsub1((yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; } break; case 90: - { (yyval) = xxfirstformal0((yyvsp[0])); modif_token( &(yylsp[0]), SYMBOL_FORMALS ) ; } - + { (yyval) = xxnullformal(); } break; case 91: - { (yyval) = xxfirstformal1((yyvsp[-2]),(yyvsp[0])); modif_token( &(yylsp[-2]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[-1]), EQ_FORMALS ) ; } - + { (yyval) = xxfirstformal0((yyvsp[(1) - (1)])); modif_token( &(yylsp[(1) - (1)]), SYMBOL_FORMALS ) ; } break; case 92: - { (yyval) = xxaddformal0((yyvsp[-2]),(yyvsp[0]), &(yylsp[0])); modif_token( &(yylsp[0]), SYMBOL_FORMALS ) ; } - + { (yyval) = xxfirstformal1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); modif_token( &(yylsp[(1) - (3)]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[(2) - (3)]), EQ_FORMALS ) ; } break; case 93: - { (yyval) = xxaddformal1((yyvsp[-4]),(yyvsp[-2]),(yyvsp[0]),&(yylsp[-2])); modif_token( &(yylsp[-2]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[-1]), EQ_FORMALS ) ;} - + { (yyval) = xxaddformal0((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); modif_token( &(yylsp[(3) - (3)]), SYMBOL_FORMALS ) ; } break; case 94: - { EatLines = 1; } + { (yyval) = xxaddformal1((yyvsp[(1) - (5)]),(yyvsp[(3) - (5)]),(yyvsp[(5) - (5)]),&(yylsp[(3) - (5)])); modif_token( &(yylsp[(3) - (5)]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[(4) - (5)]), EQ_FORMALS ) ;} + break; + + case 95: + { EatLines = 1; } break; +/* Line 1267 of yacc.c. */ default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2582,7 +2565,7 @@ yyparse (void) *++yyvsp = yyval; *++yylsp = yyloc; - /* 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. */ @@ -2597,14 +2580,10 @@ yyparse (void) 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. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2612,61 +2591,62 @@ yyparse (void) #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } - yyerror_range[1] = yylloc; + yyerror_range[0] = yylloc; if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -2682,8 +2662,8 @@ yyparse (void) if (/*CONSTCOND*/ 0) goto yyerrorlab; - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule whose action triggered + yyerror_range[0] = yylsp[1-yylen]; + /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2696,42 +2676,43 @@ yyparse (void) | 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; - } - } + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; - yyerror_range[1] = *yylsp; + yyerror_range[0] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); + yystos[yystate], yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + if (yyn == YYFINAL) + YYACCEPT; + *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - yyerror_range[2] = yylloc; + yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); + the look-ahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); *++yylsp = yyloc; /* Shift the error token. */ @@ -2755,7 +2736,7 @@ yyparse (void) yyresult = 1; goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#ifndef yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2766,22 +2747,17 @@ yyparse (void) #endif yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc); - } - /* Do not reclaim the symbols of the rule whose action triggered + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); + yystos[*yyssp], yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2792,12 +2768,15 @@ yyparse (void) if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - return yyresult; + /* Make sure YYID is used. */ + return YYID (yyresult); } + + /*----------------------------------------------------------------------------*/ static int (*ptr_getc)(void); @@ -3488,6 +3467,16 @@ static SEXP findExtractorChainPHCell(SEXP placeholder, SEXP rhs, SEXP expr, else return NULL; } + +static SEXP xxpipeassign(SEXP lhs, SEXP rhs, YYLTYPE *lloc_rhs) +{ + SEXP rhs2 = xxpipe(lhs, rhs, lloc_rhs); + SEXP lass = install("<-"); + SEXP res = lang3(lass, lhs, rhs2); + return res; +} + + static SEXP xxpipe(SEXP lhs, SEXP rhs, YYLTYPE *lloc_rhs) { SEXP ans; @@ -4580,6 +4569,7 @@ static void yyerror(const char *s) "NS_GET_INT", "':::'", "PIPE", "'|>'", "PIPEBIND", "'=>'", + "PIPE_ASSIGN", "'<|>'", "PLACEHOLDER", "'_'", 0 }; @@ -5826,6 +5816,13 @@ static int token(void) else return ERROR; } + if (nextchar('|')) { + if (nextchar('>')) { + yylval = install_and_save("<|>"); + return PIPE_ASSIGN; + } else + return ERROR; + } yylval = install_and_save("<"); return LT; case '-': @@ -6145,6 +6142,7 @@ static int yylex(void) case LEFT_ASSIGN: case RIGHT_ASSIGN: case EQ_ASSIGN: + case PIPE_ASSIGN: EatLines = 1; break; @@ -6752,3 +6750,4 @@ NORET static void raiseLexError(const char *subclassname, valuetype, value, &lloc, format); } + diff --git a/src/main/gram.y b/src/main/gram.y index 5e95c1b2dde..8763b7726a0 100644 --- a/src/main/gram.y +++ b/src/main/gram.y @@ -381,6 +381,7 @@ static SEXP xxrepeat(SEXP, SEXP); static SEXP xxnxtbrk(SEXP); static SEXP xxfuncall(SEXP, SEXP); static SEXP xxdefun(SEXP, SEXP, SEXP, YYLTYPE *); +static SEXP xxpipeassign(SEXP, SEXP, YYLTYPE *); static SEXP xxpipe(SEXP, SEXP, YYLTYPE *); static SEXP xxpipebind(SEXP, SEXP, SEXP, YYLTYPE *); static SEXP xxunary(SEXP, SEXP); @@ -412,6 +413,7 @@ static int xxvalue(SEXP, int, YYLTYPE *); /* no longer used: %token COLON_ASSIGN */ %token SLOT %token PIPE +%token PIPE_ASSIGN %token PLACEHOLDER %token PIPEBIND @@ -423,6 +425,7 @@ static int xxvalue(SEXP, int, YYLTYPE *); %right LEFT_ASSIGN %right EQ_ASSIGN %left RIGHT_ASSIGN +%right PIPE_ASSIGN %left '~' TILDE %left OR OR2 %left AND AND2 @@ -490,8 +493,9 @@ expr : NUM_CONST { $$ = $1; setId(@$); } | expr OR expr { $$ = xxbinary($2,$1,$3); setId(@$); } | expr AND2 expr { $$ = xxbinary($2,$1,$3); setId(@$); } | expr OR2 expr { $$ = xxbinary($2,$1,$3); setId(@$); } - | expr PIPE expr { $$ = xxpipe($1,$3,&@3); setId(@$); } + | expr PIPE expr { $$ = xxpipe($1,$3,&@3); setId(@$); } | expr PIPEBIND expr { $$ = xxpipebind($2,$1,$3,&@2); setId(@$); } + | expr PIPE_ASSIGN expr { $$ = xxpipeassign($1,$3,&@3); setId(@$); } | expr LEFT_ASSIGN expr { $$ = xxbinary($2,$1,$3); setId(@$); } | expr RIGHT_ASSIGN expr { $$ = xxbinary($2,$3,$1); setId(@$); } | FUNCTION '(' formlist ')' cr expr_or_assign_or_help %prec LOW @@ -1257,6 +1261,16 @@ static SEXP findExtractorChainPHCell(SEXP placeholder, SEXP rhs, SEXP expr, else return NULL; } + +static SEXP xxpipeassign(SEXP lhs, SEXP rhs, YYLTYPE *lloc_rhs) +{ + SEXP rhs2 = xxpipe(lhs, rhs, lloc_rhs); + SEXP lass = install("<-"); + SEXP res = lang3(lass, lhs, rhs2); + return res; +} + + static SEXP xxpipe(SEXP lhs, SEXP rhs, YYLTYPE *lloc_rhs) { SEXP ans; @@ -2349,6 +2363,7 @@ static void yyerror(const char *s) "NS_GET_INT", "':::'", "PIPE", "'|>'", "PIPEBIND", "'=>'", + "PIPE_ASSIGN", "'<|>'", "PLACEHOLDER", "'_'", 0 }; @@ -3595,6 +3610,13 @@ static int token(void) else return ERROR; } + if (nextchar('|')) { + if (nextchar('>')) { + yylval = install_and_save("<|>"); + return PIPE_ASSIGN; + } else + return ERROR; + } yylval = install_and_save("<"); return LT; case '-': @@ -3914,6 +3936,7 @@ static int yylex(void) case LEFT_ASSIGN: case RIGHT_ASSIGN: case EQ_ASSIGN: + case PIPE_ASSIGN: EatLines = 1; break; diff --git a/src/main/names.c b/src/main/names.c index fcb62dd86df..4b7b43f56e5 100644 --- a/src/main/names.c +++ b/src/main/names.c @@ -1038,7 +1038,7 @@ static char *Spec_name[] = { "~", "@", "=>", "==", "!=", "<", ">", "<=", ">=", "&", "|", "&&", "||", "!", - "<-", "<<-", "=", + "<-", "<<-", "=", "<|>", "$", "[", "[[", "$<-", "[<-", "[[<-", 0