version 1.16, 2006/01/30 16:18:36
|
version 1.20, 2012/12/06 14:48:19
|
|
|
//%2006//////////////////////////////////////////////////////////////////////// |
/* To be inserted in other files to bypass the chksrc tests */ |
// |
/* NOCHKSRC */ |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
|
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
/* A Bison parser, made by GNU Bison 2.3. */ |
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
|
// |
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
// of this software and associated documentation files (the "Software"), to |
|
// deal in the Software without restriction, including without limitation the |
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
// sell copies of the Software, and to permit persons to whom the Software is |
|
// furnished to do so, subject to the following conditions: |
|
// |
|
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN |
|
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED |
|
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT |
|
// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
|
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
|
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
// |
|
//============================================================================== |
|
/* A Bison parser, made by GNU Bison 1.875c. */ |
|
| |
/* Skeleton parser for Yacc-like parsing with Bison, |
/* Skeleton implementation for Bison's Yacc-like parsers in C |
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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 | it under the terms of the GNU General Public License as published by |
|
|
| |
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License |
along with this program; if not, write to the Free Software | along with this program; if not, write to the Free Software |
Foundation, Inc., 59 Temple Place - Suite 330, |
Foundation, Inc., 51 Franklin Street, Fifth Floor, |
Boston, MA 02111-1307, USA. */ |
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 |
|
under terms of your choice, so long as that work isn't itself a |
|
parser generator using the skeleton or a modified version thereof |
|
as a parser skeleton. Alternatively, if you modify or redistribute |
|
the parser skeleton itself, you may (at your option) remove this |
|
special exception, which will cause the skeleton and the resulting |
|
Bison output files to be licensed under the GNU General Public |
|
License without this special exception. |
| |
/* As a special exception, when this file is copied by Bison into a |
This special exception was added by the Free Software Foundation in |
Bison output file, you may use that output file without restriction. |
version 2.2 of Bison. */ |
This special exception was added by the Free Software Foundation |
|
in version 1.24 of Bison. */ |
|
| |
/* Written by Richard Stallman by simplifying the original so called |
/* C LALR(1) parser skeleton written by Richard Stallman, by |
``semantic'' parser. */ |
simplifying the original so-called "semantic" parser. */ |
| |
/* All symbols defined below should begin with yy or YY, to avoid | /* All symbols defined below should begin with yy or YY, to avoid |
infringing on user name space. This should be done even for local | infringing on user name space. This should be done even for local |
|
|
/* Identify Bison output. */ | /* Identify Bison output. */ |
#define YYBISON 1 | #define YYBISON 1 |
| |
|
/* Bison version. */ |
|
#define YYBISON_VERSION "2.3" |
|
|
/* Skeleton name. */ | /* Skeleton name. */ |
#define YYSKELETON_NAME "yacc.c" | #define YYSKELETON_NAME "yacc.c" |
| |
|
|
/* Using locations. */ | /* Using locations. */ |
#define YYLSP_NEEDED 0 | #define YYLSP_NEEDED 0 |
| |
/* If NAME_PREFIX is specified substitute the variables and functions |
/* Substitute the variable and function names. */ |
names. */ |
|
#define yyparse WQL_parse | #define yyparse WQL_parse |
#define yylex WQL_lex | #define yylex WQL_lex |
#define yyerror WQL_error | #define yyerror WQL_error |
|
|
TOK_UNEXPECTED_CHAR = 280 | TOK_UNEXPECTED_CHAR = 280 |
}; | }; |
#endif | #endif |
|
/* Tokens. */ |
#define TOK_INTEGER 258 | #define TOK_INTEGER 258 |
#define TOK_DOUBLE 259 | #define TOK_DOUBLE 259 |
#define TOK_STRING 260 | #define TOK_STRING 260 |
|
|
# define YYERROR_VERBOSE 0 | # define YYERROR_VERBOSE 0 |
#endif | #endif |
| |
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
/* Enabling the token table. */ |
|
#ifndef YYTOKEN_TABLE |
|
# define YYTOKEN_TABLE 0 |
|
#endif |
|
|
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
|
typedef union YYSTYPE |
#line 87 "WQL.y" | #line 87 "WQL.y" |
typedef union YYSTYPE { |
{ |
int intValue; | int intValue; |
double doubleValue; | double doubleValue; |
char* strValue; | char* strValue; |
void* nodeValue; | void* nodeValue; |
} YYSTYPE; |
} |
/* Line 191 of yacc.c. */ |
/* Line 187 of yacc.c. */ |
#line 183 "WQLtemp" |
#line 202 "WQLtemp" |
|
YYSTYPE; |
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
# define YYSTYPE_IS_DECLARED 1 | # define YYSTYPE_IS_DECLARED 1 |
# define YYSTYPE_IS_TRIVIAL 1 | # define YYSTYPE_IS_TRIVIAL 1 |
|
|
/* Copy the second part of user declarations. */ | /* Copy the second part of user declarations. */ |
| |
| |
/* Line 214 of yacc.c. */ |
/* Line 216 of yacc.c. */ |
#line 195 "WQLtemp" |
#line 215 "WQLtemp" |
| |
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
#ifdef short |
|
# undef short |
|
#endif |
| |
# ifndef YYFREE |
#ifdef YYTYPE_UINT8 |
# define YYFREE free |
typedef YYTYPE_UINT8 yytype_uint8; |
|
#else |
|
typedef unsigned char yytype_uint8; |
# endif | # endif |
# ifndef YYMALLOC |
|
# define YYMALLOC malloc |
#ifdef YYTYPE_INT8 |
|
typedef YYTYPE_INT8 yytype_int8; |
|
#elif (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
typedef signed char yytype_int8; |
|
#else |
|
typedef short int yytype_int8; |
# endif | # endif |
| |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
#ifdef YYTYPE_UINT16 |
|
typedef YYTYPE_UINT16 yytype_uint16; |
|
#else |
|
typedef unsigned short int yytype_uint16; |
|
#endif |
| |
# ifdef YYSTACK_USE_ALLOCA |
#ifdef YYTYPE_INT16 |
# if YYSTACK_USE_ALLOCA |
typedef YYTYPE_INT16 yytype_int16; |
# define YYSTACK_ALLOC alloca |
#else |
|
typedef short int yytype_int16; |
# endif | # endif |
|
|
|
#ifndef YYSIZE_T |
|
# ifdef __SIZE_TYPE__ |
|
# define YYSIZE_T __SIZE_TYPE__ |
|
# elif defined size_t |
|
# define YYSIZE_T size_t |
|
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
|
# define YYSIZE_T size_t |
# else | # else |
# if defined (alloca) || defined (_ALLOCA_H) |
# define YYSIZE_T unsigned int |
# define YYSTACK_ALLOC alloca |
# endif |
|
#endif |
|
|
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
|
|
|
#ifndef YY_ |
|
# if YYENABLE_NLS |
|
# if ENABLE_NLS |
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
|
# define YY_(msgid) dgettext ("bison-runtime", msgid) |
|
# endif |
|
# endif |
|
# ifndef YY_ |
|
# define YY_(msgid) msgid |
|
# endif |
|
#endif |
|
|
|
/* Suppress unused-variable warnings by "using" E. */ |
|
#if ! defined lint || defined __GNUC__ |
|
# define YYUSE(e) ((void) (e)) |
|
#else |
|
# define YYUSE(e) /* empty */ |
|
#endif |
|
|
|
/* Identity function, used to suppress warnings about constant conditions. */ |
|
#ifndef lint |
|
# define YYID(n) (n) |
|
#else |
|
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
static int |
|
YYID (int i) |
# else | # else |
|
static int |
|
YYID (i) |
|
int i; |
|
#endif |
|
{ |
|
return i; |
|
} |
|
#endif |
|
|
|
#if ! defined yyoverflow || YYERROR_VERBOSE |
|
|
|
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
|
|
|
# ifdef YYSTACK_USE_ALLOCA |
|
# if YYSTACK_USE_ALLOCA |
# ifdef __GNUC__ | # ifdef __GNUC__ |
# define YYSTACK_ALLOC __builtin_alloca | # define YYSTACK_ALLOC __builtin_alloca |
|
# elif defined __BUILTIN_VA_ARG_INCR |
|
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
|
# elif defined _AIX |
|
# define YYSTACK_ALLOC __alloca |
|
# elif defined _MSC_VER |
|
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
|
# define alloca _alloca |
|
# else |
|
# define YYSTACK_ALLOC alloca |
|
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
|
# ifndef _STDLIB_H |
|
# define _STDLIB_H 1 |
|
# endif |
|
# endif |
# endif | # endif |
# endif | # endif |
# endif | # endif |
| |
# ifdef YYSTACK_ALLOC | # ifdef YYSTACK_ALLOC |
/* Pacify GCC's `empty if-body' warning. */ | /* Pacify GCC's `empty if-body' warning. */ |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
# else |
# ifndef YYSTACK_ALLOC_MAXIMUM |
# if defined (__STDC__) || defined (__cplusplus) |
/* The OS might guarantee only one guard page at the bottom of the stack, |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
and a page size can be as small as 4096 bytes. So we cannot safely |
# define YYSIZE_T size_t |
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
|
to allow for a few compiler-allocated temporary stack slots. */ |
|
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
# endif | # endif |
|
# else |
# define YYSTACK_ALLOC YYMALLOC | # define YYSTACK_ALLOC YYMALLOC |
# define YYSTACK_FREE YYFREE | # define YYSTACK_FREE YYFREE |
|
# ifndef YYSTACK_ALLOC_MAXIMUM |
|
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
|
# endif |
|
# if (defined __cplusplus && ! defined _STDLIB_H \ |
|
&& ! ((defined YYMALLOC || defined malloc) \ |
|
&& (defined YYFREE || defined free))) |
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
|
# ifndef _STDLIB_H |
|
# define _STDLIB_H 1 |
|
# endif |
|
# endif |
|
# ifndef YYMALLOC |
|
# define YYMALLOC malloc |
|
# 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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
void free (void *); /* INFRINGES ON USER NAME SPACE */ |
|
# endif |
# endif | # endif |
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
# endif |
|
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| |
| |
#if (! defined (yyoverflow) \ |
#if (! defined yyoverflow \ |
&& (! defined (__cplusplus) \ |
&& (! defined __cplusplus \ |
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) |
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
| |
/* A type that is properly aligned for any stack member. */ | /* A type that is properly aligned for any stack member. */ |
union yyalloc | union yyalloc |
{ | { |
short yyss; |
yytype_int16 yyss; |
YYSTYPE yyvs; | YYSTYPE yyvs; |
}; | }; |
| |
|
|
/* The size of an array large to enough to hold all stacks, each with | /* The size of an array large to enough to hold all stacks, each with |
N elements. */ | N elements. */ |
# define YYSTACK_BYTES(N) \ | # define YYSTACK_BYTES(N) \ |
((N) * (sizeof (short) + sizeof (YYSTYPE)) \ |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
+ YYSTACK_GAP_MAXIMUM) | + YYSTACK_GAP_MAXIMUM) |
| |
/* Copy COUNT objects from FROM to TO. The source and destination do | /* Copy COUNT objects from FROM to TO. The source and destination do |
not overlap. */ | not overlap. */ |
# ifndef YYCOPY | # ifndef YYCOPY |
# if defined (__GNUC__) && 1 < __GNUC__ |
# if defined __GNUC__ && 1 < __GNUC__ |
# define YYCOPY(To, From, Count) \ | # define YYCOPY(To, From, Count) \ |
__builtin_memcpy (To, From, (Count) * sizeof (*(From))) | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
# else | # else |
# define YYCOPY(To, From, Count) \ | # define YYCOPY(To, From, Count) \ |
do \ | do \ |
{ \ | { \ |
register YYSIZE_T yyi; \ |
YYSIZE_T yyi; \ |
for (yyi = 0; yyi < (Count); yyi++) \ | for (yyi = 0; yyi < (Count); yyi++) \ |
(To)[yyi] = (From)[yyi]; \ | (To)[yyi] = (From)[yyi]; \ |
} \ | } \ |
while (0) |
while (YYID (0)) |
# endif | # endif |
# endif | # endif |
| |
|
|
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
yyptr += yynewbytes / sizeof (*yyptr); \ | yyptr += yynewbytes / sizeof (*yyptr); \ |
} \ | } \ |
while (0) |
while (YYID (0)) |
|
|
#endif |
|
| |
#if defined (__STDC__) || defined (__cplusplus) |
|
typedef signed char yysigned_char; |
|
#else |
|
typedef short yysigned_char; |
|
#endif | #endif |
| |
/* YYFINAL -- State number of the termination state. */ | /* YYFINAL -- State number of the termination state. */ |
|
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| |
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
static const unsigned char yytranslate[] = |
static const yytype_uint8 yytranslate[] = |
{ | { |
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
|
|
#if YYDEBUG | #if YYDEBUG |
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
YYRHS. */ | YYRHS. */ |
static const unsigned char yyprhs[] = |
static const yytype_uint8 yyprhs[] = |
{ | { |
0, 0, 3, 5, 9, 11, 13, 15, 19, 22, | 0, 0, 3, 5, 9, 11, 13, 15, 19, 22, |
24, 27, 30, 34, 38, 41, 45, 47, 51, 56, | 24, 27, 30, 34, 38, 41, 45, 47, 51, 56, |
|
|
}; | }; |
| |
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
static const yysigned_char yyrhs[] = |
static const yytype_int8 yyrhs[] = |
{ | { |
31, 0, -1, 32, -1, 22, 33, 35, -1, 26, | 31, 0, -1, 32, -1, 22, 33, 35, -1, 26, |
-1, 34, -1, 43, -1, 34, 27, 43, -1, 36, | -1, 34, -1, 43, -1, 34, 27, 43, -1, 36, |
|
|
}; | }; |
| |
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
static const unsigned short yyrline[] = |
static const yytype_uint16 yyrline[] = |
{ | { |
0, 160, 160, 166, 172, 176, 182, 186, 192, 196, | 0, 160, 160, 166, 172, 176, 182, 186, 192, 196, |
202, 209, 215, 220, 225, 231, 235, 239, 244, 253, | 202, 209, 215, 220, 225, 231, 235, 239, 244, 253, |
|
|
}; | }; |
#endif | #endif |
| |
#if YYDEBUG || YYERROR_VERBOSE |
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
static const char *const yytname[] = | static const char *const yytname[] = |
{ | { |
|
|
# ifdef YYPRINT | # ifdef YYPRINT |
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
token YYLEX-NUM. */ | token YYLEX-NUM. */ |
static const unsigned short yytoknum[] = |
static const yytype_uint16 yytoknum[] = |
{ | { |
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
|
|
# endif | # endif |
| |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
static const unsigned char yyr1[] = |
static const yytype_uint8 yyr1[] = |
{ | { |
0, 30, 31, 32, 33, 33, 34, 34, 35, 35, | 0, 30, 31, 32, 33, 33, 34, 34, 35, 35, |
36, 37, 38, 38, 38, 38, 38, 38, 38, 39, | 36, 37, 38, 38, 38, 38, 38, 38, 38, 39, |
|
|
}; | }; |
| |
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
static const unsigned char yyr2[] = |
static const yytype_uint8 yyr2[] = |
{ | { |
0, 2, 1, 3, 1, 1, 1, 3, 2, 1, | 0, 2, 1, 3, 1, 1, 1, 3, 2, 1, |
2, 2, 3, 3, 2, 3, 1, 3, 4, 1, | 2, 2, 3, 3, 2, 3, 1, 3, 4, 1, |
|
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
STATE-NUM when YYTABLE doesn't specify something else to do. Zero | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
means the default is an error. */ | means the default is an error. */ |
static const unsigned char yydefact[] = |
static const yytype_uint8 yydefact[] = |
{ | { |
0, 0, 0, 2, 32, 4, 0, 5, 6, 1, | 0, 0, 0, 2, 32, 4, 0, 5, 6, 1, |
0, 0, 3, 9, 0, 33, 34, 10, 0, 8, | 0, 0, 3, 9, 0, 33, 34, 10, 0, 8, |
|
|
}; | }; |
| |
/* YYDEFGOTO[NTERM-NUM]. */ | /* YYDEFGOTO[NTERM-NUM]. */ |
static const yysigned_char yydefgoto[] = |
static const yytype_int8 yydefgoto[] = |
{ | { |
-1, 2, 3, 6, 7, 12, 13, 19, 28, 29, | -1, 2, 3, 6, 7, 12, 13, 19, 28, 29, |
30, 31, 32, 54, 17, 34 | 30, 31, 32, 54, 17, 34 |
|
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
STATE-NUM. */ | STATE-NUM. */ |
#define YYPACT_NINF -38 | #define YYPACT_NINF -38 |
static const yysigned_char yypact[] = |
static const yytype_int8 yypact[] = |
{ | { |
-21, -10, 15, -38, 25, -38, 17, -8, -38, -38, | -21, -10, 15, -38, 25, -38, 17, -8, -38, -38, |
28, 39, -38, 38, 41, -38, -38, -38, 1, -38, | 28, 39, -38, 38, 41, -38, -38, -38, 1, -38, |
|
|
}; | }; |
| |
/* YYPGOTO[NTERM-NUM]. */ | /* YYPGOTO[NTERM-NUM]. */ |
static const yysigned_char yypgoto[] = |
static const yytype_int8 yypgoto[] = |
{ | { |
-38, -38, -38, -38, -38, -38, -38, -38, -17, -38, | -38, -38, -38, -38, -38, -38, -38, -38, -17, -38, |
-38, -38, -37, -1, 29, 11 | -38, -38, -37, -1, 29, 11 |
|
|
number is the opposite. If zero, do what YYDEFACT says. | number is the opposite. If zero, do what YYDEFACT says. |
If YYTABLE_NINF, syntax error. */ | If YYTABLE_NINF, syntax error. */ |
#define YYTABLE_NINF -1 | #define YYTABLE_NINF -1 |
static const unsigned char yytable[] = |
static const yytype_uint8 yytable[] = |
{ | { |
8, 1, 52, 61, 21, 22, 23, 24, 25, 35, | 8, 1, 52, 61, 21, 22, 23, 24, 25, 35, |
36, 4, 62, 20, 63, 9, 5, 33, 26, 14, | 36, 4, 62, 20, 63, 9, 5, 33, 26, 14, |
|
|
16, 18, 4, 39, 40, 38, 64, 0, 0, 53 | 16, 18, 4, 39, 40, 38, 64, 0, 0, 53 |
}; | }; |
| |
static const yysigned_char yycheck[] = |
static const yytype_int8 yycheck[] = |
{ | { |
1, 22, 39, 8, 3, 4, 5, 6, 7, 26, | 1, 22, 39, 8, 3, 4, 5, 6, 7, 26, |
27, 21, 17, 14, 51, 0, 26, 18, 17, 27, | 27, 21, 17, 14, 51, 0, 26, 18, 17, 27, |
|
|
| |
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
symbol of state STATE-NUM. */ | symbol of state STATE-NUM. */ |
static const unsigned char yystos[] = |
static const yytype_uint8 yystos[] = |
{ | { |
0, 22, 31, 32, 21, 26, 33, 34, 43, 0, | 0, 22, 31, 32, 21, 26, 33, 34, 43, 0, |
10, 24, 35, 36, 27, 21, 21, 44, 23, 37, | 10, 24, 35, 36, 27, 21, 21, 44, 23, 37, |
|
|
45, 8, 17, 42, 8 | 45, 8, 17, 42, 8 |
}; | }; |
| |
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
|
# define YYSIZE_T __SIZE_TYPE__ |
|
#endif |
|
#if ! defined (YYSIZE_T) && defined (size_t) |
|
# define YYSIZE_T size_t |
|
#endif |
|
#if ! defined (YYSIZE_T) |
|
# if defined (__STDC__) || defined (__cplusplus) |
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
|
# define YYSIZE_T size_t |
|
# endif |
|
#endif |
|
#if ! defined (YYSIZE_T) |
|
# define YYSIZE_T unsigned int |
|
#endif |
|
|
|
#define yyerrok (yyerrstatus = 0) | #define yyerrok (yyerrstatus = 0) |
#define yyclearin (yychar = YYEMPTY) | #define yyclearin (yychar = YYEMPTY) |
#define YYEMPTY (-2) | #define YYEMPTY (-2) |
|
|
yychar = (Token); \ | yychar = (Token); \ |
yylval = (Value); \ | yylval = (Value); \ |
yytoken = YYTRANSLATE (yychar); \ | yytoken = YYTRANSLATE (yychar); \ |
YYPOPSTACK; \ |
YYPOPSTACK (1); \ |
goto yybackup; \ | goto yybackup; \ |
} \ | } \ |
else \ | else \ |
{ \ | { \ |
yyerror ("syntax error: cannot back up");\ |
yyerror (YY_("syntax error: cannot back up")); \ |
YYERROR; \ | YYERROR; \ |
} \ | } \ |
while (0) |
while (YYID (0)) |
|
|
| |
#define YYTERROR 1 | #define YYTERROR 1 |
#define YYERRCODE 256 | #define YYERRCODE 256 |
| |
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
|
are run). */ |
|
| |
|
/* 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 | #ifndef YYLLOC_DEFAULT |
# define YYLLOC_DEFAULT(Current, Rhs, N) \ | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
((Current).first_line = (Rhs)[1].first_line, \ |
do \ |
(Current).first_column = (Rhs)[1].first_column, \ |
if (YYID (N)) \ |
(Current).last_line = (Rhs)[N].last_line, \ |
{ \ |
(Current).last_column = (Rhs)[N].last_column) |
(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 | #endif |
| |
|
|
|
/* YY_LOCATION_PRINT -- Print the location on the stream. |
|
This macro was not mandated originally: define only if we know |
|
we won't break user code: when these are the locations we know. */ |
|
|
|
#ifndef YY_LOCATION_PRINT |
|
# if 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 |
|
|
|
|
/* YYLEX -- calling `yylex' with the right arguments. */ | /* YYLEX -- calling `yylex' with the right arguments. */ |
| |
#ifdef YYLEX_PARAM | #ifdef YYLEX_PARAM |
|
|
do { \ | do { \ |
if (yydebug) \ | if (yydebug) \ |
YYFPRINTF Args; \ | YYFPRINTF Args; \ |
} while (0) |
} while (YYID (0)) |
| |
# define YYDSYMPRINT(Args) \ |
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
do { \ |
|
if (yydebug) \ |
|
yysymprint Args; \ |
|
} while (0) |
|
|
|
# define YYDSYMPRINTF(Title, Token, Value, Location) \ |
|
do { \ | do { \ |
if (yydebug) \ | if (yydebug) \ |
{ \ | { \ |
YYFPRINTF (stderr, "%s ", Title); \ | YYFPRINTF (stderr, "%s ", Title); \ |
yysymprint (stderr, \ |
yy_symbol_print (stderr, \ |
Token, Value); \ |
Type, Value); \ |
YYFPRINTF (stderr, "\n"); \ | YYFPRINTF (stderr, "\n"); \ |
} \ | } \ |
} while (0) |
} while (YYID (0)) |
|
|
|
|
|
/*--------------------------------. |
|
| 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) |
|
#else |
|
static void |
|
yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
|
FILE *yyoutput; |
|
int yytype; |
|
YYSTYPE const * const yyvaluep; |
|
#endif |
|
{ |
|
if (!yyvaluep) |
|
return; |
|
# ifdef YYPRINT |
|
if (yytype < YYNTOKENS) |
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
|
# else |
|
YYUSE (yyoutput); |
|
# endif |
|
switch (yytype) |
|
{ |
|
default: |
|
break; |
|
} |
|
} |
|
|
|
|
|
/*--------------------------------. |
|
| Print this symbol on YYOUTPUT. | |
|
`--------------------------------*/ |
|
|
|
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
|
static void |
|
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
|
#else |
|
static void |
|
yy_symbol_print (yyoutput, yytype, yyvaluep) |
|
FILE *yyoutput; |
|
int yytype; |
|
YYSTYPE const * const yyvaluep; |
|
#endif |
|
{ |
|
if (yytype < YYNTOKENS) |
|
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
|
else |
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
|
|
|
yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
|
YYFPRINTF (yyoutput, ")"); |
|
} |
| |
/*------------------------------------------------------------------. | /*------------------------------------------------------------------. |
| yy_stack_print -- Print the state stack from its BOTTOM up to its | | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| TOP (included). | | | TOP (included). | |
`------------------------------------------------------------------*/ | `------------------------------------------------------------------*/ |
| |
#if defined (__STDC__) || defined (__cplusplus) |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
static void | static void |
yy_stack_print (short *bottom, short *top) |
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
#else | #else |
static void | static void |
yy_stack_print (bottom, top) | yy_stack_print (bottom, top) |
short *bottom; |
yytype_int16 *bottom; |
short *top; |
yytype_int16 *top; |
#endif | #endif |
{ | { |
YYFPRINTF (stderr, "Stack now"); | YYFPRINTF (stderr, "Stack now"); |
for (/* Nothing. */; bottom <= top; ++bottom) |
for (; bottom <= top; ++bottom) |
YYFPRINTF (stderr, " %d", *bottom); | YYFPRINTF (stderr, " %d", *bottom); |
YYFPRINTF (stderr, "\n"); | YYFPRINTF (stderr, "\n"); |
} | } |
|
|
do { \ | do { \ |
if (yydebug) \ | if (yydebug) \ |
yy_stack_print ((Bottom), (Top)); \ | yy_stack_print ((Bottom), (Top)); \ |
} while (0) |
} while (YYID (0)) |
| |
| |
/*------------------------------------------------. | /*------------------------------------------------. |
| Report that the YYRULE is going to be reduced. | | | Report that the YYRULE is going to be reduced. | |
`------------------------------------------------*/ | `------------------------------------------------*/ |
| |
#if defined (__STDC__) || defined (__cplusplus) |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
static void | static void |
yy_reduce_print (int yyrule) |
yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
#else | #else |
static void | static void |
yy_reduce_print (yyrule) |
yy_reduce_print (yyvsp, yyrule) |
|
YYSTYPE *yyvsp; |
int yyrule; | int yyrule; |
#endif | #endif |
{ | { |
|
int yynrhs = yyr2[yyrule]; |
int yyi; | int yyi; |
unsigned int yylno = yyrline[yyrule]; |
unsigned long int yylno = yyrline[yyrule]; |
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", |
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
yyrule - 1, yylno); | yyrule - 1, yylno); |
/* Print the symbols being reduced, and their result. */ |
/* The symbols being reduced. */ |
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) |
for (yyi = 0; yyi < yynrhs; yyi++) |
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); |
{ |
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); |
fprintf (stderr, " $%d = ", yyi + 1); |
|
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
|
&(yyvsp[(yyi + 1) - (yynrhs)]) |
|
); |
|
fprintf (stderr, "\n"); |
|
} |
} | } |
| |
# define YY_REDUCE_PRINT(Rule) \ | # define YY_REDUCE_PRINT(Rule) \ |
do { \ | do { \ |
if (yydebug) \ | if (yydebug) \ |
yy_reduce_print (Rule); \ |
yy_reduce_print (yyvsp, Rule); \ |
} while (0) |
} while (YYID (0)) |
| |
/* Nonzero means print parse trace. It is left uninitialized so that | /* Nonzero means print parse trace. It is left uninitialized so that |
multiple parsers can coexist. */ | multiple parsers can coexist. */ |
int yydebug; | int yydebug; |
#else /* !YYDEBUG */ | #else /* !YYDEBUG */ |
# define YYDPRINTF(Args) | # define YYDPRINTF(Args) |
# define YYDSYMPRINT(Args) |
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
# define YYDSYMPRINTF(Title, Token, Value, Location) |
|
# define YY_STACK_PRINT(Bottom, Top) | # define YY_STACK_PRINT(Bottom, Top) |
# define YY_REDUCE_PRINT(Rule) | # define YY_REDUCE_PRINT(Rule) |
#endif /* !YYDEBUG */ | #endif /* !YYDEBUG */ |
|
|
if the built-in stack extension method is used). | if the built-in stack extension method is used). |
| |
Do not make this value too large; the results are undefined if | Do not make this value too large; the results are undefined if |
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
evaluated with infinite-precision integer arithmetic. */ | evaluated with infinite-precision integer arithmetic. */ |
| |
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 |
|
# undef YYMAXDEPTH |
|
#endif |
|
|
|
#ifndef YYMAXDEPTH | #ifndef YYMAXDEPTH |
# define YYMAXDEPTH 10000 | # define YYMAXDEPTH 10000 |
#endif | #endif |
|
|
#if YYERROR_VERBOSE | #if YYERROR_VERBOSE |
| |
# ifndef yystrlen | # ifndef yystrlen |
# if defined (__GLIBC__) && defined (_STRING_H) |
# if defined __GLIBC__ && defined _STRING_H |
# define yystrlen strlen | # define yystrlen strlen |
# else | # else |
/* Return the length of YYSTR. */ | /* Return the length of YYSTR. */ |
|
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
static YYSIZE_T | static YYSIZE_T |
# if defined (__STDC__) || defined (__cplusplus) |
|
yystrlen (const char *yystr) | yystrlen (const char *yystr) |
# else | # else |
|
static YYSIZE_T |
yystrlen (yystr) | yystrlen (yystr) |
const char *yystr; | const char *yystr; |
# endif | # endif |
{ | { |
register const char *yys = yystr; |
YYSIZE_T yylen; |
|
for (yylen = 0; yystr[yylen]; yylen++) |
while (*yys++ != '\0') |
|
continue; | continue; |
|
return yylen; |
return yys - yystr - 1; |
|
} | } |
# endif | # endif |
# endif | # endif |
| |
# ifndef yystpcpy | # ifndef yystpcpy |
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) |
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
# define yystpcpy stpcpy | # define yystpcpy stpcpy |
# else | # else |
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
YYDEST. */ | YYDEST. */ |
|
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
static char * | static char * |
# if defined (__STDC__) || defined (__cplusplus) |
|
yystpcpy (char *yydest, const char *yysrc) | yystpcpy (char *yydest, const char *yysrc) |
# else | # else |
|
static char * |
yystpcpy (yydest, yysrc) | yystpcpy (yydest, yysrc) |
char *yydest; | char *yydest; |
const char *yysrc; | const char *yysrc; |
# endif | # endif |
{ | { |
register char *yyd = yydest; |
char *yyd = yydest; |
register const char *yys = yysrc; |
const char *yys = yysrc; |
| |
while ((*yyd++ = *yys++) != '\0') | while ((*yyd++ = *yys++) != '\0') |
continue; | continue; |
|
|
# endif | # endif |
# endif | # endif |
| |
#endif /* !YYERROR_VERBOSE */ |
# ifndef yytnamerr |
|
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
|
quotes and backslashes, so that it's suitable for yyerror. The |
|
heuristic is that double-quoting is unnecessary unless the string |
|
contains an apostrophe, a comma, or backslash (other than |
|
backslash-backslash). YYSTR is taken from yytname. If YYRES is |
|
null, do not copy; instead, return the length of what the result |
|
would have been. */ |
|
static YYSIZE_T |
|
yytnamerr (char *yyres, const char *yystr) |
|
{ |
|
if (*yystr == '"') |
|
{ |
|
YYSIZE_T yyn = 0; |
|
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; |
| |
|
case '"': |
|
if (yyres) |
|
yyres[yyn] = '\0'; |
|
return yyn; |
|
} |
|
do_not_strip_quotes: ; |
|
} |
| |
#if YYDEBUG |
if (! yyres) |
/*--------------------------------. |
return yystrlen (yystr); |
| Print this symbol on YYOUTPUT. | |
|
`--------------------------------*/ |
|
| |
#if defined (__STDC__) || defined (__cplusplus) |
return yystpcpy (yyres, yystr) - yyres; |
static void |
} |
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) |
|
#else |
|
static void |
|
yysymprint (yyoutput, yytype, yyvaluep) |
|
FILE *yyoutput; |
|
int yytype; |
|
YYSTYPE *yyvaluep; |
|
#endif | #endif |
{ |
|
/* Pacify ``unused variable'' warnings. */ |
|
(void) yyvaluep; |
|
| |
if (yytype < YYNTOKENS) |
/* 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) |
{ | { |
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
int yyn = yypact[yystate]; |
# ifdef YYPRINT |
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
# endif |
return 0; |
} |
|
else | else |
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
{ |
|
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; |
| |
switch (yytype) |
# 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) |
{ | { |
default: |
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
|
{ |
|
yycount = 1; |
|
yysize = yysize0; |
|
yyformat[sizeof yyunexpected - 1] = '\0'; |
break; | break; |
} | } |
YYFPRINTF (yyoutput, ")"); |
yyarg[yycount++] = yytname[yyx]; |
|
yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
|
yysize_overflow |= (yysize1 < yysize); |
|
yysize = yysize1; |
|
yyfmt = yystpcpy (yyfmt, yyprefix); |
|
yyprefix = yyor; |
} | } |
| |
#endif /* ! YYDEBUG */ |
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; |
|
} |
|
} |
|
#endif /* YYERROR_VERBOSE */ |
|
|
|
|
/*-----------------------------------------------. | /*-----------------------------------------------. |
| Release the memory associated to this symbol. | | | Release the memory associated to this symbol. | |
`-----------------------------------------------*/ | `-----------------------------------------------*/ |
| |
#if defined (__STDC__) || defined (__cplusplus) |
/*ARGSUSED*/ |
|
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
static void | static void |
yydestruct (int yytype, YYSTYPE *yyvaluep) |
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
#else | #else |
static void | static void |
yydestruct (yytype, yyvaluep) |
yydestruct (yymsg, yytype, yyvaluep) |
|
const char *yymsg; |
int yytype; | int yytype; |
YYSTYPE *yyvaluep; | YYSTYPE *yyvaluep; |
#endif | #endif |
{ | { |
/* Pacify ``unused variable'' warnings. */ |
YYUSE (yyvaluep); |
(void) yyvaluep; |
|
|
if (!yymsg) |
|
yymsg = "Deleting"; |
|
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| |
switch (yytype) | switch (yytype) |
{ | { |
|
|
/* Prevent warnings from -Wmissing-prototypes. */ | /* Prevent warnings from -Wmissing-prototypes. */ |
| |
#ifdef YYPARSE_PARAM | #ifdef YYPARSE_PARAM |
# if defined (__STDC__) || defined (__cplusplus) |
#if defined __STDC__ || defined __cplusplus |
int yyparse (void *YYPARSE_PARAM); | int yyparse (void *YYPARSE_PARAM); |
# else | # else |
int yyparse (); | int yyparse (); |
# endif | # endif |
#else /* ! YYPARSE_PARAM */ | #else /* ! YYPARSE_PARAM */ |
#if defined (__STDC__) || defined (__cplusplus) |
#if defined __STDC__ || defined __cplusplus |
int yyparse (void); | int yyparse (void); |
#else | #else |
int yyparse (); | int yyparse (); |
|
|
| |
| |
| |
/* The lookahead symbol. */ |
/* The look-ahead symbol. */ |
int yychar; | int yychar; |
| |
/* The semantic value of the lookahead symbol. */ |
/* The semantic value of the look-ahead symbol. */ |
YYSTYPE yylval; | YYSTYPE yylval; |
| |
/* Number of syntax errors so far. */ | /* Number of syntax errors so far. */ |
|
|
`----------*/ | `----------*/ |
| |
#ifdef YYPARSE_PARAM | #ifdef YYPARSE_PARAM |
# if defined (__STDC__) || defined (__cplusplus) |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
int yyparse (void *YYPARSE_PARAM) |
|| defined __cplusplus || defined _MSC_VER) |
|
int |
|
yyparse (void *YYPARSE_PARAM) |
# else | # else |
int yyparse (YYPARSE_PARAM) |
int |
|
yyparse (YYPARSE_PARAM) |
void *YYPARSE_PARAM; | void *YYPARSE_PARAM; |
# endif | # endif |
#else /* ! YYPARSE_PARAM */ | #else /* ! YYPARSE_PARAM */ |
#if defined (__STDC__) || defined (__cplusplus) |
#if (defined __STDC__ || defined __C99__FUNC__ \ |
|
|| defined __cplusplus || defined _MSC_VER) |
int | int |
yyparse (void) | yyparse (void) |
#else | #else |
|
|
#endif | #endif |
{ | { |
| |
register int yystate; |
int yystate; |
register int yyn; |
int yyn; |
int yyresult; | int yyresult; |
/* Number of tokens to shift before error messages enabled. */ | /* Number of tokens to shift before error messages enabled. */ |
int yyerrstatus; | int yyerrstatus; |
/* Lookahead token as an internal (translated) token number. */ |
/* Look-ahead token as an internal (translated) token number. */ |
int yytoken = 0; | 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 |
| |
/* Three stacks and their tools: | /* Three stacks and their tools: |
`yyss': related to states, | `yyss': related to states, |
|
|
to reallocate them elsewhere. */ | to reallocate them elsewhere. */ |
| |
/* The state stack. */ | /* The state stack. */ |
short yyssa[YYINITDEPTH]; |
yytype_int16 yyssa[YYINITDEPTH]; |
short *yyss = yyssa; |
yytype_int16 *yyss = yyssa; |
register short *yyssp; |
yytype_int16 *yyssp; |
| |
/* The semantic value stack. */ | /* The semantic value stack. */ |
YYSTYPE yyvsa[YYINITDEPTH]; | YYSTYPE yyvsa[YYINITDEPTH]; |
YYSTYPE *yyvs = yyvsa; | YYSTYPE *yyvs = yyvsa; |
register YYSTYPE *yyvsp; |
YYSTYPE *yyvsp; |
| |
| |
| |
#define YYPOPSTACK (yyvsp--, yyssp--) |
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
| |
YYSIZE_T yystacksize = YYINITDEPTH; | YYSIZE_T yystacksize = YYINITDEPTH; |
| |
|
|
YYSTYPE yyval; | YYSTYPE yyval; |
| |
| |
/* When reducing, the number of symbols on the RHS of the reduced |
/* The number of symbols on the RHS of the reduced rule. |
rule. */ |
Keep to zero when no symbol should be popped. */ |
int yylen; |
int yylen = 0; |
| |
YYDPRINTF ((stderr, "Starting parse\n")); | YYDPRINTF ((stderr, "Starting parse\n")); |
| |
|
|
`------------------------------------------------------------*/ | `------------------------------------------------------------*/ |
yynewstate: | yynewstate: |
/* In all cases, when you get here, the value and location stacks | /* In all cases, when you get here, the value and location stacks |
have just been pushed. so pushing a state here evens the stacks. |
have just been pushed. So pushing a state here evens the stacks. */ |
*/ |
|
yyssp++; | yyssp++; |
| |
yysetstate: | yysetstate: |
|
|
these so that the &'s don't force the real ones into | these so that the &'s don't force the real ones into |
memory. */ | memory. */ |
YYSTYPE *yyvs1 = yyvs; | YYSTYPE *yyvs1 = yyvs; |
short *yyss1 = yyss; |
yytype_int16 *yyss1 = yyss; |
| |
| |
/* Each stack pointer address is followed by the size of the | /* Each stack pointer address is followed by the size of the |
data in use in that stack, in bytes. This used to be a | data in use in that stack, in bytes. This used to be a |
conditional around just the two extra args, but that might | conditional around just the two extra args, but that might |
be undefined if yyoverflow is a macro. */ | be undefined if yyoverflow is a macro. */ |
yyoverflow ("parser stack overflow", |
yyoverflow (YY_("memory exhausted"), |
&yyss1, yysize * sizeof (*yyssp), | &yyss1, yysize * sizeof (*yyssp), |
&yyvs1, yysize * sizeof (*yyvsp), | &yyvs1, yysize * sizeof (*yyvsp), |
| |
|
|
} | } |
#else /* no yyoverflow */ | #else /* no yyoverflow */ |
# ifndef YYSTACK_RELOCATE | # ifndef YYSTACK_RELOCATE |
goto yyoverflowlab; |
goto yyexhaustedlab; |
# else | # else |
/* Extend the stack our own way. */ | /* Extend the stack our own way. */ |
if (YYMAXDEPTH <= yystacksize) | if (YYMAXDEPTH <= yystacksize) |
goto yyoverflowlab; |
goto yyexhaustedlab; |
yystacksize *= 2; | yystacksize *= 2; |
if (YYMAXDEPTH < yystacksize) | if (YYMAXDEPTH < yystacksize) |
yystacksize = YYMAXDEPTH; | yystacksize = YYMAXDEPTH; |
| |
{ | { |
short *yyss1 = yyss; |
yytype_int16 *yyss1 = yyss; |
union yyalloc *yyptr = | union yyalloc *yyptr = |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
if (! yyptr) | if (! yyptr) |
goto yyoverflowlab; |
goto yyexhaustedlab; |
YYSTACK_RELOCATE (yyss); | YYSTACK_RELOCATE (yyss); |
YYSTACK_RELOCATE (yyvs); | YYSTACK_RELOCATE (yyvs); |
| |
|
|
`-----------*/ | `-----------*/ |
yybackup: | yybackup: |
| |
/* Do appropriate processing given the current state. */ |
/* Do appropriate processing given the current state. Read a |
/* 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. */ |
/* yyresume: */ |
|
|
|
/* 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]; | yyn = yypact[yystate]; |
if (yyn == YYPACT_NINF) | if (yyn == YYPACT_NINF) |
goto yydefault; | 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) | if (yychar == YYEMPTY) |
{ | { |
YYDPRINTF ((stderr, "Reading a token: ")); | YYDPRINTF ((stderr, "Reading a token: ")); |
|
|
else | else |
{ | { |
yytoken = YYTRANSLATE (yychar); | yytoken = YYTRANSLATE (yychar); |
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); |
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
} | } |
| |
/* If the proper action on seeing token YYTOKEN is to reduce or to | /* If the proper action on seeing token YYTOKEN is to reduce or to |
|
|
if (yyn == YYFINAL) | if (yyn == YYFINAL) |
YYACCEPT; | YYACCEPT; |
| |
/* Shift the lookahead token. */ |
|
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); |
|
|
|
/* Discard the token being shifted unless it is eof. */ |
|
if (yychar != YYEOF) |
|
yychar = YYEMPTY; |
|
|
|
*++yyvsp = yylval; |
|
|
|
|
|
/* Count tokens shifted since error; after three, turn off error | /* Count tokens shifted since error; after three, turn off error |
status. */ | status. */ |
if (yyerrstatus) | if (yyerrstatus) |
yyerrstatus--; | yyerrstatus--; |
| |
|
/* Shift the look-ahead token. */ |
|
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
|
|
|
/* Discard the shifted token unless it is eof. */ |
|
if (yychar != YYEOF) |
|
yychar = YYEMPTY; |
|
|
yystate = yyn; | yystate = yyn; |
|
*++yyvsp = yylval; |
|
|
goto yynewstate; | goto yynewstate; |
| |
| |
|
|
case 6: | case 6: |
#line 183 "WQL.y" | #line 183 "WQL.y" |
{ | { |
globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue)); |
globalParserState->statement->appendSelectPropertyName(CIMName((yyvsp[(1) - (1)].strValue))); |
;} | ;} |
break; | break; |
| |
case 7: | case 7: |
#line 187 "WQL.y" | #line 187 "WQL.y" |
{ | { |
globalParserState->statement->appendSelectPropertyName(CIMName(yyvsp[0].strValue)); |
globalParserState->statement->appendSelectPropertyName(CIMName((yyvsp[(3) - (3)].strValue))); |
;} | ;} |
break; | break; |
| |
|
|
case 10: | case 10: |
#line 203 "WQL.y" | #line 203 "WQL.y" |
{ | { |
WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", yyvsp[0].strValue)); |
WQL_TRACE(("YACC: fromClause: TOK_FROM className(%s)\n", (yyvsp[(2) - (2)].strValue))); |
globalParserState->statement->setClassName(CIMName(yyvsp[0].strValue)); |
globalParserState->statement->setClassName(CIMName((yyvsp[(2) - (2)].strValue))); |
;} | ;} |
break; | break; |
| |
|
|
case 17: | case 17: |
#line 240 "WQL.y" | #line 240 "WQL.y" |
{ | { |
WQLOperation op = yyvsp[0].intValue ? WQL_IS_TRUE : WQL_IS_FALSE; |
WQLOperation op = (yyvsp[(3) - (3)].intValue) ? WQL_IS_TRUE : WQL_IS_FALSE; |
globalParserState->statement->appendOperation(op); | globalParserState->statement->appendOperation(op); |
;} | ;} |
break; | break; |
|
|
case 18: | case 18: |
#line 245 "WQL.y" | #line 245 "WQL.y" |
{ | { |
WQLOperation op = yyvsp[0].intValue ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE; |
WQLOperation op = (yyvsp[(4) - (4)].intValue) ? WQL_IS_NOT_TRUE : WQL_IS_NOT_FALSE; |
globalParserState->statement->appendOperation(op); | globalParserState->statement->appendOperation(op); |
;} | ;} |
break; | break; |
|
|
case 30: | case 30: |
#line 316 "WQL.y" | #line 316 "WQL.y" |
{ | { |
yyval.intValue = 1; |
(yyval.intValue) = 1; |
;} | ;} |
break; | break; |
| |
case 31: | case 31: |
#line 320 "WQL.y" | #line 320 "WQL.y" |
{ | { |
yyval.intValue = 0; |
(yyval.intValue) = 0; |
;} | ;} |
break; | break; |
| |
case 32: | case 32: |
#line 333 "WQL.y" | #line 333 "WQL.y" |
{ | { |
WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", yyvsp[0].strValue)); |
WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s)\n", (yyvsp[(1) - (1)].strValue))); |
yyval.strValue = yyvsp[0].strValue; |
(yyval.strValue) = (yyvsp[(1) - (1)].strValue); |
;} | ;} |
break; | break; |
| |
case 33: | case 33: |
#line 338 "WQL.y" | #line 338 "WQL.y" |
{ | { |
WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s.%s)\n", yyvsp[-2].strValue, yyvsp[0].strValue)); |
WQL_TRACE(("YACC: propertyName : TOK_IDENTIFIER(%s.%s)\n", (yyvsp[(1) - (3)].strValue), (yyvsp[(3) - (3)].strValue))); |
#ifdef PEGASUS_SNIA_EXTENSIONS | #ifdef PEGASUS_SNIA_EXTENSIONS |
// Pass anything as a property name to fool parser for SNIA testing | // Pass anything as a property name to fool parser for SNIA testing |
yyval.strValue = strdup("dummy"); |
(yyval.strValue) = strdup("dummy"); |
#else | #else |
yyerror("Scoped (dotted) property names not supported"); | yyerror("Scoped (dotted) property names not supported"); |
#endif | #endif |
|
|
case 34: | case 34: |
#line 350 "WQL.y" | #line 350 "WQL.y" |
{ | { |
WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", yyvsp[0].strValue)); |
WQL_TRACE(("YACC: TOK_IDENTIFIER %s\n", (yyvsp[(1) - (1)].strValue))); |
yyval.strValue = yyvsp[0].strValue; |
(yyval.strValue) = (yyvsp[(1) - (1)].strValue); |
;} | ;} |
break; | break; |
| |
|
|
#line 357 "WQL.y" | #line 357 "WQL.y" |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].strValue, WQL_PROPERTY_NAME_TAG)); |
WQLOperand((yyvsp[(1) - (1)].strValue), WQL_PROPERTY_NAME_TAG)); |
globalParserState->statement->appendWherePropertyName(CIMName(yyvsp[0].strValue)); |
globalParserState->statement->appendWherePropertyName(CIMName((yyvsp[(1) - (1)].strValue))); |
;} | ;} |
break; | break; |
| |
|
|
#line 363 "WQL.y" | #line 363 "WQL.y" |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].intValue, WQL_INTEGER_VALUE_TAG)); |
WQLOperand((yyvsp[(1) - (1)].intValue), WQL_INTEGER_VALUE_TAG)); |
;} | ;} |
break; | break; |
| |
|
|
#line 368 "WQL.y" | #line 368 "WQL.y" |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].doubleValue, WQL_DOUBLE_VALUE_TAG)); |
WQLOperand((yyvsp[(1) - (1)].doubleValue), WQL_DOUBLE_VALUE_TAG)); |
;} | ;} |
break; | break; |
| |
|
|
#line 373 "WQL.y" | #line 373 "WQL.y" |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].strValue, WQL_STRING_VALUE_TAG)); |
WQLOperand((yyvsp[(1) - (1)].strValue), WQL_STRING_VALUE_TAG)); |
;} | ;} |
break; | break; |
| |
|
|
#line 378 "WQL.y" | #line 378 "WQL.y" |
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
WQLOperand(yyvsp[0].intValue != 0, WQL_BOOLEAN_VALUE_TAG)); |
WQLOperand((yyvsp[(1) - (1)].intValue) != 0, WQL_BOOLEAN_VALUE_TAG)); |
;} | ;} |
break; | break; |
| |
| |
|
/* Line 1267 of yacc.c. */ |
|
#line 1760 "WQLtemp" |
|
default: break; |
} | } |
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| |
/* Line 1000 of yacc.c. */ |
YYPOPSTACK (yylen); |
#line 1429 "WQLtemp" |
yylen = 0; |
|
|
yyvsp -= yylen; |
|
yyssp -= yylen; |
|
|
|
|
|
YY_STACK_PRINT (yyss, yyssp); | YY_STACK_PRINT (yyss, yyssp); |
| |
*++yyvsp = yyval; | *++yyvsp = yyval; |
|
|
if (!yyerrstatus) | if (!yyerrstatus) |
{ | { |
++yynerrs; | ++yynerrs; |
#if YYERROR_VERBOSE |
#if ! YYERROR_VERBOSE |
yyn = yypact[yystate]; |
yyerror (YY_("syntax error")); |
|
#else |
if (YYPACT_NINF < yyn && yyn < YYLAST) |
|
{ | { |
YYSIZE_T yysize = 0; |
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
int yytype = YYTRANSLATE (yychar); |
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
const char* yyprefix; |
|
char *yymsg; |
|
int yyx; |
|
|
|
/* 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; |
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
|
int yycount = 0; |
|
|
|
yyprefix = ", expecting "; |
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
|
{ | { |
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); |
YYSIZE_T yyalloc = 2 * yysize; |
yycount += 1; |
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
if (yycount == 5) |
yyalloc = YYSTACK_ALLOC_MAXIMUM; |
|
if (yymsg != yymsgbuf) |
|
YYSTACK_FREE (yymsg); |
|
yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
|
if (yymsg) |
|
yymsg_alloc = yyalloc; |
|
else |
{ | { |
yysize = 0; |
yymsg = yymsgbuf; |
break; |
yymsg_alloc = sizeof yymsgbuf; |
} | } |
} | } |
yysize += (sizeof ("syntax error, unexpected ") |
|
+ yystrlen (yytname[yytype])); |
|
yymsg = (char *) YYSTACK_ALLOC (yysize); |
|
if (yymsg != 0) |
|
{ |
|
char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); |
|
yyp = yystpcpy (yyp, yytname[yytype]); |
|
| |
if (yycount < 5) |
if (0 < yysize && yysize <= yymsg_alloc) |
{ | { |
yyprefix = ", expecting "; |
(void) yysyntax_error (yymsg, yystate, yychar); |
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
|
{ |
|
yyp = yystpcpy (yyp, yyprefix); |
|
yyp = yystpcpy (yyp, yytname[yyx]); |
|
yyprefix = " or "; |
|
} |
|
} |
|
yyerror (yymsg); | yyerror (yymsg); |
YYSTACK_FREE (yymsg); |
|
} | } |
else | else |
yyerror ("syntax error; also virtual memory exhausted"); |
{ |
|
yyerror (YY_("syntax error")); |
|
if (yysize != 0) |
|
goto yyexhaustedlab; |
} | } |
else |
} |
#endif /* YYERROR_VERBOSE */ |
#endif |
yyerror ("syntax error"); |
|
} | } |
| |
| |
| |
if (yyerrstatus == 3) | if (yyerrstatus == 3) |
{ | { |
/* If just tried and failed to reuse lookahead token after an |
/* If just tried and failed to reuse look-ahead token after an |
error, discard it. */ | error, discard it. */ |
| |
if (yychar <= YYEOF) | if (yychar <= YYEOF) |
{ | { |
/* If at end of input, pop the error token, |
/* Return failure if at end of input. */ |
then the rest of the stack, then return failure. */ |
|
if (yychar == YYEOF) | if (yychar == YYEOF) |
for (;;) |
|
{ |
|
YYPOPSTACK; |
|
if (yyssp == yyss) |
|
YYABORT; | YYABORT; |
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
|
yydestruct (yystos[*yyssp], yyvsp); |
|
} |
|
} | } |
else | else |
{ | { |
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); |
yydestruct ("Error: discarding", |
yydestruct (yytoken, &yylval); |
yytoken, &yylval); |
yychar = YYEMPTY; | 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. */ | token. */ |
goto yyerrlab1; | goto yyerrlab1; |
| |
|
|
`---------------------------------------------------*/ | `---------------------------------------------------*/ |
yyerrorlab: | yyerrorlab: |
| |
#ifdef __GNUC__ |
/* Pacify compilers like GCC when the user code never invokes |
/* Pacify GCC when the user code never invokes YYERROR and the label |
YYERROR and the label yyerrorlab therefore never appears in user |
yyerrorlab therefore never appears in user code. */ |
code. */ |
if (0) |
if (/*CONSTCOND*/ 0) |
goto yyerrorlab; | goto yyerrorlab; |
#endif |
|
| |
yyvsp -= yylen; |
/* Do not reclaim the symbols of the rule which action triggered |
yyssp -= yylen; |
this YYERROR. */ |
|
YYPOPSTACK (yylen); |
|
yylen = 0; |
|
YY_STACK_PRINT (yyss, yyssp); |
yystate = *yyssp; | yystate = *yyssp; |
goto yyerrlab1; | goto yyerrlab1; |
| |
|
|
if (yyssp == yyss) | if (yyssp == yyss) |
YYABORT; | YYABORT; |
| |
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
|
yydestruct (yystos[yystate], yyvsp); |
yydestruct ("Error: popping", |
YYPOPSTACK; |
yystos[yystate], yyvsp); |
|
YYPOPSTACK (1); |
yystate = *yyssp; | yystate = *yyssp; |
YY_STACK_PRINT (yyss, yyssp); | YY_STACK_PRINT (yyss, yyssp); |
} | } |
|
|
if (yyn == YYFINAL) | if (yyn == YYFINAL) |
YYACCEPT; | YYACCEPT; |
| |
YYDPRINTF ((stderr, "Shifting error token, ")); |
|
|
|
*++yyvsp = yylval; | *++yyvsp = yylval; |
| |
| |
|
/* Shift the error token. */ |
|
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
|
|
yystate = yyn; | yystate = yyn; |
goto yynewstate; | goto yynewstate; |
| |
|
|
goto yyreturn; | goto yyreturn; |
| |
#ifndef yyoverflow | #ifndef yyoverflow |
/*----------------------------------------------. |
/*-------------------------------------------------. |
| yyoverflowlab -- parser overflow comes here. | |
| yyexhaustedlab -- memory exhaustion comes here. | |
`----------------------------------------------*/ |
`-------------------------------------------------*/ |
yyoverflowlab: |
yyexhaustedlab: |
yyerror ("parser stack overflow"); |
yyerror (YY_("memory exhausted")); |
yyresult = 2; | yyresult = 2; |
/* Fall through. */ | /* Fall through. */ |
#endif | #endif |
| |
yyreturn: | yyreturn: |
|
if (yychar != YYEOF && yychar != YYEMPTY) |
|
yydestruct ("Cleanup: discarding lookahead", |
|
yytoken, &yylval); |
|
/* 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); |
|
YYPOPSTACK (1); |
|
} |
#ifndef yyoverflow | #ifndef yyoverflow |
if (yyss != yyssa) | if (yyss != yyssa) |
YYSTACK_FREE (yyss); | YYSTACK_FREE (yyss); |
#endif | #endif |
return yyresult; |
#if YYERROR_VERBOSE |
|
if (yymsg != yymsgbuf) |
|
YYSTACK_FREE (yymsg); |
|
#endif |
|
/* Make sure YYID is used. */ |
|
return YYID (yyresult); |
} | } |
| |
| |