version 1.2, 2015/01/05 13:57:59
|
version 1.3, 2015/02/13 22:16:08
|
|
|
/* To be inserted in other files to bypass the chksrc tests */ | /* To be inserted in other files to bypass the chksrc tests */ |
/* NOCHKSRC */ | /* NOCHKSRC */ |
| |
/* A Bison parser, made by GNU Bison 2.5. */ |
/* A Bison parser, made by GNU Bison 3.0.2. */ |
| |
/* Skeleton implementation for Bison GLR parsers in C | /* Skeleton implementation for Bison GLR parsers in C |
| |
Copyright (C) 2002-2011 Free Software Foundation, Inc. |
Copyright (C) 2002-2013 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 |
|
|
#define YYBISON 1 | #define YYBISON 1 |
| |
/* Bison version. */ | /* Bison version. */ |
#define YYBISON_VERSION "2.5" |
#define YYBISON_VERSION "3.0.2" |
| |
/* Skeleton name. */ | /* Skeleton name. */ |
#define YYSKELETON_NAME "glr.c" | #define YYSKELETON_NAME "glr.c" |
|
|
/* Pure parsers. */ | /* Pure parsers. */ |
#define YYPURE 0 | #define YYPURE 0 |
| |
/* Using locations. */ |
|
#define YYLSP_NEEDED 0 |
|
| |
| |
/* Substitute the variable and function names. */ | /* Substitute the variable and function names. */ |
#define yyparse FQL_parse | #define yyparse FQL_parse |
#define yylex FQL_lex | #define yylex FQL_lex |
#define yyerror FQL_error | #define yyerror FQL_error |
|
#define yydebug FQL_debug |
|
|
#define yylval FQL_lval | #define yylval FQL_lval |
#define yychar FQL_char | #define yychar FQL_char |
#define yydebug FQL_debug |
|
#define yynerrs FQL_nerrs | #define yynerrs FQL_nerrs |
#define yylloc FQL_lloc |
|
| |
/* Copy the first part of user declarations. */ |
/* First part of user declarations. */ |
|
#line 37 "FQL.y" /* glr.c:207 */ |
/* Line 172 of glr.c */ |
|
#line 37 "FQL.y" |
|
| |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
| |
|
#line 122 "FQLYACC" /* glr.c:207 */ |
| |
/* Line 172 of glr.c */ |
# ifndef YY_NULLPTR |
#line 127 "FQLYACC" |
# if defined __cplusplus && 201103L <= __cplusplus |
|
# define YY_NULLPTR nullptr |
|
# else |
|
# define YY_NULLPTR 0 |
|
# endif |
|
# endif |
| |
#include "FQLYACC.h" | #include "FQLYACC.h" |
| |
/* Enabling traces. */ |
|
#ifndef YYDEBUG |
|
# define YYDEBUG 0 |
|
#endif |
|
|
|
/* Enabling verbose error messages. */ | /* Enabling verbose error messages. */ |
#ifdef YYERROR_VERBOSE | #ifdef YYERROR_VERBOSE |
# undef YYERROR_VERBOSE | # undef YYERROR_VERBOSE |
|
|
# define YYERROR_VERBOSE 1 | # define YYERROR_VERBOSE 1 |
#endif | #endif |
| |
/* Enabling the token table. */ |
|
#ifndef YYTOKEN_TABLE |
|
# define YYTOKEN_TABLE 0 |
|
#endif |
|
|
|
/* Default (constant) value used for initialization for null | /* Default (constant) value used for initialization for null |
right-hand sides. Unlike the standard yacc.c template, |
right-hand sides. Unlike the standard yacc.c template, here we set |
here we set the default value of $$ to a zeroed-out value. |
the default value of $$ to a zeroed-out value. Since the default |
Since the default value is undefined, this behavior is |
value is undefined, this behavior is technically correct. */ |
technically correct. */ |
|
static YYSTYPE yyval_default; | static YYSTYPE yyval_default; |
| |
/* Copy the second part of user declarations. */ | /* Copy the second part of user declarations. */ |
| |
|
#line 150 "FQLYACC" /* glr.c:230 */ |
/* Line 243 of glr.c */ |
|
#line 162 "FQLYACC" |
|
| |
#include <stdio.h> | #include <stdio.h> |
#include <stdlib.h> | #include <stdlib.h> |
|
|
# if defined YYENABLE_NLS && YYENABLE_NLS | # if defined YYENABLE_NLS && YYENABLE_NLS |
# if ENABLE_NLS | # if ENABLE_NLS |
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
# define YY_(msgid) dgettext ("bison-runtime", msgid) |
# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
# endif | # endif |
# endif | # endif |
# ifndef YY_ | # ifndef YY_ |
# define YY_(msgid) msgid |
# define YY_(Msgid) Msgid |
# endif | # endif |
#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 |
|
static int |
|
YYID (i) |
|
int i; |
|
#endif |
|
{ |
|
return i; |
|
} |
|
#endif |
|
|
|
#ifndef YYFREE | #ifndef YYFREE |
# define YYFREE free | # define YYFREE free |
#endif | #endif |
|
|
#ifndef YYSETJMP | #ifndef YYSETJMP |
# include <setjmp.h> | # include <setjmp.h> |
# define YYJMP_BUF jmp_buf | # define YYJMP_BUF jmp_buf |
# define YYSETJMP(env) setjmp (env) |
# define YYSETJMP(Env) setjmp (Env) |
# define YYLONGJMP(env, val) longjmp (env, val) |
/* Pacify clang. */ |
|
# define YYLONGJMP(Env, Val) (longjmp (Env, Val), YYASSERT (0)) |
#endif | #endif |
| |
/*-----------------. |
#ifndef YY_ATTRIBUTE |
| GCC extensions. | |
# if (defined __GNUC__ \ |
`-----------------*/ |
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
|
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
#ifndef __attribute__ |
# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
/* This feature is available in gcc versions 2.5 and later. */ |
# else |
# if (! defined __GNUC__ || __GNUC__ < 2 \ |
# define YY_ATTRIBUTE(Spec) /* empty */ |
|| (__GNUC__ == 2 && __GNUC_MINOR__ < 5) \ |
|
|| (defined __STRICT_ANSI__ && __STRICT_ANSI__)) |
|
# define __attribute__(Spec) /* empty */ |
|
# endif | # endif |
#endif | #endif |
| |
|
#ifndef YY_ATTRIBUTE_PURE |
|
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
|
#endif |
| |
#ifdef __cplusplus |
#ifndef YY_ATTRIBUTE_UNUSED |
# define YYOPTIONAL_LOC(Name) /* empty */ |
# 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 | #else |
# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__)) |
# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) |
|
# endif |
#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 |
|
|
|
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
|
/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
|
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
|
_Pragma ("GCC diagnostic push") \ |
|
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
|
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
|
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
|
_Pragma ("GCC diagnostic pop") |
|
#else |
|
# 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 |
|
#endif |
|
#ifndef YY_INITIAL_VALUE |
|
# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
|
#endif |
|
|
|
|
#ifndef YYASSERT | #ifndef YYASSERT |
# define YYASSERT(condition) ((void) ((condition) || (abort (), 0))) |
# define YYASSERT(Condition) ((void) ((Condition) || (abort (), 0))) |
#endif | #endif |
| |
/* YYFINAL -- State number of the termination state. */ | /* YYFINAL -- State number of the termination state. */ |
|
|
}; | }; |
| |
#if YYDEBUG | #if YYDEBUG |
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
|
YYRHS. */ |
|
static const unsigned char yyprhs[] = |
|
{ |
|
0, 0, 3, 5, 7, 9, 12, 16, 20, 24, |
|
26, 30, 34, 38, 42, 46, 50, 55, 60, 65, |
|
69, 73, 78, 83, 85, 87, 89, 91, 95, 97, |
|
99, 101, 103, 105, 107, 109, 111, 113, 116, 118, |
|
120, 123, 126, 130, 132, 136, 138, 140, 142, 144, |
|
146, 148, 150, 152, 154, 156, 158, 160, 162, 164, |
|
166, 168, 170, 172, 174, 176, 178, 180, 182 |
|
}; |
|
|
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
|
static const signed char yyrhs[] = |
|
{ |
|
39, 0, -1, 40, -1, 41, -1, 42, -1, 41, |
|
42, -1, 42, 24, 42, -1, 42, 23, 42, -1, |
|
32, 42, 33, -1, 43, -1, 45, 50, 53, -1, |
|
46, 49, 57, -1, 48, 49, 48, -1, 44, 49, |
|
57, -1, 44, 49, 46, -1, 44, 49, 44, -1, |
|
52, 45, 49, 57, -1, 52, 45, 49, 46, -1, |
|
52, 45, 49, 44, -1, 46, 51, 47, -1, 44, |
|
51, 47, -1, 52, 45, 51, 47, -1, 28, 30, |
|
56, 31, -1, 48, -1, 48, -1, 8, -1, 28, |
|
-1, 48, 14, 28, -1, 15, -1, 16, -1, 17, |
|
-1, 19, -1, 18, -1, 20, -1, 15, -1, 16, |
|
-1, 21, -1, 22, 21, -1, 26, -1, 27, -1, |
|
22, 26, -1, 22, 27, -1, 34, 54, 35, -1, |
|
55, -1, 54, 36, 55, -1, 58, -1, 8, -1, |
|
3, -1, 4, -1, 5, -1, 9, -1, 29, -1, |
|
3, -1, 58, -1, 8, -1, 59, -1, 4, -1, |
|
5, -1, 9, -1, 29, -1, 12, -1, 10, -1, |
|
11, -1, 60, -1, 61, -1, 62, -1, 3, -1, |
|
7, -1, 6, -1 |
|
}; |
|
|
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
static const unsigned short int yyrline[] = | static const unsigned short int yyrline[] = |
{ | { |
|
|
}; | }; |
#endif | #endif |
| |
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
#if YYDEBUG || YYERROR_VERBOSE || 1 |
/* YYTNAME[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[] = |
|
|
"scalarProperty", "likePattern", "property", "scalarCompOp", | "scalarProperty", "likePattern", "property", "scalarCompOp", |
"arrayCompOp", "likeOp", "arrayOp", "arrayLiteral", "arrayLiteralList", | "arrayCompOp", "likeOp", "arrayOp", "arrayLiteral", "arrayLiteralList", |
"arrayLiteralEntry", "index", "scalarLiteral", "booleanLiteral", | "arrayLiteralEntry", "index", "scalarLiteral", "booleanLiteral", |
"integerLiteral", "decimalLiteral", "binaryLiteral", "hexLiteral", 0 |
"integerLiteral", "decimalLiteral", "binaryLiteral", "hexLiteral", YY_NULLPTR |
}; | }; |
#endif | #endif |
| |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
#define YYPACT_NINF -65 |
static const unsigned char yyr1[] = |
#define YYTABLE_NINF -1 |
{ |
|
0, 38, 39, 40, 41, 41, 42, 42, 42, 42, |
|
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, |
|
43, 43, 44, 45, 46, 47, 48, 48, 49, 49, |
|
49, 49, 49, 49, 50, 50, 51, 51, 52, 52, |
|
52, 52, 53, 54, 54, 55, 55, 55, 55, 55, |
|
55, 55, 56, 57, 57, 57, 57, 57, 57, 57, |
|
57, 58, 58, 59, 59, 59, 60, 61, 62 |
|
}; |
|
|
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
|
static const unsigned char yyr2[] = |
|
{ |
|
0, 2, 1, 1, 1, 2, 3, 3, 3, 1, |
|
3, 3, 3, 3, 3, 3, 4, 4, 4, 3, |
|
3, 4, 4, 1, 1, 1, 1, 3, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, |
|
2, 2, 3, 1, 3, 1, 1, 1, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 1, 1 |
|
}; |
|
|
|
/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */ |
|
static const unsigned char yydprec[] = |
|
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0 |
|
}; |
|
| |
/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */ |
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
static const unsigned char yymerger[] = |
STATE-NUM. */ |
|
static const signed char yypact[] = |
{ | { |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
54, -16, -65, -65, -14, 54, 24, -65, 54, 5, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
-65, 76, 22, 76, 85, 2, -65, -65, 30, -1, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
-65, 5, 54, 54, -65, -65, -65, -65, -65, -65, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
-65, 14, 46, 32, -65, -65, 9, 61, 32, 18, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
2, -65, 76, 45, -65, 29, -65, -65, -65, -65, |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
-65, -65, -65, -65, -65, -65, -65, -65, -65, -65, |
0, 0, 0, 0, 0, 0, 0, 0, 0 |
-65, -65, -65, 45, -65, -65, -65, -65, -65, -65, |
|
-65, -65, 10, -65, -65, -65, -65, 45, 46, 32, |
|
-65, -65, -65, -65, -65, -65, -65, 6, -65, -65, |
|
-65, -65, -65, -65, -65, 10, -65 |
}; | }; |
| |
/* YYDEFACT[S] -- default reduction number in state S. Performed when |
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
YYTABLE doesn't specify something else to do. Zero means the default |
Performed when YYTABLE does not specify something else to do. Zero |
is an error. */ |
means the default is an error. */ |
static const unsigned char yydefact[] = | static const unsigned char yydefact[] = |
{ | { |
0, 0, 38, 39, 26, 0, 0, 2, 3, 4, | 0, 0, 38, 39, 26, 0, 0, 2, 3, 4, |
|
|
18, 17, 16, 21, 42, 0, 44 | 18, 17, 16, 21, 42, 0, 44 |
}; | }; |
| |
/* YYPDEFGOTO[NTERM-NUM]. */ |
|
static const signed char yydefgoto[] = |
|
{ |
|
-1, 6, 7, 8, 9, 10, 11, 12, 13, 71, |
|
14, 32, 36, 33, 15, 73, 87, 88, 45, 64, |
|
65, 66, 67, 68, 69 |
|
}; |
|
|
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
|
STATE-NUM. */ |
|
#define YYPACT_NINF -65 |
|
static const signed char yypact[] = |
|
{ |
|
54, -16, -65, -65, -14, 54, 24, -65, 54, 5, |
|
-65, 76, 22, 76, 85, 2, -65, -65, 30, -1, |
|
-65, 5, 54, 54, -65, -65, -65, -65, -65, -65, |
|
-65, 14, 46, 32, -65, -65, 9, 61, 32, 18, |
|
2, -65, 76, 45, -65, 29, -65, -65, -65, -65, |
|
-65, -65, -65, -65, -65, -65, -65, -65, -65, -65, |
|
-65, -65, -65, 45, -65, -65, -65, -65, -65, -65, |
|
-65, -65, 10, -65, -65, -65, -65, 45, 46, 32, |
|
-65, -65, -65, -65, -65, -65, -65, 6, -65, -65, |
|
-65, -65, -65, -65, -65, 10, -65 |
|
}; |
|
|
|
/* YYPGOTO[NTERM-NUM]. */ | /* YYPGOTO[NTERM-NUM]. */ |
static const signed char yypgoto[] = | static const signed char yypgoto[] = |
{ | { |
|
|
-64, -65, -65, -65, -65 | -64, -65, -65, -65, -65 |
}; | }; |
| |
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
/* YYDEFGOTO[NTERM-NUM]. */ |
positive, shift that token. If negative, reduce the rule which |
static const signed char yydefgoto[] = |
|
{ |
|
-1, 6, 7, 8, 9, 10, 11, 12, 13, 71, |
|
14, 32, 36, 33, 15, 73, 87, 88, 45, 64, |
|
65, 66, 67, 68, 69 |
|
}; |
|
|
|
/* 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. */ | number is the opposite. If YYTABLE_NINF, syntax error. */ |
#define YYTABLE_NINF -1 |
|
static const unsigned char yytable[] = | static const unsigned char yytable[] = |
{ | { |
43, 61, 62, 75, 74, 37, 40, 38, 89, 19, | 43, 61, 62, 75, 74, 37, 40, 38, 89, 19, |
|
|
24, 25, 26, 27, 28, 29 | 24, 25, 26, 27, 28, 29 |
}; | }; |
| |
/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of |
|
list of conflicting reductions corresponding to action entry for |
|
state STATE-NUM in yytable. 0 means no conflicts. The list in |
|
yyconfl is terminated by a rule number of 0. */ |
|
static const unsigned char yyconflp[] = |
|
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
1, 4, 7, 9, 11, 13 |
|
}; |
|
|
|
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by |
|
0, pointed into by YYCONFLP. */ |
|
static const short int yyconfl[] = |
|
{ |
|
0, 23, 24, 0, 23, 24, 0, 24, 0, 24, |
|
0, 24, 0, 24, 0 |
|
}; |
|
|
|
static const signed char yycheck[] = | static const signed char yycheck[] = |
{ | { |
15, 32, 32, 38, 37, 13, 14, 13, 72, 5, | 15, 32, 32, 38, 37, 13, 14, 13, 72, 5, |
|
|
44, 46, 57, 47, 35, 36, 55 | 44, 46, 57, 47, 35, 36, 55 |
}; | }; |
| |
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
|
static const unsigned char yyr1[] = |
|
{ |
|
0, 38, 39, 40, 41, 41, 42, 42, 42, 42, |
|
43, 43, 43, 43, 43, 43, 43, 43, 43, 43, |
|
43, 43, 44, 45, 46, 47, 48, 48, 49, 49, |
|
49, 49, 49, 49, 50, 50, 51, 51, 52, 52, |
|
52, 52, 53, 54, 54, 55, 55, 55, 55, 55, |
|
55, 55, 56, 57, 57, 57, 57, 57, 57, 57, |
|
57, 58, 58, 59, 59, 59, 60, 61, 62 |
|
}; |
| |
/* Prevent warning if -Wmissing-prototypes. */ |
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
int yyparse (void); |
static const unsigned char yyr2[] = |
|
{ |
|
0, 2, 1, 1, 1, 2, 3, 3, 3, 1, |
|
3, 3, 3, 3, 3, 3, 4, 4, 4, 3, |
|
3, 4, 4, 1, 1, 1, 1, 3, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 2, 1, 1, |
|
2, 2, 3, 1, 3, 1, 1, 1, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
|
1, 1, 1, 1, 1, 1, 1, 1, 1 |
|
}; |
| |
/* Error token number */ |
|
#define YYTERROR 1 |
|
| |
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none). */ |
If N is 0, then set CURRENT to the empty location which ends |
static const unsigned char yydprec[] = |
the previous symbol: RHS[0] (always defined). */ |
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0 |
|
}; |
| |
|
/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM. */ |
|
static const unsigned char yymerger[] = |
|
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0 |
|
}; |
| |
#ifndef YYLLOC_DEFAULT |
/* YYIMMEDIATE[RULE-NUM] -- True iff rule #RULE-NUM is not to be deferred, as |
# define YYLLOC_DEFAULT(Current, Rhs, N) ((void) 0) |
in the case of predicates. */ |
#endif |
static const yybool yyimmediate[] = |
|
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0 |
|
}; |
| |
|
/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of |
|
list of conflicting reductions corresponding to action entry for |
|
state STATE-NUM in yytable. 0 means no conflicts. The list in |
|
yyconfl is terminated by a rule number of 0. */ |
|
static const unsigned char yyconflp[] = |
|
{ |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
1, 4, 7, 9, 11, 13 |
|
}; |
| |
#ifndef YY_LOCATION_PRINT |
/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by |
# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
0, pointed into by YYCONFLP. */ |
#endif |
static const short int yyconfl[] = |
|
{ |
|
0, 23, 24, 0, 23, 24, 0, 24, 0, 24, |
|
0, 24, 0, 24, 0 |
|
}; |
|
|
|
/* Error token number */ |
|
#define YYTERROR 1 |
| |
| |
/* YYLEX -- calling `yylex' with the right arguments. */ |
|
#define YYLEX yylex () |
|
| |
YYSTYPE yylval; | YYSTYPE yylval; |
| |
YYLTYPE yylloc; |
|
|
|
int yynerrs; | int yynerrs; |
int yychar; | int yychar; |
| |
|
|
typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG; | typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG; |
| |
#define YYCHK(YYE) \ | #define YYCHK(YYE) \ |
do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; } \ |
do { \ |
while (YYID (0)) |
YYRESULTTAG yychk_flag = YYE; \ |
|
if (yychk_flag != yyok) \ |
|
return yychk_flag; \ |
|
} while (0) |
| |
#if YYDEBUG | #if YYDEBUG |
| |
|
|
# define YYFPRINTF fprintf | # define YYFPRINTF fprintf |
# endif | # endif |
| |
|
/* This macro is provided for backward compatibility. */ |
|
#ifndef YY_LOCATION_PRINT |
|
# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
|
#endif |
|
|
|
|
# define YYDPRINTF(Args) \ | # define YYDPRINTF(Args) \ |
do { \ | do { \ |
if (yydebug) \ | if (yydebug) \ |
YYFPRINTF Args; \ | YYFPRINTF Args; \ |
} while (YYID (0)) |
} while (0) |
| |
| |
/*--------------------------------. |
/*----------------------------------------. |
| Print this symbol on YYOUTPUT. | |
| Print this symbol's value on YYOUTPUT. | |
`--------------------------------*/ |
`----------------------------------------*/ |
| |
/*ARGSUSED*/ |
|
static void | static void |
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
{ | { |
|
FILE *yyo = yyoutput; |
|
YYUSE (yyo); |
if (!yyvaluep) | if (!yyvaluep) |
return; | return; |
# ifdef YYPRINT |
YYUSE (yytype); |
if (yytype < YYNTOKENS) |
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
|
# else |
|
YYUSE (yyoutput); |
|
# endif |
|
switch (yytype) |
|
{ |
|
default: |
|
break; |
|
} |
|
} | } |
| |
| |
|
|
static void | static void |
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
{ | { |
if (yytype < YYNTOKENS) |
YYFPRINTF (yyoutput, "%s %s (", |
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
else |
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
|
| |
yy_symbol_value_print (yyoutput, yytype, yyvaluep); | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
YYFPRINTF (yyoutput, ")"); | YYFPRINTF (yyoutput, ")"); |
|
|
if (yydebug) \ | if (yydebug) \ |
{ \ | { \ |
YYFPRINTF (stderr, "%s ", Title); \ | YYFPRINTF (stderr, "%s ", Title); \ |
yy_symbol_print (stderr, Type, \ |
yy_symbol_print (stderr, Type, Value); \ |
Value); \ |
|
YYFPRINTF (stderr, "\n"); \ | YYFPRINTF (stderr, "\n"); \ |
} \ | } \ |
} while (YYID (0)) |
} while (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; |
| |
|
struct yyGLRStack; |
|
static void yypstack (struct yyGLRStack* yystackp, size_t yyk) |
|
YY_ATTRIBUTE_UNUSED; |
|
static void yypdumpstack (struct yyGLRStack* yystackp) |
|
YY_ATTRIBUTE_UNUSED; |
|
|
#else /* !YYDEBUG */ | #else /* !YYDEBUG */ |
| |
# define YYDPRINTF(Args) | # define YYDPRINTF(Args) |
|
|
#define YYHEADROOM 2 | #define YYHEADROOM 2 |
| |
#ifndef YYSTACKEXPANDABLE | #ifndef YYSTACKEXPANDABLE |
# if (! defined __cplusplus \ |
|
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)) |
|
# define YYSTACKEXPANDABLE 1 | # define YYSTACKEXPANDABLE 1 |
# else |
|
# define YYSTACKEXPANDABLE 0 |
|
# endif |
|
#endif | #endif |
| |
#if YYSTACKEXPANDABLE | #if YYSTACKEXPANDABLE |
|
|
do { \ | do { \ |
if (Yystack->yyspaceLeft < YYHEADROOM) \ | if (Yystack->yyspaceLeft < YYHEADROOM) \ |
yyexpandGLRStack (Yystack); \ | yyexpandGLRStack (Yystack); \ |
} while (YYID (0)) |
} while (0) |
#else | #else |
# define YY_RESERVE_GLRSTACK(Yystack) \ | # define YY_RESERVE_GLRSTACK(Yystack) \ |
do { \ | do { \ |
if (Yystack->yyspaceLeft < YYHEADROOM) \ | if (Yystack->yyspaceLeft < YYHEADROOM) \ |
yyMemoryExhausted (Yystack); \ | yyMemoryExhausted (Yystack); \ |
} while (YYID (0)) |
} while (0) |
#endif | #endif |
| |
| |
|
|
typedef int yyRuleNum; | typedef int yyRuleNum; |
| |
/** Grammar symbol */ | /** Grammar symbol */ |
typedef short int yySymbol; |
typedef int yySymbol; |
| |
/** Item references, as in LALR(1) machine */ | /** Item references, as in LALR(1) machine */ |
typedef short int yyItemNum; | typedef short int yyItemNum; |
|
|
yyStateNum yylrState; | yyStateNum yylrState; |
/** Preceding state in this stack */ | /** Preceding state in this stack */ |
yyGLRState* yypred; | yyGLRState* yypred; |
/** Source position of the first token produced by my symbol */ |
/** Source position of the last token produced by my symbol */ |
size_t yyposn; | size_t yyposn; |
union { | union { |
/** First in a chain of alternative reductions producing the | /** First in a chain of alternative reductions producing the |
|
|
/** Semantic value for this state. */ | /** Semantic value for this state. */ |
YYSTYPE yysval; | YYSTYPE yysval; |
} yysemantics; | } yysemantics; |
/** Source location for this state. */ |
|
YYLTYPE yyloc; |
|
}; | }; |
| |
struct yyGLRStateSet { | struct yyGLRStateSet { |
|
|
/** The lookahead for this reduction. */ | /** The lookahead for this reduction. */ |
int yyrawchar; | int yyrawchar; |
YYSTYPE yyval; | YYSTYPE yyval; |
YYLTYPE yyloc; |
|
/** Next sibling in chain of options. To facilitate merging, | /** Next sibling in chain of options. To facilitate merging, |
* options are chained in decreasing order by address. */ | * options are chained in decreasing order by address. */ |
yySemanticOption* yynext; | yySemanticOption* yynext; |
|
|
static void yyexpandGLRStack (yyGLRStack* yystackp); | static void yyexpandGLRStack (yyGLRStack* yystackp); |
#endif | #endif |
| |
static void yyFail (yyGLRStack* yystackp, const char* yymsg) |
static _Noreturn void |
__attribute__ ((__noreturn__)); |
|
static void |
|
yyFail (yyGLRStack* yystackp, const char* yymsg) | yyFail (yyGLRStack* yystackp, const char* yymsg) |
{ | { |
if (yymsg != NULL) |
if (yymsg != YY_NULLPTR) |
yyerror (yymsg); | yyerror (yymsg); |
YYLONGJMP (yystackp->yyexception_buffer, 1); | YYLONGJMP (yystackp->yyexception_buffer, 1); |
} | } |
| |
static void yyMemoryExhausted (yyGLRStack* yystackp) |
static _Noreturn void |
__attribute__ ((__noreturn__)); |
|
static void |
|
yyMemoryExhausted (yyGLRStack* yystackp) | yyMemoryExhausted (yyGLRStack* yystackp) |
{ | { |
YYLONGJMP (yystackp->yyexception_buffer, 2); | YYLONGJMP (yystackp->yyexception_buffer, 2); |
|
|
/** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting | /** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting |
* at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred | * at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred |
* containing the pointer to the next state in the chain. */ | * containing the pointer to the next state in the chain. */ |
static void yyfillin (yyGLRStackItem *, int, int) __attribute__ ((__unused__)); |
static void yyfillin (yyGLRStackItem *, int, int) YY_ATTRIBUTE_UNUSED; |
static void | static void |
yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1) | yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1) |
{ | { |
yyGLRState* s; |
|
int i; | int i; |
s = yyvsp[yylow0].yystate.yypred; |
yyGLRState *s = yyvsp[yylow0].yystate.yypred; |
for (i = yylow0-1; i >= yylow1; i -= 1) | for (i = yylow0-1; i >= yylow1; i -= 1) |
{ | { |
YYASSERT (s->yyresolved); |
#if YYDEBUG |
yyvsp[i].yystate.yyresolved = yytrue; |
yyvsp[i].yystate.yylrState = s->yylrState; |
|
#endif |
|
yyvsp[i].yystate.yyresolved = s->yyresolved; |
|
if (s->yyresolved) |
yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval; | yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval; |
yyvsp[i].yystate.yyloc = s->yyloc; |
else |
|
/* The effect of using yysval or yyloc (in an immediate rule) is |
|
* undefined. */ |
|
yyvsp[i].yystate.yysemantics.yyfirstVal = YY_NULLPTR; |
s = yyvsp[i].yystate.yypred = s->yypred; | s = yyvsp[i].yystate.yypred = s->yypred; |
} | } |
} | } |
|
|
* YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1. | * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1. |
* For convenience, always return YYLOW1. */ | * For convenience, always return YYLOW1. */ |
static inline int yyfill (yyGLRStackItem *, int *, int, yybool) | static inline int yyfill (yyGLRStackItem *, int *, int, yybool) |
__attribute__ ((__unused__)); |
YY_ATTRIBUTE_UNUSED; |
static inline int | static inline int |
yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) | yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) |
{ | { |
|
|
* value ($$), and yylocp points to place for location information | * value ($$), and yylocp points to place for location information |
* (@$). Returns yyok for normal return, yyaccept for YYACCEPT, | * (@$). Returns yyok for normal return, yyaccept for YYACCEPT, |
* yyerr for YYERROR, yyabort for YYABORT. */ | * yyerr for YYERROR, yyabort for YYABORT. */ |
/*ARGSUSED*/ static YYRESULTTAG |
static YYRESULTTAG |
yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp, |
yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp, |
YYSTYPE* yyvalp, |
yyGLRStack* yystackp, |
YYLTYPE* YYOPTIONAL_LOC (yylocp), |
YYSTYPE* yyvalp) |
yyGLRStack* yystackp |
|
) |
|
{ | { |
yybool yynormal __attribute__ ((__unused__)) = |
yybool yynormal YY_ATTRIBUTE_UNUSED = (yystackp->yysplitPoint == YY_NULLPTR); |
(yystackp->yysplitPoint == NULL); |
|
int yylow; | int yylow; |
|
YYUSE (yyvalp); |
|
YYUSE (yyrhslen); |
# undef yyerrok | # undef yyerrok |
# define yyerrok (yystackp->yyerrState = 0) | # define yyerrok (yystackp->yyerrState = 0) |
# undef YYACCEPT | # undef YYACCEPT |
|
|
*yyvalp = yyval_default; | *yyvalp = yyval_default; |
else | else |
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval; | *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval; |
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen); |
|
|
|
switch (yyn) | switch (yyn) |
{ | { |
case 2: | case 2: |
|
#line 198 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 198 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: start\n")); | FQL_TRACE(("YACC: start\n")); |
} | } |
|
#line 953 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 6: | case 6: |
|
#line 215 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 215 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: fqlExpression:TOK_AND fqlExpression\n")); | FQL_TRACE(("YACC: fqlExpression:TOK_AND fqlExpression\n")); |
globalParserState->statement->appendOperation(FQL_AND); | globalParserState->statement->appendOperation(FQL_AND); |
} | } |
|
#line 962 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 7: | case 7: |
|
#line 220 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 220 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: fqlExpression: TOK_OR fqlExpression\n")); | FQL_TRACE(("YACC: fqlExpression: TOK_OR fqlExpression\n")); |
globalParserState->statement->appendOperation(FQL_OR); | globalParserState->statement->appendOperation(FQL_OR); |
} | } |
|
#line 971 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 8: | case 8: |
|
#line 225 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 225 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: fqlExpression: ( fqlExpression )\n")); | FQL_TRACE(("YACC: fqlExpression: ( fqlExpression )\n")); |
} | } |
|
#line 979 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 9: | case 9: |
|
#line 229 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 229 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: fqlExpression: propertyComparision\n")); | FQL_TRACE(("YACC: fqlExpression: propertyComparision\n")); |
} | } |
|
#line 987 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 10: | case 10: |
|
#line 237 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 237 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayProperty arrayCompOp" | FQL_TRACE(("YACC: propertyComparison :arrayProperty arrayCompOp" |
"arrayLiteral\n")); | "arrayLiteral\n")); |
//// Want to move arrayCompOp put to here also | //// Want to move arrayCompOp put to here also |
} | } |
|
#line 997 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 11: | case 11: |
|
#line 244 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 244 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison : scalarProperty scalarCompOp" | FQL_TRACE(("YACC: propertyComparison : scalarProperty scalarCompOp" |
" scalarLiteral\n")); | " scalarLiteral\n")); |
} | } |
|
#line 1006 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 12: | case 12: |
|
#line 253 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 253 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison : property scalarCompOp" | FQL_TRACE(("YACC: propertyComparison : property scalarCompOp" |
" property\n")); | " property\n")); |
} | } |
|
#line 1015 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 13: | case 13: |
|
#line 259 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 259 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" | FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" |
" scalarLiteral\n")); | " scalarLiteral\n")); |
} | } |
|
#line 1024 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 14: | case 14: |
|
#line 265 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 265 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" | FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" |
" scalarLProperty\n")); | " scalarLProperty\n")); |
} | } |
|
#line 1033 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 15: | case 15: |
|
#line 271 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 271 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" | FQL_TRACE(("YACC: propertyComparison : arrayProperty [index] scalarCompOp" |
" arrayProperty [index]\n")); | " arrayProperty [index]\n")); |
} | } |
|
#line 1042 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 16: | case 16: |
|
#line 277 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 277 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" | FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" |
" scalarLiteral\n")); | " scalarLiteral\n")); |
} | } |
|
#line 1051 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 17: | case 17: |
|
#line 283 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 283 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" | FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" |
" scalarProperty\n")); | " scalarProperty\n")); |
} | } |
|
#line 1060 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 18: | case 18: |
|
#line 289 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 289 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" | FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty scalarCompOp" |
" arrayProperty TOK_LBRKT index TOK_RBRKT\n")); | " arrayProperty TOK_LBRKT index TOK_RBRKT\n")); |
} | } |
|
#line 1069 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 19: | case 19: |
|
#line 295 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 295 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :scalarProperty likeOp" | FQL_TRACE(("YACC: propertyComparison :scalarProperty likeOp" |
" likePattern\n")); | " likePattern\n")); |
} | } |
|
#line 1078 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 20: | case 20: |
|
#line 301 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 301 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayProperty TOK_LBRKT index" | FQL_TRACE(("YACC: propertyComparison :arrayProperty TOK_LBRKT index" |
" TOK_RBRKT likeOp likePattern\n")); | " TOK_RBRKT likeOp likePattern\n")); |
} | } |
|
#line 1087 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 21: | case 21: |
|
#line 307 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 307 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty likeOp" | FQL_TRACE(("YACC: propertyComparison :arrayOp arrayProperty likeOp" |
" likePattern\n")); | " likePattern\n")); |
} | } |
|
#line 1096 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 22: | case 22: |
|
#line 316 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 316 "FQL.y" |
|
{ | { |
//// yydebug = 1; | //// yydebug = 1; |
FQL_TRACE(("YACC: property : TOK_IDENTIFIER TOK_LBRKT index TOK_RBRKT\n")); | FQL_TRACE(("YACC: property : TOK_IDENTIFIER TOK_LBRKT index TOK_RBRKT\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.intValue))); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (-3)].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG, (((yyGLRStackItem const *)yyvsp)[YYFILL (-1)].yystate.yysemantics.yysval.intValue))); |
} | } |
|
#line 1107 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 23: | case 23: |
|
#line 324 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 324 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayProperty: property\n")); | FQL_TRACE(("YACC: arrayProperty: property\n")); |
} | } |
|
#line 1115 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 24: | case 24: |
|
#line 330 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 330 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarProperty: property\n")); | FQL_TRACE(("YACC: scalarProperty: property\n")); |
//{ $$ = $1; } | //{ $$ = $1; } |
} | } |
|
#line 1124 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 25: | case 25: |
|
#line 341 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 341 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: likePattern: TOK_STRING\n")); | FQL_TRACE(("YACC: likePattern: TOK_STRING\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG)); |
} | } |
|
#line 1134 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 26: | case 26: |
|
#line 355 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 355 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: property:TOK_IDENTIFIER\n")); | FQL_TRACE(("YACC: property:TOK_IDENTIFIER\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG)); |
globalParserState->statement->appendQueryPropertyName(CIMName((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue))); |
globalParserState->statement->appendQueryPropertyName(CIMName((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue))); |
} | } |
|
#line 1145 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 27: | case 27: |
|
#line 362 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 362 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: property:TOK_IDENTIFIER\n")); | FQL_TRACE(("YACC: property:TOK_IDENTIFIER\n")); |
globalParserState->statement->chainOperand( | globalParserState->statement->chainOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_PROPERTY_NAME_TAG)); |
} | } |
|
#line 1155 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 28: | case 28: |
|
#line 374 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 374 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_EQ); | globalParserState->statement->appendOperation(FQL_EQ); |
} | } |
|
#line 1163 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 29: | case 29: |
|
#line 378 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 378 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_NE); | globalParserState->statement->appendOperation(FQL_NE); |
} | } |
|
#line 1171 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 30: | case 30: |
|
#line 382 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 382 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_LT); | globalParserState->statement->appendOperation(FQL_LT); |
} | } |
|
#line 1179 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 31: | case 31: |
|
#line 386 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 386 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_GT); | globalParserState->statement->appendOperation(FQL_GT); |
} | } |
|
#line 1187 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 32: | case 32: |
|
#line 390 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 390 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_LE); | globalParserState->statement->appendOperation(FQL_LE); |
} | } |
|
#line 1195 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 33: | case 33: |
|
#line 394 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 394 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_GE); | globalParserState->statement->appendOperation(FQL_GE); |
} | } |
|
#line 1203 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 34: | case 34: |
|
#line 402 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 402 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_EQ); | globalParserState->statement->appendOperation(FQL_EQ); |
} | } |
|
#line 1211 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 35: | case 35: |
|
#line 406 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 406 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperation(FQL_NE); | globalParserState->statement->appendOperation(FQL_NE); |
} | } |
|
#line 1219 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 36: | case 36: |
|
#line 414 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 414 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: likeOp: TOK_LIKE\n")); | FQL_TRACE(("YACC: likeOp: TOK_LIKE\n")); |
globalParserState->statement->appendOperation(FQL_LIKE); | globalParserState->statement->appendOperation(FQL_LIKE); |
} | } |
|
#line 1228 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 37: | case 37: |
|
#line 420 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 420 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: likeOp: TOK_NOT TOK_LIKE\n")); | FQL_TRACE(("YACC: likeOp: TOK_NOT TOK_LIKE\n")); |
| |
globalParserState->statement->appendOperation(FQL_NOT_LIKE); | globalParserState->statement->appendOperation(FQL_NOT_LIKE); |
} | } |
|
#line 1238 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 38: | case 38: |
|
#line 430 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 430 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayOp: TOK_ANY\n")); | FQL_TRACE(("YACC: arrayOp: TOK_ANY\n")); |
globalParserState->statement->appendOperation(FQL_ANY); | globalParserState->statement->appendOperation(FQL_ANY); |
} | } |
|
#line 1247 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 39: | case 39: |
|
#line 435 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 435 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayOp: TOK_EVERY\n")); | FQL_TRACE(("YACC: arrayOp: TOK_EVERY\n")); |
globalParserState->statement->appendOperation(FQL_EVERY); | globalParserState->statement->appendOperation(FQL_EVERY); |
} | } |
|
#line 1256 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 40: | case 40: |
|
#line 440 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 440 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayOp: TOK_NOT TOK_ANY\n")); | FQL_TRACE(("YACC: arrayOp: TOK_NOT TOK_ANY\n")); |
globalParserState->statement->appendOperation(FQL_NOT_ANY); | globalParserState->statement->appendOperation(FQL_NOT_ANY); |
} | } |
|
#line 1265 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 41: | case 41: |
|
#line 445 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 445 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayOp: TOK_NOT TOK_EVERY\n")); | FQL_TRACE(("YACC: arrayOp: TOK_NOT TOK_EVERY\n")); |
globalParserState->statement->appendOperation(FQL_NOT_EVERY); | globalParserState->statement->appendOperation(FQL_NOT_EVERY); |
} | } |
|
#line 1274 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 42: | case 42: |
|
#line 454 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 454 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: { arrayLiteralList }\n")); | FQL_TRACE(("YACC: { arrayLiteralList }\n")); |
| |
|
|
} | } |
_argList.clear(); | _argList.clear(); |
} | } |
|
#line 1291 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 43: | case 43: |
|
#line 470 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 470 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralList : arrayLiteralEntry\n")); | FQL_TRACE(("YACC: arrayLiteralList : arrayLiteralEntry\n")); |
} | } |
|
#line 1299 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 44: | case 44: |
|
#line 474 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 474 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralList: arrayLiteralList COMMA" | FQL_TRACE(("YACC: arrayLiteralList: arrayLiteralList COMMA" |
" arrayLiteralEntry\n")); | " arrayLiteralEntry\n")); |
} | } |
|
#line 1308 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 45: | case 45: |
|
#line 483 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 483 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry:booleanLiteral\n")); | FQL_TRACE(("YACC: arrayLiteralEntry:booleanLiteral\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue), FQL_BOOLEAN_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue), FQL_BOOLEAN_VALUE_TAG); |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1318 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 46: | case 46: |
|
#line 489 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 489 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry:TOK_STRING\n")); | FQL_TRACE(("YACC: arrayLiteralEntry:TOK_STRING\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG); |
// cout << "TOK_STRING in arrayLiteralEntry = " << $1 << endl; | // cout << "TOK_STRING in arrayLiteralEntry = " << $1 << endl; |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1329 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 47: | case 47: |
|
#line 497 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 497 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry:TOK_INTEGER\n")); | FQL_TRACE(("YACC: arrayLiteralEntry:TOK_INTEGER\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG); |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1339 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 48: | case 48: |
|
#line 504 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 504 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry:TOK_INTEGER\n")); | FQL_TRACE(("YACC: arrayLiteralEntry:TOK_INTEGER\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG); |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1349 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 49: | case 49: |
|
#line 510 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 510 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry:TOK_DOUBLE\n")); | FQL_TRACE(("YACC: arrayLiteralEntry:TOK_DOUBLE\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.doubleValue), FQL_DOUBLE_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doubleValue), FQL_DOUBLE_VALUE_TAG); |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1359 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 50: | case 50: |
|
#line 518 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 518 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: arrayLiteralEntry: dateTimeLiteral\n")); | FQL_TRACE(("YACC: arrayLiteralEntry: dateTimeLiteral\n")); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_DATETIME_VALUE_TAG); |
FQLOperand* _op = new FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_DATETIME_VALUE_TAG); |
_argList.append(_op); | _argList.append(_op); |
} | } |
|
#line 1369 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 51: | case 51: |
|
#line 525 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 525 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral: referenceLiteral\n")); | FQL_TRACE(("YACC: scalarLiteral: referenceLiteral\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_REFERENCE_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_REFERENCE_VALUE_TAG)); |
} | } |
|
#line 1379 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 52: | case 52: |
|
#line 537 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 537 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: index:TOK_UNSIGNED_INTEGER\n")); | FQL_TRACE(("YACC: index:TOK_UNSIGNED_INTEGER\n")); |
} | } |
|
#line 1387 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 53: | case 53: |
|
#line 544 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 544 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral:booleanLiteral\n")); | FQL_TRACE(("YACC: scalarLiteral:booleanLiteral\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue) != 0, FQL_BOOLEAN_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue) != 0, FQL_BOOLEAN_VALUE_TAG)); |
} | } |
|
#line 1397 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 54: | case 54: |
|
#line 550 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 550 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral:TOK_STRING\n")); | FQL_TRACE(("YACC: scalarLiteral:TOK_STRING\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_STRING_VALUE_TAG)); |
} | } |
|
#line 1407 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 55: | case 55: |
|
#line 557 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 557 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral:TOK_INTEGER\n")); | FQL_TRACE(("YACC: scalarLiteral:TOK_INTEGER\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG)); |
} | } |
|
#line 1417 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 56: | case 56: |
|
#line 564 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 564 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral:TOK_UNSIGNED_INTEGER\n")); | FQL_TRACE(("YACC: scalarLiteral:TOK_UNSIGNED_INTEGER\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue), FQL_INTEGER_VALUE_TAG)); |
} | } |
|
#line 1427 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 57: | case 57: |
|
#line 570 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 570 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral:TOK_DOUBLE\n")); | FQL_TRACE(("YACC: scalarLiteral:TOK_DOUBLE\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.doubleValue), FQL_DOUBLE_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.doubleValue), FQL_DOUBLE_VALUE_TAG)); |
} | } |
|
#line 1437 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 58: | case 58: |
|
#line 580 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 580 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral: DateTime literal\n")); | FQL_TRACE(("YACC: scalarLiteral: DateTime literal\n")); |
| |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.strValue), FQL_DATETIME_VALUE_TAG)); |
FQLOperand((((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.strValue), FQL_DATETIME_VALUE_TAG)); |
} | } |
|
#line 1448 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 59: | case 59: |
|
#line 588 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 588 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: scalarLiteral: Reference literal\n")); | FQL_TRACE(("YACC: scalarLiteral: Reference literal\n")); |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand(FQL_REFERENCE_VALUE_TAG)); | FQLOperand(FQL_REFERENCE_VALUE_TAG)); |
} | } |
|
#line 1458 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 60: | case 60: |
|
#line 594 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 594 "FQL.y" |
|
{ | { |
globalParserState->statement->appendOperand( | globalParserState->statement->appendOperand( |
FQLOperand(FQL_NULL_VALUE_TAG)); | FQLOperand(FQL_NULL_VALUE_TAG)); |
} | } |
|
#line 1467 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 61: | case 61: |
|
#line 608 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 608 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: booleanLiteral:TOK_TRUE\n")); | FQL_TRACE(("YACC: booleanLiteral:TOK_TRUE\n")); |
((*yyvalp).intValue) = 1; | ((*yyvalp).intValue) = 1; |
} | } |
|
#line 1476 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 62: | case 62: |
|
#line 613 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 613 "FQL.y" |
|
{ | { |
FQL_TRACE(("YACC: booleanLiteral:TOK_FALSE\n")); | FQL_TRACE(("YACC: booleanLiteral:TOK_FALSE\n")); |
((*yyvalp).intValue) = 0; | ((*yyvalp).intValue) = 0; |
} | } |
|
#line 1485 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 63: | case 63: |
|
#line 623 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 623 "FQL.y" |
|
{ } | { } |
|
#line 1491 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 64: | case 64: |
|
#line 625 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 625 "FQL.y" |
|
{} | {} |
|
#line 1497 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 65: | case 65: |
|
#line 627 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 627 "FQL.y" |
|
{ } | { } |
|
#line 1503 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 66: | case 66: |
|
#line 632 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 632 "FQL.y" |
|
{ | { |
((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue); |
((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue); |
} | } |
|
#line 1511 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
case 67: | case 67: |
|
#line 638 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
{((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue);} |
#line 638 "FQL.y" |
#line 1517 "FQLYACC" /* glr.c:783 */ |
{((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue);} |
|
break; | break; |
| |
case 68: | case 68: |
|
#line 642 "FQL.y" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 642 "FQL.y" |
|
{ | { |
((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.intValue); |
((*yyvalp).intValue) = (((yyGLRStackItem const *)yyvsp)[YYFILL (0)].yystate.yysemantics.yysval.intValue); |
} | } |
|
#line 1525 "FQLYACC" /* glr.c:783 */ |
break; | break; |
| |
| |
|
#line 1529 "FQLYACC" /* glr.c:783 */ |
/* Line 936 of glr.c */ |
|
#line 1648 "FQLYACC" |
|
default: break; | default: break; |
} | } |
| |
|
|
} | } |
| |
| |
/*ARGSUSED*/ static void |
static void |
yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1) | yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1) |
{ | { |
YYUSE (yy0); | YYUSE (yy0); |
|
|
| Release the memory associated to this symbol. | | | Release the memory associated to this symbol. | |
`-----------------------------------------------*/ | `-----------------------------------------------*/ |
| |
/*ARGSUSED*/ |
|
static void | static void |
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
{ | { |
YYUSE (yyvaluep); | YYUSE (yyvaluep); |
|
|
if (!yymsg) | if (!yymsg) |
yymsg = "Deleting"; | yymsg = "Deleting"; |
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| |
switch (yytype) |
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
{ |
YYUSE (yytype); |
|
YY_IGNORE_MAYBE_UNINITIALIZED_END |
default: |
|
break; |
|
} |
|
} | } |
| |
/** Number of symbols composing the right hand side of rule #RULE. */ | /** Number of symbols composing the right hand side of rule #RULE. */ |
|
|
YYFPRINTF (stderr, "%s unresolved ", yymsg); | YYFPRINTF (stderr, "%s unresolved ", yymsg); |
else | else |
YYFPRINTF (stderr, "%s incomplete ", yymsg); | YYFPRINTF (stderr, "%s incomplete ", yymsg); |
yy_symbol_print (stderr, yystos[yys->yylrState], |
YY_SYMBOL_PRINT ("", yystos[yys->yylrState], YY_NULLPTR, &yys->yyloc); |
NULL); |
|
YYFPRINTF (stderr, "\n"); |
|
} | } |
#endif | #endif |
| |
|
|
} | } |
} | } |
| |
/** Left-hand-side symbol for rule #RULE. */ |
/** Left-hand-side symbol for rule #YYRULE. */ |
static inline yySymbol | static inline yySymbol |
yylhsNonterm (yyRuleNum yyrule) | yylhsNonterm (yyRuleNum yyrule) |
{ | { |
return yyr1[yyrule]; | return yyr1[yyrule]; |
} | } |
| |
#define yypact_value_is_default(yystate) \ |
#define yypact_value_is_default(Yystate) \ |
((yystate) == (-65)) |
(!!((Yystate) == (-65))) |
| |
/** True iff LR state STATE has only a default reduction (regardless |
/** True iff LR state YYSTATE has only a default reduction (regardless |
* of token). */ | * of token). */ |
static inline yybool | static inline yybool |
yyisDefaultedState (yyStateNum yystate) | yyisDefaultedState (yyStateNum yystate) |
|
|
return yypact_value_is_default (yypact[yystate]); | return yypact_value_is_default (yypact[yystate]); |
} | } |
| |
/** The default reduction for STATE, assuming it has one. */ |
/** The default reduction for YYSTATE, assuming it has one. */ |
static inline yyRuleNum | static inline yyRuleNum |
yydefaultAction (yyStateNum yystate) | yydefaultAction (yyStateNum yystate) |
{ | { |
return yydefact[yystate]; | return yydefact[yystate]; |
} | } |
| |
#define yytable_value_is_error(yytable_value) \ |
#define yytable_value_is_error(Yytable_value) \ |
YYID (0) |
0 |
| |
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN. | /** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN. |
* Result R means | * Result R means |
* R < 0: Reduce on rule -R. | * R < 0: Reduce on rule -R. |
* R = 0: Error. | * R = 0: Error. |
* R > 0: Shift to state R. | * R > 0: Shift to state R. |
* Set *CONFLICTS to a pointer into yyconfl to 0-terminated list of |
* Set *YYCONFLICTS to a pointer into yyconfl to a 0-terminated list |
* conflicting reductions. |
* of conflicting reductions. |
*/ | */ |
static inline void | static inline void |
yygetLRActions (yyStateNum yystate, int yytoken, | yygetLRActions (yyStateNum yystate, int yytoken, |
|
|
} | } |
} | } |
| |
|
/** Compute post-reduction state. |
|
* \param yystate the current state |
|
* \param yysym the nonterminal to push on the stack |
|
*/ |
static inline yyStateNum | static inline yyStateNum |
yyLRgotoState (yyStateNum yystate, yySymbol yylhs) |
yyLRgotoState (yyStateNum yystate, yySymbol yysym) |
{ | { |
int yyr; |
int yyr = yypgoto[yysym - YYNTOKENS] + yystate; |
yyr = yypgoto[yylhs - YYNTOKENS] + yystate; |
|
if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate) | if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate) |
return yytable[yyr]; | return yytable[yyr]; |
else | else |
return yydefgoto[yylhs - YYNTOKENS]; |
return yydefgoto[yysym - YYNTOKENS]; |
} | } |
| |
static inline yybool | static inline yybool |
|
|
| |
/* GLRStates */ | /* GLRStates */ |
| |
/** Return a fresh GLRStackItem. Callers should call |
/** Return a fresh GLRStackItem in YYSTACKP. The item is an LR state |
|
* if YYISSTATE, and otherwise a semantic option. Callers should call |
* YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient | * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient |
* headroom. */ | * headroom. */ |
| |
|
|
} | } |
| |
/** Add a new semantic action that will execute the action for rule | /** Add a new semantic action that will execute the action for rule |
* RULENUM on the semantic values in RHS to the list of |
* YYRULE on the semantic values in YYRHS to the list of |
* alternative actions for STATE. Assumes that RHS comes from |
* alternative actions for YYSTATE. Assumes that YYRHS comes from |
* stack #K of *STACKP. */ |
* stack #YYK of *YYSTACKP. */ |
static void | static void |
yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate, | yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate, |
yyGLRState* rhs, yyRuleNum yyrule) |
yyGLRState* yyrhs, yyRuleNum yyrule) |
{ | { |
yySemanticOption* yynewOption = | yySemanticOption* yynewOption = |
&yynewGLRStackItem (yystackp, yyfalse)->yyoption; | &yynewGLRStackItem (yystackp, yyfalse)->yyoption; |
yynewOption->yystate = rhs; |
YYASSERT (!yynewOption->yyisState); |
|
yynewOption->yystate = yyrhs; |
yynewOption->yyrule = yyrule; | yynewOption->yyrule = yyrule; |
if (yystackp->yytops.yylookaheadNeeds[yyk]) | if (yystackp->yytops.yylookaheadNeeds[yyk]) |
{ | { |
yynewOption->yyrawchar = yychar; | yynewOption->yyrawchar = yychar; |
yynewOption->yyval = yylval; | yynewOption->yyval = yylval; |
yynewOption->yyloc = yylloc; |
|
} | } |
else | else |
yynewOption->yyrawchar = YYEMPTY; | yynewOption->yyrawchar = YYEMPTY; |
|
|
| |
/* GLRStacks */ | /* GLRStacks */ |
| |
/** Initialize SET to a singleton set containing an empty stack. */ |
/** Initialize YYSET to a singleton set containing an empty stack. */ |
static yybool | static yybool |
yyinitStateSet (yyGLRStateSet* yyset) | yyinitStateSet (yyGLRStateSet* yyset) |
{ | { |
|
|
yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]); | yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]); |
if (! yyset->yystates) | if (! yyset->yystates) |
return yyfalse; | return yyfalse; |
yyset->yystates[0] = NULL; |
yyset->yystates[0] = YY_NULLPTR; |
yyset->yylookaheadNeeds = | yyset->yylookaheadNeeds = |
(yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]); | (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]); |
if (! yyset->yylookaheadNeeds) | if (! yyset->yylookaheadNeeds) |
|
|
YYFREE (yyset->yylookaheadNeeds); | YYFREE (yyset->yylookaheadNeeds); |
} | } |
| |
/** Initialize STACK to a single empty stack, with total maximum |
/** Initialize *YYSTACKP to a single empty stack, with total maximum |
* capacity for all stacks of SIZE. */ |
* capacity for all stacks of YYSIZE. */ |
static yybool | static yybool |
yyinitGLRStack (yyGLRStack* yystackp, size_t yysize) | yyinitGLRStack (yyGLRStack* yystackp, size_t yysize) |
{ | { |
|
|
if (!yystackp->yyitems) | if (!yystackp->yyitems) |
return yyfalse; | return yyfalse; |
yystackp->yynextFree = yystackp->yyitems; | yystackp->yynextFree = yystackp->yyitems; |
yystackp->yysplitPoint = NULL; |
yystackp->yysplitPoint = YY_NULLPTR; |
yystackp->yylastDeleted = NULL; |
yystackp->yylastDeleted = YY_NULLPTR; |
return yyinitStateSet (&yystackp->yytops); | return yyinitStateSet (&yystackp->yytops); |
} | } |
| |
|
|
# define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \ | # define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \ |
&((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE | &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE |
| |
/** If STACK is expandable, extend it. WARNING: Pointers into the |
/** If *YYSTACKP is expandable, extend it. WARNING: Pointers into the |
stack from outside should be considered invalid after this call. | stack from outside should be considered invalid after this call. |
We always expand when there are 1 or fewer items left AFTER an | We always expand when there are 1 or fewer items left AFTER an |
allocation, so that we can avoid having external pointers exist | allocation, so that we can avoid having external pointers exist |
|
|
{ | { |
yyGLRStackItem* yynewItems; | yyGLRStackItem* yynewItems; |
yyGLRStackItem* yyp0, *yyp1; | yyGLRStackItem* yyp0, *yyp1; |
size_t yysize, yynewSize; |
size_t yynewSize; |
size_t yyn; | size_t yyn; |
yysize = yystackp->yynextFree - yystackp->yyitems; |
size_t yysize = yystackp->yynextFree - yystackp->yyitems; |
if (YYMAXDEPTH - YYHEADROOM < yysize) | if (YYMAXDEPTH - YYHEADROOM < yysize) |
yyMemoryExhausted (yystackp); | yyMemoryExhausted (yystackp); |
yynewSize = 2*yysize; | yynewSize = 2*yysize; |
|
|
{ | { |
yyGLRState* yys0 = &yyp0->yystate; | yyGLRState* yys0 = &yyp0->yystate; |
yyGLRState* yys1 = &yyp1->yystate; | yyGLRState* yys1 = &yyp1->yystate; |
if (yys0->yypred != NULL) |
if (yys0->yypred != YY_NULLPTR) |
yys1->yypred = | yys1->yypred = |
YYRELOC (yyp0, yyp1, yys0->yypred, yystate); | YYRELOC (yyp0, yyp1, yys0->yypred, yystate); |
if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != NULL) |
if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != YY_NULLPTR) |
yys1->yysemantics.yyfirstVal = | yys1->yysemantics.yyfirstVal = |
YYRELOC(yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption); | YYRELOC(yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption); |
} | } |
|
|
{ | { |
yySemanticOption* yyv0 = &yyp0->yyoption; | yySemanticOption* yyv0 = &yyp0->yyoption; |
yySemanticOption* yyv1 = &yyp1->yyoption; | yySemanticOption* yyv1 = &yyp1->yyoption; |
if (yyv0->yystate != NULL) |
if (yyv0->yystate != YY_NULLPTR) |
yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate); | yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate); |
if (yyv0->yynext != NULL) |
if (yyv0->yynext != YY_NULLPTR) |
yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption); | yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption); |
} | } |
} | } |
if (yystackp->yysplitPoint != NULL) |
if (yystackp->yysplitPoint != YY_NULLPTR) |
yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems, | yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems, |
yystackp->yysplitPoint, yystate); | yystackp->yysplitPoint, yystate); |
| |
for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1) | for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1) |
if (yystackp->yytops.yystates[yyn] != NULL) |
if (yystackp->yytops.yystates[yyn] != YY_NULLPTR) |
yystackp->yytops.yystates[yyn] = | yystackp->yytops.yystates[yyn] = |
YYRELOC (yystackp->yyitems, yynewItems, | YYRELOC (yystackp->yyitems, yynewItems, |
yystackp->yytops.yystates[yyn], yystate); | yystackp->yytops.yystates[yyn], yystate); |
|
|
yyfreeStateSet (&yystackp->yytops); | yyfreeStateSet (&yystackp->yytops); |
} | } |
| |
/** Assuming that S is a GLRState somewhere on STACK, update the |
/** Assuming that YYS is a GLRState somewhere on *YYSTACKP, update the |
* splitpoint of STACK, if needed, so that it is at least as deep as |
* splitpoint of *YYSTACKP, if needed, so that it is at least as deep as |
* S. */ |
* YYS. */ |
static inline void | static inline void |
yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys) | yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys) |
{ | { |
if (yystackp->yysplitPoint != NULL && yystackp->yysplitPoint > yys) |
if (yystackp->yysplitPoint != YY_NULLPTR && yystackp->yysplitPoint > yys) |
yystackp->yysplitPoint = yys; | yystackp->yysplitPoint = yys; |
} | } |
| |
/** Invalidate stack #K in STACK. */ |
/** Invalidate stack #YYK in *YYSTACKP. */ |
static inline void | static inline void |
yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk) | yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk) |
{ | { |
if (yystackp->yytops.yystates[yyk] != NULL) |
if (yystackp->yytops.yystates[yyk] != YY_NULLPTR) |
yystackp->yylastDeleted = yystackp->yytops.yystates[yyk]; | yystackp->yylastDeleted = yystackp->yytops.yystates[yyk]; |
yystackp->yytops.yystates[yyk] = NULL; |
yystackp->yytops.yystates[yyk] = YY_NULLPTR; |
} | } |
| |
/** Undelete the last stack that was marked as deleted. Can only be |
/** Undelete the last stack in *YYSTACKP that was marked as deleted. Can |
done once after a deletion, and only when all other stacks have |
only be done once after a deletion, and only when all other stacks have |
been deleted. */ | been deleted. */ |
static void | static void |
yyundeleteLastStack (yyGLRStack* yystackp) | yyundeleteLastStack (yyGLRStack* yystackp) |
{ | { |
if (yystackp->yylastDeleted == NULL || yystackp->yytops.yysize != 0) |
if (yystackp->yylastDeleted == YY_NULLPTR || yystackp->yytops.yysize != 0) |
return; | return; |
yystackp->yytops.yystates[0] = yystackp->yylastDeleted; | yystackp->yytops.yystates[0] = yystackp->yylastDeleted; |
yystackp->yytops.yysize = 1; | yystackp->yytops.yysize = 1; |
YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n")); | YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n")); |
yystackp->yylastDeleted = NULL; |
yystackp->yylastDeleted = YY_NULLPTR; |
} | } |
| |
static inline void | static inline void |
|
|
yyi = yyj = 0; | yyi = yyj = 0; |
while (yyj < yystackp->yytops.yysize) | while (yyj < yystackp->yytops.yysize) |
{ | { |
if (yystackp->yytops.yystates[yyi] == NULL) |
if (yystackp->yytops.yystates[yyi] == YY_NULLPTR) |
{ | { |
if (yyi == yyj) | if (yyi == yyj) |
{ | { |
|
|
} | } |
} | } |
| |
/** Shift to a new state on stack #K of STACK, corresponding to LR state |
/** Shift to a new state on stack #YYK of *YYSTACKP, corresponding to LR |
* LRSTATE, at input position POSN, with (resolved) semantic value SVAL. */ |
* state YYLRSTATE, at input position YYPOSN, with (resolved) semantic |
|
* value *YYVALP and source location *YYLOCP. */ |
static inline void | static inline void |
yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, | yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, |
size_t yyposn, | size_t yyposn, |
YYSTYPE* yyvalp, YYLTYPE* yylocp) |
YYSTYPE* yyvalp) |
{ | { |
yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; | yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; |
| |
|
|
yynewState->yyresolved = yytrue; | yynewState->yyresolved = yytrue; |
yynewState->yypred = yystackp->yytops.yystates[yyk]; | yynewState->yypred = yystackp->yytops.yystates[yyk]; |
yynewState->yysemantics.yysval = *yyvalp; | yynewState->yysemantics.yysval = *yyvalp; |
yynewState->yyloc = *yylocp; |
|
yystackp->yytops.yystates[yyk] = yynewState; | yystackp->yytops.yystates[yyk] = yynewState; |
| |
YY_RESERVE_GLRSTACK (yystackp); | YY_RESERVE_GLRSTACK (yystackp); |
} | } |
| |
/** Shift stack #K of YYSTACK, to a new state corresponding to LR |
/** Shift stack #YYK of *YYSTACKP, to a new state corresponding to LR |
* state YYLRSTATE, at input position YYPOSN, with the (unresolved) | * state YYLRSTATE, at input position YYPOSN, with the (unresolved) |
* semantic value of YYRHS under the action for YYRULE. */ | * semantic value of YYRHS under the action for YYRULE. */ |
static inline void | static inline void |
yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, | yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState, |
size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule) |
size_t yyposn, yyGLRState* yyrhs, yyRuleNum yyrule) |
{ | { |
yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; | yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate; |
|
YYASSERT (yynewState->yyisState); |
| |
yynewState->yylrState = yylrState; | yynewState->yylrState = yylrState; |
yynewState->yyposn = yyposn; | yynewState->yyposn = yyposn; |
yynewState->yyresolved = yyfalse; | yynewState->yyresolved = yyfalse; |
yynewState->yypred = yystackp->yytops.yystates[yyk]; | yynewState->yypred = yystackp->yytops.yystates[yyk]; |
yynewState->yysemantics.yyfirstVal = NULL; |
yynewState->yysemantics.yyfirstVal = YY_NULLPTR; |
yystackp->yytops.yystates[yyk] = yynewState; | yystackp->yytops.yystates[yyk] = yynewState; |
| |
/* Invokes YY_RESERVE_GLRSTACK. */ | /* Invokes YY_RESERVE_GLRSTACK. */ |
yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule); |
yyaddDeferredAction (yystackp, yyk, yynewState, yyrhs, yyrule); |
} | } |
| |
/** Pop the symbols consumed by reduction #RULE from the top of stack |
#if !YYDEBUG |
* #K of STACK, and perform the appropriate semantic action on their |
# define YY_REDUCE_PRINT(Args) |
|
#else |
|
# define YY_REDUCE_PRINT(Args) \ |
|
do { \ |
|
if (yydebug) \ |
|
yy_reduce_print Args; \ |
|
} while (0) |
|
|
|
/*----------------------------------------------------------------------. |
|
| Report that stack #YYK of *YYSTACKP is going to be reduced by YYRULE. | |
|
`----------------------------------------------------------------------*/ |
|
|
|
static inline void |
|
yy_reduce_print (int yynormal, yyGLRStackItem* yyvsp, size_t yyk, |
|
yyRuleNum yyrule) |
|
{ |
|
int yynrhs = yyrhsLength (yyrule); |
|
int yyi; |
|
YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n", |
|
(unsigned long int) yyk, yyrule - 1, |
|
(unsigned long int) yyrline[yyrule]); |
|
if (! yynormal) |
|
yyfillin (yyvsp, 1, -yynrhs); |
|
/* The symbols being reduced. */ |
|
for (yyi = 0; yyi < yynrhs; yyi++) |
|
{ |
|
YYFPRINTF (stderr, " $%d = ", yyi + 1); |
|
yy_symbol_print (stderr, |
|
yystos[yyvsp[yyi - yynrhs + 1].yystate.yylrState], |
|
&yyvsp[yyi - yynrhs + 1].yystate.yysemantics.yysval |
|
); |
|
if (!yyvsp[yyi - yynrhs + 1].yystate.yyresolved) |
|
YYFPRINTF (stderr, " (unresolved)"); |
|
YYFPRINTF (stderr, "\n"); |
|
} |
|
} |
|
#endif |
|
|
|
/** Pop the symbols consumed by reduction #YYRULE from the top of stack |
|
* #YYK of *YYSTACKP, and perform the appropriate semantic action on their |
* semantic values. Assumes that all ambiguities in semantic values | * semantic values. Assumes that all ambiguities in semantic values |
* have been previously resolved. Set *VALP to the resulting value, |
* have been previously resolved. Set *YYVALP to the resulting value, |
* and *LOCP to the computed location (if any). Return value is as |
* and *YYLOCP to the computed location (if any). Return value is as |
* for userAction. */ | * for userAction. */ |
static inline YYRESULTTAG | static inline YYRESULTTAG |
yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, | yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, |
YYSTYPE* yyvalp, YYLTYPE* yylocp) |
YYSTYPE* yyvalp) |
{ | { |
int yynrhs = yyrhsLength (yyrule); | int yynrhs = yyrhsLength (yyrule); |
| |
if (yystackp->yysplitPoint == NULL) |
if (yystackp->yysplitPoint == YY_NULLPTR) |
{ | { |
/* Standard special case: single stack. */ | /* Standard special case: single stack. */ |
yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; |
yyGLRStackItem* yyrhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; |
YYASSERT (yyk == 0); | YYASSERT (yyk == 0); |
yystackp->yynextFree -= yynrhs; | yystackp->yynextFree -= yynrhs; |
yystackp->yyspaceLeft += yynrhs; | yystackp->yyspaceLeft += yynrhs; |
yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate; | yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate; |
return yyuserAction (yyrule, yynrhs, rhs, |
YY_REDUCE_PRINT ((1, yyrhs, yyk, yyrule)); |
yyvalp, yylocp, yystackp); |
return yyuserAction (yyrule, yynrhs, yyrhs, yystackp, |
|
yyvalp); |
} | } |
else | else |
{ | { |
/* At present, doAction is never called in nondeterministic |
|
* mode, so this branch is never taken. It is here in |
|
* anticipation of a future feature that will allow immediate |
|
* evaluation of selected actions in nondeterministic mode. */ |
|
int yyi; | int yyi; |
yyGLRState* yys; | yyGLRState* yys; |
yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; | yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; |
|
|
} | } |
yyupdateSplit (yystackp, yys); | yyupdateSplit (yystackp, yys); |
yystackp->yytops.yystates[yyk] = yys; | yystackp->yytops.yystates[yyk] = yys; |
|
YY_REDUCE_PRINT ((0, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, yyk, yyrule)); |
return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, | return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, |
yyvalp, yylocp, yystackp); |
yystackp, yyvalp); |
} | } |
} | } |
| |
#if !YYDEBUG |
/** Pop items off stack #YYK of *YYSTACKP according to grammar rule YYRULE, |
# define YY_REDUCE_PRINT(Args) |
|
#else |
|
# define YY_REDUCE_PRINT(Args) \ |
|
do { \ |
|
if (yydebug) \ |
|
yy_reduce_print Args; \ |
|
} while (YYID (0)) |
|
|
|
/*----------------------------------------------------------. |
|
| Report that the RULE is going to be reduced on stack #K. | |
|
`----------------------------------------------------------*/ |
|
|
|
/*ARGSUSED*/ static inline void |
|
yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule, |
|
YYSTYPE* yyvalp, YYLTYPE* yylocp) |
|
{ |
|
int yynrhs = yyrhsLength (yyrule); |
|
yybool yynormal __attribute__ ((__unused__)) = |
|
(yystackp->yysplitPoint == NULL); |
|
yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystackp->yytops.yystates[yyk]; |
|
int yylow = 1; |
|
int yyi; |
|
YYUSE (yyvalp); |
|
YYUSE (yylocp); |
|
YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n", |
|
(unsigned long int) yyk, yyrule - 1, |
|
(unsigned long int) yyrline[yyrule]); |
|
/* The symbols being reduced. */ |
|
for (yyi = 0; yyi < yynrhs; yyi++) |
|
{ |
|
YYFPRINTF (stderr, " $%d = ", yyi + 1); |
|
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
|
&(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yysemantics.yysval) |
|
); |
|
YYFPRINTF (stderr, "\n"); |
|
} |
|
} |
|
#endif |
|
|
|
/** Pop items off stack #K of STACK according to grammar rule RULE, |
|
* and push back on the resulting nonterminal symbol. Perform the | * and push back on the resulting nonterminal symbol. Perform the |
* semantic action associated with RULE and store its value with the |
* semantic action associated with YYRULE and store its value with the |
* newly pushed state, if FORCEEVAL or if STACK is currently |
* newly pushed state, if YYFORCEEVAL or if *YYSTACKP is currently |
* unambiguous. Otherwise, store the deferred semantic action with | * unambiguous. Otherwise, store the deferred semantic action with |
* the new state. If the new state would have an identical input | * the new state. If the new state would have an identical input |
* position, LR state, and predecessor to an existing state on the stack, | * position, LR state, and predecessor to an existing state on the stack, |
* it is identified with that existing state, eliminating stack #K from |
* it is identified with that existing state, eliminating stack #YYK from |
* the STACK. In this case, the (necessarily deferred) semantic value is |
* *YYSTACKP. In this case, the semantic value is |
* added to the options for the existing state's semantic value. | * added to the options for the existing state's semantic value. |
*/ | */ |
static inline YYRESULTTAG | static inline YYRESULTTAG |
|
|
{ | { |
size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn; | size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn; |
| |
if (yyforceEval || yystackp->yysplitPoint == NULL) |
if (yyforceEval || yystackp->yysplitPoint == YY_NULLPTR) |
{ | { |
YYSTYPE yysval; | YYSTYPE yysval; |
YYLTYPE yyloc; |
|
| |
YY_REDUCE_PRINT ((yystackp, yyk, yyrule, &yysval, &yyloc)); |
YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval); |
YYCHK (yydoAction (yystackp, yyk, yyrule, &yysval, |
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR) |
&yyloc)); |
{ |
|
YYDPRINTF ((stderr, "Parse on stack %lu rejected by rule #%d.\n", |
|
(unsigned long int) yyk, yyrule - 1)); |
|
} |
|
if (yyflag != yyok) |
|
return yyflag; |
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc); | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc); |
yyglrShift (yystackp, yyk, | yyglrShift (yystackp, yyk, |
yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState, | yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState, |
yylhsNonterm (yyrule)), | yylhsNonterm (yyrule)), |
yyposn, &yysval, &yyloc); |
yyposn, &yysval); |
} | } |
else | else |
{ | { |
|
|
yyupdateSplit (yystackp, yys); | yyupdateSplit (yystackp, yys); |
yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule)); | yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule)); |
YYDPRINTF ((stderr, | YYDPRINTF ((stderr, |
"Reduced stack %lu by rule #%d; action deferred. Now in state %d.\n", |
"Reduced stack %lu by rule #%d; action deferred. " |
|
"Now in state %d.\n", |
(unsigned long int) yyk, yyrule - 1, yynewLRState)); | (unsigned long int) yyk, yyrule - 1, yynewLRState)); |
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) | for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1) |
if (yyi != yyk && yystackp->yytops.yystates[yyi] != NULL) |
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR) |
{ | { |
yyGLRState* yyp, *yysplit = yystackp->yysplitPoint; |
yyGLRState *yysplit = yystackp->yysplitPoint; |
yyp = yystackp->yytops.yystates[yyi]; |
yyGLRState *yyp = yystackp->yytops.yystates[yyi]; |
while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn) | while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn) |
{ | { |
if (yyp->yylrState == yynewLRState && yyp->yypred == yys) | if (yyp->yylrState == yynewLRState && yyp->yypred == yys) |
|
|
static size_t | static size_t |
yysplitStack (yyGLRStack* yystackp, size_t yyk) | yysplitStack (yyGLRStack* yystackp, size_t yyk) |
{ | { |
if (yystackp->yysplitPoint == NULL) |
if (yystackp->yysplitPoint == YY_NULLPTR) |
{ | { |
YYASSERT (yyk == 0); | YYASSERT (yyk == 0); |
yystackp->yysplitPoint = yystackp->yytops.yystates[yyk]; | yystackp->yysplitPoint = yystackp->yytops.yystates[yyk]; |
|
|
yyGLRState** yynewStates; | yyGLRState** yynewStates; |
yybool* yynewLookaheadNeeds; | yybool* yynewLookaheadNeeds; |
| |
yynewStates = NULL; |
yynewStates = YY_NULLPTR; |
| |
if (yystackp->yytops.yycapacity | if (yystackp->yytops.yycapacity |
> (YYSIZEMAX / (2 * sizeof yynewStates[0]))) | > (YYSIZEMAX / (2 * sizeof yynewStates[0]))) |
|
|
(yyGLRState**) YYREALLOC (yystackp->yytops.yystates, | (yyGLRState**) YYREALLOC (yystackp->yytops.yystates, |
(yystackp->yytops.yycapacity | (yystackp->yytops.yycapacity |
* sizeof yynewStates[0])); | * sizeof yynewStates[0])); |
if (yynewStates == NULL) |
if (yynewStates == YY_NULLPTR) |
yyMemoryExhausted (yystackp); | yyMemoryExhausted (yystackp); |
yystackp->yytops.yystates = yynewStates; | yystackp->yytops.yystates = yynewStates; |
| |
|
|
(yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds, | (yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds, |
(yystackp->yytops.yycapacity | (yystackp->yytops.yycapacity |
* sizeof yynewLookaheadNeeds[0])); | * sizeof yynewLookaheadNeeds[0])); |
if (yynewLookaheadNeeds == NULL) |
if (yynewLookaheadNeeds == YY_NULLPTR) |
yyMemoryExhausted (yystackp); | yyMemoryExhausted (yystackp); |
yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds; | yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds; |
} | } |
|
|
return yystackp->yytops.yysize-1; | return yystackp->yytops.yysize-1; |
} | } |
| |
/** True iff Y0 and Y1 represent identical options at the top level. |
/** True iff YYY0 and YYY1 represent identical options at the top level. |
* That is, they represent the same rule applied to RHS symbols | * That is, they represent the same rule applied to RHS symbols |
* that produce the same terminal symbols. */ | * that produce the same terminal symbols. */ |
static yybool | static yybool |
|
|
return yyfalse; | return yyfalse; |
} | } |
| |
/** Assuming identicalOptions (Y0,Y1), destructively merge the |
/** Assuming identicalOptions (YYY0,YYY1), destructively merge the |
* alternative semantic values for the RHS-symbols of Y1 and Y0. */ |
* alternative semantic values for the RHS-symbols of YYY1 and YYY0. */ |
static void | static void |
yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1) | yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1) |
{ | { |
|
|
} | } |
else | else |
{ | { |
yySemanticOption** yyz0p; |
yySemanticOption** yyz0p = &yys0->yysemantics.yyfirstVal; |
yySemanticOption* yyz1; |
yySemanticOption* yyz1 = yys1->yysemantics.yyfirstVal; |
yyz0p = &yys0->yysemantics.yyfirstVal; |
while (yytrue) |
yyz1 = yys1->yysemantics.yyfirstVal; |
|
while (YYID (yytrue)) |
|
{ | { |
if (yyz1 == *yyz0p || yyz1 == NULL) |
if (yyz1 == *yyz0p || yyz1 == YY_NULLPTR) |
break; | break; |
else if (*yyz0p == NULL) |
else if (*yyz0p == YY_NULLPTR) |
{ | { |
*yyz0p = yyz1; | *yyz0p = yyz1; |
break; | break; |
|
|
yyGLRStack* yystackp); | yyGLRStack* yystackp); |
| |
| |
/** Resolve the previous N states starting at and including state S. If result |
/** Resolve the previous YYN states starting at and including state YYS |
* != yyok, some states may have been left unresolved possibly with empty |
* on *YYSTACKP. If result != yyok, some states may have been left |
* semantic option chains. Regardless of whether result = yyok, each state |
* unresolved possibly with empty semantic option chains. Regardless |
* has been left with consistent data so that yydestroyGLRState can be invoked |
* of whether result = yyok, each state has been left with consistent |
* if necessary. */ |
* data so that yydestroyGLRState can be invoked if necessary. */ |
static YYRESULTTAG | static YYRESULTTAG |
yyresolveStates (yyGLRState* yys, int yyn, | yyresolveStates (yyGLRState* yys, int yyn, |
yyGLRStack* yystackp) | yyGLRStack* yystackp) |
|
|
return yyok; | return yyok; |
} | } |
| |
/** Resolve the states for the RHS of OPT, perform its user action, and return |
/** Resolve the states for the RHS of YYOPT on *YYSTACKP, perform its |
* the semantic value and location. Regardless of whether result = yyok, all |
* user action, and return the semantic value and location in *YYVALP |
* RHS states have been destroyed (assuming the user action destroys all RHS |
* and *YYLOCP. Regardless of whether result = yyok, all RHS states |
|
* have been destroyed (assuming the user action destroys all RHS |
* semantic values if invoked). */ | * semantic values if invoked). */ |
static YYRESULTTAG | static YYRESULTTAG |
yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp, | yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp, |
YYSTYPE* yyvalp, YYLTYPE* yylocp) |
YYSTYPE* yyvalp) |
{ | { |
yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; | yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1]; |
int yynrhs; |
int yynrhs = yyrhsLength (yyopt->yyrule); |
int yychar_current; |
YYRESULTTAG yyflag = |
YYSTYPE yylval_current; |
yyresolveStates (yyopt->yystate, yynrhs, yystackp); |
YYLTYPE yylloc_current; |
|
YYRESULTTAG yyflag; |
|
|
|
yynrhs = yyrhsLength (yyopt->yyrule); |
|
yyflag = yyresolveStates (yyopt->yystate, yynrhs, yystackp); |
|
if (yyflag != yyok) | if (yyflag != yyok) |
{ | { |
yyGLRState *yys; | yyGLRState *yys; |
|
|
} | } |
| |
yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate; | yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate; |
yychar_current = yychar; |
{ |
yylval_current = yylval; |
int yychar_current = yychar; |
yylloc_current = yylloc; |
YYSTYPE yylval_current = yylval; |
yychar = yyopt->yyrawchar; | yychar = yyopt->yyrawchar; |
yylval = yyopt->yyval; | yylval = yyopt->yyval; |
yylloc = yyopt->yyloc; |
|
yyflag = yyuserAction (yyopt->yyrule, yynrhs, | yyflag = yyuserAction (yyopt->yyrule, yynrhs, |
yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, | yyrhsVals + YYMAXRHS + YYMAXLEFT - 1, |
yyvalp, yylocp, yystackp); |
yystackp, yyvalp); |
yychar = yychar_current; | yychar = yychar_current; |
yylval = yylval_current; | yylval = yylval_current; |
yylloc = yylloc_current; |
} |
return yyflag; | return yyflag; |
} | } |
| |
|
|
| |
for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred) | for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred) |
yystates[yyi] = yys; | yystates[yyi] = yys; |
if (yys == NULL) |
if (yys == YY_NULLPTR) |
{ | { |
yyleftmost_state.yyposn = 0; | yyleftmost_state.yyposn = 0; |
yystates[0] = &yyleftmost_state; | yystates[0] = &yyleftmost_state; |
|
|
{ | { |
if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn) | if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn) |
YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "", | YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "", |
yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1])); |
yytokenName (yystos[yystates[yyi]->yylrState])); |
else | else |
YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "", | YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "", |
yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]), |
yytokenName (yystos[yystates[yyi]->yylrState]), |
(unsigned long int) (yystates[yyi - 1]->yyposn + 1), | (unsigned long int) (yystates[yyi - 1]->yyposn + 1), |
(unsigned long int) yystates[yyi]->yyposn); | (unsigned long int) yystates[yyi]->yyposn); |
} | } |
|
|
} | } |
#endif | #endif |
| |
/*ARGSUSED*/ static YYRESULTTAG |
static YYRESULTTAG |
yyreportAmbiguity (yySemanticOption* yyx0, | yyreportAmbiguity (yySemanticOption* yyx0, |
yySemanticOption* yyx1) | yySemanticOption* yyx1) |
{ | { |
|
|
return yyabort; | return yyabort; |
} | } |
| |
/** Resolve the ambiguity represented in state S, perform the indicated |
/** Resolve the ambiguity represented in state YYS in *YYSTACKP, |
* actions, and set the semantic value of S. If result != yyok, the chain of |
* perform the indicated actions, and set the semantic value of YYS. |
* semantic options in S has been cleared instead or it has been left |
* If result != yyok, the chain of semantic options in YYS has been |
* unmodified except that redundant options may have been removed. Regardless |
* cleared instead or it has been left unmodified except that |
* of whether result = yyok, S has been left with consistent data so that |
* redundant options may have been removed. Regardless of whether |
|
* result = yyok, YYS has been left with consistent data so that |
* yydestroyGLRState can be invoked if necessary. */ | * yydestroyGLRState can be invoked if necessary. */ |
static YYRESULTTAG | static YYRESULTTAG |
yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp) | yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp) |
{ | { |
yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal; | yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal; |
yySemanticOption* yybest; |
yySemanticOption* yybest = yyoptionList; |
yySemanticOption** yypp; | yySemanticOption** yypp; |
yybool yymerge; |
yybool yymerge = yyfalse; |
YYSTYPE yysval; | YYSTYPE yysval; |
YYRESULTTAG yyflag; | YYRESULTTAG yyflag; |
YYLTYPE *yylocp = &yys->yyloc; |
|
| |
yybest = yyoptionList; |
for (yypp = &yyoptionList->yynext; *yypp != YY_NULLPTR; ) |
yymerge = yyfalse; |
|
for (yypp = &yyoptionList->yynext; *yypp != NULL; ) |
|
{ | { |
yySemanticOption* yyp = *yypp; | yySemanticOption* yyp = *yypp; |
| |
|
|
{ | { |
yySemanticOption* yyp; | yySemanticOption* yyp; |
int yyprec = yydprec[yybest->yyrule]; | int yyprec = yydprec[yybest->yyrule]; |
yyflag = yyresolveAction (yybest, yystackp, &yysval, |
yyflag = yyresolveAction (yybest, yystackp, &yysval); |
yylocp); |
|
if (yyflag == yyok) | if (yyflag == yyok) |
for (yyp = yybest->yynext; yyp != NULL; yyp = yyp->yynext) |
for (yyp = yybest->yynext; yyp != YY_NULLPTR; yyp = yyp->yynext) |
{ | { |
if (yyprec == yydprec[yyp->yyrule]) | if (yyprec == yydprec[yyp->yyrule]) |
{ | { |
YYSTYPE yysval_other; | YYSTYPE yysval_other; |
YYLTYPE yydummy; |
yyflag = yyresolveAction (yyp, yystackp, &yysval_other); |
yyflag = yyresolveAction (yyp, yystackp, &yysval_other, |
|
&yydummy); |
|
if (yyflag != yyok) | if (yyflag != yyok) |
{ | { |
yydestruct ("Cleanup: discarding incompletely merged value for", | yydestruct ("Cleanup: discarding incompletely merged value for", |
|
|
} | } |
} | } |
else | else |
yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp); |
yyflag = yyresolveAction (yybest, yystackp, &yysval); |
| |
if (yyflag == yyok) | if (yyflag == yyok) |
{ | { |
|
|
yys->yysemantics.yysval = yysval; | yys->yysemantics.yysval = yysval; |
} | } |
else | else |
yys->yysemantics.yyfirstVal = NULL; |
yys->yysemantics.yyfirstVal = YY_NULLPTR; |
return yyflag; | return yyflag; |
} | } |
| |
static YYRESULTTAG | static YYRESULTTAG |
yyresolveStack (yyGLRStack* yystackp) | yyresolveStack (yyGLRStack* yystackp) |
{ | { |
if (yystackp->yysplitPoint != NULL) |
if (yystackp->yysplitPoint != YY_NULLPTR) |
{ | { |
yyGLRState* yys; | yyGLRState* yys; |
int yyn; | int yyn; |
|
|
{ | { |
yyGLRState* yyp, *yyq, *yyr; | yyGLRState* yyp, *yyq, *yyr; |
| |
if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == NULL) |
if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == YY_NULLPTR) |
return; | return; |
| |
for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = NULL; |
for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = YY_NULLPTR; |
yyp != yystackp->yysplitPoint; | yyp != yystackp->yysplitPoint; |
yyr = yyp, yyp = yyq, yyq = yyp->yypred) | yyr = yyp, yyp = yyq, yyq = yyp->yypred) |
yyp->yypred = yyr; | yyp->yypred = yyr; |
|
|
yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems; | yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems; |
yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1; | yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1; |
yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems; | yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems; |
yystackp->yysplitPoint = NULL; |
yystackp->yysplitPoint = YY_NULLPTR; |
yystackp->yylastDeleted = NULL; |
yystackp->yylastDeleted = YY_NULLPTR; |
| |
while (yyr != NULL) |
while (yyr != YY_NULLPTR) |
{ | { |
yystackp->yynextFree->yystate = *yyr; | yystackp->yynextFree->yystate = *yyr; |
yyr = yyr->yypred; | yyr = yyr->yypred; |
|
|
yyprocessOneStack (yyGLRStack* yystackp, size_t yyk, | yyprocessOneStack (yyGLRStack* yystackp, size_t yyk, |
size_t yyposn) | size_t yyposn) |
{ | { |
int yyaction; |
while (yystackp->yytops.yystates[yyk] != YY_NULLPTR) |
const short int* yyconflicts; |
|
yyRuleNum yyrule; |
|
|
|
while (yystackp->yytops.yystates[yyk] != NULL) |
|
{ | { |
yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState; | yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState; |
YYDPRINTF ((stderr, "Stack %lu Entering state %d\n", | YYDPRINTF ((stderr, "Stack %lu Entering state %d\n", |
|
|
| |
if (yyisDefaultedState (yystate)) | if (yyisDefaultedState (yystate)) |
{ | { |
yyrule = yydefaultAction (yystate); |
YYRESULTTAG yyflag; |
|
yyRuleNum yyrule = yydefaultAction (yystate); |
if (yyrule == 0) | if (yyrule == 0) |
{ | { |
YYDPRINTF ((stderr, "Stack %lu dies.\n", | YYDPRINTF ((stderr, "Stack %lu dies.\n", |
|
|
yymarkStackDeleted (yystackp, yyk); | yymarkStackDeleted (yystackp, yyk); |
return yyok; | return yyok; |
} | } |
YYCHK (yyglrReduce (yystackp, yyk, yyrule, yyfalse)); |
yyflag = yyglrReduce (yystackp, yyk, yyrule, yyimmediate[yyrule]); |
|
if (yyflag == yyerr) |
|
{ |
|
YYDPRINTF ((stderr, |
|
"Stack %lu dies " |
|
"(predicate failure or explicit user error).\n", |
|
(unsigned long int) yyk)); |
|
yymarkStackDeleted (yystackp, yyk); |
|
return yyok; |
|
} |
|
if (yyflag != yyok) |
|
return yyflag; |
} | } |
else | else |
{ | { |
yySymbol yytoken; | yySymbol yytoken; |
|
int yyaction; |
|
const short int* yyconflicts; |
|
|
yystackp->yytops.yylookaheadNeeds[yyk] = yytrue; | yystackp->yytops.yylookaheadNeeds[yyk] = yytrue; |
if (yychar == YYEMPTY) | if (yychar == YYEMPTY) |
{ | { |
YYDPRINTF ((stderr, "Reading a token: ")); | YYDPRINTF ((stderr, "Reading a token: ")); |
yychar = YYLEX; |
yychar = yylex (); |
} | } |
| |
if (yychar <= YYEOF) | if (yychar <= YYEOF) |
|
|
| |
while (*yyconflicts != 0) | while (*yyconflicts != 0) |
{ | { |
|
YYRESULTTAG yyflag; |
size_t yynewStack = yysplitStack (yystackp, yyk); | size_t yynewStack = yysplitStack (yystackp, yyk); |
YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n", | YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n", |
(unsigned long int) yynewStack, | (unsigned long int) yynewStack, |
(unsigned long int) yyk)); | (unsigned long int) yyk)); |
YYCHK (yyglrReduce (yystackp, yynewStack, |
yyflag = yyglrReduce (yystackp, yynewStack, |
*yyconflicts, yyfalse)); |
*yyconflicts, |
|
yyimmediate[*yyconflicts]); |
|
if (yyflag == yyok) |
YYCHK (yyprocessOneStack (yystackp, yynewStack, | YYCHK (yyprocessOneStack (yystackp, yynewStack, |
yyposn)); | yyposn)); |
|
else if (yyflag == yyerr) |
|
{ |
|
YYDPRINTF ((stderr, "Stack %lu dies.\n", |
|
(unsigned long int) yynewStack)); |
|
yymarkStackDeleted (yystackp, yynewStack); |
|
} |
|
else |
|
return yyflag; |
yyconflicts += 1; | yyconflicts += 1; |
} | } |
| |
|
|
break; | break; |
} | } |
else | else |
YYCHK (yyglrReduce (yystackp, yyk, -yyaction, |
{ |
yyfalse)); |
YYRESULTTAG yyflag = yyglrReduce (yystackp, yyk, -yyaction, |
|
yyimmediate[-yyaction]); |
|
if (yyflag == yyerr) |
|
{ |
|
YYDPRINTF ((stderr, |
|
"Stack %lu dies " |
|
"(predicate failure or explicit user error).\n", |
|
(unsigned long int) yyk)); |
|
yymarkStackDeleted (yystackp, yyk); |
|
break; |
|
} |
|
else if (yyflag != yyok) |
|
return yyflag; |
|
} |
} | } |
} | } |
return yyok; | return yyok; |
} | } |
| |
/*ARGSUSED*/ static void |
static void |
yyreportSyntaxError (yyGLRStack* yystackp) | yyreportSyntaxError (yyGLRStack* yystackp) |
{ | { |
if (yystackp->yyerrState != 0) | if (yystackp->yyerrState != 0) |
|
|
#if ! YYERROR_VERBOSE | #if ! YYERROR_VERBOSE |
yyerror (YY_("syntax error")); | yyerror (YY_("syntax error")); |
#else | #else |
|
{ |
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); | yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
size_t yysize0 = yytnamerr (NULL, yytokenName (yytoken)); |
size_t yysize0 = yytnamerr (YY_NULLPTR, yytokenName (yytoken)); |
size_t yysize = yysize0; | size_t yysize = yysize0; |
size_t yysize1; |
|
yybool yysize_overflow = yyfalse; | yybool yysize_overflow = yyfalse; |
char* yymsg = NULL; |
char* yymsg = YY_NULLPTR; |
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
/* Internationalized format string. */ | /* Internationalized format string. */ |
const char *yyformat = 0; |
const char *yyformat = YY_NULLPTR; |
/* Arguments of yyformat. */ | /* Arguments of yyformat. */ |
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
/* Number of reported tokens (one for the "unexpected", one per | /* Number of reported tokens (one for the "unexpected", one per |
|
|
break; | break; |
} | } |
yyarg[yycount++] = yytokenName (yyx); | yyarg[yycount++] = yytokenName (yyx); |
yysize1 = yysize + yytnamerr (NULL, yytokenName (yyx)); |
{ |
yysize_overflow |= yysize1 < yysize; |
size_t yysz = yysize + yytnamerr (YY_NULLPTR, yytokenName (yyx)); |
yysize = yysize1; |
yysize_overflow |= yysz < yysize; |
|
yysize = yysz; |
|
} |
} | } |
} | } |
} | } |
|
|
#undef YYCASE_ | #undef YYCASE_ |
} | } |
| |
yysize1 = yysize + strlen (yyformat); |
{ |
yysize_overflow |= yysize1 < yysize; |
size_t yysz = yysize + strlen (yyformat); |
yysize = yysize1; |
yysize_overflow |= yysz < yysize; |
|
yysize = yysz; |
|
} |
| |
if (!yysize_overflow) | if (!yysize_overflow) |
yymsg = (char *) YYMALLOC (yysize); | yymsg = (char *) YYMALLOC (yysize); |
|
|
yyerror (YY_("syntax error")); | yyerror (YY_("syntax error")); |
yyMemoryExhausted (yystackp); | yyMemoryExhausted (yystackp); |
} | } |
|
} |
#endif /* YYERROR_VERBOSE */ | #endif /* YYERROR_VERBOSE */ |
yynerrs += 1; | yynerrs += 1; |
} | } |
|
|
/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP, | /* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP, |
yylval, and yylloc are the syntactic category, semantic value, and location | yylval, and yylloc are the syntactic category, semantic value, and location |
of the lookahead. */ | of the lookahead. */ |
/*ARGSUSED*/ static void |
static void |
yyrecoverSyntaxError (yyGLRStack* yystackp) | yyrecoverSyntaxError (yyGLRStack* yystackp) |
{ | { |
size_t yyk; | size_t yyk; |
|
|
if (yystackp->yyerrState == 3) | if (yystackp->yyerrState == 3) |
/* We just shifted the error token and (perhaps) took some | /* We just shifted the error token and (perhaps) took some |
reductions. Skip tokens until we can proceed. */ | reductions. Skip tokens until we can proceed. */ |
while (YYID (yytrue)) |
while (yytrue) |
{ | { |
yySymbol yytoken; | yySymbol yytoken; |
if (yychar == YYEOF) | if (yychar == YYEOF) |
yyFail (yystackp, NULL); |
yyFail (yystackp, YY_NULLPTR); |
if (yychar != YYEMPTY) | if (yychar != YYEMPTY) |
{ | { |
yytoken = YYTRANSLATE (yychar); | yytoken = YYTRANSLATE (yychar); |
|
|
yytoken, &yylval); | yytoken, &yylval); |
} | } |
YYDPRINTF ((stderr, "Reading a token: ")); | YYDPRINTF ((stderr, "Reading a token: ")); |
yychar = YYLEX; |
yychar = yylex (); |
if (yychar <= YYEOF) | if (yychar <= YYEOF) |
{ | { |
yychar = yytoken = YYEOF; | yychar = yytoken = YYEOF; |
|
|
| |
/* Reduce to one stack. */ | /* Reduce to one stack. */ |
for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1) | for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1) |
if (yystackp->yytops.yystates[yyk] != NULL) |
if (yystackp->yytops.yystates[yyk] != YY_NULLPTR) |
break; | break; |
if (yyk >= yystackp->yytops.yysize) | if (yyk >= yystackp->yytops.yysize) |
yyFail (yystackp, NULL); |
yyFail (yystackp, YY_NULLPTR); |
for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1) | for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1) |
yymarkStackDeleted (yystackp, yyk); | yymarkStackDeleted (yystackp, yyk); |
yyremoveDeletes (yystackp); | yyremoveDeletes (yystackp); |
|
|
| |
/* Now pop stack until we find a state that shifts the error token. */ | /* Now pop stack until we find a state that shifts the error token. */ |
yystackp->yyerrState = 3; | yystackp->yyerrState = 3; |
while (yystackp->yytops.yystates[0] != NULL) |
while (yystackp->yytops.yystates[0] != YY_NULLPTR) |
{ | { |
yyGLRState *yys = yystackp->yytops.yystates[0]; | yyGLRState *yys = yystackp->yytops.yystates[0]; |
yyj = yypact[yys->yylrState]; | yyj = yypact[yys->yylrState]; |
|
|
if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR | if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR |
&& yyisShiftAction (yytable[yyj])) | && yyisShiftAction (yytable[yyj])) |
{ | { |
/* Shift the error token having adjusted its location. */ |
/* Shift the error token. */ |
YYLTYPE yyerrloc; |
|
YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]], | YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]], |
&yylval, &yyerrloc); | &yylval, &yyerrloc); |
yyglrShift (yystackp, 0, yytable[yyj], | yyglrShift (yystackp, 0, yytable[yyj], |
yys->yyposn, &yylval, &yyerrloc); |
yys->yyposn, &yylval); |
yys = yystackp->yytops.yystates[0]; | yys = yystackp->yytops.yystates[0]; |
break; | break; |
} | } |
} | } |
|
if (yys->yypred != YY_NULLPTR) |
if (yys->yypred != NULL) |
|
yydestroyGLRState ("Error: popping", yys); | yydestroyGLRState ("Error: popping", yys); |
yystackp->yytops.yystates[0] = yys->yypred; | yystackp->yytops.yystates[0] = yys->yypred; |
yystackp->yynextFree -= 1; | yystackp->yynextFree -= 1; |
yystackp->yyspaceLeft += 1; | yystackp->yyspaceLeft += 1; |
} | } |
if (yystackp->yytops.yystates[0] == NULL) |
if (yystackp->yytops.yystates[0] == YY_NULLPTR) |
yyFail (yystackp, NULL); |
yyFail (yystackp, YY_NULLPTR); |
} | } |
| |
#define YYCHK1(YYE) \ | #define YYCHK1(YYE) \ |
|
|
default: \ | default: \ |
goto yybuglab; \ | goto yybuglab; \ |
} \ | } \ |
} while (YYID (0)) |
} while (0) |
|
|
| |
/*----------. | /*----------. |
| yyparse. | | | yyparse. | |
|
|
yychar = YYEMPTY; | yychar = YYEMPTY; |
yylval = yyval_default; | yylval = yyval_default; |
| |
|
|
if (! yyinitGLRStack (yystackp, YYINITDEPTH)) | if (! yyinitGLRStack (yystackp, YYINITDEPTH)) |
goto yyexhaustedlab; | goto yyexhaustedlab; |
switch (YYSETJMP (yystack.yyexception_buffer)) | switch (YYSETJMP (yystack.yyexception_buffer)) |
|
|
case 2: goto yyexhaustedlab; | case 2: goto yyexhaustedlab; |
default: goto yybuglab; | default: goto yybuglab; |
} | } |
yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc); |
yyglrShift (&yystack, 0, 0, 0, &yylval); |
yyposn = 0; | yyposn = 0; |
| |
while (YYID (yytrue)) |
while (yytrue) |
{ | { |
/* For efficiency, we have two loops, the first of which is | /* For efficiency, we have two loops, the first of which is |
specialized to deterministic operation (single stack, no | specialized to deterministic operation (single stack, no |
potential ambiguity). */ | potential ambiguity). */ |
/* Standard mode */ | /* Standard mode */ |
while (YYID (yytrue)) |
while (yytrue) |
{ | { |
yyRuleNum yyrule; | yyRuleNum yyrule; |
int yyaction; | int yyaction; |
|
|
if (yychar == YYEMPTY) | if (yychar == YYEMPTY) |
{ | { |
YYDPRINTF ((stderr, "Reading a token: ")); | YYDPRINTF ((stderr, "Reading a token: ")); |
yychar = YYLEX; |
yychar = yylex (); |
} | } |
| |
if (yychar <= YYEOF) | if (yychar <= YYEOF) |
|
|
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
yychar = YYEMPTY; | yychar = YYEMPTY; |
yyposn += 1; | yyposn += 1; |
yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc); |
yyglrShift (&yystack, 0, yyaction, yyposn, &yylval); |
if (0 < yystack.yyerrState) | if (0 < yystack.yyerrState) |
yystack.yyerrState -= 1; | yystack.yyerrState -= 1; |
} | } |
|
|
} | } |
} | } |
| |
while (YYID (yytrue)) |
while (yytrue) |
{ | { |
yySymbol yytoken_to_shift; | yySymbol yytoken_to_shift; |
size_t yys; | size_t yys; |
|
|
YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys)); | YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys)); |
YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc); | YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc); |
yyglrShift (&yystack, yys, yyaction, yyposn, | yyglrShift (&yystack, yys, yyaction, yyposn, |
&yylval, &yylloc); |
&yylval); |
YYDPRINTF ((stderr, "Stack %lu now in state #%d\n", | YYDPRINTF ((stderr, "Stack %lu now in state #%d\n", |
(unsigned long int) yys, | (unsigned long int) yys, |
yystack.yytops.yystates[yys]->yylrState)); | yystack.yytops.yystates[yys]->yylrState)); |
|
|
yyreturn: | yyreturn: |
if (yychar != YYEMPTY) | if (yychar != YYEMPTY) |
yydestruct ("Cleanup: discarding lookahead", | yydestruct ("Cleanup: discarding lookahead", |
YYTRANSLATE (yychar), |
YYTRANSLATE (yychar), &yylval); |
&yylval); |
|
| |
/* If the stack is well-formed, pop the stack until it is empty, | /* If the stack is well-formed, pop the stack until it is empty, |
destroying its entries as we go. But free the stack regardless | destroying its entries as we go. But free the stack regardless |
|
|
while (yystates[yyk]) | while (yystates[yyk]) |
{ | { |
yyGLRState *yys = yystates[yyk]; | yyGLRState *yys = yystates[yyk]; |
if (yys->yypred != NULL) |
if (yys->yypred != YY_NULLPTR) |
yydestroyGLRState ("Cleanup: popping", yys); | yydestroyGLRState ("Cleanup: popping", yys); |
yystates[yyk] = yys->yypred; | yystates[yyk] = yys->yypred; |
yystack.yynextFree -= 1; | yystack.yynextFree -= 1; |
|
|
yyfreeGLRStack (&yystack); | yyfreeGLRStack (&yystack); |
} | } |
| |
/* Make sure YYID is used. */ |
return yyresult; |
return YYID (yyresult); |
|
} | } |
| |
/* DEBUGGING ONLY */ | /* DEBUGGING ONLY */ |
#if YYDEBUG | #if YYDEBUG |
static void yypstack (yyGLRStack* yystackp, size_t yyk) |
|
__attribute__ ((__unused__)); |
|
static void yypdumpstack (yyGLRStack* yystackp) __attribute__ ((__unused__)); |
|
|
|
static void | static void |
yy_yypstack (yyGLRState* yys) | yy_yypstack (yyGLRState* yys) |
{ | { |
|
|
static void | static void |
yypstates (yyGLRState* yyst) | yypstates (yyGLRState* yyst) |
{ | { |
if (yyst == NULL) |
if (yyst == YY_NULLPTR) |
YYFPRINTF (stderr, "<null>"); | YYFPRINTF (stderr, "<null>"); |
else | else |
yy_yypstack (yyst); | yy_yypstack (yyst); |
|
|
} | } |
| |
#define YYINDEX(YYX) \ | #define YYINDEX(YYX) \ |
((YYX) == NULL ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems) |
((YYX) == YY_NULLPTR ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems) |
| |
| |
static void | static void |
|
|
(unsigned long int) (yyp - yystackp->yyitems)); | (unsigned long int) (yyp - yystackp->yyitems)); |
if (*(yybool *) yyp) | if (*(yybool *) yyp) |
{ | { |
|
YYASSERT (yyp->yystate.yyisState); |
|
YYASSERT (yyp->yyoption.yyisState); |
YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld", | YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld", |
yyp->yystate.yyresolved, yyp->yystate.yylrState, | yyp->yystate.yyresolved, yyp->yystate.yylrState, |
(unsigned long int) yyp->yystate.yyposn, | (unsigned long int) yyp->yystate.yyposn, |
|
|
} | } |
else | else |
{ | { |
|
YYASSERT (!yyp->yystate.yyisState); |
|
YYASSERT (!yyp->yyoption.yyisState); |
YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld", | YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld", |
yyp->yyoption.yyrule - 1, | yyp->yyoption.yyrule - 1, |
(long int) YYINDEX (yyp->yyoption.yystate), | (long int) YYINDEX (yyp->yyoption.yystate), |
|
|
} | } |
#endif | #endif |
| |
|
#undef yylval |
|
#undef yychar |
|
#undef yynerrs |
| |
|
/* Substitute the variable and function names. */ |
|
#define yyparse FQL_parse |
|
#define yylex FQL_lex |
|
#define yyerror FQL_error |
|
#define yylval FQL_lval |
|
#define yychar FQL_char |
|
#define yydebug FQL_debug |
|
#define yynerrs FQL_nerrs |
| |
/* Line 2659 of glr.c */ |
#line 659 "FQL.y" /* glr.c:2551 */ |
#line 659 "FQL.y" |
|
|
|
| |