2017-02-10 21:42:02 +01:00
|
|
|
/* A Bison parser, made by GNU Bison 3.0.4. */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* Bison implementation for Yacc-like parsers in C
|
|
|
|
|
2017-02-10 21:42:02 +01:00
|
|
|
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
|
|
|
|
/* As a special exception, you may create a larger work that contains
|
|
|
|
part or all of the Bison parser skeleton and distribute that work
|
|
|
|
under terms of your choice, so long as that work isn't itself a
|
|
|
|
parser generator using the skeleton or a modified version thereof
|
|
|
|
as a parser skeleton. Alternatively, if you modify or redistribute
|
|
|
|
the parser skeleton itself, you may (at your option) remove this
|
|
|
|
special exception, which will cause the skeleton and the resulting
|
|
|
|
Bison output files to be licensed under the GNU General Public
|
|
|
|
License without this special exception.
|
|
|
|
|
|
|
|
This special exception was added by the Free Software Foundation in
|
|
|
|
version 2.2 of Bison. */
|
|
|
|
|
|
|
|
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
|
|
|
simplifying the original so-called "semantic" parser. */
|
|
|
|
|
|
|
|
/* All symbols defined below should begin with yy or YY, to avoid
|
|
|
|
infringing on user name space. This should be done even for local
|
|
|
|
variables, as they might otherwise be expanded by user macros.
|
|
|
|
There are some unavoidable exceptions within include files to
|
|
|
|
define necessary library symbols; they are noted "INFRINGES ON
|
|
|
|
USER NAME SPACE" below. */
|
|
|
|
|
|
|
|
/* Identify Bison output. */
|
|
|
|
#define YYBISON 1
|
|
|
|
|
|
|
|
/* Bison version. */
|
2017-02-10 21:42:02 +01:00
|
|
|
#define YYBISON_VERSION "3.0.4"
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* Skeleton name. */
|
|
|
|
#define YYSKELETON_NAME "yacc.c"
|
|
|
|
|
|
|
|
/* Pure parsers. */
|
|
|
|
#define YYPURE 2
|
|
|
|
|
|
|
|
/* Push parsers. */
|
|
|
|
#define YYPUSH 0
|
|
|
|
|
|
|
|
/* Pull parsers. */
|
|
|
|
#define YYPULL 1
|
|
|
|
|
|
|
|
/* Substitute the type names. */
|
|
|
|
#define YYSTYPE HSQL_STYPE
|
|
|
|
#define YYLTYPE HSQL_LTYPE
|
|
|
|
/* Substitute the variable and function names. */
|
|
|
|
#define yyparse hsql_parse
|
|
|
|
#define yylex hsql_lex
|
|
|
|
#define yyerror hsql_error
|
|
|
|
#define yydebug hsql_debug
|
|
|
|
#define yynerrs hsql_nerrs
|
|
|
|
|
|
|
|
|
|
|
|
/* Copy the first part of user declarations. */
|
|
|
|
#line 1 "bison_parser.y" /* yacc.c:339 */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* bison_parser.y
|
|
|
|
* defines bison_parser.h
|
|
|
|
* outputs bison_parser.c
|
|
|
|
*
|
|
|
|
* Grammar File Spec: http://dinosaur.compilertools.net/bison/bison_6.html
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
/*********************************
|
|
|
|
** Section 1: C Declarations
|
|
|
|
*********************************/
|
|
|
|
|
|
|
|
#include "bison_parser.h"
|
|
|
|
#include "flex_lexer.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
using namespace hsql;
|
|
|
|
|
2017-04-07 16:26:20 +02:00
|
|
|
int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const char *msg) {
|
|
|
|
result->setIsValid(false);
|
|
|
|
result->setErrorDetails(strdup(msg), llocp->first_line, llocp->first_column);
|
2015-12-23 17:02:45 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 102 "bison_parser.cpp" /* yacc.c:339 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
# ifndef YY_NULLPTR
|
|
|
|
# if defined __cplusplus && 201103L <= __cplusplus
|
|
|
|
# define YY_NULLPTR nullptr
|
|
|
|
# else
|
|
|
|
# define YY_NULLPTR 0
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
|
|
|
/* Enabling verbose error messages. */
|
|
|
|
#ifdef YYERROR_VERBOSE
|
|
|
|
# undef YYERROR_VERBOSE
|
|
|
|
# define YYERROR_VERBOSE 1
|
|
|
|
#else
|
|
|
|
# define YYERROR_VERBOSE 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* In a future release of Bison, this section will be replaced
|
|
|
|
by #include "bison_parser.h". */
|
|
|
|
#ifndef YY_HSQL_BISON_PARSER_H_INCLUDED
|
|
|
|
# define YY_HSQL_BISON_PARSER_H_INCLUDED
|
|
|
|
/* Debug traces. */
|
|
|
|
#ifndef HSQL_DEBUG
|
|
|
|
# if defined YYDEBUG
|
|
|
|
#if YYDEBUG
|
|
|
|
# define HSQL_DEBUG 1
|
|
|
|
# else
|
|
|
|
# define HSQL_DEBUG 0
|
|
|
|
# endif
|
|
|
|
# else /* ! defined YYDEBUG */
|
|
|
|
# define HSQL_DEBUG 0
|
|
|
|
# endif /* ! defined YYDEBUG */
|
|
|
|
#endif /* ! defined HSQL_DEBUG */
|
|
|
|
#if HSQL_DEBUG
|
|
|
|
extern int hsql_debug;
|
|
|
|
#endif
|
|
|
|
/* "%code requires" blocks. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 34 "bison_parser.y" /* yacc.c:355 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
// %code requires block
|
2016-02-27 14:24:23 +01:00
|
|
|
|
|
|
|
#include "../sql/statements.h"
|
|
|
|
#include "../SQLParserResult.h"
|
2015-12-23 17:02:45 +01:00
|
|
|
#include "parser_typedef.h"
|
|
|
|
|
|
|
|
// Auto update column and line number
|
|
|
|
#define YY_USER_ACTION \
|
2017-05-29 16:22:13 +02:00
|
|
|
yylloc->first_line = yylloc->last_line; \
|
|
|
|
yylloc->first_column = yylloc->last_column; \
|
|
|
|
for(int i = 0; yytext[i] != '\0'; i++) { \
|
|
|
|
yylloc->total_column++; \
|
|
|
|
if(yytext[i] == '\n') { \
|
|
|
|
yylloc->last_line++; \
|
|
|
|
yylloc->last_column = 0; \
|
|
|
|
} \
|
|
|
|
else { \
|
|
|
|
yylloc->last_column++; \
|
|
|
|
} \
|
|
|
|
}
|
2015-12-23 17:02:45 +01:00
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 163 "bison_parser.cpp" /* yacc.c:355 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* Token type. */
|
|
|
|
#ifndef HSQL_TOKENTYPE
|
|
|
|
# define HSQL_TOKENTYPE
|
|
|
|
enum hsql_tokentype
|
|
|
|
{
|
|
|
|
SQL_IDENTIFIER = 258,
|
|
|
|
SQL_STRING = 259,
|
|
|
|
SQL_FLOATVAL = 260,
|
|
|
|
SQL_INTVAL = 261,
|
|
|
|
SQL_NOTEQUALS = 262,
|
|
|
|
SQL_LESSEQ = 263,
|
|
|
|
SQL_GREATEREQ = 264,
|
|
|
|
SQL_DEALLOCATE = 265,
|
|
|
|
SQL_PARAMETERS = 266,
|
|
|
|
SQL_INTERSECT = 267,
|
|
|
|
SQL_TEMPORARY = 268,
|
|
|
|
SQL_TIMESTAMP = 269,
|
|
|
|
SQL_DISTINCT = 270,
|
|
|
|
SQL_NVARCHAR = 271,
|
|
|
|
SQL_RESTRICT = 272,
|
|
|
|
SQL_TRUNCATE = 273,
|
|
|
|
SQL_ANALYZE = 274,
|
|
|
|
SQL_BETWEEN = 275,
|
|
|
|
SQL_CASCADE = 276,
|
|
|
|
SQL_COLUMNS = 277,
|
|
|
|
SQL_CONTROL = 278,
|
|
|
|
SQL_DEFAULT = 279,
|
|
|
|
SQL_EXECUTE = 280,
|
|
|
|
SQL_EXPLAIN = 281,
|
|
|
|
SQL_HISTORY = 282,
|
|
|
|
SQL_INTEGER = 283,
|
|
|
|
SQL_NATURAL = 284,
|
|
|
|
SQL_PREPARE = 285,
|
|
|
|
SQL_PRIMARY = 286,
|
|
|
|
SQL_SCHEMAS = 287,
|
|
|
|
SQL_SPATIAL = 288,
|
|
|
|
SQL_VIRTUAL = 289,
|
|
|
|
SQL_BEFORE = 290,
|
|
|
|
SQL_COLUMN = 291,
|
|
|
|
SQL_CREATE = 292,
|
|
|
|
SQL_DELETE = 293,
|
|
|
|
SQL_DIRECT = 294,
|
|
|
|
SQL_DOUBLE = 295,
|
|
|
|
SQL_ESCAPE = 296,
|
|
|
|
SQL_EXCEPT = 297,
|
|
|
|
SQL_EXISTS = 298,
|
|
|
|
SQL_GLOBAL = 299,
|
|
|
|
SQL_HAVING = 300,
|
|
|
|
SQL_IMPORT = 301,
|
|
|
|
SQL_INSERT = 302,
|
|
|
|
SQL_ISNULL = 303,
|
|
|
|
SQL_OFFSET = 304,
|
|
|
|
SQL_RENAME = 305,
|
|
|
|
SQL_SCHEMA = 306,
|
|
|
|
SQL_SELECT = 307,
|
|
|
|
SQL_SORTED = 308,
|
|
|
|
SQL_TABLES = 309,
|
|
|
|
SQL_UNIQUE = 310,
|
|
|
|
SQL_UNLOAD = 311,
|
|
|
|
SQL_UPDATE = 312,
|
|
|
|
SQL_VALUES = 313,
|
|
|
|
SQL_AFTER = 314,
|
|
|
|
SQL_ALTER = 315,
|
|
|
|
SQL_CROSS = 316,
|
|
|
|
SQL_DELTA = 317,
|
|
|
|
SQL_GROUP = 318,
|
|
|
|
SQL_INDEX = 319,
|
|
|
|
SQL_INNER = 320,
|
|
|
|
SQL_LIMIT = 321,
|
|
|
|
SQL_LOCAL = 322,
|
|
|
|
SQL_MERGE = 323,
|
|
|
|
SQL_MINUS = 324,
|
|
|
|
SQL_ORDER = 325,
|
|
|
|
SQL_OUTER = 326,
|
|
|
|
SQL_RIGHT = 327,
|
|
|
|
SQL_TABLE = 328,
|
|
|
|
SQL_UNION = 329,
|
|
|
|
SQL_USING = 330,
|
|
|
|
SQL_WHERE = 331,
|
|
|
|
SQL_CALL = 332,
|
2017-03-08 20:36:06 +01:00
|
|
|
SQL_CASE = 333,
|
|
|
|
SQL_DATE = 334,
|
|
|
|
SQL_DESC = 335,
|
|
|
|
SQL_DROP = 336,
|
|
|
|
SQL_ELSE = 337,
|
|
|
|
SQL_FILE = 338,
|
|
|
|
SQL_FROM = 339,
|
|
|
|
SQL_FULL = 340,
|
|
|
|
SQL_HASH = 341,
|
|
|
|
SQL_HINT = 342,
|
|
|
|
SQL_INTO = 343,
|
|
|
|
SQL_JOIN = 344,
|
|
|
|
SQL_LEFT = 345,
|
|
|
|
SQL_LIKE = 346,
|
|
|
|
SQL_LOAD = 347,
|
|
|
|
SQL_NULL = 348,
|
|
|
|
SQL_PART = 349,
|
|
|
|
SQL_PLAN = 350,
|
|
|
|
SQL_SHOW = 351,
|
|
|
|
SQL_TEXT = 352,
|
|
|
|
SQL_THEN = 353,
|
|
|
|
SQL_TIME = 354,
|
|
|
|
SQL_VIEW = 355,
|
|
|
|
SQL_WHEN = 356,
|
|
|
|
SQL_WITH = 357,
|
|
|
|
SQL_ADD = 358,
|
|
|
|
SQL_ALL = 359,
|
|
|
|
SQL_AND = 360,
|
|
|
|
SQL_ASC = 361,
|
|
|
|
SQL_CSV = 362,
|
|
|
|
SQL_END = 363,
|
|
|
|
SQL_FOR = 364,
|
|
|
|
SQL_INT = 365,
|
|
|
|
SQL_KEY = 366,
|
|
|
|
SQL_NOT = 367,
|
|
|
|
SQL_OFF = 368,
|
|
|
|
SQL_SET = 369,
|
|
|
|
SQL_TBL = 370,
|
|
|
|
SQL_TOP = 371,
|
|
|
|
SQL_AS = 372,
|
|
|
|
SQL_BY = 373,
|
|
|
|
SQL_IF = 374,
|
|
|
|
SQL_IN = 375,
|
|
|
|
SQL_IS = 376,
|
|
|
|
SQL_OF = 377,
|
|
|
|
SQL_ON = 378,
|
|
|
|
SQL_OR = 379,
|
|
|
|
SQL_TO = 380,
|
|
|
|
SQL_EQUALS = 381,
|
|
|
|
SQL_LESS = 382,
|
|
|
|
SQL_GREATER = 383,
|
|
|
|
SQL_NOTNULL = 384,
|
|
|
|
SQL_UMINUS = 385
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Value type. */
|
|
|
|
#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED
|
2017-02-10 21:42:02 +01:00
|
|
|
|
2015-12-23 17:02:45 +01:00
|
|
|
union HSQL_STYPE
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 92 "bison_parser.y" /* yacc.c:355 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
double fval;
|
|
|
|
int64_t ival;
|
|
|
|
char* sval;
|
2016-05-24 15:09:11 +02:00
|
|
|
uintmax_t uval;
|
2015-12-23 17:02:45 +01:00
|
|
|
bool bval;
|
|
|
|
|
|
|
|
hsql::SQLStatement* statement;
|
|
|
|
hsql::SelectStatement* select_stmt;
|
|
|
|
hsql::ImportStatement* import_stmt;
|
|
|
|
hsql::CreateStatement* create_stmt;
|
|
|
|
hsql::InsertStatement* insert_stmt;
|
|
|
|
hsql::DeleteStatement* delete_stmt;
|
|
|
|
hsql::UpdateStatement* update_stmt;
|
|
|
|
hsql::DropStatement* drop_stmt;
|
|
|
|
hsql::PrepareStatement* prep_stmt;
|
|
|
|
hsql::ExecuteStatement* exec_stmt;
|
|
|
|
|
|
|
|
hsql::TableRef* table;
|
|
|
|
hsql::Expr* expr;
|
|
|
|
hsql::OrderDescription* order;
|
|
|
|
hsql::OrderType order_type;
|
|
|
|
hsql::LimitDescription* limit;
|
|
|
|
hsql::ColumnDefinition* column_t;
|
|
|
|
hsql::GroupByDescription* group_t;
|
|
|
|
hsql::UpdateClause* update_t;
|
|
|
|
|
2017-04-07 16:26:20 +02:00
|
|
|
std::vector<hsql::SQLStatement*>* stmt_vec;
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
std::vector<char*>* str_vec;
|
|
|
|
std::vector<hsql::TableRef*>* table_vec;
|
|
|
|
std::vector<hsql::ColumnDefinition*>* column_vec;
|
|
|
|
std::vector<hsql::UpdateClause*>* update_vec;
|
|
|
|
std::vector<hsql::Expr*>* expr_vec;
|
2017-03-08 20:36:06 +01:00
|
|
|
std::vector<hsql::OrderDescription*>* order_vec;
|
2015-12-23 17:02:45 +01:00
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 343 "bison_parser.cpp" /* yacc.c:355 */
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
2017-02-10 21:42:02 +01:00
|
|
|
|
|
|
|
typedef union HSQL_STYPE HSQL_STYPE;
|
2015-12-23 17:02:45 +01:00
|
|
|
# define HSQL_STYPE_IS_TRIVIAL 1
|
|
|
|
# define HSQL_STYPE_IS_DECLARED 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Location type. */
|
|
|
|
#if ! defined HSQL_LTYPE && ! defined HSQL_LTYPE_IS_DECLARED
|
|
|
|
typedef struct HSQL_LTYPE HSQL_LTYPE;
|
|
|
|
struct HSQL_LTYPE
|
|
|
|
{
|
|
|
|
int first_line;
|
|
|
|
int first_column;
|
|
|
|
int last_line;
|
|
|
|
int last_column;
|
|
|
|
};
|
|
|
|
# define HSQL_LTYPE_IS_DECLARED 1
|
|
|
|
# define HSQL_LTYPE_IS_TRIVIAL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-07 16:26:20 +02:00
|
|
|
int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner);
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */
|
|
|
|
|
|
|
|
/* Copy the second part of user declarations. */
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 373 "bison_parser.cpp" /* yacc.c:358 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
#ifdef short
|
|
|
|
# undef short
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef YYTYPE_UINT8
|
|
|
|
typedef YYTYPE_UINT8 yytype_uint8;
|
|
|
|
#else
|
|
|
|
typedef unsigned char yytype_uint8;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef YYTYPE_INT8
|
|
|
|
typedef YYTYPE_INT8 yytype_int8;
|
|
|
|
#else
|
|
|
|
typedef signed char yytype_int8;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef YYTYPE_UINT16
|
|
|
|
typedef YYTYPE_UINT16 yytype_uint16;
|
|
|
|
#else
|
|
|
|
typedef unsigned short int yytype_uint16;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef YYTYPE_INT16
|
|
|
|
typedef YYTYPE_INT16 yytype_int16;
|
|
|
|
#else
|
|
|
|
typedef short int yytype_int16;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef YYSIZE_T
|
|
|
|
# ifdef __SIZE_TYPE__
|
|
|
|
# define YYSIZE_T __SIZE_TYPE__
|
|
|
|
# elif defined size_t
|
|
|
|
# define YYSIZE_T size_t
|
|
|
|
# elif ! defined YYSIZE_T
|
|
|
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# define YYSIZE_T size_t
|
|
|
|
# else
|
|
|
|
# define YYSIZE_T unsigned int
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
|
|
|
|
|
|
|
|
#ifndef YY_
|
|
|
|
# if defined YYENABLE_NLS && YYENABLE_NLS
|
|
|
|
# if ENABLE_NLS
|
|
|
|
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifndef YY_
|
|
|
|
# define YY_(Msgid) Msgid
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef YY_ATTRIBUTE
|
|
|
|
# if (defined __GNUC__ \
|
|
|
|
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
|
|
|
|
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
|
|
|
|
# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
|
|
|
|
# else
|
|
|
|
# define YY_ATTRIBUTE(Spec) /* empty */
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef YY_ATTRIBUTE_PURE
|
|
|
|
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef YY_ATTRIBUTE_UNUSED
|
|
|
|
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined _Noreturn \
|
|
|
|
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
|
|
|
|
# if defined _MSC_VER && 1200 <= _MSC_VER
|
|
|
|
# define _Noreturn __declspec (noreturn)
|
|
|
|
# else
|
|
|
|
# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Suppress unused-variable warnings by "using" E. */
|
|
|
|
#if ! defined lint || defined __GNUC__
|
|
|
|
# define YYUSE(E) ((void) (E))
|
|
|
|
#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
|
|
|
|
|
|
|
|
|
|
|
|
#if ! defined yyoverflow || YYERROR_VERBOSE
|
|
|
|
|
|
|
|
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
|
|
|
|
|
|
|
# ifdef YYSTACK_USE_ALLOCA
|
|
|
|
# if YYSTACK_USE_ALLOCA
|
|
|
|
# ifdef __GNUC__
|
|
|
|
# define YYSTACK_ALLOC __builtin_alloca
|
|
|
|
# elif defined __BUILTIN_VA_ARG_INCR
|
|
|
|
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# elif defined _AIX
|
|
|
|
# define YYSTACK_ALLOC __alloca
|
|
|
|
# elif defined _MSC_VER
|
|
|
|
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# define alloca _alloca
|
|
|
|
# else
|
|
|
|
# define YYSTACK_ALLOC alloca
|
|
|
|
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
|
|
|
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
|
|
|
|
# ifndef EXIT_SUCCESS
|
|
|
|
# define EXIT_SUCCESS 0
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifdef YYSTACK_ALLOC
|
|
|
|
/* Pacify GCC's 'empty if-body' warning. */
|
|
|
|
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
|
|
|
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
|
|
|
/* The OS might guarantee only one guard page at the bottom of the stack,
|
|
|
|
and a page size can be as small as 4096 bytes. So we cannot safely
|
|
|
|
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
|
|
|
|
to allow for a few compiler-allocated temporary stack slots. */
|
|
|
|
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# define YYSTACK_ALLOC YYMALLOC
|
|
|
|
# define YYSTACK_FREE YYFREE
|
|
|
|
# ifndef YYSTACK_ALLOC_MAXIMUM
|
|
|
|
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
|
|
|
|
# endif
|
|
|
|
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
|
|
|
&& ! ((defined YYMALLOC || defined malloc) \
|
|
|
|
&& (defined YYFREE || defined free)))
|
|
|
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# ifndef EXIT_SUCCESS
|
|
|
|
# define EXIT_SUCCESS 0
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifndef YYMALLOC
|
|
|
|
# define YYMALLOC malloc
|
|
|
|
# if ! defined malloc && ! defined EXIT_SUCCESS
|
|
|
|
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# ifndef YYFREE
|
|
|
|
# define YYFREE free
|
|
|
|
# if ! defined free && ! defined EXIT_SUCCESS
|
|
|
|
void free (void *); /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
|
|
|
|
|
|
|
|
|
|
|
|
#if (! defined yyoverflow \
|
|
|
|
&& (! defined __cplusplus \
|
|
|
|
|| (defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL \
|
|
|
|
&& defined HSQL_STYPE_IS_TRIVIAL && HSQL_STYPE_IS_TRIVIAL)))
|
|
|
|
|
|
|
|
/* A type that is properly aligned for any stack member. */
|
|
|
|
union yyalloc
|
|
|
|
{
|
|
|
|
yytype_int16 yyss_alloc;
|
|
|
|
YYSTYPE yyvs_alloc;
|
|
|
|
YYLTYPE yyls_alloc;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The size of the maximum gap between one aligned stack and the next. */
|
|
|
|
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
|
|
|
|
|
|
|
|
/* The size of an array large to enough to hold all stacks, each with
|
|
|
|
N elements. */
|
|
|
|
# define YYSTACK_BYTES(N) \
|
|
|
|
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
|
|
|
+ 2 * YYSTACK_GAP_MAXIMUM)
|
|
|
|
|
|
|
|
# define YYCOPY_NEEDED 1
|
|
|
|
|
|
|
|
/* Relocate STACK from its old location to the new one. The
|
|
|
|
local variables YYSIZE and YYSTACKSIZE give the old and new number of
|
|
|
|
elements in the stack, and YYPTR gives the new location of the
|
|
|
|
stack. Advance YYPTR to a properly aligned location for the next
|
|
|
|
stack. */
|
|
|
|
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
YYSIZE_T yynewbytes; \
|
|
|
|
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
|
|
|
Stack = &yyptr->Stack_alloc; \
|
|
|
|
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
|
|
|
yyptr += yynewbytes / sizeof (*yyptr); \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
|
|
|
|
/* Copy COUNT objects from SRC to DST. The source and destination do
|
|
|
|
not overlap. */
|
|
|
|
# ifndef YYCOPY
|
|
|
|
# if defined __GNUC__ && 1 < __GNUC__
|
|
|
|
# define YYCOPY(Dst, Src, Count) \
|
|
|
|
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
|
|
|
|
# else
|
|
|
|
# define YYCOPY(Dst, Src, Count) \
|
|
|
|
do \
|
|
|
|
{ \
|
|
|
|
YYSIZE_T yyi; \
|
|
|
|
for (yyi = 0; yyi < (Count); yyi++) \
|
|
|
|
(Dst)[yyi] = (Src)[yyi]; \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif /* !YYCOPY_NEEDED */
|
|
|
|
|
|
|
|
/* YYFINAL -- State number of the termination state. */
|
2017-03-08 20:36:06 +01:00
|
|
|
#define YYFINAL 48
|
2015-12-23 17:02:45 +01:00
|
|
|
/* YYLAST -- Last index in YYTABLE. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#define YYLAST 463
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* YYNTOKENS -- Number of terminals. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#define YYNTOKENS 148
|
2015-12-23 17:02:45 +01:00
|
|
|
/* YYNNTS -- Number of nonterminals. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#define YYNNTS 76
|
2015-12-23 17:02:45 +01:00
|
|
|
/* YYNRULES -- Number of rules. */
|
2017-04-21 22:03:12 +02:00
|
|
|
#define YYNRULES 170
|
2015-12-23 17:02:45 +01:00
|
|
|
/* YYNSTATES -- Number of states. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#define YYNSTATES 312
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
|
|
|
|
by yylex, with out-of-bounds checking. */
|
|
|
|
#define YYUNDEFTOK 2
|
2017-03-08 20:36:06 +01:00
|
|
|
#define YYMAXUTOK 385
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
#define YYTRANSLATE(YYX) \
|
|
|
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
|
|
|
|
|
|
|
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
|
|
|
|
as returned by yylex, without out-of-bounds checking. */
|
|
|
|
static const yytype_uint8 yytranslate[] =
|
|
|
|
{
|
|
|
|
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2017-03-08 20:36:06 +01:00
|
|
|
2, 2, 2, 2, 2, 2, 2, 137, 2, 2,
|
2017-05-29 16:22:13 +02:00
|
|
|
142, 143, 135, 133, 146, 134, 144, 136, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 145,
|
|
|
|
128, 126, 129, 147, 2, 2, 2, 2, 2, 2,
|
2015-12-23 17:02:45 +01:00
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2017-03-08 20:36:06 +01:00
|
|
|
2, 140, 2, 141, 138, 2, 2, 2, 2, 2,
|
2015-12-23 17:02:45 +01:00
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2017-05-29 16:22:13 +02:00
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
2015-12-23 17:02:45 +01:00
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
|
|
|
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
|
|
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
|
|
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
|
|
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
|
|
|
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
|
|
|
|
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
|
|
|
|
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
|
|
|
|
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
|
|
|
85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
|
|
|
|
95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
|
|
|
|
105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
|
2017-03-08 20:36:06 +01:00
|
|
|
115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
|
|
|
|
125, 127, 130, 131, 132, 139
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#if HSQL_DEBUG
|
|
|
|
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
|
|
|
|
static const yytype_uint16 yyrline[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
0, 237, 237, 258, 259, 263, 264, 269, 270, 271,
|
|
|
|
272, 273, 274, 275, 276, 277, 285, 292, 295, 299,
|
|
|
|
311, 319, 323, 333, 339, 345, 355, 356, 360, 361,
|
|
|
|
365, 372, 373, 374, 375, 385, 389, 393, 405, 413,
|
|
|
|
425, 431, 441, 442, 452, 461, 462, 466, 478, 479,
|
|
|
|
483, 484, 488, 498, 512, 526, 527, 528, 532, 544,
|
|
|
|
545, 549, 553, 558, 559, 563, 568, 572, 573, 576,
|
|
|
|
577, 581, 582, 586, 590, 591, 592, 598, 599, 603,
|
|
|
|
604, 605, 612, 613, 617, 618, 622, 629, 630, 631,
|
|
|
|
632, 633, 634, 638, 639, 640, 641, 642, 643, 647,
|
|
|
|
648, 649, 653, 654, 658, 659, 660, 661, 662, 663,
|
|
|
|
664, 665, 666, 670, 671, 675, 676, 677, 678, 683,
|
|
|
|
687, 688, 692, 693, 694, 695, 696, 697, 701, 705,
|
|
|
|
709, 710, 714, 715, 716, 720, 725, 726, 730, 734,
|
|
|
|
738, 750, 751, 761, 762, 768, 773, 774, 779, 789,
|
|
|
|
797, 798, 803, 804, 808, 809, 817, 829, 830, 831,
|
|
|
|
832, 833, 834, 835, 836, 837, 842, 851, 852, 857,
|
|
|
|
858
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if HSQL_DEBUG || YYERROR_VERBOSE || 1
|
|
|
|
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
|
|
|
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
|
|
|
static const char *const yytname[] =
|
|
|
|
{
|
|
|
|
"$end", "error", "$undefined", "IDENTIFIER", "STRING", "FLOATVAL",
|
|
|
|
"INTVAL", "NOTEQUALS", "LESSEQ", "GREATEREQ", "DEALLOCATE", "PARAMETERS",
|
|
|
|
"INTERSECT", "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR",
|
|
|
|
"RESTRICT", "TRUNCATE", "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS",
|
|
|
|
"CONTROL", "DEFAULT", "EXECUTE", "EXPLAIN", "HISTORY", "INTEGER",
|
|
|
|
"NATURAL", "PREPARE", "PRIMARY", "SCHEMAS", "SPATIAL", "VIRTUAL",
|
|
|
|
"BEFORE", "COLUMN", "CREATE", "DELETE", "DIRECT", "DOUBLE", "ESCAPE",
|
|
|
|
"EXCEPT", "EXISTS", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL",
|
|
|
|
"OFFSET", "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNIQUE",
|
|
|
|
"UNLOAD", "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA",
|
|
|
|
"GROUP", "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER",
|
2017-03-08 20:36:06 +01:00
|
|
|
"OUTER", "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE",
|
|
|
|
"DATE", "DESC", "DROP", "ELSE", "FILE", "FROM", "FULL", "HASH", "HINT",
|
|
|
|
"INTO", "JOIN", "LEFT", "LIKE", "LOAD", "NULL", "PART", "PLAN", "SHOW",
|
|
|
|
"TEXT", "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", "AND",
|
|
|
|
"ASC", "CSV", "END", "FOR", "INT", "KEY", "NOT", "OFF", "SET", "TBL",
|
|
|
|
"TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR", "TO", "'='",
|
|
|
|
"EQUALS", "'<'", "'>'", "LESS", "GREATER", "NOTNULL", "'+'", "'-'",
|
|
|
|
"'*'", "'/'", "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'",
|
2017-05-29 16:22:13 +02:00
|
|
|
"';'", "','", "'?'", "$accept", "input", "statement_list", "statement",
|
|
|
|
"preparable_statement", "prepare_statement", "prepare_target_query",
|
|
|
|
"execute_statement", "import_statement", "import_file_type", "file_path",
|
|
|
|
"create_statement", "opt_not_exists", "column_def_commalist",
|
|
|
|
"column_def", "column_type", "drop_statement", "delete_statement",
|
|
|
|
"truncate_statement", "insert_statement", "opt_column_list",
|
|
|
|
"update_statement", "update_clause_commalist", "update_clause",
|
|
|
|
"select_statement", "select_with_paren", "select_no_paren",
|
|
|
|
"set_operator", "select_clause", "opt_distinct", "select_list",
|
|
|
|
"from_clause", "opt_where", "opt_group", "opt_having", "opt_order",
|
|
|
|
"order_list", "order_desc", "opt_order_type", "opt_top", "opt_limit",
|
|
|
|
"expr_list", "literal_list", "expr_alias", "expr", "operand",
|
|
|
|
"scalar_expr", "unary_expr", "binary_expr", "logic_expr", "in_expr",
|
|
|
|
"case_expr", "exists_expr", "comp_expr", "function_expr", "between_expr",
|
|
|
|
"column_name", "literal", "string_literal", "num_literal", "int_literal",
|
|
|
|
"star_expr", "param_expr", "table_ref", "table_ref_atomic",
|
|
|
|
"table_ref_commalist", "table_ref_name", "table_ref_name_no_alias",
|
|
|
|
"table_name", "alias", "opt_alias", "join_clause", "opt_join_type",
|
|
|
|
"join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
# ifdef YYPRINT
|
|
|
|
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
|
|
|
|
(internal) symbol number NUM (which must be that of a token). */
|
|
|
|
static const yytype_uint16 yytoknum[] =
|
|
|
|
{
|
|
|
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
|
|
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
|
|
|
|
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
|
|
|
|
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
|
|
|
|
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
|
|
|
|
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
|
|
|
|
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
|
|
|
|
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
|
|
|
|
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
|
|
|
|
345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
|
|
|
|
355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
|
|
|
|
365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
|
2017-03-08 20:36:06 +01:00
|
|
|
375, 376, 377, 378, 379, 380, 61, 381, 60, 62,
|
|
|
|
382, 383, 384, 43, 45, 42, 47, 37, 94, 385,
|
2017-05-29 16:22:13 +02:00
|
|
|
91, 93, 40, 41, 46, 59, 44, 63
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
# endif
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#define YYPACT_NINF -231
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
#define yypact_value_is_default(Yystate) \
|
2017-05-29 16:22:13 +02:00
|
|
|
(!!((Yystate) == (-231)))
|
2015-12-23 17:02:45 +01:00
|
|
|
|
2017-04-21 22:03:12 +02:00
|
|
|
#define YYTABLE_NINF -166
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
#define yytable_value_is_error(Yytable_value) \
|
2017-04-21 22:03:12 +02:00
|
|
|
(!!((Yytable_value) == (-166)))
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
|
|
|
STATE-NUM. */
|
|
|
|
static const yytype_int16 yypact[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
153, 5, 30, 47, 99, -42, 22, 26, 36, -2,
|
|
|
|
30, -30, -39, 126, -9, -231, -231, -231, -231, -231,
|
|
|
|
-231, -231, -231, -231, -231, -231, -231, -231, -231, 95,
|
|
|
|
139, 12, -231, 2, 63, 45, 45, 30, 42, 30,
|
|
|
|
160, 157, 62, -231, 30, 30, 50, 64, -231, 153,
|
|
|
|
-231, -231, -231, 70, -231, -39, 140, -231, 208, 23,
|
|
|
|
222, 119, 30, 30, 162, -231, 159, 98, -231, -231,
|
|
|
|
-231, 90, 240, -231, -231, -231, -231, -231, 90, 178,
|
|
|
|
178, 160, -231, -231, -231, -231, -231, -27, -231, -231,
|
|
|
|
-231, -231, -231, -231, -231, 209, -65, 98, 90, -231,
|
|
|
|
247, 250, -5, -93, 118, 161, 11, 20, -231, 61,
|
|
|
|
177, 120, -231, 3, 121, -231, -231, -231, -231, -231,
|
|
|
|
-231, -231, -231, -231, -231, -231, -231, -231, 141, -46,
|
|
|
|
-231, 122, -231, 80, 140, 140, 216, -231, 23, -231,
|
|
|
|
154, 267, 158, 10, 186, -231, -231, -21, 134, -231,
|
|
|
|
157, 274, 227, 90, 138, 20, 264, 85, 143, -83,
|
|
|
|
1, 162, 90, -231, 90, 278, 90, -231, -231, 20,
|
|
|
|
20, 20, 20, 20, -51, 147, 20, 20, 20, 20,
|
|
|
|
20, 20, 20, 20, 20, 23, 240, -231, 90, -231,
|
|
|
|
-231, -231, -231, -231, 160, -231, 199, 8, 31, -231,
|
|
|
|
-39, 30, -231, 287, 23, 90, -231, 148, 111, 227,
|
|
|
|
201, -231, -231, -39, -231, 317, -231, 4, -231, 230,
|
|
|
|
-231, -231, -231, 189, 296, 275, 275, 173, 296, 20,
|
|
|
|
156, 61, 296, 275, 275, 85, 85, 174, 174, 174,
|
|
|
|
-231, -231, -231, -231, -231, 247, -231, -231, -231, -231,
|
|
|
|
-231, -231, 267, -231, -231, -231, 41, 46, -231, 20,
|
|
|
|
170, 171, -231, -231, -231, -231, 225, 229, 1, 226,
|
|
|
|
-231, 198, -231, 20, 296, 61, 179, 84, -231, -231,
|
|
|
|
-231, -231, 206, -231, 4, -231, -231, 258, 175, 1,
|
|
|
|
90, 264, 181, 93, -231, -231, 20, -231, 1, 27,
|
|
|
|
-34, -231, -231, 237, 258, 90, 90, -231, -231, 10,
|
|
|
|
-231, 10
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
|
|
|
|
Performed when YYTABLE does not specify something else to do. Zero
|
|
|
|
means the default is an error. */
|
|
|
|
static const yytype_uint8 yydefact[] =
|
|
|
|
{
|
2017-03-08 20:36:06 +01:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 78,
|
2017-04-21 22:03:12 +02:00
|
|
|
0, 0, 0, 0, 168, 3, 6, 5, 15, 8,
|
2017-03-08 20:36:06 +01:00
|
|
|
9, 14, 11, 12, 10, 13, 7, 48, 49, 70,
|
|
|
|
0, 150, 39, 18, 0, 27, 27, 0, 0, 0,
|
2017-04-21 22:03:12 +02:00
|
|
|
0, 60, 0, 149, 0, 0, 0, 0, 1, 167,
|
2017-03-08 20:36:06 +01:00
|
|
|
2, 56, 57, 0, 55, 0, 81, 37, 0, 0,
|
2017-05-29 16:22:13 +02:00
|
|
|
0, 0, 0, 0, 64, 21, 0, 43, 138, 77,
|
|
|
|
59, 0, 0, 35, 36, 51, 50, 4, 0, 70,
|
|
|
|
70, 0, 52, 151, 135, 136, 140, 0, 84, 132,
|
|
|
|
133, 137, 134, 17, 16, 0, 0, 43, 0, 38,
|
|
|
|
0, 0, 0, 130, 0, 0, 0, 0, 139, 0,
|
|
|
|
0, 61, 82, 155, 87, 94, 95, 96, 89, 92,
|
|
|
|
91, 90, 104, 97, 88, 99, 101, 100, 0, 64,
|
|
|
|
45, 69, 71, 76, 81, 81, 79, 19, 0, 26,
|
|
|
|
0, 0, 0, 63, 0, 22, 169, 0, 0, 41,
|
|
|
|
60, 0, 0, 0, 0, 0, 103, 102, 0, 0,
|
|
|
|
0, 64, 0, 153, 0, 0, 0, 154, 86, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 44, 0, 75,
|
|
|
|
74, 73, 54, 53, 0, 85, 0, 0, 0, 28,
|
|
|
|
0, 0, 42, 0, 0, 0, 131, 0, 0, 0,
|
|
|
|
0, 98, 93, 0, 62, 141, 143, 155, 145, 66,
|
|
|
|
83, 113, 152, 114, 123, 126, 127, 0, 111, 0,
|
|
|
|
0, 0, 122, 124, 125, 106, 105, 108, 107, 109,
|
|
|
|
110, 47, 46, 72, 80, 0, 32, 33, 34, 31,
|
|
|
|
30, 24, 0, 25, 20, 170, 0, 0, 120, 0,
|
|
|
|
0, 0, 164, 163, 157, 158, 162, 161, 0, 0,
|
|
|
|
148, 0, 58, 0, 112, 0, 0, 0, 23, 29,
|
|
|
|
40, 128, 0, 121, 155, 160, 159, 146, 142, 0,
|
|
|
|
0, 129, 0, 0, 117, 115, 0, 144, 0, 165,
|
|
|
|
68, 118, 116, 0, 147, 0, 0, 65, 119, 166,
|
|
|
|
156, 67
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYPGOTO[NTERM-NUM]. */
|
|
|
|
static const yytype_int16 yypgoto[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
-231, -231, -231, 268, -231, -231, -231, -231, -231, -231,
|
|
|
|
75, -231, 289, -231, 74, -231, -231, -231, -231, -231,
|
|
|
|
234, -231, -231, 150, -158, 6, -12, -231, 272, 183,
|
|
|
|
-231, -231, -109, -231, -231, 72, -231, 149, -231, -231,
|
|
|
|
83, -96, 146, 176, -77, -98, -231, -231, -231, -231,
|
|
|
|
-231, -231, -231, -231, -231, -231, -231, -47, -97, -231,
|
|
|
|
-35, -231, -231, -231, -230, -231, -231, -231, 0, -231,
|
|
|
|
-183, -231, -231, -231, -231, -231
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYDEFGOTO[NTERM-NUM]. */
|
|
|
|
static const yytype_int16 yydefgoto[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
-1, 13, 14, 15, 16, 17, 94, 18, 19, 66,
|
|
|
|
144, 20, 62, 198, 199, 250, 21, 22, 23, 24,
|
|
|
|
102, 25, 129, 130, 26, 27, 28, 55, 29, 71,
|
|
|
|
110, 161, 99, 272, 307, 56, 131, 132, 191, 41,
|
|
|
|
82, 111, 87, 112, 113, 114, 115, 116, 117, 118,
|
|
|
|
119, 120, 121, 122, 123, 124, 125, 126, 89, 90,
|
|
|
|
91, 127, 92, 214, 215, 288, 216, 42, 217, 167,
|
|
|
|
168, 218, 269, 310, 50, 147
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
|
|
|
|
positive, shift that token. If negative, reduce the rule whose
|
|
|
|
number is the opposite. If YYTABLE_NINF, syntax error. */
|
|
|
|
static const yytype_int16 yytable[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
47, 133, 32, 145, 31, 69, 163, 163, 156, 157,
|
|
|
|
43, 306, 88, 9, 103, 84, 85, 68, 46, 140,
|
|
|
|
187, 143, 164, 103, 84, 85, 68, 84, 85, 68,
|
|
|
|
98, 35, 159, 31, 270, 30, 246, 64, 287, 67,
|
|
|
|
229, 166, 253, 44, 73, 74, 136, 9, 247, 150,
|
|
|
|
33, 151, 219, 148, 154, 261, 262, 156, 36, 299,
|
|
|
|
212, 79, 96, 97, 103, 84, 85, 68, 304, 230,
|
|
|
|
45, 224, 225, 226, 227, 228, 208, 141, 232, 233,
|
|
|
|
234, 235, 236, 237, 238, 239, 240, 221, 263, 223,
|
|
|
|
149, 195, 264, 103, 84, 85, 68, 158, 265, 266,
|
|
|
|
186, 297, 34, 12, 104, 248, 37, 51, 164, 257,
|
|
|
|
38, 133, 162, 9, 40, 164, 137, 267, 249, 138,
|
|
|
|
165, 165, 202, 155, 39, 203, 48, 166, 169, 170,
|
|
|
|
171, 274, 155, 104, 166, 277, 49, 52, 241, 105,
|
|
|
|
207, 172, 57, 213, 59, 107, 108, 60, 145, 65,
|
|
|
|
305, 134, 135, 109, 107, 108, 58, 88, 86, 244,
|
|
|
|
189, 282, 109, 1, 61, 53, 68, 86, 105, 54,
|
|
|
|
86, 2, 70, 106, 251, 291, 72, 252, 3, 293,
|
|
|
|
169, 170, 171, 4, 280, 164, 190, 138, 78, 281,
|
|
|
|
5, 6, 162, 75, 300, 107, 108, 260, 303, 7,
|
|
|
|
8, 254, 106, 109, 166, 9, 81, 76, 86, 259,
|
|
|
|
10, 83, 173, 169, 170, 171, 164, 192, 193, 276,
|
|
|
|
181, 182, 183, 184, 107, 108, 93, 295, 309, 311,
|
|
|
|
162, 95, 109, 174, 11, 166, 302, 86, 98, 162,
|
|
|
|
101, 175, 100, 128, 169, 170, 171, 176, 53, 177,
|
|
|
|
178, 84, 139, 146, 179, 180, 181, 182, 183, 184,
|
|
|
|
152, 160, 153, 292, 173, 194, 162, 185, 188, 196,
|
|
|
|
197, 169, 170, 171, 201, 200, 204, 206, 273, 9,
|
|
|
|
209, 222, 245, -166, -166, 210, 211, 262, 296, 231,
|
|
|
|
255, 258, 229, 271, 164, 12, 285, 173, 275, 176,
|
|
|
|
286, 177, 178, 169, 170, 171, 179, 180, 181, 182,
|
|
|
|
183, 184, 184, 283, 284, 289, 290, 77, 210, 263,
|
|
|
|
278, 298, 294, 264, 301, 63, 279, 80, 173, 265,
|
|
|
|
266, 142, 176, 205, 177, 178, 242, 243, 220, 179,
|
|
|
|
180, 181, 182, 183, 184, 308, 262, -165, 267, 210,
|
|
|
|
256, 0, 0, 0, 0, 173, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 176, 0, 177, 178, 0, 0, 0,
|
|
|
|
179, 180, 181, 182, 183, 184, 210, 0, 263, 0,
|
|
|
|
0, 0, 264, 0, 0, 0, 0, 173, 265, 266,
|
|
|
|
176, 0, 177, 178, 0, 0, 0, 179, 180, 181,
|
|
|
|
182, 183, 184, -166, -166, 0, -165, 267, 179, 180,
|
|
|
|
181, 182, 183, 184, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 176, 0, 177, 178, 0, 0, 0, 179,
|
|
|
|
180, 181, 182, 183, 184, 0, 0, 0, 0, 0,
|
2015-12-23 17:02:45 +01:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2017-04-21 22:03:12 +02:00
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
2017-05-29 16:22:13 +02:00
|
|
|
0, 0, 0, 268
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static const yytype_int16 yycheck[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
12, 78, 2, 100, 3, 40, 3, 3, 106, 107,
|
|
|
|
10, 45, 59, 52, 3, 4, 5, 6, 12, 84,
|
|
|
|
129, 98, 105, 3, 4, 5, 6, 4, 5, 6,
|
|
|
|
76, 73, 109, 3, 217, 30, 28, 37, 268, 39,
|
|
|
|
91, 124, 200, 73, 44, 45, 81, 52, 40, 142,
|
|
|
|
3, 144, 161, 58, 43, 213, 29, 155, 100, 289,
|
|
|
|
143, 55, 62, 63, 3, 4, 5, 6, 298, 120,
|
|
|
|
100, 169, 170, 171, 172, 173, 153, 142, 176, 177,
|
|
|
|
178, 179, 180, 181, 182, 183, 184, 164, 61, 166,
|
|
|
|
102, 138, 65, 3, 4, 5, 6, 109, 71, 72,
|
|
|
|
146, 284, 3, 142, 43, 97, 84, 12, 105, 205,
|
|
|
|
84, 188, 146, 52, 116, 105, 143, 90, 110, 146,
|
|
|
|
117, 117, 143, 112, 88, 146, 0, 124, 7, 8,
|
|
|
|
9, 229, 112, 43, 124, 231, 145, 42, 185, 78,
|
|
|
|
152, 20, 3, 142, 142, 134, 135, 84, 245, 107,
|
|
|
|
123, 79, 80, 142, 134, 135, 144, 204, 147, 194,
|
|
|
|
80, 259, 142, 10, 119, 70, 6, 147, 78, 74,
|
|
|
|
147, 18, 15, 112, 143, 273, 114, 146, 25, 275,
|
|
|
|
7, 8, 9, 30, 143, 105, 106, 146, 118, 143,
|
|
|
|
37, 38, 146, 143, 290, 134, 135, 209, 296, 46,
|
|
|
|
47, 201, 112, 142, 124, 52, 66, 143, 147, 98,
|
|
|
|
57, 3, 91, 7, 8, 9, 105, 134, 135, 231,
|
|
|
|
135, 136, 137, 138, 134, 135, 4, 143, 305, 306,
|
|
|
|
146, 112, 142, 112, 81, 124, 143, 147, 76, 146,
|
|
|
|
142, 120, 83, 3, 7, 8, 9, 126, 70, 128,
|
|
|
|
129, 4, 43, 3, 133, 134, 135, 136, 137, 138,
|
|
|
|
142, 84, 101, 275, 91, 49, 146, 126, 146, 115,
|
|
|
|
3, 7, 8, 9, 88, 117, 142, 3, 105, 52,
|
|
|
|
142, 3, 83, 8, 9, 112, 143, 29, 82, 142,
|
|
|
|
3, 143, 91, 63, 105, 142, 71, 91, 142, 126,
|
|
|
|
71, 128, 129, 7, 8, 9, 133, 134, 135, 136,
|
|
|
|
137, 138, 138, 143, 143, 89, 118, 49, 112, 61,
|
|
|
|
245, 146, 143, 65, 143, 36, 252, 55, 91, 71,
|
|
|
|
72, 97, 126, 150, 128, 129, 186, 188, 162, 133,
|
|
|
|
134, 135, 136, 137, 138, 108, 29, 89, 90, 112,
|
|
|
|
204, -1, -1, -1, -1, 91, -1, -1, -1, -1,
|
|
|
|
-1, -1, -1, 126, -1, 128, 129, -1, -1, -1,
|
|
|
|
133, 134, 135, 136, 137, 138, 112, -1, 61, -1,
|
|
|
|
-1, -1, 65, -1, -1, -1, -1, 91, 71, 72,
|
|
|
|
126, -1, 128, 129, -1, -1, -1, 133, 134, 135,
|
|
|
|
136, 137, 138, 128, 129, -1, 89, 90, 133, 134,
|
|
|
|
135, 136, 137, 138, -1, -1, -1, -1, -1, -1,
|
|
|
|
-1, -1, 126, -1, 128, 129, -1, -1, -1, 133,
|
|
|
|
134, 135, 136, 137, 138, -1, -1, -1, -1, -1,
|
2017-04-21 22:03:12 +02:00
|
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
2015-12-23 17:02:45 +01:00
|
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
2017-05-29 16:22:13 +02:00
|
|
|
-1, -1, -1, 146
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
|
|
|
symbol of state STATE-NUM. */
|
|
|
|
static const yytype_uint8 yystos[] =
|
|
|
|
{
|
|
|
|
0, 10, 18, 25, 30, 37, 38, 46, 47, 52,
|
2017-05-29 16:22:13 +02:00
|
|
|
57, 81, 142, 149, 150, 151, 152, 153, 155, 156,
|
|
|
|
159, 164, 165, 166, 167, 169, 172, 173, 174, 176,
|
|
|
|
30, 3, 216, 3, 3, 73, 100, 84, 84, 88,
|
|
|
|
116, 187, 215, 216, 73, 100, 173, 174, 0, 145,
|
|
|
|
222, 12, 42, 70, 74, 175, 183, 3, 144, 142,
|
|
|
|
84, 119, 160, 160, 216, 107, 157, 216, 6, 208,
|
|
|
|
15, 177, 114, 216, 216, 143, 143, 151, 118, 173,
|
|
|
|
176, 66, 188, 3, 4, 5, 147, 190, 205, 206,
|
|
|
|
207, 208, 210, 4, 154, 112, 216, 216, 76, 180,
|
|
|
|
83, 142, 168, 3, 43, 78, 112, 134, 135, 142,
|
|
|
|
178, 189, 191, 192, 193, 194, 195, 196, 197, 198,
|
|
|
|
199, 200, 201, 202, 203, 204, 205, 209, 3, 170,
|
|
|
|
171, 184, 185, 192, 183, 183, 208, 143, 146, 43,
|
|
|
|
84, 142, 168, 192, 158, 206, 3, 223, 58, 174,
|
|
|
|
142, 144, 142, 101, 43, 112, 193, 193, 174, 192,
|
|
|
|
84, 179, 146, 3, 105, 117, 124, 217, 218, 7,
|
|
|
|
8, 9, 20, 91, 112, 120, 126, 128, 129, 133,
|
|
|
|
134, 135, 136, 137, 138, 126, 146, 180, 146, 80,
|
|
|
|
106, 186, 188, 188, 49, 205, 115, 3, 161, 162,
|
|
|
|
117, 88, 143, 146, 142, 177, 3, 174, 192, 142,
|
|
|
|
112, 143, 143, 142, 211, 212, 214, 216, 219, 180,
|
|
|
|
191, 192, 3, 192, 193, 193, 193, 193, 193, 91,
|
|
|
|
120, 142, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
|
|
193, 205, 171, 185, 208, 83, 28, 40, 97, 110,
|
|
|
|
163, 143, 146, 172, 216, 3, 190, 189, 143, 98,
|
|
|
|
174, 172, 29, 61, 65, 71, 72, 90, 146, 220,
|
|
|
|
218, 63, 181, 105, 193, 142, 174, 189, 158, 162,
|
|
|
|
143, 143, 193, 143, 143, 71, 71, 212, 213, 89,
|
|
|
|
118, 193, 174, 189, 143, 143, 82, 218, 146, 212,
|
|
|
|
189, 143, 143, 193, 212, 123, 45, 182, 108, 192,
|
|
|
|
221, 192
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
|
|
|
static const yytype_uint8 yyr1[] =
|
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
0, 148, 149, 150, 150, 151, 151, 152, 152, 152,
|
|
|
|
152, 152, 152, 152, 152, 152, 153, 154, 155, 155,
|
|
|
|
156, 157, 158, 159, 159, 159, 160, 160, 161, 161,
|
|
|
|
162, 163, 163, 163, 163, 164, 164, 164, 165, 166,
|
|
|
|
167, 167, 168, 168, 169, 170, 170, 171, 172, 172,
|
|
|
|
173, 173, 174, 174, 174, 175, 175, 175, 176, 177,
|
|
|
|
177, 178, 179, 180, 180, 181, 181, 182, 182, 183,
|
|
|
|
183, 184, 184, 185, 186, 186, 186, 187, 187, 188,
|
|
|
|
188, 188, 189, 189, 190, 190, 191, 192, 192, 192,
|
|
|
|
192, 192, 192, 193, 193, 193, 193, 193, 193, 194,
|
|
|
|
194, 194, 195, 195, 196, 196, 196, 196, 196, 196,
|
|
|
|
196, 196, 196, 197, 197, 198, 198, 198, 198, 199,
|
|
|
|
200, 200, 201, 201, 201, 201, 201, 201, 202, 203,
|
|
|
|
204, 204, 205, 205, 205, 206, 207, 207, 208, 209,
|
|
|
|
210, 211, 211, 212, 212, 212, 213, 213, 214, 215,
|
|
|
|
216, 216, 217, 217, 218, 218, 219, 220, 220, 220,
|
|
|
|
220, 220, 220, 220, 220, 220, 221, 222, 222, 223,
|
|
|
|
223
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
|
|
|
|
static const yytype_uint8 yyr2[] =
|
|
|
|
{
|
|
|
|
0, 2, 2, 1, 3, 1, 1, 1, 1, 1,
|
2017-05-29 16:22:13 +02:00
|
|
|
1, 1, 1, 1, 1, 1, 4, 1, 2, 5,
|
2017-03-08 20:36:06 +01:00
|
|
|
7, 1, 1, 8, 7, 7, 3, 0, 1, 3,
|
|
|
|
2, 1, 1, 1, 1, 3, 3, 3, 4, 2,
|
|
|
|
8, 5, 3, 0, 5, 1, 3, 3, 1, 1,
|
|
|
|
3, 3, 3, 5, 5, 1, 1, 1, 7, 1,
|
|
|
|
0, 1, 2, 2, 0, 4, 0, 2, 0, 3,
|
|
|
|
0, 1, 3, 2, 1, 1, 0, 2, 0, 2,
|
|
|
|
4, 0, 1, 3, 1, 3, 2, 1, 1, 1,
|
|
|
|
1, 1, 1, 3, 1, 1, 1, 1, 3, 1,
|
|
|
|
1, 1, 2, 2, 1, 3, 3, 3, 3, 3,
|
|
|
|
3, 3, 4, 3, 3, 5, 6, 5, 6, 8,
|
|
|
|
4, 5, 3, 3, 3, 3, 3, 3, 5, 5,
|
|
|
|
1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 3, 1, 4, 1, 1, 3, 2, 1,
|
|
|
|
1, 3, 2, 1, 1, 0, 6, 1, 1, 2,
|
2017-04-21 22:03:12 +02:00
|
|
|
2, 1, 1, 1, 1, 0, 1, 1, 0, 1,
|
|
|
|
3
|
2015-12-23 17:02:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#define yyerrok (yyerrstatus = 0)
|
|
|
|
#define yyclearin (yychar = YYEMPTY)
|
|
|
|
#define YYEMPTY (-2)
|
|
|
|
#define YYEOF 0
|
|
|
|
|
|
|
|
#define YYACCEPT goto yyacceptlab
|
|
|
|
#define YYABORT goto yyabortlab
|
|
|
|
#define YYERROR goto yyerrorlab
|
|
|
|
|
|
|
|
|
|
|
|
#define YYRECOVERING() (!!yyerrstatus)
|
|
|
|
|
|
|
|
#define YYBACKUP(Token, Value) \
|
|
|
|
do \
|
|
|
|
if (yychar == YYEMPTY) \
|
|
|
|
{ \
|
|
|
|
yychar = (Token); \
|
|
|
|
yylval = (Value); \
|
|
|
|
YYPOPSTACK (yylen); \
|
|
|
|
yystate = *yyssp; \
|
|
|
|
goto yybackup; \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \
|
|
|
|
YYERROR; \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
|
|
|
|
/* Error token number */
|
|
|
|
#define YYTERROR 1
|
|
|
|
#define YYERRCODE 256
|
|
|
|
|
|
|
|
|
|
|
|
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
|
|
|
If N is 0, then set CURRENT to the empty location which ends
|
|
|
|
the previous symbol: RHS[0] (always defined). */
|
|
|
|
|
|
|
|
#ifndef YYLLOC_DEFAULT
|
|
|
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
|
|
|
do \
|
|
|
|
if (N) \
|
|
|
|
{ \
|
|
|
|
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
|
|
|
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
|
|
|
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
|
|
|
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
(Current).first_line = (Current).last_line = \
|
|
|
|
YYRHSLOC (Rhs, 0).last_line; \
|
|
|
|
(Current).first_column = (Current).last_column = \
|
|
|
|
YYRHSLOC (Rhs, 0).last_column; \
|
|
|
|
} \
|
|
|
|
while (0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
|
|
|
|
|
|
|
|
|
|
|
/* Enable debugging if requested. */
|
|
|
|
#if HSQL_DEBUG
|
|
|
|
|
|
|
|
# ifndef YYFPRINTF
|
|
|
|
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
|
|
|
|
# define YYFPRINTF fprintf
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# define YYDPRINTF(Args) \
|
|
|
|
do { \
|
|
|
|
if (yydebug) \
|
|
|
|
YYFPRINTF Args; \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
/* YY_LOCATION_PRINT -- Print the location on the stream.
|
|
|
|
This macro was not mandated originally: define only if we know
|
|
|
|
we won't break user code: when these are the locations we know. */
|
|
|
|
|
|
|
|
#ifndef YY_LOCATION_PRINT
|
|
|
|
# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL
|
|
|
|
|
|
|
|
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
|
|
|
|
|
|
|
|
YY_ATTRIBUTE_UNUSED
|
|
|
|
static unsigned
|
|
|
|
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
|
|
|
|
{
|
|
|
|
unsigned res = 0;
|
|
|
|
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
|
|
|
if (0 <= yylocp->first_line)
|
|
|
|
{
|
|
|
|
res += YYFPRINTF (yyo, "%d", yylocp->first_line);
|
|
|
|
if (0 <= yylocp->first_column)
|
|
|
|
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
|
|
|
|
}
|
|
|
|
if (0 <= yylocp->last_line)
|
|
|
|
{
|
|
|
|
if (yylocp->first_line < yylocp->last_line)
|
|
|
|
{
|
|
|
|
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
|
|
|
|
if (0 <= end_col)
|
|
|
|
res += YYFPRINTF (yyo, ".%d", end_col);
|
|
|
|
}
|
|
|
|
else if (0 <= end_col && yylocp->first_column < end_col)
|
|
|
|
res += YYFPRINTF (yyo, "-%d", end_col);
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
# define YY_LOCATION_PRINT(File, Loc) \
|
|
|
|
yy_location_print_ (File, &(Loc))
|
|
|
|
|
|
|
|
# else
|
|
|
|
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
|
|
|
do { \
|
|
|
|
if (yydebug) \
|
|
|
|
{ \
|
|
|
|
YYFPRINTF (stderr, "%s ", Title); \
|
|
|
|
yy_symbol_print (stderr, \
|
|
|
|
Type, Value, Location, result, scanner); \
|
|
|
|
YYFPRINTF (stderr, "\n"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------.
|
|
|
|
| Print this symbol's value on YYOUTPUT. |
|
|
|
|
`----------------------------------------*/
|
|
|
|
|
|
|
|
static void
|
2017-04-07 16:26:20 +02:00
|
|
|
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
FILE *yyo = yyoutput;
|
|
|
|
YYUSE (yyo);
|
|
|
|
YYUSE (yylocationp);
|
|
|
|
YYUSE (result);
|
|
|
|
YYUSE (scanner);
|
|
|
|
if (!yyvaluep)
|
|
|
|
return;
|
|
|
|
# ifdef YYPRINT
|
|
|
|
if (yytype < YYNTOKENS)
|
|
|
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
|
|
|
|
# endif
|
|
|
|
YYUSE (yytype);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------.
|
|
|
|
| Print this symbol on YYOUTPUT. |
|
|
|
|
`--------------------------------*/
|
|
|
|
|
|
|
|
static void
|
2017-04-07 16:26:20 +02:00
|
|
|
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
YYFPRINTF (yyoutput, "%s %s (",
|
|
|
|
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
|
|
|
|
|
|
|
|
YY_LOCATION_PRINT (yyoutput, *yylocationp);
|
|
|
|
YYFPRINTF (yyoutput, ": ");
|
|
|
|
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, result, scanner);
|
|
|
|
YYFPRINTF (yyoutput, ")");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------.
|
|
|
|
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
|
|
|
|
| TOP (included). |
|
|
|
|
`------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
static void
|
|
|
|
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
|
|
|
|
{
|
|
|
|
YYFPRINTF (stderr, "Stack now");
|
|
|
|
for (; yybottom <= yytop; yybottom++)
|
|
|
|
{
|
|
|
|
int yybot = *yybottom;
|
|
|
|
YYFPRINTF (stderr, " %d", yybot);
|
|
|
|
}
|
|
|
|
YYFPRINTF (stderr, "\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
# define YY_STACK_PRINT(Bottom, Top) \
|
|
|
|
do { \
|
|
|
|
if (yydebug) \
|
|
|
|
yy_stack_print ((Bottom), (Top)); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------.
|
|
|
|
| Report that the YYRULE is going to be reduced. |
|
|
|
|
`------------------------------------------------*/
|
|
|
|
|
|
|
|
static void
|
2017-04-07 16:26:20 +02:00
|
|
|
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, hsql::SQLParserResult* result, yyscan_t scanner)
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
unsigned long int yylno = yyrline[yyrule];
|
|
|
|
int yynrhs = yyr2[yyrule];
|
|
|
|
int yyi;
|
|
|
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
|
|
|
|
yyrule - 1, yylno);
|
|
|
|
/* The symbols being reduced. */
|
|
|
|
for (yyi = 0; yyi < yynrhs; yyi++)
|
|
|
|
{
|
|
|
|
YYFPRINTF (stderr, " $%d = ", yyi + 1);
|
|
|
|
yy_symbol_print (stderr,
|
|
|
|
yystos[yyssp[yyi + 1 - yynrhs]],
|
|
|
|
&(yyvsp[(yyi + 1) - (yynrhs)])
|
|
|
|
, &(yylsp[(yyi + 1) - (yynrhs)]) , result, scanner);
|
|
|
|
YYFPRINTF (stderr, "\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# define YY_REDUCE_PRINT(Rule) \
|
|
|
|
do { \
|
|
|
|
if (yydebug) \
|
|
|
|
yy_reduce_print (yyssp, yyvsp, yylsp, Rule, result, scanner); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Nonzero means print parse trace. It is left uninitialized so that
|
|
|
|
multiple parsers can coexist. */
|
|
|
|
int yydebug;
|
|
|
|
#else /* !HSQL_DEBUG */
|
|
|
|
# define YYDPRINTF(Args)
|
|
|
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
|
|
|
# define YY_STACK_PRINT(Bottom, Top)
|
|
|
|
# define YY_REDUCE_PRINT(Rule)
|
|
|
|
#endif /* !HSQL_DEBUG */
|
|
|
|
|
|
|
|
|
|
|
|
/* YYINITDEPTH -- initial size of the parser's stacks. */
|
|
|
|
#ifndef YYINITDEPTH
|
|
|
|
# define YYINITDEPTH 200
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
|
|
|
|
if the built-in stack extension method is used).
|
|
|
|
|
|
|
|
Do not make this value too large; the results are undefined if
|
|
|
|
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
|
|
|
|
evaluated with infinite-precision integer arithmetic. */
|
|
|
|
|
|
|
|
#ifndef YYMAXDEPTH
|
|
|
|
# define YYMAXDEPTH 10000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if YYERROR_VERBOSE
|
|
|
|
|
|
|
|
# ifndef yystrlen
|
|
|
|
# if defined __GLIBC__ && defined _STRING_H
|
|
|
|
# define yystrlen strlen
|
|
|
|
# else
|
|
|
|
/* Return the length of YYSTR. */
|
|
|
|
static YYSIZE_T
|
|
|
|
yystrlen (const char *yystr)
|
|
|
|
{
|
|
|
|
YYSIZE_T yylen;
|
|
|
|
for (yylen = 0; yystr[yylen]; yylen++)
|
|
|
|
continue;
|
|
|
|
return yylen;
|
|
|
|
}
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifndef yystpcpy
|
|
|
|
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
|
|
|
|
# define yystpcpy stpcpy
|
|
|
|
# else
|
|
|
|
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
|
|
|
|
YYDEST. */
|
|
|
|
static char *
|
|
|
|
yystpcpy (char *yydest, const char *yysrc)
|
|
|
|
{
|
|
|
|
char *yyd = yydest;
|
|
|
|
const char *yys = yysrc;
|
|
|
|
|
|
|
|
while ((*yyd++ = *yys++) != '\0')
|
|
|
|
continue;
|
|
|
|
|
|
|
|
return yyd - 1;
|
|
|
|
}
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# ifndef yytnamerr
|
|
|
|
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
|
|
|
|
quotes and backslashes, so that it's suitable for yyerror. The
|
|
|
|
heuristic is that double-quoting is unnecessary unless the string
|
|
|
|
contains an apostrophe, a comma, or backslash (other than
|
|
|
|
backslash-backslash). YYSTR is taken from yytname. If YYRES is
|
|
|
|
null, do not copy; instead, return the length of what the result
|
|
|
|
would have been. */
|
|
|
|
static YYSIZE_T
|
|
|
|
yytnamerr (char *yyres, const char *yystr)
|
|
|
|
{
|
|
|
|
if (*yystr == '"')
|
|
|
|
{
|
|
|
|
YYSIZE_T yyn = 0;
|
|
|
|
char const *yyp = yystr;
|
|
|
|
|
|
|
|
for (;;)
|
|
|
|
switch (*++yyp)
|
|
|
|
{
|
|
|
|
case '\'':
|
|
|
|
case ',':
|
|
|
|
goto do_not_strip_quotes;
|
|
|
|
|
|
|
|
case '\\':
|
|
|
|
if (*++yyp != '\\')
|
|
|
|
goto do_not_strip_quotes;
|
|
|
|
/* Fall through. */
|
|
|
|
default:
|
|
|
|
if (yyres)
|
|
|
|
yyres[yyn] = *yyp;
|
|
|
|
yyn++;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case '"':
|
|
|
|
if (yyres)
|
|
|
|
yyres[yyn] = '\0';
|
|
|
|
return yyn;
|
|
|
|
}
|
|
|
|
do_not_strip_quotes: ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! yyres)
|
|
|
|
return yystrlen (yystr);
|
|
|
|
|
|
|
|
return yystpcpy (yyres, yystr) - yyres;
|
|
|
|
}
|
|
|
|
# endif
|
|
|
|
|
|
|
|
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
|
|
|
|
about the unexpected token YYTOKEN for the state stack whose top is
|
|
|
|
YYSSP.
|
|
|
|
|
|
|
|
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
|
|
|
|
not large enough to hold the message. In that case, also set
|
|
|
|
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
|
|
|
|
required number of bytes is too large to store. */
|
|
|
|
static int
|
|
|
|
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|
|
|
yytype_int16 *yyssp, int yytoken)
|
|
|
|
{
|
|
|
|
YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
|
|
|
|
YYSIZE_T yysize = yysize0;
|
|
|
|
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
|
|
|
/* Internationalized format string. */
|
|
|
|
const char *yyformat = YY_NULLPTR;
|
|
|
|
/* Arguments of yyformat. */
|
|
|
|
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
|
|
|
/* Number of reported tokens (one for the "unexpected", one per
|
|
|
|
"expected"). */
|
|
|
|
int yycount = 0;
|
|
|
|
|
|
|
|
/* There are many possibilities here to consider:
|
|
|
|
- If this state is a consistent state with a default action, then
|
|
|
|
the only way this function was invoked is if the default action
|
|
|
|
is an error action. In that case, don't check for expected
|
|
|
|
tokens because there are none.
|
|
|
|
- The only way there can be no lookahead present (in yychar) is if
|
|
|
|
this state is a consistent state with a default action. Thus,
|
|
|
|
detecting the absence of a lookahead is sufficient to determine
|
|
|
|
that there is no unexpected or expected token to report. In that
|
|
|
|
case, just report a simple "syntax error".
|
|
|
|
- Don't assume there isn't a lookahead just because this state is a
|
|
|
|
consistent state with a default action. There might have been a
|
|
|
|
previous inconsistent state, consistent state with a non-default
|
|
|
|
action, or user semantic action that manipulated yychar.
|
|
|
|
- Of course, the expected token list depends on states to have
|
|
|
|
correct lookahead information, and it depends on the parser not
|
|
|
|
to perform extra reductions after fetching a lookahead from the
|
|
|
|
scanner and before detecting a syntax error. Thus, state merging
|
|
|
|
(from LALR or IELR) and default reductions corrupt the expected
|
|
|
|
token list. However, the list is correct for canonical LR with
|
|
|
|
one exception: it will still contain any token that will not be
|
|
|
|
accepted due to an error action in a later state.
|
|
|
|
*/
|
|
|
|
if (yytoken != YYEMPTY)
|
|
|
|
{
|
|
|
|
int yyn = yypact[*yyssp];
|
|
|
|
yyarg[yycount++] = yytname[yytoken];
|
|
|
|
if (!yypact_value_is_default (yyn))
|
|
|
|
{
|
|
|
|
/* Start YYX at -YYN if negative to avoid negative indexes in
|
|
|
|
YYCHECK. In other words, skip the first -YYN actions for
|
|
|
|
this state because they are default actions. */
|
|
|
|
int yyxbegin = yyn < 0 ? -yyn : 0;
|
|
|
|
/* Stay within bounds of both yycheck and yytname. */
|
|
|
|
int yychecklim = YYLAST - yyn + 1;
|
|
|
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
|
|
|
|
int yyx;
|
|
|
|
|
|
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
|
|
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
|
|
|
|
&& !yytable_value_is_error (yytable[yyx + yyn]))
|
|
|
|
{
|
|
|
|
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
|
|
|
|
{
|
|
|
|
yycount = 1;
|
|
|
|
yysize = yysize0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
yyarg[yycount++] = yytname[yyx];
|
|
|
|
{
|
|
|
|
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
|
|
|
if (! (yysize <= yysize1
|
|
|
|
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
|
|
|
return 2;
|
|
|
|
yysize = yysize1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (yycount)
|
|
|
|
{
|
|
|
|
# define YYCASE_(N, S) \
|
|
|
|
case N: \
|
|
|
|
yyformat = S; \
|
|
|
|
break
|
|
|
|
YYCASE_(0, YY_("syntax error"));
|
|
|
|
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
|
|
|
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
|
|
|
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
|
|
|
|
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
|
|
|
|
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
|
|
|
|
# undef YYCASE_
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
|
|
|
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
|
|
|
return 2;
|
|
|
|
yysize = yysize1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (*yymsg_alloc < yysize)
|
|
|
|
{
|
|
|
|
*yymsg_alloc = 2 * yysize;
|
|
|
|
if (! (yysize <= *yymsg_alloc
|
|
|
|
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
|
|
|
|
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Avoid sprintf, as that infringes on the user's name space.
|
|
|
|
Don't have undefined behavior even if the translation
|
|
|
|
produced a string with the wrong number of "%s"s. */
|
|
|
|
{
|
|
|
|
char *yyp = *yymsg;
|
|
|
|
int yyi = 0;
|
|
|
|
while ((*yyp = *yyformat) != '\0')
|
|
|
|
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
|
|
|
|
{
|
|
|
|
yyp += yytnamerr (yyp, yyarg[yyi++]);
|
|
|
|
yyformat += 2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
yyp++;
|
|
|
|
yyformat++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif /* YYERROR_VERBOSE */
|
|
|
|
|
|
|
|
/*-----------------------------------------------.
|
|
|
|
| Release the memory associated to this symbol. |
|
|
|
|
`-----------------------------------------------*/
|
|
|
|
|
|
|
|
static void
|
2017-04-07 16:26:20 +02:00
|
|
|
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
YYUSE (yyvaluep);
|
|
|
|
YYUSE (yylocationp);
|
|
|
|
YYUSE (result);
|
|
|
|
YYUSE (scanner);
|
|
|
|
if (!yymsg)
|
|
|
|
yymsg = "Deleting";
|
|
|
|
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
|
|
|
|
|
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
2017-02-08 04:56:07 +01:00
|
|
|
switch (yytype)
|
|
|
|
{
|
|
|
|
case 3: /* IDENTIFIER */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1573 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: /* STRING */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1579 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 5: /* FLOATVAL */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1585 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 6: /* INTVAL */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1591 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 7: /* NOTEQUALS */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1597 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 8: /* LESSEQ */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1603 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 9: /* GREATEREQ */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1609 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 150: /* statement_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-04-07 16:26:20 +02:00
|
|
|
{
|
|
|
|
if ((((*yyvaluep).stmt_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).stmt_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete (((*yyvaluep).stmt_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1622 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 151: /* statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).statement)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1628 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 152: /* preparable_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).statement)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1634 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 153: /* prepare_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).prep_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1640 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 154: /* prepare_target_query */
|
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
|
|
|
#line 1646 "bison_parser.cpp" /* yacc.c:1257 */
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 155: /* execute_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).exec_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1652 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 156: /* import_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).import_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1658 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 157: /* import_file_type */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1664 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 158: /* file_path */
|
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1670 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 159: /* create_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).create_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1676 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 160: /* opt_not_exists */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1682 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 161: /* column_def_commalist */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).column_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).column_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).column_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1695 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 162: /* column_def */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).column_t)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1701 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 163: /* column_type */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1707 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 164: /* drop_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).drop_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1713 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 165: /* delete_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).delete_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1719 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 166: /* truncate_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).delete_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1725 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 167: /* insert_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).insert_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1731 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 168: /* opt_column_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).str_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).str_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).str_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1744 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 169: /* update_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).update_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1750 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 170: /* update_clause_commalist */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).update_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).update_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).update_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1763 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 171: /* update_clause */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).update_t)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1769 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 172: /* select_statement */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1775 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 173: /* select_with_paren */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1781 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 174: /* select_no_paren */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1787 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 176: /* select_clause */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1793 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 177: /* opt_distinct */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1799 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 178: /* select_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).expr_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).expr_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).expr_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1812 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 179: /* from_clause */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1818 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 180: /* opt_where */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1824 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 181: /* opt_group */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).group_t)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1830 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 182: /* opt_having */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1836 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 183: /* opt_order */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{
|
|
|
|
if ((((*yyvaluep).order_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).order_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete (((*yyvaluep).order_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1849 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 184: /* order_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{
|
|
|
|
if ((((*yyvaluep).order_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).order_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete (((*yyvaluep).order_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1862 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 185: /* order_desc */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).order)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1868 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 186: /* opt_order_type */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1874 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 187: /* opt_top */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).limit)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1880 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 188: /* opt_limit */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).limit)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1886 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 189: /* expr_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).expr_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).expr_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).expr_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1899 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 190: /* literal_list */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).expr_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).expr_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).expr_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1912 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 191: /* expr_alias */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1918 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 192: /* expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1924 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 193: /* operand */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1930 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 194: /* scalar_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1936 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 195: /* unary_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1942 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 196: /* binary_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1948 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 197: /* logic_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1954 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 198: /* in_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1960 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 199: /* case_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1966 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 200: /* exists_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1972 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 201: /* comp_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1978 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 202: /* function_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1984 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 203: /* between_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1990 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 204: /* column_name */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 1996 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 205: /* literal */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2002 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 206: /* string_literal */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2008 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 207: /* num_literal */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2014 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 208: /* int_literal */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2020 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 209: /* star_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2026 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 210: /* param_expr */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2032 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 211: /* table_ref */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2038 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 212: /* table_ref_atomic */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2044 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 213: /* table_ref_commalist */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).table_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).table_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).table_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2057 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 214: /* table_ref_name */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2063 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 215: /* table_ref_name_no_alias */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2069 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 216: /* table_name */
|
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2075 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 217: /* alias */
|
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2081 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 218: /* opt_alias */
|
|
|
|
#line 134 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ free( (((*yyvaluep).sval)) ); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2087 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 219: /* join_clause */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2093 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 220: /* opt_join_type */
|
|
|
|
#line 133 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2099 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 221: /* join_condition */
|
|
|
|
#line 143 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{ delete (((*yyvaluep).expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2105 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
case 223: /* ident_commalist */
|
|
|
|
#line 135 "bison_parser.y" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
{
|
2017-02-10 21:42:02 +01:00
|
|
|
if ((((*yyvaluep).str_vec)) != NULL) {
|
|
|
|
for (auto ptr : *(((*yyvaluep).str_vec))) {
|
|
|
|
delete ptr;
|
|
|
|
}
|
2017-02-08 04:56:07 +01:00
|
|
|
}
|
|
|
|
delete (((*yyvaluep).str_vec));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2118 "bison_parser.cpp" /* yacc.c:1257 */
|
2017-02-08 04:56:07 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2015-12-23 17:02:45 +01:00
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*----------.
|
|
|
|
| yyparse. |
|
|
|
|
`----------*/
|
|
|
|
|
|
|
|
int
|
2017-04-07 16:26:20 +02:00
|
|
|
yyparse (hsql::SQLParserResult* result, yyscan_t scanner)
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
/* The lookahead symbol. */
|
|
|
|
int yychar;
|
|
|
|
|
|
|
|
|
|
|
|
/* The semantic value of the lookahead symbol. */
|
|
|
|
/* Default value used for initialization, for pacifying older GCCs
|
|
|
|
or non-GCC compilers. */
|
|
|
|
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
|
|
|
|
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
|
|
|
|
|
|
|
|
/* Location data for the lookahead symbol. */
|
|
|
|
static YYLTYPE yyloc_default
|
|
|
|
# if defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL
|
|
|
|
= { 1, 1, 1, 1 }
|
|
|
|
# endif
|
|
|
|
;
|
|
|
|
YYLTYPE yylloc = yyloc_default;
|
|
|
|
|
|
|
|
/* Number of syntax errors so far. */
|
|
|
|
int yynerrs;
|
|
|
|
|
|
|
|
int yystate;
|
|
|
|
/* Number of tokens to shift before error messages enabled. */
|
|
|
|
int yyerrstatus;
|
|
|
|
|
|
|
|
/* The stacks and their tools:
|
|
|
|
'yyss': related to states.
|
|
|
|
'yyvs': related to semantic values.
|
|
|
|
'yyls': related to locations.
|
|
|
|
|
|
|
|
Refer to the stacks through separate pointers, to allow yyoverflow
|
|
|
|
to reallocate them elsewhere. */
|
|
|
|
|
|
|
|
/* The state stack. */
|
|
|
|
yytype_int16 yyssa[YYINITDEPTH];
|
|
|
|
yytype_int16 *yyss;
|
|
|
|
yytype_int16 *yyssp;
|
|
|
|
|
|
|
|
/* The semantic value stack. */
|
|
|
|
YYSTYPE yyvsa[YYINITDEPTH];
|
|
|
|
YYSTYPE *yyvs;
|
|
|
|
YYSTYPE *yyvsp;
|
|
|
|
|
|
|
|
/* The location stack. */
|
|
|
|
YYLTYPE yylsa[YYINITDEPTH];
|
|
|
|
YYLTYPE *yyls;
|
|
|
|
YYLTYPE *yylsp;
|
|
|
|
|
|
|
|
/* The locations where the error started and ended. */
|
|
|
|
YYLTYPE yyerror_range[3];
|
|
|
|
|
|
|
|
YYSIZE_T yystacksize;
|
|
|
|
|
|
|
|
int yyn;
|
|
|
|
int yyresult;
|
|
|
|
/* Lookahead token as an internal (translated) token number. */
|
|
|
|
int yytoken = 0;
|
|
|
|
/* The variables used to return semantic value and location from the
|
|
|
|
action routines. */
|
|
|
|
YYSTYPE yyval;
|
|
|
|
YYLTYPE yyloc;
|
|
|
|
|
|
|
|
#if YYERROR_VERBOSE
|
|
|
|
/* Buffer for error messages, and its allocated size. */
|
|
|
|
char yymsgbuf[128];
|
|
|
|
char *yymsg = yymsgbuf;
|
|
|
|
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
|
|
|
|
|
|
|
|
/* The number of symbols on the RHS of the reduced rule.
|
|
|
|
Keep to zero when no symbol should be popped. */
|
|
|
|
int yylen = 0;
|
|
|
|
|
|
|
|
yyssp = yyss = yyssa;
|
|
|
|
yyvsp = yyvs = yyvsa;
|
|
|
|
yylsp = yyls = yylsa;
|
|
|
|
yystacksize = YYINITDEPTH;
|
|
|
|
|
|
|
|
YYDPRINTF ((stderr, "Starting parse\n"));
|
|
|
|
|
|
|
|
yystate = 0;
|
|
|
|
yyerrstatus = 0;
|
|
|
|
yynerrs = 0;
|
|
|
|
yychar = YYEMPTY; /* Cause a token to be read. */
|
|
|
|
|
|
|
|
/* User initialization code. */
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 71 "bison_parser.y" /* yacc.c:1429 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
yylloc.first_column = 0;
|
|
|
|
yylloc.last_column = 0;
|
|
|
|
yylloc.first_line = 0;
|
|
|
|
yylloc.last_line = 0;
|
|
|
|
yylloc.total_column = 0;
|
|
|
|
}
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2236 "bison_parser.cpp" /* yacc.c:1429 */
|
2015-12-23 17:02:45 +01:00
|
|
|
yylsp[0] = yylloc;
|
|
|
|
goto yysetstate;
|
|
|
|
|
|
|
|
/*------------------------------------------------------------.
|
|
|
|
| yynewstate -- Push a new state, which is found in yystate. |
|
|
|
|
`------------------------------------------------------------*/
|
|
|
|
yynewstate:
|
|
|
|
/* In all cases, when you get here, the value and location stacks
|
|
|
|
have just been pushed. So pushing a state here evens the stacks. */
|
|
|
|
yyssp++;
|
|
|
|
|
|
|
|
yysetstate:
|
|
|
|
*yyssp = yystate;
|
|
|
|
|
|
|
|
if (yyss + yystacksize - 1 <= yyssp)
|
|
|
|
{
|
|
|
|
/* Get the current used size of the three stacks, in elements. */
|
|
|
|
YYSIZE_T yysize = yyssp - yyss + 1;
|
|
|
|
|
|
|
|
#ifdef yyoverflow
|
|
|
|
{
|
|
|
|
/* Give user a chance to reallocate the stack. Use copies of
|
|
|
|
these so that the &'s don't force the real ones into
|
|
|
|
memory. */
|
|
|
|
YYSTYPE *yyvs1 = yyvs;
|
|
|
|
yytype_int16 *yyss1 = yyss;
|
|
|
|
YYLTYPE *yyls1 = yyls;
|
|
|
|
|
|
|
|
/* Each stack pointer address is followed by the size of the
|
|
|
|
data in use in that stack, in bytes. This used to be a
|
|
|
|
conditional around just the two extra args, but that might
|
|
|
|
be undefined if yyoverflow is a macro. */
|
|
|
|
yyoverflow (YY_("memory exhausted"),
|
|
|
|
&yyss1, yysize * sizeof (*yyssp),
|
|
|
|
&yyvs1, yysize * sizeof (*yyvsp),
|
|
|
|
&yyls1, yysize * sizeof (*yylsp),
|
|
|
|
&yystacksize);
|
|
|
|
|
|
|
|
yyls = yyls1;
|
|
|
|
yyss = yyss1;
|
|
|
|
yyvs = yyvs1;
|
|
|
|
}
|
|
|
|
#else /* no yyoverflow */
|
|
|
|
# ifndef YYSTACK_RELOCATE
|
|
|
|
goto yyexhaustedlab;
|
|
|
|
# else
|
|
|
|
/* Extend the stack our own way. */
|
|
|
|
if (YYMAXDEPTH <= yystacksize)
|
|
|
|
goto yyexhaustedlab;
|
|
|
|
yystacksize *= 2;
|
|
|
|
if (YYMAXDEPTH < yystacksize)
|
|
|
|
yystacksize = YYMAXDEPTH;
|
|
|
|
|
|
|
|
{
|
|
|
|
yytype_int16 *yyss1 = yyss;
|
|
|
|
union yyalloc *yyptr =
|
|
|
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
|
|
|
if (! yyptr)
|
|
|
|
goto yyexhaustedlab;
|
|
|
|
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
|
|
|
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
|
|
|
|
YYSTACK_RELOCATE (yyls_alloc, yyls);
|
|
|
|
# undef YYSTACK_RELOCATE
|
|
|
|
if (yyss1 != yyssa)
|
|
|
|
YYSTACK_FREE (yyss1);
|
|
|
|
}
|
|
|
|
# endif
|
|
|
|
#endif /* no yyoverflow */
|
|
|
|
|
|
|
|
yyssp = yyss + yysize - 1;
|
|
|
|
yyvsp = yyvs + yysize - 1;
|
|
|
|
yylsp = yyls + yysize - 1;
|
|
|
|
|
|
|
|
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
|
|
|
(unsigned long int) yystacksize));
|
|
|
|
|
|
|
|
if (yyss + yystacksize - 1 <= yyssp)
|
|
|
|
YYABORT;
|
|
|
|
}
|
|
|
|
|
|
|
|
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
|
|
|
|
|
|
|
if (yystate == YYFINAL)
|
|
|
|
YYACCEPT;
|
|
|
|
|
|
|
|
goto yybackup;
|
|
|
|
|
|
|
|
/*-----------.
|
|
|
|
| yybackup. |
|
|
|
|
`-----------*/
|
|
|
|
yybackup:
|
|
|
|
|
|
|
|
/* Do appropriate processing given the current state. Read a
|
|
|
|
lookahead token if we need one and don't already have one. */
|
|
|
|
|
|
|
|
/* First try to decide what to do without reference to lookahead token. */
|
|
|
|
yyn = yypact[yystate];
|
|
|
|
if (yypact_value_is_default (yyn))
|
|
|
|
goto yydefault;
|
|
|
|
|
|
|
|
/* Not known => get a lookahead token if don't already have one. */
|
|
|
|
|
|
|
|
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
|
|
|
|
if (yychar == YYEMPTY)
|
|
|
|
{
|
|
|
|
YYDPRINTF ((stderr, "Reading a token: "));
|
|
|
|
yychar = yylex (&yylval, &yylloc, scanner);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (yychar <= YYEOF)
|
|
|
|
{
|
|
|
|
yychar = yytoken = YYEOF;
|
|
|
|
YYDPRINTF ((stderr, "Now at end of input.\n"));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
yytoken = YYTRANSLATE (yychar);
|
|
|
|
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If the proper action on seeing token YYTOKEN is to reduce or to
|
|
|
|
detect an error, take that action. */
|
|
|
|
yyn += yytoken;
|
|
|
|
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
|
|
|
|
goto yydefault;
|
|
|
|
yyn = yytable[yyn];
|
|
|
|
if (yyn <= 0)
|
|
|
|
{
|
|
|
|
if (yytable_value_is_error (yyn))
|
|
|
|
goto yyerrlab;
|
|
|
|
yyn = -yyn;
|
|
|
|
goto yyreduce;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Count tokens shifted since error; after three, turn off error
|
|
|
|
status. */
|
|
|
|
if (yyerrstatus)
|
|
|
|
yyerrstatus--;
|
|
|
|
|
|
|
|
/* Shift the lookahead token. */
|
|
|
|
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
|
|
|
|
|
|
|
|
/* Discard the shifted token. */
|
|
|
|
yychar = YYEMPTY;
|
|
|
|
|
|
|
|
yystate = yyn;
|
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
|
|
|
*++yyvsp = yylval;
|
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
|
|
|
*++yylsp = yylloc;
|
|
|
|
goto yynewstate;
|
|
|
|
|
|
|
|
|
|
|
|
/*-----------------------------------------------------------.
|
|
|
|
| yydefault -- do the default action for the current state. |
|
|
|
|
`-----------------------------------------------------------*/
|
|
|
|
yydefault:
|
|
|
|
yyn = yydefact[yystate];
|
|
|
|
if (yyn == 0)
|
|
|
|
goto yyerrlab;
|
|
|
|
goto yyreduce;
|
|
|
|
|
|
|
|
|
|
|
|
/*-----------------------------.
|
|
|
|
| yyreduce -- Do a reduction. |
|
|
|
|
`-----------------------------*/
|
|
|
|
yyreduce:
|
|
|
|
/* yyn is the number of a rule to reduce with. */
|
|
|
|
yylen = yyr2[yyn];
|
|
|
|
|
|
|
|
/* If YYLEN is nonzero, implement the default value of the action:
|
|
|
|
'$$ = $1'.
|
|
|
|
|
|
|
|
Otherwise, the following line sets YYVAL to garbage.
|
|
|
|
This behavior is undocumented and Bison
|
|
|
|
users should not rely upon it. Assigning to YYVAL
|
|
|
|
unconditionally makes the parser a bit smaller, and it avoids a
|
|
|
|
GCC warning that YYVAL may be used uninitialized. */
|
|
|
|
yyval = yyvsp[1-yylen];
|
|
|
|
|
|
|
|
/* Default location. */
|
|
|
|
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
|
|
|
|
YY_REDUCE_PRINT (yyn);
|
|
|
|
switch (yyn)
|
|
|
|
{
|
|
|
|
case 2:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 237 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) {
|
|
|
|
// Transfers ownership of the statement.
|
|
|
|
result->addStatement(stmt);
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned param_id = 0;
|
|
|
|
for (void* param : yyloc.param_list) {
|
|
|
|
if (param != nullptr) {
|
|
|
|
Expr* expr = (Expr*) param;
|
|
|
|
expr->ival = param_id;
|
|
|
|
result->addParameter(expr);
|
|
|
|
++param_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete (yyvsp[-1].stmt_vec);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2441 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 258 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-07 16:26:20 +02:00
|
|
|
{ (yyval.stmt_vec) = new std::vector<SQLStatement*>(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2447 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 4:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 259 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-07 16:26:20 +02:00
|
|
|
{ (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2453 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 7:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 269 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].select_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2459 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 8:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 270 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].import_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2465 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 9:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 271 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].create_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2471 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 10:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 272 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].insert_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2477 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 11:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 273 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].delete_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2483 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 12:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 274 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].delete_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2489 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 13:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 275 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].update_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2495 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 14:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 276 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].drop_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2501 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 15:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 277 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.statement) = (yyvsp[0].exec_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2507 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 16:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 285 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.prep_stmt) = new PrepareStatement();
|
|
|
|
(yyval.prep_stmt)->name = (yyvsp[-2].sval);
|
2017-05-29 16:22:13 +02:00
|
|
|
(yyval.prep_stmt)->query = (yyvsp[0].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2517 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 18:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 295 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.exec_stmt) = new ExecuteStatement();
|
|
|
|
(yyval.exec_stmt)->name = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2526 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 19:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 299 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.exec_stmt) = new ExecuteStatement();
|
|
|
|
(yyval.exec_stmt)->name = (yyvsp[-3].sval);
|
|
|
|
(yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2536 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 20:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 311 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval));
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.import_stmt)->filePath = (yyvsp[-2].sval);
|
|
|
|
(yyval.import_stmt)->tableName = (yyvsp[0].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2546 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 21:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 319 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-21 16:15:07 +02:00
|
|
|
{ (yyval.uval) = kImportCSV; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2552 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 22:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 323 "bison_parser.y" /* yacc.c:1646 */
|
2017-02-08 04:27:04 +01:00
|
|
|
{ (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2558 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 23:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 333 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval);
|
|
|
|
(yyval.create_stmt)->tableName = (yyvsp[-4].sval);
|
|
|
|
(yyval.create_stmt)->filePath = (yyvsp[0].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2569 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 24:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 339 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.create_stmt) = new CreateStatement(kCreateTable);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval);
|
|
|
|
(yyval.create_stmt)->tableName = (yyvsp[-3].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.create_stmt)->columns = (yyvsp[-1].column_vec);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2580 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 25:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 345 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.create_stmt) = new CreateStatement(kCreateView);
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval);
|
|
|
|
(yyval.create_stmt)->tableName = (yyvsp[-3].sval);
|
|
|
|
(yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec);
|
|
|
|
(yyval.create_stmt)->select = (yyvsp[0].select_stmt);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2592 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 26:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 355 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.bval) = true; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2598 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 27:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 356 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.bval) = false; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2604 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 28:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 360 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.column_vec) = new std::vector<ColumnDefinition*>(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2610 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 29:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 361 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2616 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 30:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 365 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.column_t) = new ColumnDefinition((yyvsp[-1].sval), (ColumnDefinition::DataType) (yyvsp[0].uval));
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2624 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 31:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 372 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = ColumnDefinition::INT; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2630 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 32:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 373 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = ColumnDefinition::INT; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2636 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 33:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 374 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = ColumnDefinition::DOUBLE; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2642 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 34:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 375 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = ColumnDefinition::TEXT; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2648 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 35:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 385 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.drop_stmt) = new DropStatement(kDropTable);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.drop_stmt)->name = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2657 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 36:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 389 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.drop_stmt) = new DropStatement(kDropView);
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.drop_stmt)->name = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2666 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 37:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 393 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.drop_stmt) = new DropStatement(kDropPreparedStatement);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.drop_stmt)->name = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2675 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 38:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 405 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.delete_stmt) = new DeleteStatement();
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.delete_stmt)->tableName = (yyvsp[-1].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.delete_stmt)->expr = (yyvsp[0].expr);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2685 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 39:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 413 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.delete_stmt) = new DeleteStatement();
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.delete_stmt)->tableName = (yyvsp[0].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2694 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 40:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 425 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.insert_stmt) = new InsertStatement(kInsertValues);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.insert_stmt)->tableName = (yyvsp[-5].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.insert_stmt)->columns = (yyvsp[-4].str_vec);
|
|
|
|
(yyval.insert_stmt)->values = (yyvsp[-1].expr_vec);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2705 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 41:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 431 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-04-21 16:15:07 +02:00
|
|
|
(yyval.insert_stmt) = new InsertStatement(kInsertSelect);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.insert_stmt)->tableName = (yyvsp[-2].sval);
|
2015-12-23 17:02:45 +01:00
|
|
|
(yyval.insert_stmt)->columns = (yyvsp[-1].str_vec);
|
|
|
|
(yyval.insert_stmt)->select = (yyvsp[0].select_stmt);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2716 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 42:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 441 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.str_vec) = (yyvsp[-1].str_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2722 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 43:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 442 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.str_vec) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2728 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 44:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 452 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.update_stmt) = new UpdateStatement();
|
|
|
|
(yyval.update_stmt)->table = (yyvsp[-3].table);
|
|
|
|
(yyval.update_stmt)->updates = (yyvsp[-1].update_vec);
|
|
|
|
(yyval.update_stmt)->where = (yyvsp[0].expr);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2739 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 45:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 461 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.update_vec) = new std::vector<UpdateClause*>(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2745 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 46:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 462 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2751 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 47:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 466 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.update_t) = new UpdateClause();
|
|
|
|
(yyval.update_t)->column = (yyvsp[-2].sval);
|
|
|
|
(yyval.update_t)->value = (yyvsp[0].expr);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2761 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 50:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 483 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2767 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 51:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 484 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2773 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 52:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 488 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.select_stmt) = (yyvsp[-2].select_stmt);
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.select_stmt)->order = (yyvsp[-1].order_vec);
|
|
|
|
|
|
|
|
// Limit could have been set by TOP.
|
|
|
|
if ((yyvsp[0].limit) != NULL) {
|
|
|
|
delete (yyval.select_stmt)->limit;
|
|
|
|
(yyval.select_stmt)->limit = (yyvsp[0].limit);
|
|
|
|
}
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2788 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 53:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 498 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
// TODO: allow multiple unions (through linked list)
|
|
|
|
// TODO: capture type of set_operator
|
|
|
|
// TODO: might overwrite order and limit of first select here
|
|
|
|
(yyval.select_stmt) = (yyvsp[-4].select_stmt);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.select_stmt)->unionSelect = (yyvsp[-2].select_stmt);
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.select_stmt)->order = (yyvsp[-1].order_vec);
|
|
|
|
|
|
|
|
// Limit could have been set by TOP.
|
|
|
|
if ((yyvsp[0].limit) != NULL) {
|
|
|
|
delete (yyval.select_stmt)->limit;
|
|
|
|
(yyval.select_stmt)->limit = (yyvsp[0].limit);
|
|
|
|
}
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2807 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 54:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 512 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-07 02:01:00 +01:00
|
|
|
{
|
|
|
|
(yyval.select_stmt) = (yyvsp[-4].select_stmt);
|
|
|
|
(yyval.select_stmt)->unionSelect = (yyvsp[-2].select_stmt);
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.select_stmt)->order = (yyvsp[-1].order_vec);
|
|
|
|
|
|
|
|
// Limit could have been set by TOP.
|
|
|
|
if ((yyvsp[0].limit) != NULL) {
|
|
|
|
delete (yyval.select_stmt)->limit;
|
|
|
|
(yyval.select_stmt)->limit = (yyvsp[0].limit);
|
|
|
|
}
|
2017-03-07 02:01:00 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2823 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-07 02:01:00 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 58:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 532 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.select_stmt) = new SelectStatement();
|
2017-03-08 20:36:06 +01:00
|
|
|
(yyval.select_stmt)->limit = (yyvsp[-5].limit);
|
2016-02-27 15:22:22 +01:00
|
|
|
(yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval);
|
|
|
|
(yyval.select_stmt)->selectList = (yyvsp[-3].expr_vec);
|
|
|
|
(yyval.select_stmt)->fromTable = (yyvsp[-2].table);
|
|
|
|
(yyval.select_stmt)->whereClause = (yyvsp[-1].expr);
|
|
|
|
(yyval.select_stmt)->groupBy = (yyvsp[0].group_t);
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2837 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 59:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 544 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.bval) = true; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2843 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 60:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 545 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.bval) = false; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2849 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 62:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 553 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.table) = (yyvsp[0].table); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2855 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 63:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 558 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2861 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 64:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 559 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2867 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 65:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 563 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.group_t) = new GroupByDescription();
|
|
|
|
(yyval.group_t)->columns = (yyvsp[-1].expr_vec);
|
|
|
|
(yyval.group_t)->having = (yyvsp[0].expr);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2877 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 66:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 568 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.group_t) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2883 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 67:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 572 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2889 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 68:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 573 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2895 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 69:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 576 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.order_vec) = (yyvsp[0].order_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2901 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 70:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 577 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.order_vec) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2907 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 71:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 581 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.order_vec) = new std::vector<OrderDescription*>(); (yyval.order_vec)->push_back((yyvsp[0].order)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2913 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 72:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 582 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2919 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 73:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 586 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2925 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 74:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 590 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.order_type) = kOrderAsc; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2931 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 75:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 591 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.order_type) = kOrderDesc; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2937 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 76:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 592 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.order_type) = kOrderAsc; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2943 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 77:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 598 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2949 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 78:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 599 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.limit) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2955 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 79:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 603 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.limit) = new LimitDescription((yyvsp[0].expr)->ival, kNoOffset); delete (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2961 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 80:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 604 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.limit) = new LimitDescription((yyvsp[-2].expr)->ival, (yyvsp[0].expr)->ival); delete (yyvsp[-2].expr); delete (yyvsp[0].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2967 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 81:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 605 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.limit) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2973 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 82:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 612 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr_vec) = new std::vector<Expr*>(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2979 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 83:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 613 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2985 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 84:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 617 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr_vec) = new std::vector<Expr*>(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2991 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 85:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 618 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 2997 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 86:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 622 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.expr) = (yyvsp[-1].expr);
|
|
|
|
(yyval.expr)->alias = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3006 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 93:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 638 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = (yyvsp[-1].expr); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3012 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 98:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 643 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3018 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 102:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 653 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpUnary(kOpMinus, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3024 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 103:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 654 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3030 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 105:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 659 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '-', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3036 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 106:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 660 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '+', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3042 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 107:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 661 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '/', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3048 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 108:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 662 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '*', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3054 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 109:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 663 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '%', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3060 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 110:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 664 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '^', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3066 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 111:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 665 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3072 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 112:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 666 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3078 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 113:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 670 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3084 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 114:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 671 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3090 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 115:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 675 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3096 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 116:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 676 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3102 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 117:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 677 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3108 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 118:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 678 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3114 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 119:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 683 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeCase((yyvsp[-5].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3120 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 120:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 687 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3126 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 121:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 688 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3132 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 122:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 692 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '=', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3138 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 123:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 693 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3144 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 124:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 694 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '<', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3150 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 125:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 695 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), '>', (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3156 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 126:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 696 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3162 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 127:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 697 "bison_parser.y" /* yacc.c:1646 */
|
2017-04-06 18:28:22 +02:00
|
|
|
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3168 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 128:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 701 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3174 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 129:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 705 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3180 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 130:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 709 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3186 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 131:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 710 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3192 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 135:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 720 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3198 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 136:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 725 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3204 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 138:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 730 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3210 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 139:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 734 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.expr) = new Expr(kExprStar); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3216 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 140:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 738 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
2017-05-29 16:22:13 +02:00
|
|
|
(yyval.expr) = Expr::makeParameter(yylloc.total_column);
|
|
|
|
(yyval.expr)->ival2 = yyloc.param_list.size();
|
|
|
|
yyloc.param_list.push_back((yyval.expr));
|
2015-12-23 17:02:45 +01:00
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3226 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 142:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 751 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyvsp[0].table_vec)->push_back((yyvsp[-2].table));
|
|
|
|
auto tbl = new TableRef(kTableCrossProduct);
|
|
|
|
tbl->list = (yyvsp[0].table_vec);
|
|
|
|
(yyval.table) = tbl;
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3237 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 144:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 762 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
auto tbl = new TableRef(kTableSelect);
|
|
|
|
tbl->select = (yyvsp[-2].select_stmt);
|
|
|
|
tbl->alias = (yyvsp[0].sval);
|
|
|
|
(yyval.table) = tbl;
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3248 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 146:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 773 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.table_vec) = new std::vector<TableRef*>(); (yyval.table_vec)->push_back((yyvsp[0].table)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3254 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 147:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 774 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3260 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 148:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 779 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
auto tbl = new TableRef(kTableName);
|
|
|
|
tbl->name = (yyvsp[-1].sval);
|
|
|
|
tbl->alias = (yyvsp[0].sval);
|
|
|
|
(yyval.table) = tbl;
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3271 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 149:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 789 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.table) = new TableRef(kTableName);
|
|
|
|
(yyval.table)->name = (yyvsp[0].sval);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3280 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 152:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 803 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.sval) = (yyvsp[0].sval); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3286 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 155:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 809 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.sval) = NULL; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3292 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 156:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 818 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{
|
|
|
|
(yyval.table) = new TableRef(kTableJoin);
|
|
|
|
(yyval.table)->join = new JoinDefinition();
|
|
|
|
(yyval.table)->join->type = (JoinType) (yyvsp[-4].uval);
|
|
|
|
(yyval.table)->join->left = (yyvsp[-5].table);
|
|
|
|
(yyval.table)->join->right = (yyvsp[-2].table);
|
|
|
|
(yyval.table)->join->condition = (yyvsp[0].expr);
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3305 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 157:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 829 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = kJoinInner; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3311 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 158:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 830 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = kJoinOuter; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3317 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 159:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 831 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.uval) = kJoinLeftOuter; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3323 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 160:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 832 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.uval) = kJoinRightOuter; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3329 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 161:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 833 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = kJoinLeft; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3335 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 162:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 834 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = kJoinRight; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3341 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-03-08 20:36:06 +01:00
|
|
|
case 163:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 835 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.uval) = kJoinCross; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3347 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 164:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 836 "bison_parser.y" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
{ (yyval.uval) = kJoinNatural; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3353 "bison_parser.cpp" /* yacc.c:1646 */
|
2017-03-08 20:36:06 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 165:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 837 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.uval) = kJoinInner; }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3359 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-04-21 22:03:12 +02:00
|
|
|
case 169:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 857 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyval.str_vec) = new std::vector<char*>(); (yyval.str_vec)->push_back((yyvsp[0].sval)); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3365 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
2017-04-21 22:03:12 +02:00
|
|
|
case 170:
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 858 "bison_parser.y" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
{ (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); }
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3371 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 3375 "bison_parser.cpp" /* yacc.c:1646 */
|
2015-12-23 17:02:45 +01:00
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
/* User semantic actions sometimes alter yychar, and that requires
|
|
|
|
that yytoken be updated with the new translation. We take the
|
|
|
|
approach of translating immediately before every use of yytoken.
|
|
|
|
One alternative is translating here after every semantic action,
|
|
|
|
but that translation would be missed if the semantic action invokes
|
|
|
|
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
|
|
|
|
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
|
|
|
|
incorrect destructor might then be invoked immediately. In the
|
|
|
|
case of YYERROR or YYBACKUP, subsequent parser actions might lead
|
|
|
|
to an incorrect destructor call or verbose syntax error message
|
|
|
|
before the lookahead is translated. */
|
|
|
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
|
|
|
|
|
|
|
YYPOPSTACK (yylen);
|
|
|
|
yylen = 0;
|
|
|
|
YY_STACK_PRINT (yyss, yyssp);
|
|
|
|
|
|
|
|
*++yyvsp = yyval;
|
|
|
|
*++yylsp = yyloc;
|
|
|
|
|
|
|
|
/* Now 'shift' the result of the reduction. Determine what state
|
|
|
|
that goes to, based on the state we popped back to and the rule
|
|
|
|
number reduced by. */
|
|
|
|
|
|
|
|
yyn = yyr1[yyn];
|
|
|
|
|
|
|
|
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
|
|
|
|
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
|
|
|
|
yystate = yytable[yystate];
|
|
|
|
else
|
|
|
|
yystate = yydefgoto[yyn - YYNTOKENS];
|
|
|
|
|
|
|
|
goto yynewstate;
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------.
|
|
|
|
| yyerrlab -- here on detecting error. |
|
|
|
|
`--------------------------------------*/
|
|
|
|
yyerrlab:
|
|
|
|
/* Make sure we have latest lookahead translation. See comments at
|
|
|
|
user semantic actions for why this is necessary. */
|
|
|
|
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
|
|
|
|
|
|
|
|
/* If not already recovering from an error, report this error. */
|
|
|
|
if (!yyerrstatus)
|
|
|
|
{
|
|
|
|
++yynerrs;
|
|
|
|
#if ! YYERROR_VERBOSE
|
|
|
|
yyerror (&yylloc, result, scanner, YY_("syntax error"));
|
|
|
|
#else
|
|
|
|
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
|
|
|
|
yyssp, yytoken)
|
|
|
|
{
|
|
|
|
char const *yymsgp = YY_("syntax error");
|
|
|
|
int yysyntax_error_status;
|
|
|
|
yysyntax_error_status = YYSYNTAX_ERROR;
|
|
|
|
if (yysyntax_error_status == 0)
|
|
|
|
yymsgp = yymsg;
|
|
|
|
else if (yysyntax_error_status == 1)
|
|
|
|
{
|
|
|
|
if (yymsg != yymsgbuf)
|
|
|
|
YYSTACK_FREE (yymsg);
|
|
|
|
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
|
|
|
|
if (!yymsg)
|
|
|
|
{
|
|
|
|
yymsg = yymsgbuf;
|
|
|
|
yymsg_alloc = sizeof yymsgbuf;
|
|
|
|
yysyntax_error_status = 2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
yysyntax_error_status = YYSYNTAX_ERROR;
|
|
|
|
yymsgp = yymsg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yyerror (&yylloc, result, scanner, yymsgp);
|
|
|
|
if (yysyntax_error_status == 2)
|
|
|
|
goto yyexhaustedlab;
|
|
|
|
}
|
|
|
|
# undef YYSYNTAX_ERROR
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
yyerror_range[1] = yylloc;
|
|
|
|
|
|
|
|
if (yyerrstatus == 3)
|
|
|
|
{
|
|
|
|
/* If just tried and failed to reuse lookahead token after an
|
|
|
|
error, discard it. */
|
|
|
|
|
|
|
|
if (yychar <= YYEOF)
|
|
|
|
{
|
|
|
|
/* Return failure if at end of input. */
|
|
|
|
if (yychar == YYEOF)
|
|
|
|
YYABORT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
yydestruct ("Error: discarding",
|
|
|
|
yytoken, &yylval, &yylloc, result, scanner);
|
|
|
|
yychar = YYEMPTY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Else will try to reuse lookahead token after shifting the error
|
|
|
|
token. */
|
|
|
|
goto yyerrlab1;
|
|
|
|
|
|
|
|
|
|
|
|
/*---------------------------------------------------.
|
|
|
|
| yyerrorlab -- error raised explicitly by YYERROR. |
|
|
|
|
`---------------------------------------------------*/
|
|
|
|
yyerrorlab:
|
|
|
|
|
|
|
|
/* Pacify compilers like GCC when the user code never invokes
|
|
|
|
YYERROR and the label yyerrorlab therefore never appears in user
|
|
|
|
code. */
|
|
|
|
if (/*CONSTCOND*/ 0)
|
|
|
|
goto yyerrorlab;
|
|
|
|
|
|
|
|
yyerror_range[1] = yylsp[1-yylen];
|
|
|
|
/* Do not reclaim the symbols of the rule whose action triggered
|
|
|
|
this YYERROR. */
|
|
|
|
YYPOPSTACK (yylen);
|
|
|
|
yylen = 0;
|
|
|
|
YY_STACK_PRINT (yyss, yyssp);
|
|
|
|
yystate = *yyssp;
|
|
|
|
goto yyerrlab1;
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------.
|
|
|
|
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
|
|
|
`-------------------------------------------------------------*/
|
|
|
|
yyerrlab1:
|
|
|
|
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
|
|
|
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
yyn = yypact[yystate];
|
|
|
|
if (!yypact_value_is_default (yyn))
|
|
|
|
{
|
|
|
|
yyn += YYTERROR;
|
|
|
|
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
|
|
|
{
|
|
|
|
yyn = yytable[yyn];
|
|
|
|
if (0 < yyn)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Pop the current state because it cannot handle the error token. */
|
|
|
|
if (yyssp == yyss)
|
|
|
|
YYABORT;
|
|
|
|
|
|
|
|
yyerror_range[1] = *yylsp;
|
|
|
|
yydestruct ("Error: popping",
|
|
|
|
yystos[yystate], yyvsp, yylsp, result, scanner);
|
|
|
|
YYPOPSTACK (1);
|
|
|
|
yystate = *yyssp;
|
|
|
|
YY_STACK_PRINT (yyss, yyssp);
|
|
|
|
}
|
|
|
|
|
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
|
|
|
|
*++yyvsp = yylval;
|
|
|
|
YY_IGNORE_MAYBE_UNINITIALIZED_END
|
|
|
|
|
|
|
|
yyerror_range[2] = yylloc;
|
|
|
|
/* Using YYLLOC is tempting, but would change the location of
|
|
|
|
the lookahead. YYLOC is available though. */
|
|
|
|
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
|
|
|
|
*++yylsp = yyloc;
|
|
|
|
|
|
|
|
/* Shift the error token. */
|
|
|
|
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
|
|
|
|
|
|
|
|
yystate = yyn;
|
|
|
|
goto yynewstate;
|
|
|
|
|
|
|
|
|
|
|
|
/*-------------------------------------.
|
|
|
|
| yyacceptlab -- YYACCEPT comes here. |
|
|
|
|
`-------------------------------------*/
|
|
|
|
yyacceptlab:
|
|
|
|
yyresult = 0;
|
|
|
|
goto yyreturn;
|
|
|
|
|
|
|
|
/*-----------------------------------.
|
|
|
|
| yyabortlab -- YYABORT comes here. |
|
|
|
|
`-----------------------------------*/
|
|
|
|
yyabortlab:
|
|
|
|
yyresult = 1;
|
|
|
|
goto yyreturn;
|
|
|
|
|
|
|
|
#if !defined yyoverflow || YYERROR_VERBOSE
|
|
|
|
/*-------------------------------------------------.
|
|
|
|
| yyexhaustedlab -- memory exhaustion comes here. |
|
|
|
|
`-------------------------------------------------*/
|
|
|
|
yyexhaustedlab:
|
|
|
|
yyerror (&yylloc, result, scanner, YY_("memory exhausted"));
|
|
|
|
yyresult = 2;
|
|
|
|
/* Fall through. */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
yyreturn:
|
|
|
|
if (yychar != YYEMPTY)
|
|
|
|
{
|
|
|
|
/* Make sure we have latest lookahead translation. See comments at
|
|
|
|
user semantic actions for why this is necessary. */
|
|
|
|
yytoken = YYTRANSLATE (yychar);
|
|
|
|
yydestruct ("Cleanup: discarding lookahead",
|
|
|
|
yytoken, &yylval, &yylloc, result, scanner);
|
|
|
|
}
|
|
|
|
/* Do not reclaim the symbols of the rule whose action triggered
|
|
|
|
this YYABORT or YYACCEPT. */
|
|
|
|
YYPOPSTACK (yylen);
|
|
|
|
YY_STACK_PRINT (yyss, yyssp);
|
|
|
|
while (yyssp != yyss)
|
|
|
|
{
|
|
|
|
yydestruct ("Cleanup: popping",
|
|
|
|
yystos[*yyssp], yyvsp, yylsp, result, scanner);
|
|
|
|
YYPOPSTACK (1);
|
|
|
|
}
|
|
|
|
#ifndef yyoverflow
|
|
|
|
if (yyss != yyssa)
|
|
|
|
YYSTACK_FREE (yyss);
|
|
|
|
#endif
|
|
|
|
#if YYERROR_VERBOSE
|
|
|
|
if (yymsg != yymsgbuf)
|
|
|
|
YYSTACK_FREE (yymsg);
|
|
|
|
#endif
|
|
|
|
return yyresult;
|
|
|
|
}
|
2017-05-29 16:22:13 +02:00
|
|
|
#line 861 "bison_parser.y" /* yacc.c:1906 */
|
2015-12-23 17:02:45 +01:00
|
|
|
|
|
|
|
/*********************************
|
|
|
|
** Section 4: Additional C code
|
|
|
|
*********************************/
|
|
|
|
|
|
|
|
/* empty */
|
|
|
|
|