diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp
index 0bba6ad7..8e44501c 100644
--- a/src/parser/bison_parser.cpp
+++ b/src/parser/bison_parser.cpp
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -34,10 +33,6 @@
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-
/* 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.
@@ -45,11 +40,11 @@
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Identify Bison output, and Bison version. */
-#define YYBISON 30802
+/* Identify Bison output. */
+#define YYBISON 1
-/* Bison version string. */
-#define YYBISON_VERSION "3.8.2"
+/* Bison version. */
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -73,8 +68,9 @@
#define yydebug hsql_debug
#define yynerrs hsql_nerrs
-/* First part of user prologue. */
-#line 2 "bison_parser.y"
+
+/* Copy the first part of user declarations. */
+#line 2 "bison_parser.y" /* yacc.c:339 */
/**
@@ -105,460 +101,394 @@
}
// clang-format off
-#line 109 "bison_parser.cpp"
+#line 105 "bison_parser.cpp" /* yacc.c:339 */
-# ifndef YY_CAST
-# ifdef __cplusplus
-# define YY_CAST(Type, Val) static_cast (Val)
-# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val)
+# ifndef YY_NULLPTR
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULLPTR nullptr
# else
-# define YY_CAST(Type, Val) ((Type) (Val))
-# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
+# define YY_NULLPTR 0
# endif
# endif
-# ifndef YY_NULLPTR
-# if defined __cplusplus
-# if 201103L <= __cplusplus
-# define YY_NULLPTR nullptr
-# else
-# define YY_NULLPTR 0
-# 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 YY_NULLPTR ((void*)0)
+# define HSQL_DEBUG 0
# endif
-# 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. */
+#line 39 "bison_parser.y" /* yacc.c:355 */
+
+// %code requires block
+
+#include "../SQLParserResult.h"
+#include "../sql/statements.h"
+#include "parser_typedef.h"
+
+// Auto update column and line number
+#define YY_USER_ACTION \
+ yylloc->first_line = yylloc->last_line; \
+ yylloc->first_column = yylloc->last_column; \
+ for (int i = 0; yytext[i] != '\0'; i++) { \
+ yylloc->total_column++; \
+ yylloc->string_length++; \
+ if (yytext[i] == '\n') { \
+ yylloc->last_line++; \
+ yylloc->last_column = 0; \
+ } else { \
+ yylloc->last_column++; \
+ } \
+ }
-#include "bison_parser.h"
-/* Symbol kind. */
-enum yysymbol_kind_t
+#line 166 "bison_parser.cpp" /* yacc.c:355 */
+
+/* Token type. */
+#ifndef HSQL_TOKENTYPE
+# define HSQL_TOKENTYPE
+ enum hsql_tokentype
+ {
+ SQL_IDENTIFIER = 258,
+ SQL_STRING = 259,
+ SQL_FLOATVAL = 260,
+ SQL_INTVAL = 261,
+ SQL_DEALLOCATE = 262,
+ SQL_PARAMETERS = 263,
+ SQL_INTERSECT = 264,
+ SQL_TEMPORARY = 265,
+ SQL_TIMESTAMP = 266,
+ SQL_DISTINCT = 267,
+ SQL_NVARCHAR = 268,
+ SQL_RESTRICT = 269,
+ SQL_TRUNCATE = 270,
+ SQL_ANALYZE = 271,
+ SQL_BETWEEN = 272,
+ SQL_CASCADE = 273,
+ SQL_COLUMNS = 274,
+ SQL_CONTROL = 275,
+ SQL_DEFAULT = 276,
+ SQL_EXECUTE = 277,
+ SQL_EXPLAIN = 278,
+ SQL_ENCODING = 279,
+ SQL_INTEGER = 280,
+ SQL_NATURAL = 281,
+ SQL_PREPARE = 282,
+ SQL_SCHEMAS = 283,
+ SQL_CHARACTER_VARYING = 284,
+ SQL_REAL = 285,
+ SQL_DECIMAL = 286,
+ SQL_SMALLINT = 287,
+ SQL_BIGINT = 288,
+ SQL_SPATIAL = 289,
+ SQL_VARCHAR = 290,
+ SQL_VIRTUAL = 291,
+ SQL_DESCRIBE = 292,
+ SQL_BEFORE = 293,
+ SQL_COLUMN = 294,
+ SQL_CREATE = 295,
+ SQL_DELETE = 296,
+ SQL_DIRECT = 297,
+ SQL_DOUBLE = 298,
+ SQL_ESCAPE = 299,
+ SQL_EXCEPT = 300,
+ SQL_EXISTS = 301,
+ SQL_EXTRACT = 302,
+ SQL_CAST = 303,
+ SQL_FORMAT = 304,
+ SQL_GLOBAL = 305,
+ SQL_HAVING = 306,
+ SQL_IMPORT = 307,
+ SQL_INSERT = 308,
+ SQL_ISNULL = 309,
+ SQL_OFFSET = 310,
+ SQL_RENAME = 311,
+ SQL_SCHEMA = 312,
+ SQL_SELECT = 313,
+ SQL_SORTED = 314,
+ SQL_TABLES = 315,
+ SQL_UNLOAD = 316,
+ SQL_UPDATE = 317,
+ SQL_VALUES = 318,
+ SQL_AFTER = 319,
+ SQL_ALTER = 320,
+ SQL_CROSS = 321,
+ SQL_DELTA = 322,
+ SQL_FLOAT = 323,
+ SQL_GROUP = 324,
+ SQL_INDEX = 325,
+ SQL_INNER = 326,
+ SQL_LIMIT = 327,
+ SQL_LOCAL = 328,
+ SQL_MERGE = 329,
+ SQL_MINUS = 330,
+ SQL_ORDER = 331,
+ SQL_OVER = 332,
+ SQL_OUTER = 333,
+ SQL_RIGHT = 334,
+ SQL_TABLE = 335,
+ SQL_UNION = 336,
+ SQL_USING = 337,
+ SQL_WHERE = 338,
+ SQL_CALL = 339,
+ SQL_CASE = 340,
+ SQL_CHAR = 341,
+ SQL_COPY = 342,
+ SQL_DATE = 343,
+ SQL_DATETIME = 344,
+ SQL_DESC = 345,
+ SQL_DROP = 346,
+ SQL_ELSE = 347,
+ SQL_FILE = 348,
+ SQL_FROM = 349,
+ SQL_FULL = 350,
+ SQL_HASH = 351,
+ SQL_HINT = 352,
+ SQL_INTO = 353,
+ SQL_JOIN = 354,
+ SQL_LEFT = 355,
+ SQL_LIKE = 356,
+ SQL_LOAD = 357,
+ SQL_LONG = 358,
+ SQL_NULL = 359,
+ SQL_PARTITION = 360,
+ SQL_PLAN = 361,
+ SQL_SHOW = 362,
+ SQL_TEXT = 363,
+ SQL_THEN = 364,
+ SQL_TIME = 365,
+ SQL_VIEW = 366,
+ SQL_WHEN = 367,
+ SQL_WITH = 368,
+ SQL_ADD = 369,
+ SQL_ALL = 370,
+ SQL_AND = 371,
+ SQL_ASC = 372,
+ SQL_END = 373,
+ SQL_FOR = 374,
+ SQL_INT = 375,
+ SQL_NOT = 376,
+ SQL_OFF = 377,
+ SQL_SET = 378,
+ SQL_TOP = 379,
+ SQL_AS = 380,
+ SQL_BY = 381,
+ SQL_IF = 382,
+ SQL_IN = 383,
+ SQL_IS = 384,
+ SQL_OF = 385,
+ SQL_ON = 386,
+ SQL_OR = 387,
+ SQL_TO = 388,
+ SQL_NO = 389,
+ SQL_ARRAY = 390,
+ SQL_CONCAT = 391,
+ SQL_ILIKE = 392,
+ SQL_SECOND = 393,
+ SQL_MINUTE = 394,
+ SQL_HOUR = 395,
+ SQL_DAY = 396,
+ SQL_MONTH = 397,
+ SQL_YEAR = 398,
+ SQL_SECONDS = 399,
+ SQL_MINUTES = 400,
+ SQL_HOURS = 401,
+ SQL_DAYS = 402,
+ SQL_MONTHS = 403,
+ SQL_YEARS = 404,
+ SQL_INTERVAL = 405,
+ SQL_TRUE = 406,
+ SQL_FALSE = 407,
+ SQL_BOOLEAN = 408,
+ SQL_TRANSACTION = 409,
+ SQL_BEGIN = 410,
+ SQL_COMMIT = 411,
+ SQL_ROLLBACK = 412,
+ SQL_NOWAIT = 413,
+ SQL_SKIP = 414,
+ SQL_LOCKED = 415,
+ SQL_SHARE = 416,
+ SQL_RANGE = 417,
+ SQL_ROWS = 418,
+ SQL_GROUPS = 419,
+ SQL_UNBOUNDED = 420,
+ SQL_FOLLOWING = 421,
+ SQL_PRECEDING = 422,
+ SQL_CURRENT_ROW = 423,
+ SQL_UNIQUE = 424,
+ SQL_PRIMARY = 425,
+ SQL_FOREIGN = 426,
+ SQL_KEY = 427,
+ SQL_REFERENCES = 428,
+ SQL_EQUALS = 429,
+ SQL_NOTEQUALS = 430,
+ SQL_LESS = 431,
+ SQL_GREATER = 432,
+ SQL_LESSEQ = 433,
+ SQL_GREATEREQ = 434,
+ SQL_NOTNULL = 435,
+ SQL_UMINUS = 436
+ };
+#endif
+
+/* Value type. */
+#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED
+
+union HSQL_STYPE
{
- YYSYMBOL_YYEMPTY = -2,
- YYSYMBOL_YYEOF = 0, /* "end of file" */
- YYSYMBOL_YYerror = 1, /* error */
- YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
- YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */
- YYSYMBOL_STRING = 4, /* STRING */
- YYSYMBOL_FLOATVAL = 5, /* FLOATVAL */
- YYSYMBOL_INTVAL = 6, /* INTVAL */
- YYSYMBOL_DEALLOCATE = 7, /* DEALLOCATE */
- YYSYMBOL_PARAMETERS = 8, /* PARAMETERS */
- YYSYMBOL_INTERSECT = 9, /* INTERSECT */
- YYSYMBOL_TEMPORARY = 10, /* TEMPORARY */
- YYSYMBOL_TIMESTAMP = 11, /* TIMESTAMP */
- YYSYMBOL_DISTINCT = 12, /* DISTINCT */
- YYSYMBOL_NVARCHAR = 13, /* NVARCHAR */
- YYSYMBOL_RESTRICT = 14, /* RESTRICT */
- YYSYMBOL_TRUNCATE = 15, /* TRUNCATE */
- YYSYMBOL_ANALYZE = 16, /* ANALYZE */
- YYSYMBOL_BETWEEN = 17, /* BETWEEN */
- YYSYMBOL_CASCADE = 18, /* CASCADE */
- YYSYMBOL_COLUMNS = 19, /* COLUMNS */
- YYSYMBOL_CONTROL = 20, /* CONTROL */
- YYSYMBOL_DEFAULT = 21, /* DEFAULT */
- YYSYMBOL_EXECUTE = 22, /* EXECUTE */
- YYSYMBOL_EXPLAIN = 23, /* EXPLAIN */
- YYSYMBOL_ENCODING = 24, /* ENCODING */
- YYSYMBOL_INTEGER = 25, /* INTEGER */
- YYSYMBOL_NATURAL = 26, /* NATURAL */
- YYSYMBOL_PREPARE = 27, /* PREPARE */
- YYSYMBOL_SCHEMAS = 28, /* SCHEMAS */
- YYSYMBOL_CHARACTER_VARYING = 29, /* CHARACTER_VARYING */
- YYSYMBOL_REAL = 30, /* REAL */
- YYSYMBOL_DECIMAL = 31, /* DECIMAL */
- YYSYMBOL_SMALLINT = 32, /* SMALLINT */
- YYSYMBOL_BIGINT = 33, /* BIGINT */
- YYSYMBOL_SPATIAL = 34, /* SPATIAL */
- YYSYMBOL_VARCHAR = 35, /* VARCHAR */
- YYSYMBOL_VIRTUAL = 36, /* VIRTUAL */
- YYSYMBOL_DESCRIBE = 37, /* DESCRIBE */
- YYSYMBOL_BEFORE = 38, /* BEFORE */
- YYSYMBOL_COLUMN = 39, /* COLUMN */
- YYSYMBOL_CREATE = 40, /* CREATE */
- YYSYMBOL_DELETE = 41, /* DELETE */
- YYSYMBOL_DIRECT = 42, /* DIRECT */
- YYSYMBOL_DOUBLE = 43, /* DOUBLE */
- YYSYMBOL_ESCAPE = 44, /* ESCAPE */
- YYSYMBOL_EXCEPT = 45, /* EXCEPT */
- YYSYMBOL_EXISTS = 46, /* EXISTS */
- YYSYMBOL_EXTRACT = 47, /* EXTRACT */
- YYSYMBOL_CAST = 48, /* CAST */
- YYSYMBOL_FORMAT = 49, /* FORMAT */
- YYSYMBOL_GLOBAL = 50, /* GLOBAL */
- YYSYMBOL_HAVING = 51, /* HAVING */
- YYSYMBOL_IMPORT = 52, /* IMPORT */
- YYSYMBOL_INSERT = 53, /* INSERT */
- YYSYMBOL_ISNULL = 54, /* ISNULL */
- YYSYMBOL_OFFSET = 55, /* OFFSET */
- YYSYMBOL_RENAME = 56, /* RENAME */
- YYSYMBOL_SCHEMA = 57, /* SCHEMA */
- YYSYMBOL_SELECT = 58, /* SELECT */
- YYSYMBOL_SORTED = 59, /* SORTED */
- YYSYMBOL_TABLES = 60, /* TABLES */
- YYSYMBOL_UNLOAD = 61, /* UNLOAD */
- YYSYMBOL_UPDATE = 62, /* UPDATE */
- YYSYMBOL_VALUES = 63, /* VALUES */
- YYSYMBOL_AFTER = 64, /* AFTER */
- YYSYMBOL_ALTER = 65, /* ALTER */
- YYSYMBOL_CROSS = 66, /* CROSS */
- YYSYMBOL_DELTA = 67, /* DELTA */
- YYSYMBOL_FLOAT = 68, /* FLOAT */
- YYSYMBOL_GROUP = 69, /* GROUP */
- YYSYMBOL_INDEX = 70, /* INDEX */
- YYSYMBOL_INNER = 71, /* INNER */
- YYSYMBOL_LIMIT = 72, /* LIMIT */
- YYSYMBOL_LOCAL = 73, /* LOCAL */
- YYSYMBOL_MERGE = 74, /* MERGE */
- YYSYMBOL_MINUS = 75, /* MINUS */
- YYSYMBOL_ORDER = 76, /* ORDER */
- YYSYMBOL_OVER = 77, /* OVER */
- YYSYMBOL_OUTER = 78, /* OUTER */
- YYSYMBOL_RIGHT = 79, /* RIGHT */
- YYSYMBOL_TABLE = 80, /* TABLE */
- YYSYMBOL_UNION = 81, /* UNION */
- YYSYMBOL_USING = 82, /* USING */
- YYSYMBOL_WHERE = 83, /* WHERE */
- YYSYMBOL_CALL = 84, /* CALL */
- YYSYMBOL_CASE = 85, /* CASE */
- YYSYMBOL_CHAR = 86, /* CHAR */
- YYSYMBOL_COPY = 87, /* COPY */
- YYSYMBOL_DATE = 88, /* DATE */
- YYSYMBOL_DATETIME = 89, /* DATETIME */
- YYSYMBOL_DESC = 90, /* DESC */
- YYSYMBOL_DROP = 91, /* DROP */
- YYSYMBOL_ELSE = 92, /* ELSE */
- YYSYMBOL_FILE = 93, /* FILE */
- YYSYMBOL_FROM = 94, /* FROM */
- YYSYMBOL_FULL = 95, /* FULL */
- YYSYMBOL_HASH = 96, /* HASH */
- YYSYMBOL_HINT = 97, /* HINT */
- YYSYMBOL_INTO = 98, /* INTO */
- YYSYMBOL_JOIN = 99, /* JOIN */
- YYSYMBOL_LEFT = 100, /* LEFT */
- YYSYMBOL_LIKE = 101, /* LIKE */
- YYSYMBOL_LOAD = 102, /* LOAD */
- YYSYMBOL_LONG = 103, /* LONG */
- YYSYMBOL_NULL = 104, /* NULL */
- YYSYMBOL_PARTITION = 105, /* PARTITION */
- YYSYMBOL_PLAN = 106, /* PLAN */
- YYSYMBOL_SHOW = 107, /* SHOW */
- YYSYMBOL_TEXT = 108, /* TEXT */
- YYSYMBOL_THEN = 109, /* THEN */
- YYSYMBOL_TIME = 110, /* TIME */
- YYSYMBOL_VIEW = 111, /* VIEW */
- YYSYMBOL_WHEN = 112, /* WHEN */
- YYSYMBOL_WITH = 113, /* WITH */
- YYSYMBOL_ADD = 114, /* ADD */
- YYSYMBOL_ALL = 115, /* ALL */
- YYSYMBOL_AND = 116, /* AND */
- YYSYMBOL_ASC = 117, /* ASC */
- YYSYMBOL_END = 118, /* END */
- YYSYMBOL_FOR = 119, /* FOR */
- YYSYMBOL_INT = 120, /* INT */
- YYSYMBOL_NOT = 121, /* NOT */
- YYSYMBOL_OFF = 122, /* OFF */
- YYSYMBOL_SET = 123, /* SET */
- YYSYMBOL_TOP = 124, /* TOP */
- YYSYMBOL_AS = 125, /* AS */
- YYSYMBOL_BY = 126, /* BY */
- YYSYMBOL_IF = 127, /* IF */
- YYSYMBOL_IN = 128, /* IN */
- YYSYMBOL_IS = 129, /* IS */
- YYSYMBOL_OF = 130, /* OF */
- YYSYMBOL_ON = 131, /* ON */
- YYSYMBOL_OR = 132, /* OR */
- YYSYMBOL_TO = 133, /* TO */
- YYSYMBOL_NO = 134, /* NO */
- YYSYMBOL_ARRAY = 135, /* ARRAY */
- YYSYMBOL_CONCAT = 136, /* CONCAT */
- YYSYMBOL_ILIKE = 137, /* ILIKE */
- YYSYMBOL_SECOND = 138, /* SECOND */
- YYSYMBOL_MINUTE = 139, /* MINUTE */
- YYSYMBOL_HOUR = 140, /* HOUR */
- YYSYMBOL_DAY = 141, /* DAY */
- YYSYMBOL_MONTH = 142, /* MONTH */
- YYSYMBOL_YEAR = 143, /* YEAR */
- YYSYMBOL_SECONDS = 144, /* SECONDS */
- YYSYMBOL_MINUTES = 145, /* MINUTES */
- YYSYMBOL_HOURS = 146, /* HOURS */
- YYSYMBOL_DAYS = 147, /* DAYS */
- YYSYMBOL_MONTHS = 148, /* MONTHS */
- YYSYMBOL_YEARS = 149, /* YEARS */
- YYSYMBOL_INTERVAL = 150, /* INTERVAL */
- YYSYMBOL_TRUE = 151, /* TRUE */
- YYSYMBOL_FALSE = 152, /* FALSE */
- YYSYMBOL_BOOLEAN = 153, /* BOOLEAN */
- YYSYMBOL_TRANSACTION = 154, /* TRANSACTION */
- YYSYMBOL_BEGIN = 155, /* BEGIN */
- YYSYMBOL_COMMIT = 156, /* COMMIT */
- YYSYMBOL_ROLLBACK = 157, /* ROLLBACK */
- YYSYMBOL_NOWAIT = 158, /* NOWAIT */
- YYSYMBOL_SKIP = 159, /* SKIP */
- YYSYMBOL_LOCKED = 160, /* LOCKED */
- YYSYMBOL_SHARE = 161, /* SHARE */
- YYSYMBOL_RANGE = 162, /* RANGE */
- YYSYMBOL_ROWS = 163, /* ROWS */
- YYSYMBOL_GROUPS = 164, /* GROUPS */
- YYSYMBOL_UNBOUNDED = 165, /* UNBOUNDED */
- YYSYMBOL_FOLLOWING = 166, /* FOLLOWING */
- YYSYMBOL_PRECEDING = 167, /* PRECEDING */
- YYSYMBOL_CURRENT_ROW = 168, /* CURRENT_ROW */
- YYSYMBOL_UNIQUE = 169, /* UNIQUE */
- YYSYMBOL_PRIMARY = 170, /* PRIMARY */
- YYSYMBOL_FOREIGN = 171, /* FOREIGN */
- YYSYMBOL_KEY = 172, /* KEY */
- YYSYMBOL_REFERENCES = 173, /* REFERENCES */
- YYSYMBOL_174_ = 174, /* '=' */
- YYSYMBOL_EQUALS = 175, /* EQUALS */
- YYSYMBOL_NOTEQUALS = 176, /* NOTEQUALS */
- YYSYMBOL_177_ = 177, /* '<' */
- YYSYMBOL_178_ = 178, /* '>' */
- YYSYMBOL_LESS = 179, /* LESS */
- YYSYMBOL_GREATER = 180, /* GREATER */
- YYSYMBOL_LESSEQ = 181, /* LESSEQ */
- YYSYMBOL_GREATEREQ = 182, /* GREATEREQ */
- YYSYMBOL_NOTNULL = 183, /* NOTNULL */
- YYSYMBOL_184_ = 184, /* '+' */
- YYSYMBOL_185_ = 185, /* '-' */
- YYSYMBOL_186_ = 186, /* '*' */
- YYSYMBOL_187_ = 187, /* '/' */
- YYSYMBOL_188_ = 188, /* '%' */
- YYSYMBOL_189_ = 189, /* '^' */
- YYSYMBOL_UMINUS = 190, /* UMINUS */
- YYSYMBOL_191_ = 191, /* '[' */
- YYSYMBOL_192_ = 192, /* ']' */
- YYSYMBOL_193_ = 193, /* '(' */
- YYSYMBOL_194_ = 194, /* ')' */
- YYSYMBOL_195_ = 195, /* '.' */
- YYSYMBOL_196_ = 196, /* ';' */
- YYSYMBOL_197_ = 197, /* ',' */
- YYSYMBOL_198_ = 198, /* '?' */
- YYSYMBOL_YYACCEPT = 199, /* $accept */
- YYSYMBOL_input = 200, /* input */
- YYSYMBOL_statement_list = 201, /* statement_list */
- YYSYMBOL_statement = 202, /* statement */
- YYSYMBOL_preparable_statement = 203, /* preparable_statement */
- YYSYMBOL_opt_hints = 204, /* opt_hints */
- YYSYMBOL_hint_list = 205, /* hint_list */
- YYSYMBOL_hint = 206, /* hint */
- YYSYMBOL_transaction_statement = 207, /* transaction_statement */
- YYSYMBOL_opt_transaction_keyword = 208, /* opt_transaction_keyword */
- YYSYMBOL_prepare_statement = 209, /* prepare_statement */
- YYSYMBOL_prepare_target_query = 210, /* prepare_target_query */
- YYSYMBOL_execute_statement = 211, /* execute_statement */
- YYSYMBOL_import_statement = 212, /* import_statement */
- YYSYMBOL_file_type = 213, /* file_type */
- YYSYMBOL_file_path = 214, /* file_path */
- YYSYMBOL_opt_import_export_options = 215, /* opt_import_export_options */
- YYSYMBOL_import_export_options = 216, /* import_export_options */
- YYSYMBOL_csv_option = 217, /* csv_option */
- YYSYMBOL_export_statement = 218, /* export_statement */
- YYSYMBOL_show_statement = 219, /* show_statement */
- YYSYMBOL_create_statement = 220, /* create_statement */
- YYSYMBOL_opt_not_exists = 221, /* opt_not_exists */
- YYSYMBOL_table_elem_commalist = 222, /* table_elem_commalist */
- YYSYMBOL_table_elem = 223, /* table_elem */
- YYSYMBOL_column_def = 224, /* column_def */
- YYSYMBOL_column_type = 225, /* column_type */
- YYSYMBOL_opt_time_precision = 226, /* opt_time_precision */
- YYSYMBOL_opt_decimal_specification = 227, /* opt_decimal_specification */
- YYSYMBOL_opt_column_constraints = 228, /* opt_column_constraints */
- YYSYMBOL_column_constraints = 229, /* column_constraints */
- YYSYMBOL_column_constraint = 230, /* column_constraint */
- YYSYMBOL_table_constraint = 231, /* table_constraint */
- YYSYMBOL_references_spec = 232, /* references_spec */
- YYSYMBOL_drop_statement = 233, /* drop_statement */
- YYSYMBOL_opt_exists = 234, /* opt_exists */
- YYSYMBOL_alter_statement = 235, /* alter_statement */
- YYSYMBOL_alter_action = 236, /* alter_action */
- YYSYMBOL_drop_action = 237, /* drop_action */
- YYSYMBOL_delete_statement = 238, /* delete_statement */
- YYSYMBOL_truncate_statement = 239, /* truncate_statement */
- YYSYMBOL_insert_statement = 240, /* insert_statement */
- YYSYMBOL_opt_column_list = 241, /* opt_column_list */
- YYSYMBOL_update_statement = 242, /* update_statement */
- YYSYMBOL_update_clause_commalist = 243, /* update_clause_commalist */
- YYSYMBOL_update_clause = 244, /* update_clause */
- YYSYMBOL_select_statement = 245, /* select_statement */
- YYSYMBOL_select_within_set_operation = 246, /* select_within_set_operation */
- YYSYMBOL_select_within_set_operation_no_parentheses = 247, /* select_within_set_operation_no_parentheses */
- YYSYMBOL_select_with_paren = 248, /* select_with_paren */
- YYSYMBOL_select_no_paren = 249, /* select_no_paren */
- YYSYMBOL_set_operator = 250, /* set_operator */
- YYSYMBOL_set_type = 251, /* set_type */
- YYSYMBOL_opt_all = 252, /* opt_all */
- YYSYMBOL_select_clause = 253, /* select_clause */
- YYSYMBOL_opt_distinct = 254, /* opt_distinct */
- YYSYMBOL_select_list = 255, /* select_list */
- YYSYMBOL_opt_from_clause = 256, /* opt_from_clause */
- YYSYMBOL_from_clause = 257, /* from_clause */
- YYSYMBOL_opt_where = 258, /* opt_where */
- YYSYMBOL_opt_group = 259, /* opt_group */
- YYSYMBOL_opt_having = 260, /* opt_having */
- YYSYMBOL_opt_order = 261, /* opt_order */
- YYSYMBOL_order_list = 262, /* order_list */
- YYSYMBOL_order_desc = 263, /* order_desc */
- YYSYMBOL_opt_order_type = 264, /* opt_order_type */
- YYSYMBOL_opt_null_ordering = 265, /* opt_null_ordering */
- YYSYMBOL_opt_top = 266, /* opt_top */
- YYSYMBOL_opt_limit = 267, /* opt_limit */
- YYSYMBOL_expr_list = 268, /* expr_list */
- YYSYMBOL_opt_extended_literal_list = 269, /* opt_extended_literal_list */
- YYSYMBOL_extended_literal_list = 270, /* extended_literal_list */
- YYSYMBOL_casted_extended_literal = 271, /* casted_extended_literal */
- YYSYMBOL_extended_literal = 272, /* extended_literal */
- YYSYMBOL_expr_alias = 273, /* expr_alias */
- YYSYMBOL_expr = 274, /* expr */
- YYSYMBOL_operand = 275, /* operand */
- YYSYMBOL_scalar_expr = 276, /* scalar_expr */
- YYSYMBOL_unary_expr = 277, /* unary_expr */
- YYSYMBOL_binary_expr = 278, /* binary_expr */
- YYSYMBOL_logic_expr = 279, /* logic_expr */
- YYSYMBOL_in_expr = 280, /* in_expr */
- YYSYMBOL_case_expr = 281, /* case_expr */
- YYSYMBOL_case_list = 282, /* case_list */
- YYSYMBOL_exists_expr = 283, /* exists_expr */
- YYSYMBOL_comp_expr = 284, /* comp_expr */
- YYSYMBOL_function_expr = 285, /* function_expr */
- YYSYMBOL_opt_window = 286, /* opt_window */
- YYSYMBOL_opt_partition = 287, /* opt_partition */
- YYSYMBOL_opt_frame_clause = 288, /* opt_frame_clause */
- YYSYMBOL_frame_type = 289, /* frame_type */
- YYSYMBOL_frame_bound = 290, /* frame_bound */
- YYSYMBOL_extract_expr = 291, /* extract_expr */
- YYSYMBOL_cast_expr = 292, /* cast_expr */
- YYSYMBOL_datetime_field = 293, /* datetime_field */
- YYSYMBOL_datetime_field_plural = 294, /* datetime_field_plural */
- YYSYMBOL_duration_field = 295, /* duration_field */
- YYSYMBOL_array_expr = 296, /* array_expr */
- YYSYMBOL_array_index = 297, /* array_index */
- YYSYMBOL_between_expr = 298, /* between_expr */
- YYSYMBOL_column_name = 299, /* column_name */
- YYSYMBOL_literal = 300, /* literal */
- YYSYMBOL_string_literal = 301, /* string_literal */
- YYSYMBOL_bool_literal = 302, /* bool_literal */
- YYSYMBOL_num_literal = 303, /* num_literal */
- YYSYMBOL_int_literal = 304, /* int_literal */
- YYSYMBOL_null_literal = 305, /* null_literal */
- YYSYMBOL_date_literal = 306, /* date_literal */
- YYSYMBOL_interval_literal = 307, /* interval_literal */
- YYSYMBOL_param_expr = 308, /* param_expr */
- YYSYMBOL_table_ref = 309, /* table_ref */
- YYSYMBOL_table_ref_atomic = 310, /* table_ref_atomic */
- YYSYMBOL_nonjoin_table_ref_atomic = 311, /* nonjoin_table_ref_atomic */
- YYSYMBOL_table_ref_commalist = 312, /* table_ref_commalist */
- YYSYMBOL_table_ref_name = 313, /* table_ref_name */
- YYSYMBOL_table_ref_name_no_alias = 314, /* table_ref_name_no_alias */
- YYSYMBOL_table_name = 315, /* table_name */
- YYSYMBOL_opt_index_name = 316, /* opt_index_name */
- YYSYMBOL_table_alias = 317, /* table_alias */
- YYSYMBOL_opt_table_alias = 318, /* opt_table_alias */
- YYSYMBOL_alias = 319, /* alias */
- YYSYMBOL_opt_alias = 320, /* opt_alias */
- YYSYMBOL_opt_locking_clause = 321, /* opt_locking_clause */
- YYSYMBOL_opt_locking_clause_list = 322, /* opt_locking_clause_list */
- YYSYMBOL_locking_clause = 323, /* locking_clause */
- YYSYMBOL_row_lock_mode = 324, /* row_lock_mode */
- YYSYMBOL_opt_row_lock_policy = 325, /* opt_row_lock_policy */
- YYSYMBOL_opt_with_clause = 326, /* opt_with_clause */
- YYSYMBOL_with_clause = 327, /* with_clause */
- YYSYMBOL_with_description_list = 328, /* with_description_list */
- YYSYMBOL_with_description = 329, /* with_description */
- YYSYMBOL_join_clause = 330, /* join_clause */
- YYSYMBOL_opt_join_type = 331, /* opt_join_type */
- YYSYMBOL_join_condition = 332, /* join_condition */
- YYSYMBOL_opt_semicolon = 333, /* opt_semicolon */
- YYSYMBOL_ident_commalist = 334 /* ident_commalist */
-};
-typedef enum yysymbol_kind_t yysymbol_kind_t;
+#line 102 "bison_parser.y" /* yacc.c:355 */
+
+ // clang-format on
+ bool bval;
+ char* sval;
+ double fval;
+ int64_t ival;
+ uintmax_t uval;
+
+ // statements
+ hsql::AlterStatement* alter_stmt;
+ hsql::CreateStatement* create_stmt;
+ hsql::DeleteStatement* delete_stmt;
+ hsql::DropStatement* drop_stmt;
+ hsql::ExecuteStatement* exec_stmt;
+ hsql::ExportStatement* export_stmt;
+ hsql::ImportStatement* import_stmt;
+ hsql::InsertStatement* insert_stmt;
+ hsql::PrepareStatement* prep_stmt;
+ hsql::SelectStatement* select_stmt;
+ hsql::ShowStatement* show_stmt;
+ hsql::SQLStatement* statement;
+ hsql::TransactionStatement* transaction_stmt;
+ hsql::UpdateStatement* update_stmt;
+
+ hsql::Alias* alias_t;
+ hsql::AlterAction* alter_action_t;
+ hsql::ColumnConstraints* column_constraints_t;
+ hsql::ColumnDefinition* column_t;
+ hsql::ColumnType column_type_t;
+ hsql::ConstraintType column_constraint_t;
+ hsql::DatetimeField datetime_field;
+ hsql::DropColumnAction* drop_action_t;
+ hsql::Expr* expr;
+ hsql::FrameBound* frame_bound;
+ hsql::FrameDescription* frame_description;
+ hsql::FrameType frame_type;
+ hsql::GroupByDescription* group_t;
+ hsql::ImportType import_type_t;
+ hsql::JoinType join_type;
+ hsql::LimitDescription* limit;
+ hsql::LockingClause* locking_t;
+ hsql::OrderDescription* order;
+ hsql::OrderType order_type;
+ hsql::NullOrdering null_ordering_t;
+ hsql::ReferencesSpecification* references_spec_t;
+ hsql::SetOperation* set_operator_t;
+ hsql::TableConstraint* table_constraint_t;
+ hsql::TableElement* table_element_t;
+ hsql::TableName table_name;
+ hsql::TableRef* table;
+ hsql::UpdateClause* update_t;
+ hsql::WindowDescription* window_description;
+ hsql::WithDescription* with_description_t;
+
+ std::vector* str_vec;
+ std::vector* expr_vec;
+ std::vector* order_vec;
+ std::vector* stmt_vec;
+ std::vector* table_element_vec;
+ std::vector* table_vec;
+ std::vector* update_vec;
+ std::vector* with_description_vec;
+ std::vector* locking_clause_vec;
+
+ std::pair* ival_pair;
+
+ hsql::RowLockMode lock_mode_t;
+ hsql::RowLockWaitPolicy lock_wait_policy_t;
+
+ hsql::ImportExportOptions* import_export_option_t;
+ std::pair* csv_option_t;
+ // clang-format off
+#line 435 "bison_parser.cpp" /* yacc.c:355 */
+};
+typedef union HSQL_STYPE HSQL_STYPE;
+# define HSQL_STYPE_IS_TRIVIAL 1
+# define HSQL_STYPE_IS_DECLARED 1
+#endif
-#ifdef short
-# undef short
+/* 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
-/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
- and (if available) are included
- so that the code can choose integer types of a good width. */
-#ifndef __PTRDIFF_MAX__
-# include /* INFRINGES ON USER NAME SPACE */
-# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
-# include /* INFRINGES ON USER NAME SPACE */
-# define YY_STDINT_H
-# endif
-#endif
-/* Narrow types that promote to a signed type and that can represent a
- signed or unsigned integer of at least N bits. In tables they can
- save space and decrease cache pressure. Promoting to a signed type
- helps avoid bugs in integer arithmetic. */
+int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner);
-#ifdef __INT_LEAST8_MAX__
-typedef __INT_LEAST8_TYPE__ yytype_int8;
-#elif defined YY_STDINT_H
-typedef int_least8_t yytype_int8;
-#else
-typedef signed char yytype_int8;
-#endif
+#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */
-#ifdef __INT_LEAST16_MAX__
-typedef __INT_LEAST16_TYPE__ yytype_int16;
-#elif defined YY_STDINT_H
-typedef int_least16_t yytype_int16;
-#else
-typedef short yytype_int16;
-#endif
+/* Copy the second part of user declarations. */
+
+#line 465 "bison_parser.cpp" /* yacc.c:358 */
-/* Work around bug in HP-UX 11.23, which defines these macros
- incorrectly for preprocessor constants. This workaround can likely
- be removed in 2023, as HPE has promised support for HP-UX 11.23
- (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
- . */
-#ifdef __hpux
-# undef UINT_LEAST8_MAX
-# undef UINT_LEAST16_MAX
-# define UINT_LEAST8_MAX 255
-# define UINT_LEAST16_MAX 65535
+#ifdef short
+# undef short
#endif
-#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST8_TYPE__ yytype_uint8;
-#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST8_MAX <= INT_MAX)
-typedef uint_least8_t yytype_uint8;
-#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
+#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 short yytype_uint8;
+typedef signed char yytype_int8;
#endif
-#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
-typedef __UINT_LEAST16_TYPE__ yytype_uint16;
-#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
- && UINT_LEAST16_MAX <= INT_MAX)
-typedef uint_least16_t yytype_uint16;
-#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
-typedef unsigned short yytype_uint16;
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
#else
-typedef int yytype_uint16;
+typedef unsigned short int yytype_uint16;
#endif
-#ifndef YYPTRDIFF_T
-# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
-# define YYPTRDIFF_T __PTRDIFF_TYPE__
-# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
-# elif defined PTRDIFF_MAX
-# ifndef ptrdiff_t
-# include /* INFRINGES ON USER NAME SPACE */
-# endif
-# define YYPTRDIFF_T ptrdiff_t
-# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
-# else
-# define YYPTRDIFF_T long
-# define YYPTRDIFF_MAXIMUM LONG_MAX
-# endif
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
@@ -566,28 +496,15 @@ typedef int yytype_uint16;
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
-# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
+# elif ! defined YYSIZE_T
# include /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
-# define YYSIZE_T unsigned
+# define YYSIZE_T unsigned int
# endif
#endif
-#define YYSIZE_MAXIMUM \
- YY_CAST (YYPTRDIFF_T, \
- (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
- ? YYPTRDIFF_MAXIMUM \
- : YY_CAST (YYSIZE_T, -1)))
-
-#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
-
-
-/* Stored state numbers (used for stacks). */
-typedef yytype_int16 yy_state_t;
-
-/* State numbers in computations. */
-typedef int yy_state_fast_t;
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
@@ -601,43 +518,47 @@ typedef int yy_state_fast_t;
# endif
#endif
-
-#ifndef YY_ATTRIBUTE_PURE
-# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#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_PURE
+# define YY_ATTRIBUTE(Spec) /* empty */
# endif
#endif
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
#ifndef YY_ATTRIBUTE_UNUSED
-# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
-# define YY_ATTRIBUTE_UNUSED __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 YY_ATTRIBUTE_UNUSED
+# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YY_USE(E) ((void) (E))
+# define YYUSE(E) ((void) (E))
#else
-# define YY_USE(E) /* empty */
+# define YYUSE(E) /* empty */
#endif
+#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
-# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
-# else
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# endif
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
@@ -650,22 +571,8 @@ typedef int yy_state_fast_t;
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
-#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
-# define YY_IGNORE_USELESS_CAST_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
-# define YY_IGNORE_USELESS_CAST_END \
- _Pragma ("GCC diagnostic pop")
-#endif
-#ifndef YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_BEGIN
-# define YY_IGNORE_USELESS_CAST_END
-#endif
-
-#define YY_ASSERT(E) ((void) (0 && (E)))
-
-#if 1
+#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -730,7 +637,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
-#endif /* 1 */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
#if (! defined yyoverflow \
&& (! defined __cplusplus \
@@ -740,19 +648,18 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yy_state_t yyss_alloc;
+ 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 (YYSIZEOF (union yyalloc) - 1)
+# 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) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
- + YYSIZEOF (YYLTYPE)) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
@@ -765,11 +672,11 @@ union yyalloc
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
- YYPTRDIFF_T yynewbytes; \
+ YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / YYSIZEOF (*yyptr); \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
@@ -781,12 +688,12 @@ union yyalloc
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
+ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
- YYPTRDIFF_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
@@ -798,30 +705,27 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 69
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 947
+#define YYLAST 856
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 199
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 136
/* YYNRULES -- Number of rules. */
-#define YYNRULES 355
+#define YYNRULES 357
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 649
+#define YYNSTATES 656
-/* YYMAXUTOK -- Last valid token kind. */
+/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
+ by yylex, with out-of-bounds checking. */
+#define YYUNDEFTOK 2
#define YYMAXUTOK 436
-
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK \
- ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
- : YYSYMBOL_YYUNDEF)
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
- as returned by yylex. */
+ as returned by yylex, without out-of-bounds checking. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -871,8 +775,8 @@ static const yytype_uint8 yytranslate[] =
};
#if HSQL_DEBUG
-/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
-static const yytype_int16 yyrline[] =
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
{
0, 343, 343, 362, 368, 375, 379, 383, 384, 385,
387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
@@ -898,69 +802,61 @@ static const yytype_int16 yyrline[] =
1134, 1135, 1136, 1137, 1138, 1139, 1140, 1142, 1143, 1145,
1146, 1147, 1148, 1152, 1153, 1154, 1155, 1157, 1158, 1160,
1161, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1173, 1174,
- 1178, 1179, 1181, 1182, 1187, 1188, 1189, 1193, 1194, 1195,
- 1197, 1198, 1199, 1200, 1201, 1203, 1205, 1207, 1208, 1209,
- 1210, 1211, 1212, 1214, 1215, 1216, 1217, 1218, 1219, 1221,
- 1221, 1223, 1225, 1227, 1229, 1230, 1231, 1232, 1234, 1234,
- 1234, 1234, 1234, 1234, 1234, 1236, 1238, 1239, 1241, 1242,
- 1244, 1246, 1248, 1259, 1260, 1271, 1303, 1312, 1312, 1319,
- 1319, 1321, 1321, 1328, 1332, 1337, 1345, 1351, 1355, 1360,
- 1361, 1363, 1363, 1365, 1365, 1367, 1368, 1370, 1370, 1376,
- 1377, 1379, 1383, 1388, 1394, 1401, 1402, 1403, 1404, 1406,
- 1407, 1408, 1414, 1414, 1416, 1418, 1422, 1427, 1437, 1444,
- 1452, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469,
- 1470, 1472, 1478, 1478, 1481, 1485
+ 1175, 1176, 1180, 1181, 1183, 1184, 1189, 1190, 1191, 1195,
+ 1196, 1197, 1199, 1200, 1201, 1202, 1203, 1205, 1207, 1209,
+ 1210, 1211, 1212, 1213, 1214, 1216, 1217, 1218, 1219, 1220,
+ 1221, 1223, 1223, 1225, 1227, 1229, 1231, 1232, 1233, 1234,
+ 1236, 1236, 1236, 1236, 1236, 1236, 1236, 1238, 1240, 1241,
+ 1243, 1244, 1246, 1248, 1250, 1261, 1262, 1273, 1305, 1314,
+ 1314, 1321, 1321, 1323, 1323, 1330, 1334, 1339, 1347, 1353,
+ 1357, 1362, 1363, 1365, 1365, 1367, 1367, 1369, 1370, 1372,
+ 1372, 1378, 1379, 1381, 1385, 1390, 1396, 1403, 1404, 1405,
+ 1406, 1408, 1409, 1410, 1416, 1416, 1418, 1420, 1424, 1429,
+ 1439, 1446, 1454, 1463, 1464, 1465, 1466, 1467, 1468, 1469,
+ 1470, 1471, 1472, 1474, 1480, 1480, 1483, 1487
};
#endif
-/** Accessing symbol of state STATE. */
-#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
-
-#if 1
-/* The user-facing name of the symbol whose (internal) number is
- YYSYMBOL. No bounds checking. */
-static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
-
+#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 of file\"", "error", "\"invalid token\"", "IDENTIFIER", "STRING",
- "FLOATVAL", "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT",
- "TEMPORARY", "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE",
- "ANALYZE", "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT",
- "EXECUTE", "EXPLAIN", "ENCODING", "INTEGER", "NATURAL", "PREPARE",
- "SCHEMAS", "CHARACTER_VARYING", "REAL", "DECIMAL", "SMALLINT", "BIGINT",
- "SPATIAL", "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN",
- "CREATE", "DELETE", "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS",
- "EXTRACT", "CAST", "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT",
- "ISNULL", "OFFSET", "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES",
- "UNLOAD", "UPDATE", "VALUES", "AFTER", "ALTER", "CROSS", "DELTA",
- "FLOAT", "GROUP", "INDEX", "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS",
- "ORDER", "OVER", "OUTER", "RIGHT", "TABLE", "UNION", "USING", "WHERE",
- "CALL", "CASE", "CHAR", "COPY", "DATE", "DATETIME", "DESC", "DROP",
- "ELSE", "FILE", "FROM", "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT",
- "LIKE", "LOAD", "LONG", "NULL", "PARTITION", "PLAN", "SHOW", "TEXT",
- "THEN", "TIME", "VIEW", "WHEN", "WITH", "ADD", "ALL", "AND", "ASC",
- "END", "FOR", "INT", "NOT", "OFF", "SET", "TOP", "AS", "BY", "IF", "IN",
- "IS", "OF", "ON", "OR", "TO", "NO", "ARRAY", "CONCAT", "ILIKE", "SECOND",
- "MINUTE", "HOUR", "DAY", "MONTH", "YEAR", "SECONDS", "MINUTES", "HOURS",
- "DAYS", "MONTHS", "YEARS", "INTERVAL", "TRUE", "FALSE", "BOOLEAN",
- "TRANSACTION", "BEGIN", "COMMIT", "ROLLBACK", "NOWAIT", "SKIP", "LOCKED",
- "SHARE", "RANGE", "ROWS", "GROUPS", "UNBOUNDED", "FOLLOWING",
- "PRECEDING", "CURRENT_ROW", "UNIQUE", "PRIMARY", "FOREIGN", "KEY",
- "REFERENCES", "'='", "EQUALS", "NOTEQUALS", "'<'", "'>'", "LESS",
- "GREATER", "LESSEQ", "GREATEREQ", "NOTNULL", "'+'", "'-'", "'*'", "'/'",
- "'%'", "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "';'", "','",
- "'?'", "$accept", "input", "statement_list", "statement",
- "preparable_statement", "opt_hints", "hint_list", "hint",
- "transaction_statement", "opt_transaction_keyword", "prepare_statement",
- "prepare_target_query", "execute_statement", "import_statement",
- "file_type", "file_path", "opt_import_export_options",
- "import_export_options", "csv_option", "export_statement",
- "show_statement", "create_statement", "opt_not_exists",
- "table_elem_commalist", "table_elem", "column_def", "column_type",
- "opt_time_precision", "opt_decimal_specification",
+ "$end", "error", "$undefined", "IDENTIFIER", "STRING", "FLOATVAL",
+ "INTVAL", "DEALLOCATE", "PARAMETERS", "INTERSECT", "TEMPORARY",
+ "TIMESTAMP", "DISTINCT", "NVARCHAR", "RESTRICT", "TRUNCATE", "ANALYZE",
+ "BETWEEN", "CASCADE", "COLUMNS", "CONTROL", "DEFAULT", "EXECUTE",
+ "EXPLAIN", "ENCODING", "INTEGER", "NATURAL", "PREPARE", "SCHEMAS",
+ "CHARACTER_VARYING", "REAL", "DECIMAL", "SMALLINT", "BIGINT", "SPATIAL",
+ "VARCHAR", "VIRTUAL", "DESCRIBE", "BEFORE", "COLUMN", "CREATE", "DELETE",
+ "DIRECT", "DOUBLE", "ESCAPE", "EXCEPT", "EXISTS", "EXTRACT", "CAST",
+ "FORMAT", "GLOBAL", "HAVING", "IMPORT", "INSERT", "ISNULL", "OFFSET",
+ "RENAME", "SCHEMA", "SELECT", "SORTED", "TABLES", "UNLOAD", "UPDATE",
+ "VALUES", "AFTER", "ALTER", "CROSS", "DELTA", "FLOAT", "GROUP", "INDEX",
+ "INNER", "LIMIT", "LOCAL", "MERGE", "MINUS", "ORDER", "OVER", "OUTER",
+ "RIGHT", "TABLE", "UNION", "USING", "WHERE", "CALL", "CASE", "CHAR",
+ "COPY", "DATE", "DATETIME", "DESC", "DROP", "ELSE", "FILE", "FROM",
+ "FULL", "HASH", "HINT", "INTO", "JOIN", "LEFT", "LIKE", "LOAD", "LONG",
+ "NULL", "PARTITION", "PLAN", "SHOW", "TEXT", "THEN", "TIME", "VIEW",
+ "WHEN", "WITH", "ADD", "ALL", "AND", "ASC", "END", "FOR", "INT", "NOT",
+ "OFF", "SET", "TOP", "AS", "BY", "IF", "IN", "IS", "OF", "ON", "OR",
+ "TO", "NO", "ARRAY", "CONCAT", "ILIKE", "SECOND", "MINUTE", "HOUR",
+ "DAY", "MONTH", "YEAR", "SECONDS", "MINUTES", "HOURS", "DAYS", "MONTHS",
+ "YEARS", "INTERVAL", "TRUE", "FALSE", "BOOLEAN", "TRANSACTION", "BEGIN",
+ "COMMIT", "ROLLBACK", "NOWAIT", "SKIP", "LOCKED", "SHARE", "RANGE",
+ "ROWS", "GROUPS", "UNBOUNDED", "FOLLOWING", "PRECEDING", "CURRENT_ROW",
+ "UNIQUE", "PRIMARY", "FOREIGN", "KEY", "REFERENCES", "'='", "EQUALS",
+ "NOTEQUALS", "'<'", "'>'", "LESS", "GREATER", "LESSEQ", "GREATEREQ",
+ "NOTNULL", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "UMINUS", "'['",
+ "']'", "'('", "')'", "'.'", "';'", "','", "'?'", "$accept", "input",
+ "statement_list", "statement", "preparable_statement", "opt_hints",
+ "hint_list", "hint", "transaction_statement", "opt_transaction_keyword",
+ "prepare_statement", "prepare_target_query", "execute_statement",
+ "import_statement", "file_type", "file_path",
+ "opt_import_export_options", "import_export_options", "csv_option",
+ "export_statement", "show_statement", "create_statement",
+ "opt_not_exists", "table_elem_commalist", "table_elem", "column_def",
+ "column_type", "opt_time_precision", "opt_decimal_specification",
"opt_column_constraints", "column_constraints", "column_constraint",
"table_constraint", "references_spec", "drop_statement", "opt_exists",
"alter_statement", "alter_action", "drop_action", "delete_statement",
@@ -991,409 +887,415 @@ static const char *const yytname[] =
"with_description_list", "with_description", "join_clause",
"opt_join_type", "join_condition", "opt_semicolon", "ident_commalist", YY_NULLPTR
};
+#endif
-static const char *
-yysymbol_name (yysymbol_kind_t yysymbol)
+# 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[] =
{
- return yytname[yysymbol];
-}
-#endif
+ 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,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 61, 429, 430, 60, 62, 431,
+ 432, 433, 434, 435, 43, 45, 42, 47, 37, 94,
+ 436, 91, 93, 40, 41, 46, 59, 44, 63
+};
+# endif
-#define YYPACT_NINF (-568)
+#define YYPACT_NINF -529
-#define yypact_value_is_default(Yyn) \
- ((Yyn) == YYPACT_NINF)
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-529)))
-#define YYTABLE_NINF (-353)
+#define YYTABLE_NINF -355
-#define yytable_value_is_error(Yyn) \
- ((Yyn) == YYTABLE_NINF)
+#define yytable_value_is_error(Yytable_value) \
+ (!!((Yytable_value) == (-355)))
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 641, 28, 135, 199, 259, 135, -18, 150, 175, 190,
- 135, 218, 23, 89, 125, 282, 156, 156, 156, 304,
- 116, -568, 201, -568, 201, -568, -568, -568, -568, -568,
- -568, -568, -568, -568, -568, -568, -568, -23, -568, 328,
- 153, -568, 161, 245, -568, 231, 231, 231, 135, 342,
- 135, 237, -568, 246, -23, 253, 31, 246, 246, 246,
- 135, -568, 274, 228, -568, -568, -568, -568, -568, -568,
- 618, -568, 281, -568, -568, 278, 192, -568, 184, -568,
- 412, 91, 425, 310, 431, 135, 135, 356, -568, 349,
- 247, 441, 397, 135, 251, 252, 443, 443, 443, 454,
- 135, 135, -568, 265, 282, -568, 270, 460, 462, -568,
- -568, -568, -23, 357, 350, -23, 80, -568, -568, -568,
- 440, 284, 471, -568, 474, -568, -568, 27, -568, 289,
- 287, -568, -568, -568, -568, -568, -568, -568, -568, -568,
- -568, -568, -568, -568, 439, -568, 355, -47, 247, 347,
- -568, 443, 484, 242, 314, -44, -568, -568, 399, -568,
- -568, -568, -69, -69, -69, -568, -568, -568, -568, -568,
- 490, -568, -568, -568, 347, 418, -568, -568, 192, -568,
- -568, 347, 418, 347, 151, 381, -568, -568, -568, -568,
- -568, -568, -568, -568, -568, -568, -568, -568, -568, -568,
- -568, 220, -568, 226, -568, -568, -568, 91, -568, 135,
- 499, 392, 21, 382, 99, 313, 317, 319, 205, 407,
- 322, 456, -568, 329, 73, 435, -568, -568, -568, -568,
- -568, -568, -568, -568, -568, -568, -568, -568, -568, -568,
- -568, -568, 419, -568, -105, 323, -568, 347, 441, -568,
- 479, -568, -568, 326, 82, -568, 356, -568, 327, -19,
- -568, 427, 334, -568, 42, 80, -23, 337, -568, 106,
- 80, 73, 468, 33, -1, -568, 381, -568, 401, -568,
- -568, 331, 442, -568, 691, 344, 366, 367, -13, -568,
- -568, -568, 392, 9, 20, 485, 226, 347, 347, -42,
- 76, 353, 456, 702, 347, 134, 354, -66, 347, 347,
- 456, -568, 456, -41, 358, 154, 456, 456, 456, 456,
- 456, 456, 456, 456, 456, 456, 456, 456, 456, 456,
- 456, 460, 135, -568, 544, 91, 73, -568, 246, 82,
- 545, 546, 342, 548, 84, -568, -568, 91, -568, 490,
- 24, 356, -568, 347, -568, 550, -568, -568, -568, -568,
- 347, -568, -568, 551, 381, 347, 347, -568, 383, -568,
- 400, 98, -568, 691, 484, 443, -568, -568, 369, -568,
- 372, -568, -568, 373, -568, -568, 375, -568, -568, -568,
- -568, 376, -568, -568, 146, 484, 377, 380, -568, 21,
- -568, 497, 347, -568, -568, 396, 481, 115, -53, 162,
- 347, 347, -568, 485, 475, 114, -568, -568, -568, 478,
- 684, 727, 456, 402, 329, -568, 492, 406, 727, 727,
- 727, 727, 756, 756, 756, 756, 134, 134, -55, -55,
- -55, -61, 409, -568, -568, 85, 595, 144, -568, -568,
- -568, -568, -568, 83, 149, -568, 392, -568, 370, -568,
- 405, -568, 38, -568, 530, -568, -568, -568, 600, -568,
- -568, 73, 73, 542, -568, 484, -568, 455, -568, 420,
- 185, -568, 622, 623, -568, 624, 625, 626, -568, -568,
- 531, -568, 464, 135, -568, 146, -568, -568, 186, 484,
- 484, -568, 444, -568, 187, -568, 347, 691, 347, 347,
- -568, -59, 152, 449, -568, 456, 727, 329, 450, 191,
- -568, -568, -568, -568, -568, 630, 342, -568, -568, 452,
- 539, -568, -568, -568, 569, 572, 573, 553, 24, 650,
- -568, -568, -568, 534, -568, -568, -568, 90, -568, -568,
- -568, 463, 195, 467, 470, 472, -568, -568, 247, -568,
- -568, -568, 203, 207, 557, 497, -65, 473, 73, 181,
- -568, 347, -568, 702, 480, 212, -568, -568, -568, -568,
- 38, 24, -568, -568, -568, 24, 430, 476, 347, -568,
- -568, -568, 659, -568, -568, -568, -568, -568, 500, 549,
- 418, -568, -568, -568, -568, 73, -568, -568, -568, -568,
- 613, 484, -21, 482, -568, 347, 165, 493, 347, 225,
- 347, -568, -568, 334, -568, -568, -568, 483, 47, 484,
- 73, -568, -568, 73, -568, 68, 62, 241, -568, -568,
- 229, -568, -568, 556, -568, -568, -568, 62, -568
+ 595, 27, 65, 71, 99, 65, 113, 83, 137, 140,
+ 65, 190, 21, 195, 37, 292, 120, 120, 120, 287,
+ 103, -529, 221, -529, 221, -529, -529, -529, -529, -529,
+ -529, -529, -529, -529, -529, -529, -529, -26, -529, 342,
+ 166, -529, 183, 313, -529, 251, 251, 251, 65, 415,
+ 65, 298, -529, 297, -26, 293, -37, 297, 297, 297,
+ 65, -529, 309, 267, -529, -529, -529, -529, -529, -529,
+ 578, -529, 369, -529, -529, 350, 224, -529, 35, -529,
+ 479, 353, 486, 374, 494, 65, 65, 418, -529, 413,
+ 314, 505, 464, 65, 315, 317, 508, 508, 508, 519,
+ 65, 65, -529, 332, 292, -529, 333, 521, 518, -529,
+ -529, -529, -26, 420, 410, -26, 15, -529, -529, -529,
+ 707, 344, 535, -529, 536, -529, -529, 45, -529, 349,
+ 347, -529, -529, -529, -529, -529, -529, -529, -529, -529,
+ -529, -529, -529, -529, 500, -529, 416, -15, 314, 363,
+ -529, 508, 547, 198, 380, -38, -529, -529, 466, -529,
+ -529, -529, -75, -75, -75, -529, -529, -529, -529, -529,
+ 552, -529, -529, -529, 363, 483, -529, -529, 224, -529,
+ -529, 363, 483, 363, 151, 443, -529, -529, -529, -529,
+ -529, -529, -529, -529, -529, -529, -529, -529, -529, -529,
+ -529, 200, -529, 248, -529, -529, -529, 353, -529, 65,
+ 561, 454, 19, 441, 129, 375, 381, 382, 244, 367,
+ 396, 59, -529, 335, 69, 395, -529, -529, -529, -529,
+ -529, -529, -529, -529, -529, -529, -529, -529, -529, -529,
+ -529, -529, 490, -529, 38, 397, -529, 363, 505, -529,
+ 550, -529, -529, 398, 193, -529, 418, -529, 402, 180,
+ -529, 502, 400, -529, 44, 15, -26, 401, -529, -31,
+ 15, 69, 544, 68, 106, -529, 443, -529, 476, -529,
+ -529, 411, 510, -529, 668, 414, 434, 436, 205, -529,
+ -529, -529, 454, 9, 36, 551, 248, 363, 363, 268,
+ -43, 419, 59, 609, 363, 217, 417, -23, 363, 363,
+ 59, -529, 59, 24, 421, -27, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 521, 65, -529, 610, 353, 69, -529, 297, 193,
+ 612, 616, 415, 617, 222, -529, -529, 353, -529, 552,
+ 22, 418, -529, 363, -529, 620, -529, -529, -529, -529,
+ 363, -529, -529, 621, 443, 363, 363, -529, 455, -529,
+ 465, -70, -529, 668, 547, 508, -529, -529, 432, -529,
+ 435, -529, -529, 440, -529, -529, 444, -529, -529, -529,
+ -529, 445, -529, -529, 139, 547, 448, 449, -529, 19,
+ -529, 557, 363, 451, -529, 452, 555, -13, 201, 167,
+ 363, 363, -529, 551, 528, 119, -529, -529, -529, 529,
+ 538, 638, 59, 457, 335, -529, 548, 460, 638, 638,
+ 638, 638, 653, 653, 653, 653, 217, 217, 92, 92,
+ 92, -96, 461, -529, -529, 228, 652, 234, -529, -529,
+ -529, -529, -529, 227, 239, -529, 454, -529, 87, -529,
+ 459, -529, 39, -529, 589, -529, -529, -529, 658, -529,
+ -529, 69, 69, 600, -529, 547, -529, 504, -529, 472,
+ 241, -529, 662, 664, -529, 665, 666, 667, -529, -529,
+ 572, -529, 506, 65, -529, 139, -529, -529, 246, 547,
+ 547, -529, 484, -529, 253, 14, -529, 363, 668, 363,
+ 363, -529, 182, 211, 487, -529, 59, 638, 335, 489,
+ 264, -529, -529, -529, -529, -529, 676, 415, -529, -529,
+ 493, 585, -529, -529, -529, 611, 618, 626, 591, 22,
+ 685, -529, -529, -529, 568, -529, -529, -529, -77, -529,
+ -529, -529, 501, 265, 511, 512, 515, -529, -529, 314,
+ -529, -529, -529, 266, 271, 613, 557, 557, 363, 121,
+ 523, 69, 203, -529, 363, -529, 609, 527, 278, -529,
+ -529, -529, -529, 39, 22, -529, -529, -529, 22, 247,
+ 539, 363, -529, -529, -529, 722, -529, -529, -529, -529,
+ -529, 558, 614, 483, -529, -529, 279, -529, -529, -529,
+ 69, -529, -529, -529, -529, 463, 547, -22, 543, -529,
+ 363, 330, 557, 549, 363, 284, 363, -529, -529, 400,
+ -529, -529, -529, 553, 61, -529, 547, 69, -529, -529,
+ 69, -529, 25, 55, 188, -529, -529, 286, -529, -529,
+ 625, -529, -529, -529, 55, -529
};
-/* 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_int16 yydefact[] =
+ /* 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_uint16 yydefact[] =
{
- 333, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 335, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 30, 30, 30, 0,
- 353, 3, 21, 19, 21, 18, 8, 9, 7, 11,
- 16, 17, 13, 14, 12, 15, 10, 0, 332, 0,
- 307, 114, 33, 0, 54, 61, 61, 61, 0, 0,
- 0, 0, 306, 109, 0, 0, 0, 109, 109, 109,
- 0, 52, 0, 334, 335, 29, 26, 28, 27, 1,
- 333, 2, 0, 6, 5, 164, 123, 124, 154, 106,
- 0, 174, 0, 0, 310, 0, 0, 148, 37, 0,
+ 355, 3, 21, 19, 21, 18, 8, 9, 7, 11,
+ 16, 17, 13, 14, 12, 15, 10, 0, 334, 0,
+ 309, 114, 33, 0, 54, 61, 61, 61, 0, 0,
+ 0, 0, 308, 109, 0, 0, 0, 109, 109, 109,
+ 0, 52, 0, 336, 337, 29, 26, 28, 27, 1,
+ 335, 2, 0, 6, 5, 164, 123, 124, 154, 106,
+ 0, 174, 0, 0, 312, 0, 0, 148, 37, 0,
118, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 53, 0, 0, 4, 0, 0, 142, 136,
- 137, 135, 0, 139, 0, 0, 170, 308, 285, 288,
- 290, 0, 0, 291, 0, 286, 287, 0, 296, 0,
- 173, 175, 177, 179, 278, 279, 280, 289, 281, 282,
- 283, 284, 32, 31, 0, 309, 0, 0, 118, 0,
+ 137, 135, 0, 139, 0, 0, 170, 310, 287, 290,
+ 292, 0, 0, 293, 0, 288, 289, 0, 298, 0,
+ 173, 175, 177, 179, 280, 281, 282, 291, 283, 284,
+ 285, 286, 32, 31, 0, 311, 0, 0, 118, 0,
113, 0, 0, 0, 0, 148, 120, 108, 0, 131,
- 130, 38, 41, 41, 41, 107, 104, 105, 337, 336,
- 0, 290, 163, 141, 0, 154, 127, 126, 128, 138,
- 134, 0, 154, 0, 0, 320, 257, 258, 259, 260,
- 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
- 293, 0, 292, 295, 180, 181, 34, 0, 60, 0,
- 0, 333, 0, 0, 274, 0, 0, 0, 0, 0,
- 0, 0, 276, 0, 147, 183, 190, 191, 192, 185,
+ 130, 38, 41, 41, 41, 107, 104, 105, 339, 338,
+ 0, 292, 163, 141, 0, 154, 127, 126, 128, 138,
+ 134, 0, 154, 0, 0, 322, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
+ 295, 0, 294, 297, 180, 181, 34, 0, 60, 0,
+ 0, 335, 0, 0, 276, 0, 0, 0, 0, 0,
+ 0, 0, 278, 0, 147, 183, 190, 191, 192, 185,
187, 193, 186, 206, 194, 195, 196, 197, 189, 184,
- 199, 200, 0, 354, 0, 0, 116, 0, 0, 119,
+ 199, 200, 0, 356, 0, 0, 116, 0, 0, 119,
0, 110, 111, 0, 0, 51, 148, 50, 24, 0,
- 22, 145, 143, 171, 318, 170, 0, 153, 155, 160,
- 170, 166, 168, 165, 0, 132, 319, 321, 0, 294,
+ 22, 145, 143, 171, 320, 170, 0, 153, 155, 160,
+ 170, 166, 168, 165, 0, 132, 321, 323, 0, 296,
176, 0, 0, 57, 0, 0, 0, 0, 0, 62,
- 64, 65, 333, 142, 0, 0, 0, 0, 0, 0,
+ 64, 65, 335, 142, 0, 0, 0, 0, 0, 0,
0, 0, 0, 202, 0, 201, 0, 0, 0, 0,
0, 203, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 117, 0, 0, 122, 121, 109, 0,
0, 0, 0, 0, 0, 47, 36, 0, 20, 0,
- 0, 148, 144, 0, 316, 0, 317, 182, 125, 129,
- 0, 159, 158, 161, 320, 0, 0, 325, 0, 327,
- 0, 331, 322, 0, 0, 0, 83, 77, 0, 79,
+ 0, 148, 144, 0, 318, 0, 319, 182, 125, 129,
+ 0, 159, 158, 161, 322, 0, 0, 327, 0, 329,
+ 0, 333, 324, 0, 0, 0, 83, 77, 0, 79,
89, 80, 67, 0, 74, 75, 0, 71, 72, 78,
81, 86, 76, 68, 91, 0, 0, 0, 56, 0,
- 59, 241, 0, 275, 277, 0, 0, 0, 0, 0,
+ 59, 243, 0, 277, 279, 0, 0, 0, 0, 0,
0, 0, 225, 0, 0, 0, 198, 188, 217, 218,
0, 213, 0, 0, 0, 204, 0, 216, 215, 231,
232, 233, 234, 235, 236, 237, 208, 207, 210, 209,
- 211, 212, 0, 35, 355, 0, 0, 0, 48, 45,
- 43, 49, 40, 0, 0, 23, 333, 146, 297, 299,
- 0, 301, 314, 300, 150, 172, 315, 156, 0, 157,
- 133, 169, 167, 0, 328, 0, 330, 0, 323, 0,
+ 211, 212, 0, 35, 357, 0, 0, 0, 48, 45,
+ 43, 49, 40, 0, 0, 23, 335, 146, 299, 301,
+ 0, 303, 316, 302, 150, 172, 317, 156, 0, 157,
+ 133, 169, 167, 0, 330, 0, 332, 0, 325, 0,
0, 55, 0, 0, 73, 0, 0, 0, 82, 98,
0, 97, 0, 0, 66, 90, 92, 94, 0, 0,
- 0, 63, 0, 238, 0, 229, 0, 0, 0, 0,
- 223, 0, 0, 0, 271, 0, 214, 0, 0, 0,
- 205, 272, 115, 112, 39, 0, 0, 46, 25, 0,
- 0, 349, 341, 347, 345, 348, 343, 0, 0, 0,
- 313, 305, 311, 0, 140, 162, 326, 331, 329, 178,
- 58, 0, 0, 0, 0, 0, 99, 96, 118, 93,
- 95, 101, 0, 0, 243, 241, 0, 0, 227, 0,
- 226, 0, 230, 273, 0, 0, 221, 219, 44, 42,
- 314, 0, 344, 346, 342, 0, 298, 315, 0, 324,
- 70, 88, 0, 84, 69, 85, 103, 100, 0, 0,
- 154, 239, 255, 256, 224, 228, 222, 220, 302, 338,
- 350, 0, 152, 0, 102, 0, 246, 0, 0, 0,
- 0, 149, 87, 242, 247, 248, 249, 0, 0, 0,
- 351, 339, 312, 151, 240, 0, 0, 0, 254, 244,
- 0, 253, 251, 0, 252, 250, 340, 0, 245
+ 0, 63, 0, 238, 0, 142, 229, 0, 0, 0,
+ 0, 223, 0, 0, 0, 273, 0, 214, 0, 0,
+ 0, 205, 274, 115, 112, 39, 0, 0, 46, 25,
+ 0, 0, 351, 343, 349, 347, 350, 345, 0, 0,
+ 0, 315, 307, 313, 0, 140, 162, 328, 333, 331,
+ 178, 58, 0, 0, 0, 0, 0, 99, 96, 118,
+ 93, 95, 101, 0, 0, 245, 243, 243, 0, 0,
+ 0, 227, 0, 226, 0, 230, 275, 0, 0, 221,
+ 219, 44, 42, 316, 0, 346, 348, 344, 0, 300,
+ 317, 0, 326, 70, 88, 0, 84, 69, 85, 103,
+ 100, 0, 0, 154, 239, 240, 0, 257, 258, 224,
+ 228, 222, 220, 304, 340, 352, 0, 152, 0, 102,
+ 0, 248, 243, 0, 0, 0, 0, 149, 87, 244,
+ 249, 250, 251, 0, 0, 241, 0, 353, 341, 314,
+ 151, 242, 0, 0, 0, 256, 246, 0, 255, 253,
+ 0, 254, 252, 342, 0, 247
};
-/* YYPGOTO[NTERM-NUM]. */
+ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -568, -568, -568, 615, -568, 663, -568, 339, -568, 403,
- -568, -568, -568, -568, -322, -79, 264, 351, 236, -568,
- -568, -568, 391, -568, 297, -568, -335, -568, -568, -568,
- -568, 202, -568, -453, -568, -43, -568, -568, -568, -568,
- -568, -568, -142, -568, -568, 451, -210, -86, -568, 129,
- -50, -38, -568, -568, -84, 408, -568, -568, -568, -130,
- -568, -568, -170, -568, 338, -568, -568, -568, 77, -297,
- -568, -270, 503, 506, 359, -147, -208, -568, -568, -568,
- -568, -568, -568, 415, -568, -568, -568, 139, -568, -568,
- -568, -567, -568, -568, -154, -568, -568, -568, -568, -568,
- -568, -64, -568, -568, 584, -98, -568, -568, 588, -568,
- -568, -484, 119, -568, -568, -568, -2, -568, -568, 137,
- 465, -568, 363, -568, 457, -568, 171, -568, -568, -568,
- 631, -568, -568, -568, -568, -352
+ -529, -529, -529, 673, -529, 720, -529, 399, -529, 428,
+ -529, -529, -529, -529, -325, -79, 290, 422, 296, -529,
+ -529, -529, 453, -529, 354, -529, -338, -529, -529, -529,
+ -529, 260, -529, -429, -529, -45, -529, -529, -529, -529,
+ -529, -529, -142, -529, -529, 514, -202, -87, -529, 204,
+ -49, -5, -529, -529, -85, -278, -529, -529, -529, -139,
+ -529, -529, -171, -529, 403, -529, -529, -529, 127, -297,
+ -529, -67, 559, 563, 405, -147, -188, -529, -529, -529,
+ -529, -529, -529, 469, -529, -529, -529, -514, -529, -529,
+ -529, -528, -529, -529, -148, -529, -529, -529, -529, -529,
+ -529, -58, -529, -529, 632, -106, -529, -529, 633, -529,
+ -529, -496, 181, -529, -529, -529, -2, -529, -529, 186,
+ 509, -529, 406, -529, 496, -529, 229, -529, -529, -529,
+ 675, -529, -529, -529, -529, -354
};
-/* YYDEFGOTO[NTERM-NUM]. */
+ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- 0, 19, 20, 21, 22, 73, 259, 260, 23, 66,
+ -1, 19, 20, 21, 22, 73, 259, 260, 23, 66,
24, 143, 25, 26, 89, 162, 255, 344, 345, 27,
28, 29, 84, 288, 289, 290, 394, 488, 484, 494,
495, 496, 291, 497, 30, 93, 31, 251, 252, 32,
33, 34, 153, 35, 155, 156, 36, 175, 176, 177,
77, 112, 113, 180, 78, 174, 261, 351, 352, 150,
- 544, 621, 116, 267, 268, 363, 469, 108, 185, 262,
+ 545, 627, 116, 267, 268, 363, 469, 108, 185, 262,
129, 130, 131, 132, 263, 264, 225, 226, 227, 228,
- 229, 230, 231, 300, 232, 233, 234, 503, 600, 627,
- 628, 639, 235, 236, 198, 199, 200, 237, 238, 239,
+ 229, 230, 231, 300, 232, 233, 234, 503, 603, 633,
+ 634, 646, 235, 236, 198, 199, 200, 237, 238, 239,
240, 241, 134, 135, 136, 137, 138, 139, 140, 141,
- 457, 458, 459, 460, 461, 51, 462, 146, 540, 541,
- 542, 357, 275, 276, 277, 371, 478, 37, 38, 63,
- 64, 463, 537, 631, 71, 244
+ 457, 458, 459, 460, 461, 51, 462, 146, 541, 542,
+ 543, 357, 275, 276, 277, 371, 478, 37, 38, 63,
+ 64, 463, 538, 638, 71, 244
};
-/* 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. */
+ /* 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[] =
{
- 41, 283, 224, 44, 95, 265, 213, 415, 52, 172,
- 56, 303, 270, 305, 99, 100, 101, 133, 163, 164,
- 450, 173, 480, 403, 284, 249, 40, 40, 178, 182,
- 620, 178, 119, 120, 269, 75, 271, 273, 479, 149,
- 115, 354, 560, 498, 253, 354, 87, 210, 90, 279,
- 308, 308, 45, 635, 586, 39, 508, 308, 102, 570,
- 422, 367, 46, 308, 636, 445, 309, 309, 635, 643,
- 298, 299, 242, 309, 308, 316, 307, 454, 211, 309,
- 648, 316, 400, 147, 148, 340, 340, 423, 366, 333,
- 309, 158, 334, 47, 303, 118, 119, 120, 166, 167,
- 336, 610, 420, 246, 421, 504, 341, 525, 427, 428,
+ 41, 172, 224, 44, 265, 95, 213, 415, 52, 283,
+ 56, 270, 99, 100, 101, 402, 249, 450, 163, 164,
+ 480, 173, 284, 133, 40, 40, 173, 178, 182, 626,
+ 178, 303, 75, 305, 269, 479, 271, 273, 253, 403,
+ 316, 498, 354, 589, 109, 149, 87, 354, 90, 410,
+ 119, 120, 604, 605, 39, 279, 60, 97, 102, 361,
+ 475, 642, 214, 118, 119, 120, 561, 642, 40, 411,
+ 183, 299, 242, 115, 42, 412, 307, 425, 643, 210,
+ 110, 476, 477, 147, 148, 308, 362, 184, 476, 477,
+ 400, 158, 615, 308, 426, 331, 98, 61, 166, 167,
+ 336, 309, 43, 308, 246, 504, 216, 217, 635, 309,
+ 211, 114, 508, 531, 303, 650, 111, 346, 254, 309,
+ 334, 548, 420, 366, 421, 422, 655, 520, 427, 428,
429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
- 439, 440, 441, 547, 254, 97, 346, 519, 417, 602,
- 331, 342, 526, 368, 330, 183, 331, 133, 40, 121,
- 266, 55, 406, 133, 60, 614, 212, 562, 563, 308,
- 407, 408, 184, 248, 214, 118, 119, 120, 308, 57,
- 369, 418, 419, 539, 98, 309, 76, 355, 410, 58,
- 54, 370, 567, 306, 309, 348, 353, 124, 349, 122,
- 359, 398, 178, 94, 399, 61, 343, 343, 411, 308,
- 285, 286, 287, 109, 412, 123, 361, 215, 216, 217,
- 59, 109, 42, 401, 579, 309, 404, 281, 214, 118,
- 119, 120, 637, 269, 516, 638, 54, 456, 471, 472,
- 575, 464, 308, 362, 118, 119, 120, 637, 475, 110,
- 638, 308, 168, 442, 641, 642, 218, 110, 309, 122,
- 507, 124, 125, 126, 48, 405, 529, 309, 476, 477,
- 489, 215, 216, 217, 509, 123, 476, 477, 425, 619,
- 114, 571, 43, 511, 512, 111, 272, 490, 308, 49,
- 316, 133, 219, 111, 411, 426, 127, 640, 452, 522,
- 510, 453, 207, 133, 309, 62, 220, 334, 50, 128,
- 218, 612, 293, 122, 294, 446, 481, 308, 53, 604,
- 75, 124, 125, 126, 69, 245, 514, 573, 122, 123,
- 65, 353, 70, 309, 72, 491, 492, 298, 623, 493,
- 327, 328, 329, 330, 123, 331, 219, 624, 625, 626,
- 443, 79, 214, 118, 119, 120, 221, 222, 524, 82,
- 220, 453, 358, 528, 223, 88, 207, 364, 80, 128,
- 214, 118, 119, 120, 81, 124, 125, 126, 83, 566,
- 91, 568, 569, 513, 186, 187, 188, 189, 190, 191,
- 124, 125, 126, 92, 518, 215, 216, 217, 106, 550,
- 561, 565, 334, 334, 353, 577, 96, 75, 353, 591,
- 221, 222, 592, 215, 216, 217, 530, 597, 223, 103,
- 334, 598, 107, 128, 334, 127, 607, 644, 645, 353,
- 214, 118, 119, 120, 218, 117, 596, 122, 128, 632,
- 67, 68, 334, 646, 605, 104, 334, 256, 257, 142,
- 616, 144, 218, 123, 145, 122, 531, 85, 86, 149,
- 152, 532, 151, 157, 154, 159, 160, 161, 533, 534,
- 219, 123, 310, 301, 216, 217, 530, 165, 54, 214,
- 118, 119, 120, 170, 220, 535, 171, 574, 219, -350,
- 536, 630, 179, 633, 173, 202, 181, 201, 203, 124,
- 125, 126, 220, 206, 207, 208, 209, 243, 247, 311,
- 250, 558, 218, 258, 114, 122, 531, 124, 125, 126,
- 274, 532, 282, 216, 217, 15, 295, 292, 533, 534,
- 296, 123, 297, 304, 221, 222, 335, 332, 338, 339,
- 347, 350, 223, 365, 374, 535, 373, 128, 302, -350,
- 536, 353, 221, 222, 360, 375, 312, 395, 396, 397,
- 223, 218, 220, 75, 122, 128, 413, 444, 416, 448,
- 449, 424, 451, 466, 468, 473, 313, 124, 125, 126,
- 123, 474, 482, 314, 315, 483, 485, -303, 486, 487,
- 499, 316, 317, 500, 502, 506, 422, 302, 186, 187,
- 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 505, 220, 221, 222, 308, 517, 520, 331, 523, 543,
- 223, 521, 538, 545, 546, 128, 124, 125, 126, 318,
- 319, 320, 321, 322, 549, 548, 323, 324, -352, 325,
- 326, 327, 328, 329, 330, 1, 331, -304, 551, 552,
- 553, 554, 555, 2, 578, 556, 557, 564, 581, 530,
- 3, 221, 222, 572, 576, 4, 580, 582, 1, 223,
- 583, 584, 585, 587, 128, 5, 2, 590, 6, 7,
- 588, 593, 599, 3, 594, 613, 595, 603, 4, 611,
- 8, 9, 647, 493, 606, 615, 622, 634, 5, 531,
- 10, 6, 7, 11, 532, 105, 629, 74, 455, 527,
- 447, 533, 534, 8, 9, 617, 501, 559, 467, 337,
- 609, 402, 376, 10, 601, 12, 11, 278, 535, 13,
- 280, 204, 465, 536, 409, 205, 377, 608, 589, 0,
- 378, 379, 380, 381, 382, 14, 383, 470, 12, 356,
- 0, 15, 13, 372, 384, 169, 0, 0, 311, 0,
- 0, 0, 0, 0, 618, 0, 0, 0, 14, 0,
- 0, 0, 0, 0, 15, 0, 311, 0, 0, 385,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 16, 17, 18, 0, 386, 0, 387,
- 388, 311, 0, 0, 0, 312, 0, 0, 0, 0,
- 0, 0, 0, 0, 389, 0, 16, 17, 18, 390,
- 515, 391, 0, 312, 0, 414, 0, 0, 0, 0,
- 311, 392, 0, 315, 0, 0, 0, 0, 0, 0,
- 316, 317, 0, 414, 0, 0, 0, 0, -353, 0,
- 0, 315, 0, 0, 0, 0, 0, 0, 316, 317,
- 0, 0, 0, 0, 393, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 315, 0, 318, 319,
- 320, 321, 322, 316, -353, 323, 324, 0, 325, 326,
- 327, 328, 329, 330, 0, 331, 318, 319, 320, 321,
- 322, 0, 0, 323, 324, 315, 325, 326, 327, 328,
- 329, 330, 316, 331, 0, 0, 0, 0, 0, 0,
- 0, -353, -353, -353, 321, 322, 0, 0, 323, 324,
- 0, 325, 326, 327, 328, 329, 330, 0, 331, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, -353, -353, 0, 0, -353, -353, 0,
- 325, 326, 327, 328, 329, 330, 0, 331
+ 439, 440, 441, 133, 218, 563, 564, 122, 406, 133,
+ 407, 408, 423, 532, 214, 118, 119, 120, 533, 248,
+ 308, 418, 419, 123, 540, 534, 535, 54, 367, 355,
+ 570, 417, 619, 266, 306, 353, 309, 48, 212, 359,
+ 302, 178, 536, 45, 308, 308, -352, 537, 285, 286,
+ 287, 648, 649, 46, 220, 124, 340, 215, 216, 217,
+ 309, 309, 582, 401, 118, 119, 120, 281, 567, 124,
+ 125, 126, 464, 269, 54, 456, 55, 341, 471, 472,
+ 644, 578, 404, 645, 47, 442, 644, 568, 316, 645,
+ 340, 49, 333, 109, 517, 334, 218, 308, 50, 122,
+ 368, 76, 342, 489, 221, 222, 405, 214, 118, 119,
+ 120, 526, 223, 309, 530, 123, 75, 128, 94, 510,
+ 490, 245, 625, 512, 513, 57, 272, 369, 445, 110,
+ 53, 606, 219, 531, 65, 58, 527, 133, 370, 411,
+ 454, 330, 647, 331, -305, 511, 220, 69, 122, 133,
+ 215, 216, 217, 446, 617, 62, 481, 343, 308, 70,
+ 573, 124, 125, 126, 123, 111, 59, 168, 491, 492,
+ 509, 515, 493, 532, 309, 607, 353, 308, 533, 308,
+ 574, 609, 293, 629, 294, 534, 535, 308, 576, 218,
+ 443, 343, 122, 309, 72, 309, 221, 222, 214, 118,
+ 119, 120, 536, 309, 223, 79, -352, 537, 123, 128,
+ 124, 125, 126, 316, 651, 652, 298, 118, 119, 120,
+ 569, 80, 571, 572, 514, 219, 214, 118, 119, 120,
+ 214, 118, 119, 120, 348, 519, 81, 349, 83, 220,
+ 298, 215, 216, 217, 308, 127, 186, 187, 188, 189,
+ 190, 191, 358, 75, 124, 125, 126, 364, 128, 398,
+ 309, 121, 399, 327, 328, 329, 330, 82, 331, 215,
+ 216, 217, 310, 301, 216, 217, 452, 599, 88, 453,
+ 218, 91, 523, 122, 92, 207, 96, 610, 525, 221,
+ 222, 453, 621, 529, 103, 551, 207, 223, 334, 123,
+ 562, 122, 128, 334, -306, 67, 68, 566, 218, 311,
+ 353, 122, 218, 256, 257, 122, 219, 123, 580, 594,
+ 600, 353, 595, 334, 104, 601, 106, 123, 334, 577,
+ 220, 123, 612, 622, 107, 353, 353, 637, 639, 640,
+ 653, 334, 117, 334, 219, 124, 125, 126, 302, 531,
+ 142, 559, 630, 631, 632, 144, 312, 145, 220, 85,
+ 86, 149, 220, 124, 125, 126, 151, 152, 154, 159,
+ 157, 160, 161, 124, 125, 126, 313, 124, 125, 126,
+ 221, 222, 165, 314, 315, 54, 170, 171, 223, 532,
+ 173, 316, 317, 128, 533, 179, 181, 201, 127, 202,
+ 203, 534, 535, 206, 207, 623, 208, 209, 221, 222,
+ 243, 128, 221, 222, 247, 258, 223, 250, 536, 114,
+ 223, 128, 274, 537, 282, 128, 292, 15, 295, 318,
+ 319, 320, 321, 322, 296, 297, 323, 324, -354, 325,
+ 326, 327, 328, 329, 330, 1, 331, 304, 332, 338,
+ 335, 339, 311, 2, 624, 347, 350, 353, 360, 365,
+ 3, 373, 1, 375, 374, 4, 396, 395, 397, 75,
+ 2, 416, 413, 444, 424, 5, 448, 3, 6, 7,
+ 449, 451, 4, 466, 468, 482, 474, 473, 483, 422,
+ 8, 9, 5, 485, 502, 6, 7, 486, 487, 312,
+ 10, 499, 500, 11, 505, 308, 506, 8, 9, 507,
+ 518, 331, 521, 522, 516, 524, 539, 10, 544, 414,
+ 11, 546, 547, 311, 549, 12, 550, 315, 552, 13,
+ 553, 554, 555, 556, 316, 317, 557, 565, 558, 376,
+ 581, 575, 12, 579, 584, 14, 13, 583, 590, 585,
+ 588, 15, 311, 377, 591, 593, 586, 378, 379, 380,
+ 381, 382, 14, 383, 587, 596, 597, 311, 15, 598,
+ 312, 384, 318, 319, 320, 321, 322, 608, 602, 323,
+ 324, 611, 325, 326, 327, 328, 329, 330, 618, 331,
+ 414, 493, 616, 16, 17, 18, 385, 628, 315, -355,
+ 620, 654, 636, 105, 74, 316, 317, 641, 455, 528,
+ 16, 17, 18, 501, 386, 560, 387, 388, 465, 204,
+ 205, 447, 337, 467, 278, 614, 280, 315, 409, 613,
+ 470, 389, 372, 356, 316, -355, 390, 592, 391, 169,
+ 0, 0, 315, 318, 319, 320, 321, 322, 392, 316,
+ 323, 324, 0, 325, 326, 327, 328, 329, 330, 0,
+ 331, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -355, -355, -355, 321, 322, 0, 0, 323,
+ 324, 393, 325, 326, 327, 328, 329, 330, 0, 331,
+ -355, -355, 0, 0, -355, -355, 0, 325, 326, 327,
+ 328, 329, 330, 0, 331, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 195, 196, 197
};
static const yytype_int16 yycheck[] =
{
- 2, 211, 149, 5, 54, 175, 148, 304, 10, 107,
- 12, 219, 182, 221, 57, 58, 59, 81, 97, 98,
- 342, 12, 374, 3, 3, 155, 3, 3, 112, 115,
- 51, 115, 5, 6, 181, 58, 183, 184, 373, 83,
- 78, 3, 495, 395, 113, 3, 48, 94, 50, 203,
- 116, 116, 70, 6, 538, 27, 109, 116, 60, 118,
- 101, 62, 80, 116, 17, 335, 132, 132, 6, 636,
- 112, 218, 151, 132, 116, 136, 223, 347, 125, 132,
- 647, 136, 292, 85, 86, 3, 3, 128, 55, 194,
- 132, 93, 197, 111, 302, 4, 5, 6, 100, 101,
- 247, 585, 310, 153, 312, 402, 24, 24, 316, 317,
+ 2, 107, 149, 5, 175, 54, 148, 304, 10, 211,
+ 12, 182, 57, 58, 59, 293, 155, 342, 97, 98,
+ 374, 12, 3, 81, 3, 3, 12, 112, 115, 51,
+ 115, 219, 58, 221, 181, 373, 183, 184, 113, 3,
+ 136, 395, 3, 539, 9, 83, 48, 3, 50, 92,
+ 5, 6, 566, 567, 27, 203, 19, 94, 60, 90,
+ 130, 6, 3, 4, 5, 6, 495, 6, 3, 112,
+ 55, 218, 151, 78, 3, 118, 223, 104, 17, 94,
+ 45, 158, 159, 85, 86, 116, 117, 72, 158, 159,
+ 292, 93, 588, 116, 121, 191, 133, 60, 100, 101,
+ 247, 132, 3, 116, 153, 402, 47, 48, 622, 132,
+ 125, 76, 125, 26, 302, 643, 81, 256, 193, 132,
+ 197, 475, 310, 55, 312, 101, 654, 424, 316, 317,
318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
- 328, 329, 330, 475, 193, 94, 256, 424, 194, 194,
- 191, 49, 49, 134, 189, 55, 191, 201, 3, 48,
- 178, 12, 296, 207, 19, 598, 193, 499, 500, 116,
- 297, 298, 72, 197, 3, 4, 5, 6, 116, 70,
- 161, 308, 309, 125, 133, 132, 37, 125, 92, 80,
- 193, 172, 507, 223, 132, 194, 197, 150, 197, 88,
- 266, 194, 266, 54, 197, 60, 104, 104, 112, 116,
- 169, 170, 171, 9, 118, 104, 90, 46, 47, 48,
- 111, 9, 3, 194, 526, 132, 186, 209, 3, 4,
- 5, 6, 165, 360, 422, 168, 193, 193, 365, 366,
- 517, 351, 116, 117, 4, 5, 6, 165, 130, 45,
- 168, 116, 103, 331, 166, 167, 85, 45, 132, 88,
- 125, 150, 151, 152, 94, 295, 456, 132, 158, 159,
- 104, 46, 47, 48, 92, 104, 158, 159, 104, 611,
- 76, 109, 3, 410, 411, 81, 115, 121, 116, 94,
- 136, 335, 121, 81, 112, 121, 185, 629, 194, 194,
- 118, 197, 197, 347, 132, 3, 135, 197, 98, 198,
- 85, 588, 193, 88, 195, 338, 375, 116, 80, 118,
- 58, 150, 151, 152, 0, 63, 192, 515, 88, 104,
- 154, 197, 196, 132, 113, 169, 170, 112, 615, 173,
- 186, 187, 188, 189, 104, 191, 121, 162, 163, 164,
- 332, 3, 3, 4, 5, 6, 185, 186, 194, 94,
- 135, 197, 265, 194, 193, 3, 197, 270, 195, 198,
- 3, 4, 5, 6, 193, 150, 151, 152, 127, 506,
- 123, 508, 509, 413, 138, 139, 140, 141, 142, 143,
- 150, 151, 152, 127, 424, 46, 47, 48, 97, 194,
- 194, 194, 197, 197, 197, 194, 133, 58, 197, 194,
- 185, 186, 197, 46, 47, 48, 26, 194, 193, 125,
- 197, 194, 124, 198, 197, 185, 194, 166, 167, 197,
- 3, 4, 5, 6, 85, 3, 558, 88, 198, 194,
- 17, 18, 197, 194, 571, 197, 197, 163, 164, 4,
- 600, 121, 85, 104, 3, 88, 66, 46, 47, 83,
- 193, 71, 93, 46, 3, 194, 194, 4, 78, 79,
- 121, 104, 17, 46, 47, 48, 26, 3, 193, 3,
- 4, 5, 6, 193, 135, 95, 6, 517, 121, 99,
- 100, 618, 115, 620, 12, 4, 126, 193, 4, 150,
- 151, 152, 135, 194, 197, 46, 131, 3, 174, 54,
- 91, 493, 85, 3, 76, 88, 66, 150, 151, 152,
- 119, 71, 3, 47, 48, 113, 193, 125, 78, 79,
- 193, 104, 193, 191, 185, 186, 193, 98, 39, 193,
- 193, 94, 193, 55, 193, 95, 125, 198, 121, 99,
- 100, 197, 185, 186, 197, 93, 101, 193, 172, 172,
- 193, 85, 135, 58, 88, 198, 193, 3, 194, 4,
- 4, 193, 4, 3, 3, 172, 121, 150, 151, 152,
- 104, 161, 193, 128, 129, 193, 193, 197, 193, 193,
- 193, 136, 137, 193, 77, 94, 101, 121, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 194, 135, 185, 186, 116, 193, 104, 191, 3, 69,
- 193, 192, 197, 3, 62, 198, 150, 151, 152, 174,
- 175, 176, 177, 178, 194, 160, 181, 182, 0, 184,
- 185, 186, 187, 188, 189, 7, 191, 197, 6, 6,
- 6, 6, 6, 15, 4, 104, 172, 193, 99, 26,
- 22, 185, 186, 194, 194, 27, 194, 78, 7, 193,
- 78, 78, 99, 3, 198, 37, 15, 194, 40, 41,
- 126, 194, 105, 22, 194, 6, 194, 194, 27, 193,
- 52, 53, 116, 173, 194, 126, 194, 194, 37, 66,
- 62, 40, 41, 65, 71, 70, 193, 24, 349, 453,
- 339, 78, 79, 52, 53, 82, 399, 495, 360, 248,
- 581, 293, 11, 62, 565, 87, 65, 201, 95, 91,
- 207, 127, 353, 100, 299, 127, 25, 580, 547, -1,
- 29, 30, 31, 32, 33, 107, 35, 364, 87, 264,
- -1, 113, 91, 276, 43, 104, -1, -1, 54, -1,
- -1, -1, -1, -1, 131, -1, -1, -1, 107, -1,
- -1, -1, -1, -1, 113, -1, 54, -1, -1, 68,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 155, 156, 157, -1, 86, -1, 88,
- 89, 54, -1, -1, -1, 101, -1, -1, -1, -1,
- -1, -1, -1, -1, 103, -1, 155, 156, 157, 108,
- 116, 110, -1, 101, -1, 121, -1, -1, -1, -1,
- 54, 120, -1, 129, -1, -1, -1, -1, -1, -1,
- 136, 137, -1, 121, -1, -1, -1, -1, 101, -1,
- -1, 129, -1, -1, -1, -1, -1, -1, 136, 137,
- -1, -1, -1, -1, 153, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 129, -1, 174, 175,
- 176, 177, 178, 136, 137, 181, 182, -1, 184, 185,
- 186, 187, 188, 189, -1, 191, 174, 175, 176, 177,
- 178, -1, -1, 181, 182, 129, 184, 185, 186, 187,
- 188, 189, 136, 191, -1, -1, -1, -1, -1, -1,
- -1, 174, 175, 176, 177, 178, -1, -1, 181, 182,
- -1, 184, 185, 186, 187, 188, 189, -1, 191, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 177, 178, -1, -1, 181, 182, -1,
- 184, 185, 186, 187, 188, 189, -1, 191
+ 328, 329, 330, 201, 85, 499, 500, 88, 296, 207,
+ 297, 298, 128, 66, 3, 4, 5, 6, 71, 197,
+ 116, 308, 309, 104, 125, 78, 79, 193, 62, 125,
+ 508, 194, 601, 178, 223, 197, 132, 94, 193, 266,
+ 121, 266, 95, 70, 116, 116, 99, 100, 169, 170,
+ 171, 166, 167, 80, 135, 150, 3, 46, 47, 48,
+ 132, 132, 527, 194, 4, 5, 6, 209, 194, 150,
+ 151, 152, 351, 360, 193, 193, 12, 24, 365, 366,
+ 165, 518, 186, 168, 111, 331, 165, 505, 136, 168,
+ 3, 94, 194, 9, 422, 197, 85, 116, 98, 88,
+ 134, 37, 49, 104, 185, 186, 295, 3, 4, 5,
+ 6, 24, 193, 132, 456, 104, 58, 198, 54, 92,
+ 121, 63, 616, 410, 411, 70, 115, 161, 335, 45,
+ 80, 568, 121, 26, 154, 80, 49, 335, 172, 112,
+ 347, 189, 636, 191, 197, 118, 135, 0, 88, 347,
+ 46, 47, 48, 338, 591, 3, 375, 104, 116, 196,
+ 118, 150, 151, 152, 104, 81, 111, 103, 169, 170,
+ 109, 192, 173, 66, 132, 194, 197, 116, 71, 116,
+ 109, 118, 193, 620, 195, 78, 79, 116, 516, 85,
+ 332, 104, 88, 132, 113, 132, 185, 186, 3, 4,
+ 5, 6, 95, 132, 193, 3, 99, 100, 104, 198,
+ 150, 151, 152, 136, 166, 167, 112, 4, 5, 6,
+ 507, 195, 509, 510, 413, 121, 3, 4, 5, 6,
+ 3, 4, 5, 6, 194, 424, 193, 197, 127, 135,
+ 112, 46, 47, 48, 116, 185, 138, 139, 140, 141,
+ 142, 143, 265, 58, 150, 151, 152, 270, 198, 194,
+ 132, 48, 197, 186, 187, 188, 189, 94, 191, 46,
+ 47, 48, 17, 46, 47, 48, 194, 559, 3, 197,
+ 85, 123, 194, 88, 127, 197, 133, 574, 194, 185,
+ 186, 197, 603, 194, 125, 194, 197, 193, 197, 104,
+ 194, 88, 198, 197, 197, 17, 18, 194, 85, 54,
+ 197, 88, 85, 163, 164, 88, 121, 104, 194, 194,
+ 194, 197, 197, 197, 197, 194, 97, 104, 197, 518,
+ 135, 104, 194, 194, 124, 197, 197, 624, 194, 626,
+ 194, 197, 3, 197, 121, 150, 151, 152, 121, 26,
+ 4, 493, 162, 163, 164, 121, 101, 3, 135, 46,
+ 47, 83, 135, 150, 151, 152, 93, 193, 3, 194,
+ 46, 194, 4, 150, 151, 152, 121, 150, 151, 152,
+ 185, 186, 3, 128, 129, 193, 193, 6, 193, 66,
+ 12, 136, 137, 198, 71, 115, 126, 193, 185, 4,
+ 4, 78, 79, 194, 197, 82, 46, 131, 185, 186,
+ 3, 198, 185, 186, 174, 3, 193, 91, 95, 76,
+ 193, 198, 119, 100, 3, 198, 125, 113, 193, 174,
+ 175, 176, 177, 178, 193, 193, 181, 182, 0, 184,
+ 185, 186, 187, 188, 189, 7, 191, 191, 98, 39,
+ 193, 193, 54, 15, 131, 193, 94, 197, 197, 55,
+ 22, 125, 7, 93, 193, 27, 172, 193, 172, 58,
+ 15, 194, 193, 3, 193, 37, 4, 22, 40, 41,
+ 4, 4, 27, 3, 3, 193, 161, 172, 193, 101,
+ 52, 53, 37, 193, 77, 40, 41, 193, 193, 101,
+ 62, 193, 193, 65, 193, 116, 194, 52, 53, 94,
+ 193, 191, 104, 192, 116, 3, 197, 62, 69, 121,
+ 65, 3, 62, 54, 160, 87, 194, 129, 6, 91,
+ 6, 6, 6, 6, 136, 137, 104, 193, 172, 11,
+ 4, 194, 87, 194, 99, 107, 91, 194, 3, 78,
+ 99, 113, 54, 25, 126, 194, 78, 29, 30, 31,
+ 32, 33, 107, 35, 78, 194, 194, 54, 113, 194,
+ 101, 43, 174, 175, 176, 177, 178, 194, 105, 181,
+ 182, 194, 184, 185, 186, 187, 188, 189, 6, 191,
+ 121, 173, 193, 155, 156, 157, 68, 194, 129, 101,
+ 126, 116, 193, 70, 24, 136, 137, 194, 349, 453,
+ 155, 156, 157, 399, 86, 495, 88, 89, 353, 127,
+ 127, 339, 248, 360, 201, 584, 207, 129, 299, 583,
+ 364, 103, 276, 264, 136, 137, 108, 548, 110, 104,
+ -1, -1, 129, 174, 175, 176, 177, 178, 120, 136,
+ 181, 182, -1, 184, 185, 186, 187, 188, 189, -1,
+ 191, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 174, 175, 176, 177, 178, -1, -1, 181,
+ 182, 153, 184, 185, 186, 187, 188, 189, -1, 191,
+ 177, 178, -1, -1, 181, 182, -1, 184, 185, 186,
+ 187, 188, 189, -1, 191, 138, 139, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 149
};
-/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
- state STATE-NUM. */
-static const yytype_int16 yystos[] =
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint16 yystos[] =
{
0, 7, 15, 22, 27, 37, 40, 41, 52, 53,
62, 65, 87, 91, 107, 113, 155, 156, 157, 200,
@@ -1445,25 +1347,26 @@ static const yytype_int16 yystos[] =
321, 274, 274, 172, 161, 130, 158, 159, 325, 225,
334, 214, 193, 193, 227, 193, 193, 193, 226, 104,
121, 169, 170, 173, 228, 229, 230, 232, 334, 193,
- 193, 223, 77, 286, 268, 194, 94, 125, 109, 92,
- 118, 274, 274, 249, 192, 116, 275, 193, 249, 268,
- 104, 192, 194, 3, 194, 24, 49, 217, 194, 245,
- 26, 66, 71, 78, 79, 95, 100, 331, 197, 125,
- 317, 318, 319, 69, 259, 3, 62, 334, 160, 194,
- 194, 6, 6, 6, 6, 6, 104, 172, 315, 230,
- 232, 194, 334, 334, 193, 194, 274, 225, 274, 274,
- 118, 109, 194, 275, 249, 268, 194, 194, 4, 213,
- 194, 99, 78, 78, 78, 99, 310, 3, 126, 325,
- 194, 194, 197, 194, 194, 194, 241, 194, 194, 105,
- 287, 286, 194, 194, 118, 274, 194, 194, 318, 311,
- 310, 193, 268, 6, 232, 126, 261, 82, 131, 334,
- 51, 260, 194, 268, 162, 163, 164, 288, 289, 193,
- 274, 332, 194, 274, 194, 6, 17, 165, 168, 290,
- 334, 166, 167, 290, 166, 167, 194, 116, 290
+ 193, 223, 77, 286, 268, 193, 194, 94, 125, 109,
+ 92, 118, 274, 274, 249, 192, 116, 275, 193, 249,
+ 268, 104, 192, 194, 3, 194, 24, 49, 217, 194,
+ 245, 26, 66, 71, 78, 79, 95, 100, 331, 197,
+ 125, 317, 318, 319, 69, 259, 3, 62, 334, 160,
+ 194, 194, 6, 6, 6, 6, 6, 104, 172, 315,
+ 230, 232, 194, 334, 334, 193, 194, 194, 254, 274,
+ 225, 274, 274, 118, 109, 194, 275, 249, 268, 194,
+ 194, 4, 213, 194, 99, 78, 78, 78, 99, 310,
+ 3, 126, 325, 194, 194, 197, 194, 194, 194, 241,
+ 194, 194, 105, 287, 286, 286, 268, 194, 194, 118,
+ 274, 194, 194, 318, 311, 310, 193, 268, 6, 232,
+ 126, 261, 194, 82, 131, 334, 51, 260, 194, 268,
+ 162, 163, 164, 288, 289, 286, 193, 274, 332, 194,
+ 274, 194, 6, 17, 165, 168, 290, 334, 166, 167,
+ 290, 166, 167, 194, 116, 290
};
-/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
-static const yytype_int16 yyr1[] =
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
{
0, 199, 200, 201, 201, 202, 202, 202, 202, 202,
203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
@@ -1489,22 +1392,22 @@ static const yytype_int16 yyr1[] =
278, 278, 278, 278, 278, 278, 278, 279, 279, 280,
280, 280, 280, 281, 281, 281, 281, 282, 282, 283,
283, 284, 284, 284, 284, 284, 284, 284, 285, 285,
- 286, 286, 287, 287, 288, 288, 288, 289, 289, 289,
- 290, 290, 290, 290, 290, 291, 292, 293, 293, 293,
- 293, 293, 293, 294, 294, 294, 294, 294, 294, 295,
- 295, 296, 297, 298, 299, 299, 299, 299, 300, 300,
- 300, 300, 300, 300, 300, 301, 302, 302, 303, 303,
- 304, 305, 306, 307, 307, 307, 308, 309, 309, 310,
- 310, 311, 311, 312, 312, 313, 314, 315, 315, 316,
- 316, 317, 317, 318, 318, 319, 319, 320, 320, 321,
- 321, 322, 322, 323, 323, 324, 324, 324, 324, 325,
- 325, 325, 326, 326, 327, 328, 328, 329, 330, 330,
- 330, 331, 331, 331, 331, 331, 331, 331, 331, 331,
- 331, 332, 333, 333, 334, 334
+ 285, 285, 286, 286, 287, 287, 288, 288, 288, 289,
+ 289, 289, 290, 290, 290, 290, 290, 291, 292, 293,
+ 293, 293, 293, 293, 293, 294, 294, 294, 294, 294,
+ 294, 295, 295, 296, 297, 298, 299, 299, 299, 299,
+ 300, 300, 300, 300, 300, 300, 300, 301, 302, 302,
+ 303, 303, 304, 305, 306, 307, 307, 307, 308, 309,
+ 309, 310, 310, 311, 311, 312, 312, 313, 314, 315,
+ 315, 316, 316, 317, 317, 318, 318, 319, 319, 320,
+ 320, 321, 321, 322, 322, 323, 323, 324, 324, 324,
+ 324, 325, 325, 325, 326, 326, 327, 328, 328, 329,
+ 330, 330, 330, 331, 331, 331, 331, 331, 331, 331,
+ 331, 331, 331, 332, 333, 333, 334, 334
};
-/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
-static const yytype_int8 yyr2[] =
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
{
0, 2, 2, 1, 3, 2, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -1530,54 +1433,54 @@ static const yytype_int8 yyr2[] =
3, 3, 3, 3, 4, 3, 3, 3, 3, 5,
6, 5, 6, 4, 6, 3, 5, 4, 5, 4,
5, 3, 3, 3, 3, 3, 3, 3, 4, 6,
- 6, 0, 3, 0, 2, 5, 0, 1, 1, 1,
- 2, 2, 2, 2, 1, 6, 6, 1, 1, 1,
+ 6, 8, 6, 0, 3, 0, 2, 5, 0, 1,
+ 1, 1, 2, 2, 2, 2, 1, 6, 6, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 4, 5, 1, 3, 1, 3, 1, 1,
+ 1, 1, 1, 4, 4, 5, 1, 3, 1, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 2, 3, 2, 1, 1, 3, 1,
- 1, 1, 4, 1, 3, 2, 1, 1, 3, 1,
- 0, 1, 5, 1, 0, 2, 1, 1, 0, 1,
- 0, 1, 2, 3, 5, 1, 3, 1, 2, 2,
- 1, 0, 1, 0, 2, 1, 3, 3, 4, 6,
- 8, 1, 2, 1, 2, 1, 2, 1, 1, 1,
- 0, 1, 1, 0, 1, 3
+ 1, 1, 1, 1, 2, 2, 3, 2, 1, 1,
+ 3, 1, 1, 1, 4, 1, 3, 2, 1, 1,
+ 3, 1, 0, 1, 5, 1, 0, 2, 1, 1,
+ 0, 1, 0, 1, 2, 3, 5, 1, 3, 1,
+ 2, 2, 1, 0, 1, 0, 2, 1, 3, 3,
+ 4, 6, 8, 1, 2, 1, 2, 1, 2, 1,
+ 1, 1, 0, 1, 1, 0, 1, 3
};
-enum { YYENOMEM = -2 };
-
#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = SQL_HSQL_EMPTY)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
-#define YYNOMEM goto yyexhaustedlab
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(Token, Value) \
- do \
- if (yychar == SQL_HSQL_EMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
- while (0)
-
-/* Backward compatibility with an undocumented macro.
- Use SQL_HSQL_error or SQL_HSQL_UNDEF. */
-#define YYERRCODE SQL_HSQL_UNDEF
+#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
@@ -1621,27 +1524,20 @@ do { \
} while (0)
-/* YYLOCATION_PRINT -- Print the location on the stream.
+/* 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 YYLOCATION_PRINT
-
-# if defined YY_LOCATION_PRINT
-
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YYLOCATION_PRINT(File, Loc) YY_LOCATION_PRINT(File, *(Loc))
-
-# elif defined HSQL_LTYPE_IS_TRIVIAL && HSQL_LTYPE_IS_TRIVIAL
+#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 int
+static unsigned
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
- int res = 0;
+ unsigned res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
@@ -1661,73 +1557,65 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
-}
-
-# define YYLOCATION_PRINT yy_location_print_
+ }
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YY_LOCATION_PRINT(File, Loc) YYLOCATION_PRINT(File, &(Loc))
+# define YY_LOCATION_PRINT(File, Loc) \
+ yy_location_print_ (File, &(Loc))
-# else
-
-# define YYLOCATION_PRINT(File, Loc) ((void) 0)
- /* Temporary convenience wrapper in case some people defined the
- undocumented and private YY_LOCATION_PRINT macros. */
-# define YY_LOCATION_PRINT YYLOCATION_PRINT
-
-# endif
-# endif /* !defined YYLOCATION_PRINT */
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
- Kind, Value, Location, result, scanner); \
+ Type, Value, Location, result, scanner); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
-/*-----------------------------------.
-| Print this symbol's value on YYO. |
-`-----------------------------------*/
+/*----------------------------------------.
+| Print this symbol's value on YYOUTPUT. |
+`----------------------------------------*/
static void
-yy_symbol_value_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
{
- FILE *yyoutput = yyo;
- YY_USE (yyoutput);
- YY_USE (yylocationp);
- YY_USE (result);
- YY_USE (scanner);
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ YYUSE (yylocationp);
+ YYUSE (result);
+ YYUSE (scanner);
if (!yyvaluep)
return;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YY_USE (yykind);
- YY_IGNORE_MAYBE_UNINITIALIZED_END
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
}
-/*---------------------------.
-| Print this symbol on YYO. |
-`---------------------------*/
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
static void
-yy_symbol_print (FILE *yyo,
- yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
{
- YYFPRINTF (yyo, "%s %s (",
- yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
+ YYFPRINTF (yyoutput, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
- YYLOCATION_PRINT (yyo, yylocationp);
- YYFPRINTF (yyo, ": ");
- yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, result, scanner);
- YYFPRINTF (yyo, ")");
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, result, scanner);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -1736,7 +1624,7 @@ yy_symbol_print (FILE *yyo,
`------------------------------------------------------------------*/
static void
-yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
@@ -1759,22 +1647,21 @@ do { \
`------------------------------------------------*/
static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
- int yyrule, hsql::SQLParserResult* result, yyscan_t scanner)
+yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, hsql::SQLParserResult* result, yyscan_t scanner)
{
- int yylno = yyrline[yyrule];
+ unsigned long int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
+ 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,
- YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
- &yyvsp[(yyi + 1) - (yynrhs)],
- &(yylsp[(yyi + 1) - (yynrhs)]), result, scanner);
+ yystos[yyssp[yyi + 1 - yynrhs]],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , result, scanner);
YYFPRINTF (stderr, "\n");
}
}
@@ -1789,8 +1676,8 @@ do { \
multiple parsers can coexist. */
int yydebug;
#else /* !HSQL_DEBUG */
-# define YYDPRINTF(Args) ((void) 0)
-# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
+# 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 */
@@ -1813,77 +1700,28 @@ int yydebug;
#endif
-/* Context of a parse error. */
-typedef struct
-{
- yy_state_t *yyssp;
- yysymbol_kind_t yytoken;
- YYLTYPE *yylloc;
-} yypcontext_t;
-
-/* Put in YYARG at most YYARGN of the expected tokens given the
- current YYCTX, and return the number of tokens stored in YYARG. If
- YYARG is null, return the number of expected tokens (guaranteed to
- be less than YYNTOKENS). Return YYENOMEM on memory exhaustion.
- Return 0 if there are more than YYARGN expected tokens, yet fill
- YYARG up to YYARGN. */
-static int
-yypcontext_expected_tokens (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
-{
- /* Actual size of YYARG. */
- int yycount = 0;
- int yyn = yypact[+*yyctx->yyssp];
- 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 != YYSYMBOL_YYerror
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (!yyarg)
- ++yycount;
- else if (yycount == yyargn)
- return 0;
- else
- yyarg[yycount++] = YY_CAST (yysymbol_kind_t, yyx);
- }
- }
- if (yyarg && yycount == 0 && 0 < yyargn)
- yyarg[0] = YYSYMBOL_YYEMPTY;
- return yycount;
-}
-
-
+#if YYERROR_VERBOSE
-
-#ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
-# else
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
/* Return the length of YYSTR. */
-static YYPTRDIFF_T
+static YYSIZE_T
yystrlen (const char *yystr)
{
- YYPTRDIFF_T yylen;
+ YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
+# endif
# endif
-#endif
-#ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
+# 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 *
@@ -1897,10 +1735,10 @@ yystpcpy (char *yydest, const char *yysrc)
return yyd - 1;
}
+# endif
# endif
-#endif
-#ifndef yytnamerr
+# 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
@@ -1908,13 +1746,14 @@ yystpcpy (char *yydest, const char *yysrc)
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 YYPTRDIFF_T
+static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
- YYPTRDIFF_T yyn = 0;
+ YYSIZE_T yyn = 0;
char const *yyp = yystr;
+
for (;;)
switch (*++yyp)
{
@@ -1925,10 +1764,7 @@ yytnamerr (char *yyres, const char *yystr)
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
- else
- goto append;
-
- append:
+ /* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
@@ -1943,20 +1779,36 @@ yytnamerr (char *yyres, const char *yystr)
do_not_strip_quotes: ;
}
- if (yyres)
- return yystpcpy (yyres, yystr) - yyres;
- else
+ if (! yyres)
return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
}
-#endif
+# 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
-yy_syntax_error_arguments (const yypcontext_t *yyctx,
- yysymbol_kind_t yyarg[], int yyargn)
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
{
- /* Actual size of YYARG. */
+ 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
@@ -1980,78 +1832,63 @@ yy_syntax_error_arguments (const yypcontext_t *yyctx,
one exception: it will still contain any token that will not be
accepted due to an error action in a later state.
*/
- if (yyctx->yytoken != YYSYMBOL_YYEMPTY)
+ if (yytoken != YYEMPTY)
{
- int yyn;
- if (yyarg)
- yyarg[yycount] = yyctx->yytoken;
- ++yycount;
- yyn = yypcontext_expected_tokens (yyctx,
- yyarg ? yyarg + 1 : yyarg, yyargn - 1);
- if (yyn == YYENOMEM)
- return YYENOMEM;
- else
- yycount += yyn;
+ 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;
+ }
+ }
+ }
}
- return yycount;
-}
-
-/* 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 YYENOMEM if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
- const yypcontext_t *yyctx)
-{
- enum { YYARGS_MAX = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat: reported tokens (one for the "unexpected",
- one per "expected"). */
- yysymbol_kind_t yyarg[YYARGS_MAX];
- /* Cumulated lengths of YYARG. */
- YYPTRDIFF_T yysize = 0;
-
- /* Actual size of YYARG. */
- int yycount = yy_syntax_error_arguments (yyctx, yyarg, YYARGS_MAX);
- if (yycount == YYENOMEM)
- return YYENOMEM;
switch (yycount)
{
-#define YYCASE_(N, S) \
+# define YYCASE_(N, S) \
case N: \
yyformat = S; \
- break
- default: /* Avoid compiler warnings. */
+ 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_
+# undef YYCASE_
}
- /* Compute error message size. Don't count the "%s"s, but reserve
- room for the terminator. */
- yysize = yystrlen (yyformat) - 2 * yycount + 1;
{
- int yyi;
- for (yyi = 0; yyi < yycount; ++yyi)
- {
- YYPTRDIFF_T yysize1
- = yysize + yytnamerr (YY_NULLPTR, yytname[yyarg[yyi]]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
- return YYENOMEM;
- }
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
}
if (*yymsg_alloc < yysize)
@@ -2060,7 +1897,7 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
if (! (yysize <= *yymsg_alloc
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return -1;
+ return 1;
}
/* Avoid sprintf, as that infringes on the user's name space.
@@ -2072,65 +1909,64 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
while ((*yyp = *yyformat) != '\0')
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
- yyp += yytnamerr (yyp, yytname[yyarg[yyi++]]);
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
}
else
{
- ++yyp;
- ++yyformat;
+ yyp++;
+ yyformat++;
}
}
return 0;
}
-
+#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
-yydestruct (const char *yymsg,
- yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
{
- YY_USE (yyvaluep);
- YY_USE (yylocationp);
- YY_USE (result);
- YY_USE (scanner);
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ YYUSE (result);
+ YYUSE (scanner);
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- switch (yykind)
+ switch (yytype)
{
- case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */
-#line 194 "bison_parser.y"
- { free(((*yyvaluep).sval)); }
-#line 2111 "bison_parser.cpp"
+ case 3: /* IDENTIFIER */
+#line 194 "bison_parser.y" /* yacc.c:1257 */
+ { free(((*yyvaluep).sval)); }
+#line 1947 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_STRING: /* STRING */
-#line 194 "bison_parser.y"
- { free(((*yyvaluep).sval)); }
-#line 2117 "bison_parser.cpp"
+ case 4: /* STRING */
+#line 194 "bison_parser.y" /* yacc.c:1257 */
+ { free(((*yyvaluep).sval)); }
+#line 1953 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_FLOATVAL: /* FLOATVAL */
-#line 181 "bison_parser.y"
- { }
-#line 2123 "bison_parser.cpp"
+ case 5: /* FLOATVAL */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 1959 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_INTVAL: /* INTVAL */
-#line 181 "bison_parser.y"
- { }
-#line 2129 "bison_parser.cpp"
+ case 6: /* INTVAL */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 1965 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_statement_list: /* statement_list */
-#line 195 "bison_parser.y"
- {
+ case 201: /* statement_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).stmt_vec)) {
for (auto ptr : *(((*yyvaluep).stmt_vec))) {
delete ptr;
@@ -2138,24 +1974,24 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).stmt_vec));
}
-#line 2142 "bison_parser.cpp"
+#line 1978 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_statement: /* statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).statement)); }
-#line 2148 "bison_parser.cpp"
+ case 202: /* statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).statement)); }
+#line 1984 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_preparable_statement: /* preparable_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).statement)); }
-#line 2154 "bison_parser.cpp"
+ case 203: /* preparable_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).statement)); }
+#line 1990 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_hints: /* opt_hints */
-#line 195 "bison_parser.y"
- {
+ case 204: /* opt_hints */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2163,12 +1999,12 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2167 "bison_parser.cpp"
+#line 2003 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_hint_list: /* hint_list */
-#line 195 "bison_parser.y"
- {
+ case 205: /* hint_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2176,105 +2012,105 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2180 "bison_parser.cpp"
+#line 2016 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_hint: /* hint */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2186 "bison_parser.cpp"
+ case 206: /* hint */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2022 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_transaction_statement: /* transaction_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).transaction_stmt)); }
-#line 2192 "bison_parser.cpp"
+ case 207: /* transaction_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).transaction_stmt)); }
+#line 2028 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_prepare_statement: /* prepare_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).prep_stmt)); }
-#line 2198 "bison_parser.cpp"
+ case 209: /* prepare_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).prep_stmt)); }
+#line 2034 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_prepare_target_query: /* prepare_target_query */
-#line 194 "bison_parser.y"
- { free(((*yyvaluep).sval)); }
-#line 2204 "bison_parser.cpp"
+ case 210: /* prepare_target_query */
+#line 194 "bison_parser.y" /* yacc.c:1257 */
+ { free(((*yyvaluep).sval)); }
+#line 2040 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_execute_statement: /* execute_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).exec_stmt)); }
-#line 2210 "bison_parser.cpp"
+ case 211: /* execute_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).exec_stmt)); }
+#line 2046 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_import_statement: /* import_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).import_stmt)); }
-#line 2216 "bison_parser.cpp"
+ case 212: /* import_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).import_stmt)); }
+#line 2052 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_file_type: /* file_type */
-#line 181 "bison_parser.y"
- { }
-#line 2222 "bison_parser.cpp"
+ case 213: /* file_type */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2058 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_file_path: /* file_path */
-#line 194 "bison_parser.y"
- { free(((*yyvaluep).sval)); }
-#line 2228 "bison_parser.cpp"
+ case 214: /* file_path */
+#line 194 "bison_parser.y" /* yacc.c:1257 */
+ { free(((*yyvaluep).sval)); }
+#line 2064 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_import_export_options: /* opt_import_export_options */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).import_export_option_t)); }
-#line 2234 "bison_parser.cpp"
+ case 215: /* opt_import_export_options */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).import_export_option_t)); }
+#line 2070 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_import_export_options: /* import_export_options */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).import_export_option_t)); }
-#line 2240 "bison_parser.cpp"
+ case 216: /* import_export_options */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).import_export_option_t)); }
+#line 2076 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_csv_option: /* csv_option */
-#line 203 "bison_parser.y"
- {
+ case 217: /* csv_option */
+#line 203 "bison_parser.y" /* yacc.c:1257 */
+ {
free(((*yyvaluep).csv_option_t)->second);
delete (((*yyvaluep).csv_option_t));
}
-#line 2249 "bison_parser.cpp"
+#line 2085 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_export_statement: /* export_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).export_stmt)); }
-#line 2255 "bison_parser.cpp"
+ case 218: /* export_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).export_stmt)); }
+#line 2091 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_show_statement: /* show_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).show_stmt)); }
-#line 2261 "bison_parser.cpp"
+ case 219: /* show_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).show_stmt)); }
+#line 2097 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_create_statement: /* create_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).create_stmt)); }
-#line 2267 "bison_parser.cpp"
+ case 220: /* create_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).create_stmt)); }
+#line 2103 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_not_exists: /* opt_not_exists */
-#line 181 "bison_parser.y"
- { }
-#line 2273 "bison_parser.cpp"
+ case 221: /* opt_not_exists */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2109 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_elem_commalist: /* table_elem_commalist */
-#line 195 "bison_parser.y"
- {
+ case 222: /* table_elem_commalist */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).table_element_vec)) {
for (auto ptr : *(((*yyvaluep).table_element_vec))) {
delete ptr;
@@ -2282,120 +2118,120 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).table_element_vec));
}
-#line 2286 "bison_parser.cpp"
+#line 2122 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_elem: /* table_elem */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table_element_t)); }
-#line 2292 "bison_parser.cpp"
+ case 223: /* table_elem */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table_element_t)); }
+#line 2128 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_column_def: /* column_def */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).column_t)); }
-#line 2298 "bison_parser.cpp"
+ case 224: /* column_def */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).column_t)); }
+#line 2134 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_column_type: /* column_type */
-#line 181 "bison_parser.y"
- { }
-#line 2304 "bison_parser.cpp"
+ case 225: /* column_type */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2140 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_time_precision: /* opt_time_precision */
-#line 181 "bison_parser.y"
- { }
-#line 2310 "bison_parser.cpp"
+ case 226: /* opt_time_precision */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2146 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_decimal_specification: /* opt_decimal_specification */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).ival_pair)); }
-#line 2316 "bison_parser.cpp"
+ case 227: /* opt_decimal_specification */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).ival_pair)); }
+#line 2152 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_column_constraints: /* opt_column_constraints */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).column_constraints_t)); }
-#line 2322 "bison_parser.cpp"
+ case 228: /* opt_column_constraints */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).column_constraints_t)); }
+#line 2158 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_column_constraints: /* column_constraints */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).column_constraints_t)); }
-#line 2328 "bison_parser.cpp"
+ case 229: /* column_constraints */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).column_constraints_t)); }
+#line 2164 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_column_constraint: /* column_constraint */
-#line 181 "bison_parser.y"
- { }
-#line 2334 "bison_parser.cpp"
+ case 230: /* column_constraint */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2170 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_constraint: /* table_constraint */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table_constraint_t)); }
-#line 2340 "bison_parser.cpp"
+ case 231: /* table_constraint */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table_constraint_t)); }
+#line 2176 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_references_spec: /* references_spec */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).references_spec_t)); }
-#line 2346 "bison_parser.cpp"
+ case 232: /* references_spec */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).references_spec_t)); }
+#line 2182 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_drop_statement: /* drop_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).drop_stmt)); }
-#line 2352 "bison_parser.cpp"
+ case 233: /* drop_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).drop_stmt)); }
+#line 2188 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_exists: /* opt_exists */
-#line 181 "bison_parser.y"
- { }
-#line 2358 "bison_parser.cpp"
+ case 234: /* opt_exists */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2194 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_alter_statement: /* alter_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alter_stmt)); }
-#line 2364 "bison_parser.cpp"
+ case 235: /* alter_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alter_stmt)); }
+#line 2200 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_alter_action: /* alter_action */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alter_action_t)); }
-#line 2370 "bison_parser.cpp"
+ case 236: /* alter_action */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alter_action_t)); }
+#line 2206 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_drop_action: /* drop_action */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).drop_action_t)); }
-#line 2376 "bison_parser.cpp"
+ case 237: /* drop_action */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).drop_action_t)); }
+#line 2212 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_delete_statement: /* delete_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).delete_stmt)); }
-#line 2382 "bison_parser.cpp"
+ case 238: /* delete_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).delete_stmt)); }
+#line 2218 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_truncate_statement: /* truncate_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).delete_stmt)); }
-#line 2388 "bison_parser.cpp"
+ case 239: /* truncate_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).delete_stmt)); }
+#line 2224 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_insert_statement: /* insert_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).insert_stmt)); }
-#line 2394 "bison_parser.cpp"
+ case 240: /* insert_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).insert_stmt)); }
+#line 2230 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_column_list: /* opt_column_list */
-#line 186 "bison_parser.y"
- {
+ case 241: /* opt_column_list */
+#line 186 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).str_vec)) {
for (auto ptr : *(((*yyvaluep).str_vec))) {
free(ptr);
@@ -2403,18 +2239,18 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).str_vec));
}
-#line 2407 "bison_parser.cpp"
+#line 2243 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_update_statement: /* update_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).update_stmt)); }
-#line 2413 "bison_parser.cpp"
+ case 242: /* update_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).update_stmt)); }
+#line 2249 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */
-#line 195 "bison_parser.y"
- {
+ case 243: /* update_clause_commalist */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).update_vec)) {
for (auto ptr : *(((*yyvaluep).update_vec))) {
delete ptr;
@@ -2422,78 +2258,78 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).update_vec));
}
-#line 2426 "bison_parser.cpp"
+#line 2262 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_update_clause: /* update_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).update_t)); }
-#line 2432 "bison_parser.cpp"
+ case 244: /* update_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).update_t)); }
+#line 2268 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_statement: /* select_statement */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2438 "bison_parser.cpp"
+ case 245: /* select_statement */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2274 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2444 "bison_parser.cpp"
+ case 246: /* select_within_set_operation */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2280 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2450 "bison_parser.cpp"
+ case 247: /* select_within_set_operation_no_parentheses */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2286 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_with_paren: /* select_with_paren */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2456 "bison_parser.cpp"
+ case 248: /* select_with_paren */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2292 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_no_paren: /* select_no_paren */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2462 "bison_parser.cpp"
+ case 249: /* select_no_paren */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2298 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_set_operator: /* set_operator */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).set_operator_t)); }
-#line 2468 "bison_parser.cpp"
+ case 250: /* set_operator */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).set_operator_t)); }
+#line 2304 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_set_type: /* set_type */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).set_operator_t)); }
-#line 2474 "bison_parser.cpp"
+ case 251: /* set_type */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).set_operator_t)); }
+#line 2310 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_all: /* opt_all */
-#line 181 "bison_parser.y"
- { }
-#line 2480 "bison_parser.cpp"
+ case 252: /* opt_all */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2316 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_clause: /* select_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).select_stmt)); }
-#line 2486 "bison_parser.cpp"
+ case 253: /* select_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).select_stmt)); }
+#line 2322 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_distinct: /* opt_distinct */
-#line 181 "bison_parser.y"
- { }
-#line 2492 "bison_parser.cpp"
+ case 254: /* opt_distinct */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2328 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_select_list: /* select_list */
-#line 195 "bison_parser.y"
- {
+ case 255: /* select_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2501,42 +2337,42 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2505 "bison_parser.cpp"
+#line 2341 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_from_clause: /* opt_from_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2511 "bison_parser.cpp"
+ case 256: /* opt_from_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2347 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_from_clause: /* from_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2517 "bison_parser.cpp"
+ case 257: /* from_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2353 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_where: /* opt_where */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2523 "bison_parser.cpp"
+ case 258: /* opt_where */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2359 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_group: /* opt_group */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).group_t)); }
-#line 2529 "bison_parser.cpp"
+ case 259: /* opt_group */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).group_t)); }
+#line 2365 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_having: /* opt_having */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2535 "bison_parser.cpp"
+ case 260: /* opt_having */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2371 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_order: /* opt_order */
-#line 195 "bison_parser.y"
- {
+ case 261: /* opt_order */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).order_vec)) {
for (auto ptr : *(((*yyvaluep).order_vec))) {
delete ptr;
@@ -2544,12 +2380,12 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).order_vec));
}
-#line 2548 "bison_parser.cpp"
+#line 2384 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_order_list: /* order_list */
-#line 195 "bison_parser.y"
- {
+ case 262: /* order_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).order_vec)) {
for (auto ptr : *(((*yyvaluep).order_vec))) {
delete ptr;
@@ -2557,42 +2393,42 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).order_vec));
}
-#line 2561 "bison_parser.cpp"
+#line 2397 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_order_desc: /* order_desc */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).order)); }
-#line 2567 "bison_parser.cpp"
+ case 263: /* order_desc */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).order)); }
+#line 2403 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_order_type: /* opt_order_type */
-#line 181 "bison_parser.y"
- { }
-#line 2573 "bison_parser.cpp"
+ case 264: /* opt_order_type */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2409 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_null_ordering: /* opt_null_ordering */
-#line 181 "bison_parser.y"
- { }
-#line 2579 "bison_parser.cpp"
+ case 265: /* opt_null_ordering */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2415 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_top: /* opt_top */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).limit)); }
-#line 2585 "bison_parser.cpp"
+ case 266: /* opt_top */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).limit)); }
+#line 2421 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_limit: /* opt_limit */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).limit)); }
-#line 2591 "bison_parser.cpp"
+ case 267: /* opt_limit */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).limit)); }
+#line 2427 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_expr_list: /* expr_list */
-#line 195 "bison_parser.y"
- {
+ case 268: /* expr_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2600,12 +2436,12 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2604 "bison_parser.cpp"
+#line 2440 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_extended_literal_list: /* opt_extended_literal_list */
-#line 195 "bison_parser.y"
- {
+ case 269: /* opt_extended_literal_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2613,12 +2449,12 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2617 "bison_parser.cpp"
+#line 2453 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_extended_literal_list: /* extended_literal_list */
-#line 195 "bison_parser.y"
- {
+ case 270: /* extended_literal_list */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2626,108 +2462,108 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2630 "bison_parser.cpp"
+#line 2466 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_casted_extended_literal: /* casted_extended_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2636 "bison_parser.cpp"
+ case 271: /* casted_extended_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2472 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_extended_literal: /* extended_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2642 "bison_parser.cpp"
+ case 272: /* extended_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2478 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_expr_alias: /* expr_alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2648 "bison_parser.cpp"
+ case 273: /* expr_alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2484 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_expr: /* expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2654 "bison_parser.cpp"
+ case 274: /* expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2490 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_operand: /* operand */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2660 "bison_parser.cpp"
+ case 275: /* operand */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2496 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_scalar_expr: /* scalar_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2666 "bison_parser.cpp"
+ case 276: /* scalar_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2502 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_unary_expr: /* unary_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2672 "bison_parser.cpp"
+ case 277: /* unary_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2508 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_binary_expr: /* binary_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2678 "bison_parser.cpp"
+ case 278: /* binary_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2514 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_logic_expr: /* logic_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2684 "bison_parser.cpp"
+ case 279: /* logic_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2520 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_in_expr: /* in_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2690 "bison_parser.cpp"
+ case 280: /* in_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2526 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_case_expr: /* case_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2696 "bison_parser.cpp"
+ case 281: /* case_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2532 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_case_list: /* case_list */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2702 "bison_parser.cpp"
+ case 282: /* case_list */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2538 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_exists_expr: /* exists_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2708 "bison_parser.cpp"
+ case 283: /* exists_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2544 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_comp_expr: /* comp_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2714 "bison_parser.cpp"
+ case 284: /* comp_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2550 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_function_expr: /* function_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2720 "bison_parser.cpp"
+ case 285: /* function_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2556 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_window: /* opt_window */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).window_description)); }
-#line 2726 "bison_parser.cpp"
+ case 286: /* opt_window */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).window_description)); }
+#line 2562 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_partition: /* opt_partition */
-#line 195 "bison_parser.y"
- {
+ case 287: /* opt_partition */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).expr_vec)) {
for (auto ptr : *(((*yyvaluep).expr_vec))) {
delete ptr;
@@ -2735,156 +2571,156 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2739 "bison_parser.cpp"
+#line 2575 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_frame_clause: /* opt_frame_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).frame_description)); }
-#line 2745 "bison_parser.cpp"
+ case 288: /* opt_frame_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).frame_description)); }
+#line 2581 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_frame_type: /* frame_type */
-#line 181 "bison_parser.y"
- { }
-#line 2751 "bison_parser.cpp"
+ case 289: /* frame_type */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2587 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_frame_bound: /* frame_bound */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).frame_bound)); }
-#line 2757 "bison_parser.cpp"
+ case 290: /* frame_bound */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).frame_bound)); }
+#line 2593 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_extract_expr: /* extract_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2763 "bison_parser.cpp"
+ case 291: /* extract_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2599 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_cast_expr: /* cast_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2769 "bison_parser.cpp"
+ case 292: /* cast_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2605 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_datetime_field: /* datetime_field */
-#line 181 "bison_parser.y"
- { }
-#line 2775 "bison_parser.cpp"
+ case 293: /* datetime_field */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2611 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_datetime_field_plural: /* datetime_field_plural */
-#line 181 "bison_parser.y"
- { }
-#line 2781 "bison_parser.cpp"
+ case 294: /* datetime_field_plural */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2617 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_duration_field: /* duration_field */
-#line 181 "bison_parser.y"
- { }
-#line 2787 "bison_parser.cpp"
+ case 295: /* duration_field */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2623 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_array_expr: /* array_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2793 "bison_parser.cpp"
+ case 296: /* array_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2629 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_array_index: /* array_index */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2799 "bison_parser.cpp"
+ case 297: /* array_index */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2635 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_between_expr: /* between_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2805 "bison_parser.cpp"
+ case 298: /* between_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2641 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_column_name: /* column_name */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2811 "bison_parser.cpp"
+ case 299: /* column_name */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2647 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_literal: /* literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2817 "bison_parser.cpp"
+ case 300: /* literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2653 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_string_literal: /* string_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2823 "bison_parser.cpp"
+ case 301: /* string_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2659 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_bool_literal: /* bool_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2829 "bison_parser.cpp"
+ case 302: /* bool_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2665 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_num_literal: /* num_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2835 "bison_parser.cpp"
+ case 303: /* num_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2671 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_int_literal: /* int_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2841 "bison_parser.cpp"
+ case 304: /* int_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2677 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_null_literal: /* null_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2847 "bison_parser.cpp"
+ case 305: /* null_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2683 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_date_literal: /* date_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2853 "bison_parser.cpp"
+ case 306: /* date_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2689 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_interval_literal: /* interval_literal */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2859 "bison_parser.cpp"
+ case 307: /* interval_literal */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2695 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_param_expr: /* param_expr */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 2865 "bison_parser.cpp"
+ case 308: /* param_expr */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2701 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_ref: /* table_ref */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2871 "bison_parser.cpp"
+ case 309: /* table_ref */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2707 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2877 "bison_parser.cpp"
+ case 310: /* table_ref_atomic */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2713 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2883 "bison_parser.cpp"
+ case 311: /* nonjoin_table_ref_atomic */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2719 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */
-#line 195 "bison_parser.y"
- {
+ case 312: /* table_ref_commalist */
+#line 195 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).table_vec)) {
for (auto ptr : *(((*yyvaluep).table_vec))) {
delete ptr;
@@ -2892,135 +2728,135 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).table_vec));
}
-#line 2896 "bison_parser.cpp"
+#line 2732 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_ref_name: /* table_ref_name */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2902 "bison_parser.cpp"
+ case 313: /* table_ref_name */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2738 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 2908 "bison_parser.cpp"
+ case 314: /* table_ref_name_no_alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2744 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_name: /* table_name */
-#line 182 "bison_parser.y"
- {
+ case 315: /* table_name */
+#line 182 "bison_parser.y" /* yacc.c:1257 */
+ {
free(((*yyvaluep).table_name).name);
free(((*yyvaluep).table_name).schema);
}
-#line 2917 "bison_parser.cpp"
+#line 2753 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_index_name: /* opt_index_name */
-#line 194 "bison_parser.y"
- { free(((*yyvaluep).sval)); }
-#line 2923 "bison_parser.cpp"
+ case 316: /* opt_index_name */
+#line 194 "bison_parser.y" /* yacc.c:1257 */
+ { free(((*yyvaluep).sval)); }
+#line 2759 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_table_alias: /* table_alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alias_t)); }
-#line 2929 "bison_parser.cpp"
+ case 317: /* table_alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alias_t)); }
+#line 2765 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_table_alias: /* opt_table_alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alias_t)); }
-#line 2935 "bison_parser.cpp"
+ case 318: /* opt_table_alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alias_t)); }
+#line 2771 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_alias: /* alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alias_t)); }
-#line 2941 "bison_parser.cpp"
+ case 319: /* alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alias_t)); }
+#line 2777 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_alias: /* opt_alias */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).alias_t)); }
-#line 2947 "bison_parser.cpp"
+ case 320: /* opt_alias */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).alias_t)); }
+#line 2783 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_locking_clause: /* opt_locking_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).locking_clause_vec)); }
-#line 2953 "bison_parser.cpp"
+ case 321: /* opt_locking_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).locking_clause_vec)); }
+#line 2789 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_locking_clause_list: /* opt_locking_clause_list */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).locking_clause_vec)); }
-#line 2959 "bison_parser.cpp"
+ case 322: /* opt_locking_clause_list */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).locking_clause_vec)); }
+#line 2795 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_locking_clause: /* locking_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).locking_t)); }
-#line 2965 "bison_parser.cpp"
+ case 323: /* locking_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).locking_t)); }
+#line 2801 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_row_lock_mode: /* row_lock_mode */
-#line 181 "bison_parser.y"
- { }
-#line 2971 "bison_parser.cpp"
+ case 324: /* row_lock_mode */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2807 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_row_lock_policy: /* opt_row_lock_policy */
-#line 181 "bison_parser.y"
- { }
-#line 2977 "bison_parser.cpp"
+ case 325: /* opt_row_lock_policy */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2813 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_with_clause: /* opt_with_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).with_description_vec)); }
-#line 2983 "bison_parser.cpp"
+ case 326: /* opt_with_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).with_description_vec)); }
+#line 2819 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_with_clause: /* with_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).with_description_vec)); }
-#line 2989 "bison_parser.cpp"
+ case 327: /* with_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).with_description_vec)); }
+#line 2825 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_with_description_list: /* with_description_list */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).with_description_vec)); }
-#line 2995 "bison_parser.cpp"
+ case 328: /* with_description_list */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).with_description_vec)); }
+#line 2831 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_with_description: /* with_description */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).with_description_t)); }
-#line 3001 "bison_parser.cpp"
+ case 329: /* with_description */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).with_description_t)); }
+#line 2837 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_join_clause: /* join_clause */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).table)); }
-#line 3007 "bison_parser.cpp"
+ case 330: /* join_clause */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).table)); }
+#line 2843 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_opt_join_type: /* opt_join_type */
-#line 181 "bison_parser.y"
- { }
-#line 3013 "bison_parser.cpp"
+ case 331: /* opt_join_type */
+#line 181 "bison_parser.y" /* yacc.c:1257 */
+ { }
+#line 2849 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_join_condition: /* join_condition */
-#line 207 "bison_parser.y"
- { delete (((*yyvaluep).expr)); }
-#line 3019 "bison_parser.cpp"
+ case 332: /* join_condition */
+#line 207 "bison_parser.y" /* yacc.c:1257 */
+ { delete (((*yyvaluep).expr)); }
+#line 2855 "bison_parser.cpp" /* yacc.c:1257 */
break;
- case YYSYMBOL_ident_commalist: /* ident_commalist */
-#line 186 "bison_parser.y"
- {
+ case 334: /* ident_commalist */
+#line 186 "bison_parser.y" /* yacc.c:1257 */
+ {
if (((*yyvaluep).str_vec)) {
for (auto ptr : *(((*yyvaluep).str_vec))) {
free(ptr);
@@ -3028,9 +2864,10 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).str_vec));
}
-#line 3032 "bison_parser.cpp"
+#line 2868 "bison_parser.cpp" /* yacc.c:1257 */
break;
+
default:
break;
}
@@ -3040,8 +2877,6 @@ yydestruct (const char *yymsg,
-
-
/*----------.
| yyparse. |
`----------*/
@@ -3049,7 +2884,7 @@ yydestruct (const char *yymsg,
int
yyparse (hsql::SQLParserResult* result, yyscan_t scanner)
{
-/* Lookahead token kind. */
+/* The lookahead symbol. */
int yychar;
@@ -3068,50 +2903,55 @@ static YYLTYPE yyloc_default
YYLTYPE yylloc = yyloc_default;
/* Number of syntax errors so far. */
- int yynerrs = 0;
+ int yynerrs;
- yy_state_fast_t yystate = 0;
+ int yystate;
/* Number of tokens to shift before error messages enabled. */
- int yyerrstatus = 0;
+ int yyerrstatus;
- /* Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
- /* Their size. */
- YYPTRDIFF_T yystacksize = YYINITDEPTH;
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The state stack: array, bottom, top. */
- yy_state_t yyssa[YYINITDEPTH];
- yy_state_t *yyss = yyssa;
- yy_state_t *yyssp = yyss;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The semantic value stack: array, bottom, top. */
+ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp = yyvs;
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- /* The location stack: array, bottom, top. */
+ /* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp = yyls;
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
int yyn;
- /* The return value of yyparse. */
int yyresult;
- /* Lookahead symbol kind. */
- yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
+ /* 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;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
-
+#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
- YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
@@ -3119,13 +2959,20 @@ YYLTYPE yylloc = yyloc_default;
Keep to zero when no symbol should be popped. */
int yylen = 0;
- YYDPRINTF ((stderr, "Starting parse\n"));
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
+ yystacksize = YYINITDEPTH;
- yychar = SQL_HSQL_EMPTY; /* Cause a token to be read. */
+ YYDPRINTF ((stderr, "Starting parse\n"));
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* User initialization code. */
-#line 81 "bison_parser.y"
+#line 81 "bison_parser.y" /* yacc.c:1429 */
{
// Initialize
yylloc.first_column = 0;
@@ -3136,47 +2983,33 @@ YYLTYPE yylloc = yyloc_default;
yylloc.string_length = 0;
}
-#line 3140 "bison_parser.cpp"
-
+#line 2987 "bison_parser.cpp" /* yacc.c:1429 */
yylsp[0] = yylloc;
goto yysetstate;
-
/*------------------------------------------------------------.
-| yynewstate -- push a new state, which is found in yystate. |
+| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
-yynewstate:
+ 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 -- set current state (the top of the stack) to yystate. |
-`--------------------------------------------------------------------*/
-yysetstate:
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
- YY_IGNORE_USELESS_CAST_BEGIN
- *yyssp = YY_CAST (yy_state_t, yystate);
- YY_IGNORE_USELESS_CAST_END
- YY_STACK_PRINT (yyss, yyssp);
+ yysetstate:
+ *yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE
- YYNOMEM;
-#else
{
/* Get the current used size of the three stacks, in elements. */
- YYPTRDIFF_T yysize = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
-# if defined yyoverflow
+#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. */
- yy_state_t *yyss1 = yyss;
YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
YYLTYPE *yyls1 = yyls;
/* Each stack pointer address is followed by the size of the
@@ -3184,29 +3017,32 @@ YYLTYPE yylloc = yyloc_default;
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * YYSIZEOF (*yyssp),
- &yyvs1, yysize * YYSIZEOF (*yyvsp),
- &yyls1, yysize * YYSIZEOF (*yylsp),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
+ yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
- yyls = yyls1;
}
-# else /* defined YYSTACK_RELOCATE */
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- YYNOMEM;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- yy_state_t *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
- YY_CAST (union yyalloc *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- YYNOMEM;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
YYSTACK_RELOCATE (yyls_alloc, yyls);
@@ -3215,32 +3051,31 @@ YYLTYPE yylloc = yyloc_default;
YYSTACK_FREE (yyss1);
}
# endif
+#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
- YY_IGNORE_USELESS_CAST_BEGIN
- YYDPRINTF ((stderr, "Stack size increased to %ld\n",
- YY_CAST (long, yystacksize)));
- YY_IGNORE_USELESS_CAST_END
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+ 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. */
@@ -3251,30 +3086,18 @@ YYLTYPE yylloc = yyloc_default;
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
- if (yychar == SQL_HSQL_EMPTY)
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token\n"));
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar = yylex (&yylval, &yylloc, scanner);
}
- if (yychar <= SQL_YYEOF)
+ if (yychar <= YYEOF)
{
- yychar = SQL_YYEOF;
- yytoken = YYSYMBOL_YYEOF;
+ yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
- else if (yychar == SQL_HSQL_error)
- {
- /* The scanner already issued an error message, process directly
- to error recovery. But do not keep the error token as
- lookahead, it is too special and may lead us to an endless
- loop in error recovery. */
- yychar = SQL_HSQL_UNDEF;
- yytoken = YYSYMBOL_YYerror;
- yyerror_range[1] = yylloc;
- goto yyerrlab1;
- }
else
{
yytoken = YYTRANSLATE (yychar);
@@ -3302,14 +3125,15 @@ YYLTYPE yylloc = yyloc_default;
/* 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;
-
- /* Discard the shifted token. */
- yychar = SQL_HSQL_EMPTY;
goto yynewstate;
@@ -3324,7 +3148,7 @@ YYLTYPE yylloc = yyloc_default;
/*-----------------------------.
-| yyreduce -- do a reduction. |
+| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
@@ -3340,15 +3164,14 @@ YYLTYPE yylloc = yyloc_default;
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
- /* Default location. */
+ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
- yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 2: /* input: statement_list opt_semicolon */
-#line 343 "bison_parser.y"
- {
+ case 2:
+#line 343 "bison_parser.y" /* yacc.c:1646 */
+ {
for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) {
// Transfers ownership of the statement.
result->addStatement(stmt);
@@ -3365,237 +3188,237 @@ YYLTYPE yylloc = yyloc_default;
}
delete (yyvsp[-1].stmt_vec);
}
-#line 3369 "bison_parser.cpp"
+#line 3192 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 3: /* statement_list: statement */
-#line 362 "bison_parser.y"
- {
+ case 3:
+#line 362 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[0].statement)->stringLength = yylloc.string_length;
yylloc.string_length = 0;
(yyval.stmt_vec) = new std::vector();
(yyval.stmt_vec)->push_back((yyvsp[0].statement));
}
-#line 3380 "bison_parser.cpp"
+#line 3203 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 4: /* statement_list: statement_list ';' statement */
-#line 368 "bison_parser.y"
- {
+ case 4:
+#line 368 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[0].statement)->stringLength = yylloc.string_length;
yylloc.string_length = 0;
(yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement));
(yyval.stmt_vec) = (yyvsp[-2].stmt_vec);
}
-#line 3391 "bison_parser.cpp"
+#line 3214 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 5: /* statement: prepare_statement opt_hints */
-#line 375 "bison_parser.y"
- {
+ case 5:
+#line 375 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.statement) = (yyvsp[-1].prep_stmt);
(yyval.statement)->hints = (yyvsp[0].expr_vec);
}
-#line 3400 "bison_parser.cpp"
+#line 3223 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 6: /* statement: preparable_statement opt_hints */
-#line 379 "bison_parser.y"
- {
+ case 6:
+#line 379 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.statement) = (yyvsp[-1].statement);
(yyval.statement)->hints = (yyvsp[0].expr_vec);
}
-#line 3409 "bison_parser.cpp"
+#line 3232 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 7: /* statement: show_statement */
-#line 383 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].show_stmt); }
-#line 3415 "bison_parser.cpp"
+ case 7:
+#line 383 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].show_stmt); }
+#line 3238 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 8: /* statement: import_statement */
-#line 384 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].import_stmt); }
-#line 3421 "bison_parser.cpp"
+ case 8:
+#line 384 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].import_stmt); }
+#line 3244 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 9: /* statement: export_statement */
-#line 385 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].export_stmt); }
-#line 3427 "bison_parser.cpp"
+ case 9:
+#line 385 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].export_stmt); }
+#line 3250 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 10: /* preparable_statement: select_statement */
-#line 387 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].select_stmt); }
-#line 3433 "bison_parser.cpp"
+ case 10:
+#line 387 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].select_stmt); }
+#line 3256 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 11: /* preparable_statement: create_statement */
-#line 388 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].create_stmt); }
-#line 3439 "bison_parser.cpp"
+ case 11:
+#line 388 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].create_stmt); }
+#line 3262 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 12: /* preparable_statement: insert_statement */
-#line 389 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].insert_stmt); }
-#line 3445 "bison_parser.cpp"
+ case 12:
+#line 389 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].insert_stmt); }
+#line 3268 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 13: /* preparable_statement: delete_statement */
-#line 390 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].delete_stmt); }
-#line 3451 "bison_parser.cpp"
+ case 13:
+#line 390 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].delete_stmt); }
+#line 3274 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 14: /* preparable_statement: truncate_statement */
-#line 391 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].delete_stmt); }
-#line 3457 "bison_parser.cpp"
+ case 14:
+#line 391 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].delete_stmt); }
+#line 3280 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 15: /* preparable_statement: update_statement */
-#line 392 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].update_stmt); }
-#line 3463 "bison_parser.cpp"
+ case 15:
+#line 392 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].update_stmt); }
+#line 3286 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 16: /* preparable_statement: drop_statement */
-#line 393 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].drop_stmt); }
-#line 3469 "bison_parser.cpp"
+ case 16:
+#line 393 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].drop_stmt); }
+#line 3292 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 17: /* preparable_statement: alter_statement */
-#line 394 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].alter_stmt); }
-#line 3475 "bison_parser.cpp"
+ case 17:
+#line 394 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].alter_stmt); }
+#line 3298 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 18: /* preparable_statement: execute_statement */
-#line 395 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].exec_stmt); }
-#line 3481 "bison_parser.cpp"
+ case 18:
+#line 395 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].exec_stmt); }
+#line 3304 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 19: /* preparable_statement: transaction_statement */
-#line 396 "bison_parser.y"
- { (yyval.statement) = (yyvsp[0].transaction_stmt); }
-#line 3487 "bison_parser.cpp"
+ case 19:
+#line 396 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.statement) = (yyvsp[0].transaction_stmt); }
+#line 3310 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 20: /* opt_hints: WITH HINT '(' hint_list ')' */
-#line 402 "bison_parser.y"
- { (yyval.expr_vec) = (yyvsp[-1].expr_vec); }
-#line 3493 "bison_parser.cpp"
+ case 20:
+#line 402 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); }
+#line 3316 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 21: /* opt_hints: %empty */
-#line 403 "bison_parser.y"
- { (yyval.expr_vec) = nullptr; }
-#line 3499 "bison_parser.cpp"
+ case 21:
+#line 403 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = nullptr; }
+#line 3322 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 22: /* hint_list: hint */
-#line 405 "bison_parser.y"
- {
+ case 22:
+#line 405 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr_vec) = new std::vector();
(yyval.expr_vec)->push_back((yyvsp[0].expr));
}
-#line 3508 "bison_parser.cpp"
+#line 3331 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 23: /* hint_list: hint_list ',' hint */
-#line 409 "bison_parser.y"
- {
+ case 23:
+#line 409 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr));
(yyval.expr_vec) = (yyvsp[-2].expr_vec);
}
-#line 3517 "bison_parser.cpp"
+#line 3340 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 24: /* hint: IDENTIFIER */
-#line 414 "bison_parser.y"
- {
+ case 24:
+#line 414 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = Expr::make(kExprHint);
(yyval.expr)->name = (yyvsp[0].sval);
}
-#line 3526 "bison_parser.cpp"
+#line 3349 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 25: /* hint: IDENTIFIER '(' extended_literal_list ')' */
-#line 418 "bison_parser.y"
- {
+ case 25:
+#line 418 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = Expr::make(kExprHint);
(yyval.expr)->name = (yyvsp[-3].sval);
(yyval.expr)->exprList = (yyvsp[-1].expr_vec);
}
-#line 3536 "bison_parser.cpp"
+#line 3359 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 26: /* transaction_statement: BEGIN opt_transaction_keyword */
-#line 428 "bison_parser.y"
- { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); }
-#line 3542 "bison_parser.cpp"
+ case 26:
+#line 428 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction); }
+#line 3365 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 27: /* transaction_statement: ROLLBACK opt_transaction_keyword */
-#line 429 "bison_parser.y"
- { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); }
-#line 3548 "bison_parser.cpp"
+ case 27:
+#line 429 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction); }
+#line 3371 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 28: /* transaction_statement: COMMIT opt_transaction_keyword */
-#line 430 "bison_parser.y"
- { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); }
-#line 3554 "bison_parser.cpp"
+ case 28:
+#line 430 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction); }
+#line 3377 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 31: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */
-#line 438 "bison_parser.y"
- {
+ case 31:
+#line 438 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.prep_stmt) = new PrepareStatement();
(yyval.prep_stmt)->name = (yyvsp[-2].sval);
(yyval.prep_stmt)->query = (yyvsp[0].sval);
}
-#line 3564 "bison_parser.cpp"
+#line 3387 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 33: /* execute_statement: EXECUTE IDENTIFIER */
-#line 446 "bison_parser.y"
- {
+ case 33:
+#line 446 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.exec_stmt) = new ExecuteStatement();
(yyval.exec_stmt)->name = (yyvsp[0].sval);
}
-#line 3573 "bison_parser.cpp"
+#line 3396 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 34: /* execute_statement: EXECUTE IDENTIFIER '(' opt_extended_literal_list ')' */
-#line 450 "bison_parser.y"
- {
+ case 34:
+#line 450 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.exec_stmt) = new ExecuteStatement();
(yyval.exec_stmt)->name = (yyvsp[-3].sval);
(yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec);
}
-#line 3583 "bison_parser.cpp"
+#line 3406 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 35: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */
-#line 462 "bison_parser.y"
- {
+ case 35:
+#line 462 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.import_stmt) = new ImportStatement((yyvsp[-4].import_type_t));
(yyval.import_stmt)->filePath = (yyvsp[-2].sval);
(yyval.import_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.import_stmt)->tableName = (yyvsp[0].table_name).name;
}
-#line 3594 "bison_parser.cpp"
+#line 3417 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 36: /* import_statement: COPY table_name FROM file_path opt_import_export_options opt_where */
-#line 468 "bison_parser.y"
- {
+ case 36:
+#line 468 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.import_stmt) = new ImportStatement((yyvsp[-1].import_export_option_t)->format);
(yyval.import_stmt)->filePath = (yyvsp[-2].sval);
(yyval.import_stmt)->schema = (yyvsp[-4].table_name).schema;
@@ -3611,12 +3434,12 @@ YYLTYPE yylloc = yyloc_default;
}
delete (yyvsp[-1].import_export_option_t);
}
-#line 3615 "bison_parser.cpp"
+#line 3438 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 37: /* file_type: IDENTIFIER */
-#line 485 "bison_parser.y"
- {
+ case 37:
+#line 485 "bison_parser.y" /* yacc.c:1646 */
+ {
if (strcasecmp((yyvsp[0].sval), "csv") == 0) {
(yyval.import_type_t) = kImportCSV;
} else if (strcasecmp((yyvsp[0].sval), "tbl") == 0) {
@@ -3630,36 +3453,36 @@ YYLTYPE yylloc = yyloc_default;
}
free((yyvsp[0].sval));
}
-#line 3634 "bison_parser.cpp"
+#line 3457 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 38: /* file_path: STRING */
-#line 500 "bison_parser.y"
- { (yyval.sval) = (yyvsp[0].sval); }
-#line 3640 "bison_parser.cpp"
+ case 38:
+#line 500 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.sval) = (yyvsp[0].sval); }
+#line 3463 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 39: /* opt_import_export_options: WITH '(' import_export_options ')' */
-#line 502 "bison_parser.y"
- { (yyval.import_export_option_t) = (yyvsp[-1].import_export_option_t); }
-#line 3646 "bison_parser.cpp"
+ case 39:
+#line 502 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.import_export_option_t) = (yyvsp[-1].import_export_option_t); }
+#line 3469 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 40: /* opt_import_export_options: '(' import_export_options ')' */
-#line 503 "bison_parser.y"
- { (yyval.import_export_option_t) = (yyvsp[-1].import_export_option_t); }
-#line 3652 "bison_parser.cpp"
+ case 40:
+#line 503 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.import_export_option_t) = (yyvsp[-1].import_export_option_t); }
+#line 3475 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 41: /* opt_import_export_options: %empty */
-#line 504 "bison_parser.y"
- { (yyval.import_export_option_t) = new ImportExportOptions{}; }
-#line 3658 "bison_parser.cpp"
+ case 41:
+#line 504 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.import_export_option_t) = new ImportExportOptions{}; }
+#line 3481 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 42: /* import_export_options: import_export_options ',' FORMAT file_type */
-#line 506 "bison_parser.y"
- {
+ case 42:
+#line 506 "bison_parser.y" /* yacc.c:1646 */
+ {
if ((yyvsp[-3].import_export_option_t)->format != kImportAuto) {
delete (yyvsp[-3].import_export_option_t);
yyerror(&yyloc, result, scanner, "File type must only be provided once.");
@@ -3673,21 +3496,21 @@ YYLTYPE yylloc = yyloc_default;
(yyvsp[-3].import_export_option_t)->format = (yyvsp[0].import_type_t);
(yyval.import_export_option_t) = (yyvsp[-3].import_export_option_t);
}
-#line 3677 "bison_parser.cpp"
+#line 3500 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 43: /* import_export_options: FORMAT file_type */
-#line 520 "bison_parser.y"
- {
+ case 43:
+#line 520 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.import_export_option_t) = new ImportExportOptions{};
(yyval.import_export_option_t)->format = (yyvsp[0].import_type_t);
}
-#line 3686 "bison_parser.cpp"
+#line 3509 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 44: /* import_export_options: import_export_options ',' ENCODING STRING */
-#line 524 "bison_parser.y"
- {
+ case 44:
+#line 524 "bison_parser.y" /* yacc.c:1646 */
+ {
if ((yyvsp[-3].import_export_option_t)->encoding) {
delete (yyvsp[-3].import_export_option_t);
free((yyvsp[0].sval));
@@ -3697,21 +3520,21 @@ YYLTYPE yylloc = yyloc_default;
(yyvsp[-3].import_export_option_t)->encoding = (yyvsp[0].sval);
(yyval.import_export_option_t) = (yyvsp[-3].import_export_option_t);
}
-#line 3701 "bison_parser.cpp"
+#line 3524 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 45: /* import_export_options: ENCODING STRING */
-#line 534 "bison_parser.y"
- {
+ case 45:
+#line 534 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.import_export_option_t) = new ImportExportOptions{};
(yyval.import_export_option_t)->encoding = (yyvsp[0].sval);
}
-#line 3710 "bison_parser.cpp"
+#line 3533 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 46: /* import_export_options: import_export_options ',' csv_option */
-#line 538 "bison_parser.y"
- {
+ case 46:
+#line 538 "bison_parser.y" /* yacc.c:1646 */
+ {
if ((yyvsp[-2].import_export_option_t)->format != kImportAuto && (yyvsp[-2].import_export_option_t)->format != kImportCSV) {
delete (yyvsp[-2].import_export_option_t);
free((yyvsp[0].csv_option_t)->second);
@@ -3735,24 +3558,24 @@ YYLTYPE yylloc = yyloc_default;
delete (yyvsp[0].csv_option_t);
(yyval.import_export_option_t) = (yyvsp[-2].import_export_option_t);
}
-#line 3739 "bison_parser.cpp"
+#line 3562 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 47: /* import_export_options: csv_option */
-#line 562 "bison_parser.y"
- {
+ case 47:
+#line 562 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.import_export_option_t) = new ImportExportOptions{};
(yyval.import_export_option_t)->csv_options = new CsvOptions{};
(yyval.import_export_option_t)->csv_options->accept_csv_option((yyvsp[0].csv_option_t));
delete (yyvsp[0].csv_option_t);
}
-#line 3751 "bison_parser.cpp"
+#line 3574 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 48: /* csv_option: IDENTIFIER STRING */
-#line 570 "bison_parser.y"
- {
+ case 48:
+#line 570 "bison_parser.y" /* yacc.c:1646 */
+ {
if (strcasecmp((yyvsp[-1].sval), "DELIMITER") == 0) {
(yyval.csv_option_t) = new std::pair(CsvOptionType::Delimiter, (yyvsp[0].sval));
} else if (strcasecmp((yyvsp[-1].sval), "QUOTE") == 0) {
@@ -3765,18 +3588,18 @@ YYLTYPE yylloc = yyloc_default;
}
free((yyvsp[-1].sval));
}
-#line 3769 "bison_parser.cpp"
+#line 3592 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 49: /* csv_option: NULL STRING */
-#line 583 "bison_parser.y"
- { (yyval.csv_option_t) = new std::pair(CsvOptionType::Null, (yyvsp[0].sval)); }
-#line 3775 "bison_parser.cpp"
+ case 49:
+#line 583 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.csv_option_t) = new std::pair(CsvOptionType::Null, (yyvsp[0].sval)); }
+#line 3598 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 50: /* export_statement: COPY table_name TO file_path opt_import_export_options */
-#line 590 "bison_parser.y"
- {
+ case 50:
+#line 590 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.export_stmt) = new ExportStatement((yyvsp[0].import_export_option_t)->format);
(yyval.export_stmt)->filePath = (yyvsp[-1].sval);
(yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema;
@@ -3791,12 +3614,12 @@ YYLTYPE yylloc = yyloc_default;
}
delete (yyvsp[0].import_export_option_t);
}
-#line 3795 "bison_parser.cpp"
+#line 3618 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 51: /* export_statement: COPY select_with_paren TO file_path opt_import_export_options */
-#line 605 "bison_parser.y"
- {
+ case 51:
+#line 605 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.export_stmt) = new ExportStatement((yyvsp[0].import_export_option_t)->format);
(yyval.export_stmt)->filePath = (yyvsp[-1].sval);
(yyval.export_stmt)->select = (yyvsp[-3].select_stmt);
@@ -3810,38 +3633,38 @@ YYLTYPE yylloc = yyloc_default;
}
delete (yyvsp[0].import_export_option_t);
}
-#line 3814 "bison_parser.cpp"
+#line 3637 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 52: /* show_statement: SHOW TABLES */
-#line 625 "bison_parser.y"
- { (yyval.show_stmt) = new ShowStatement(kShowTables); }
-#line 3820 "bison_parser.cpp"
+ case 52:
+#line 625 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.show_stmt) = new ShowStatement(kShowTables); }
+#line 3643 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 53: /* show_statement: SHOW COLUMNS table_name */
-#line 626 "bison_parser.y"
- {
+ case 53:
+#line 626 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.show_stmt) = new ShowStatement(kShowColumns);
(yyval.show_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.show_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3830 "bison_parser.cpp"
+#line 3653 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 54: /* show_statement: DESCRIBE table_name */
-#line 631 "bison_parser.y"
- {
+ case 54:
+#line 631 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.show_stmt) = new ShowStatement(kShowColumns);
(yyval.show_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.show_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3840 "bison_parser.cpp"
+#line 3663 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 55: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */
-#line 642 "bison_parser.y"
- {
+ case 55:
+#line 642 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl);
(yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval);
(yyval.create_stmt)->schema = (yyvsp[-4].table_name).schema;
@@ -3854,12 +3677,12 @@ YYLTYPE yylloc = yyloc_default;
free((yyvsp[-2].sval));
(yyval.create_stmt)->filePath = (yyvsp[0].sval);
}
-#line 3858 "bison_parser.cpp"
+#line 3681 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 56: /* create_statement: CREATE TABLE opt_not_exists table_name '(' table_elem_commalist ')' */
-#line 655 "bison_parser.y"
- {
+ case 56:
+#line 655 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.create_stmt) = new CreateStatement(kCreateTable);
(yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval);
(yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema;
@@ -3871,36 +3694,36 @@ YYLTYPE yylloc = yyloc_default;
YYERROR;
}
}
-#line 3875 "bison_parser.cpp"
+#line 3698 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 57: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */
-#line 667 "bison_parser.y"
- {
+ case 57:
+#line 667 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.create_stmt) = new CreateStatement(kCreateTable);
(yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval);
(yyval.create_stmt)->schema = (yyvsp[-2].table_name).schema;
(yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name;
(yyval.create_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 3887 "bison_parser.cpp"
+#line 3710 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 58: /* create_statement: CREATE INDEX opt_not_exists opt_index_name ON table_name '(' ident_commalist ')' */
-#line 674 "bison_parser.y"
- {
+ case 58:
+#line 674 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.create_stmt) = new CreateStatement(kCreateIndex);
(yyval.create_stmt)->indexName = (yyvsp[-5].sval);
(yyval.create_stmt)->ifNotExists = (yyvsp[-6].bval);
(yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name;
(yyval.create_stmt)->indexColumns = (yyvsp[-1].str_vec);
}
-#line 3899 "bison_parser.cpp"
+#line 3722 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 59: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */
-#line 681 "bison_parser.y"
- {
+ case 59:
+#line 681 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.create_stmt) = new CreateStatement(kCreateView);
(yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval);
(yyval.create_stmt)->schema = (yyvsp[-3].table_name).schema;
@@ -3908,500 +3731,500 @@ YYLTYPE yylloc = yyloc_default;
(yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec);
(yyval.create_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 3912 "bison_parser.cpp"
+#line 3735 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 60: /* opt_not_exists: IF NOT EXISTS */
-#line 690 "bison_parser.y"
- { (yyval.bval) = true; }
-#line 3918 "bison_parser.cpp"
+ case 60:
+#line 690 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = true; }
+#line 3741 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 61: /* opt_not_exists: %empty */
-#line 691 "bison_parser.y"
- { (yyval.bval) = false; }
-#line 3924 "bison_parser.cpp"
+ case 61:
+#line 691 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = false; }
+#line 3747 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 62: /* table_elem_commalist: table_elem */
-#line 693 "bison_parser.y"
- {
+ case 62:
+#line 693 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table_element_vec) = new std::vector();
(yyval.table_element_vec)->push_back((yyvsp[0].table_element_t));
}
-#line 3933 "bison_parser.cpp"
+#line 3756 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 63: /* table_elem_commalist: table_elem_commalist ',' table_elem */
-#line 697 "bison_parser.y"
- {
+ case 63:
+#line 697 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].table_element_vec)->push_back((yyvsp[0].table_element_t));
(yyval.table_element_vec) = (yyvsp[-2].table_element_vec);
}
-#line 3942 "bison_parser.cpp"
+#line 3765 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 64: /* table_elem: column_def */
-#line 702 "bison_parser.y"
- { (yyval.table_element_t) = (yyvsp[0].column_t); }
-#line 3948 "bison_parser.cpp"
+ case 64:
+#line 702 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table_element_t) = (yyvsp[0].column_t); }
+#line 3771 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 65: /* table_elem: table_constraint */
-#line 703 "bison_parser.y"
- { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); }
-#line 3954 "bison_parser.cpp"
+ case 65:
+#line 703 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table_element_t) = (yyvsp[0].table_constraint_t); }
+#line 3777 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 66: /* column_def: IDENTIFIER column_type opt_column_constraints */
-#line 705 "bison_parser.y"
- {
+ case 66:
+#line 705 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].column_constraints_t)->constraints, (yyvsp[0].column_constraints_t)->references);
if (!(yyval.column_t)->trySetNullableExplicit()) {
yyerror(&yyloc, result, scanner, ("Conflicting nullability constraints for " + std::string{(yyvsp[-2].sval)}).c_str());
}
delete (yyvsp[0].column_constraints_t);
}
-#line 3966 "bison_parser.cpp"
+#line 3789 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 67: /* column_type: BIGINT */
-#line 713 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::BIGINT}; }
-#line 3972 "bison_parser.cpp"
+ case 67:
+#line 713 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::BIGINT}; }
+#line 3795 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 68: /* column_type: BOOLEAN */
-#line 714 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::BOOLEAN}; }
-#line 3978 "bison_parser.cpp"
+ case 68:
+#line 714 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::BOOLEAN}; }
+#line 3801 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 69: /* column_type: CHAR '(' INTVAL ')' */
-#line 715 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; }
-#line 3984 "bison_parser.cpp"
+ case 69:
+#line 715 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; }
+#line 3807 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 70: /* column_type: CHARACTER_VARYING '(' INTVAL ')' */
-#line 716 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; }
-#line 3990 "bison_parser.cpp"
+ case 70:
+#line 716 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; }
+#line 3813 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 71: /* column_type: DATE */
-#line 717 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::DATE}; }
-#line 3996 "bison_parser.cpp"
+ case 71:
+#line 717 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::DATE}; }
+#line 3819 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 72: /* column_type: DATETIME */
-#line 718 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; }
-#line 4002 "bison_parser.cpp"
+ case 72:
+#line 718 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; }
+#line 3825 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 73: /* column_type: DECIMAL opt_decimal_specification */
-#line 719 "bison_parser.y"
- {
+ case 73:
+#line 719 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.column_type_t) = ColumnType{DataType::DECIMAL, 0, (yyvsp[0].ival_pair)->first, (yyvsp[0].ival_pair)->second};
delete (yyvsp[0].ival_pair);
}
-#line 4011 "bison_parser.cpp"
+#line 3834 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 74: /* column_type: DOUBLE */
-#line 723 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; }
-#line 4017 "bison_parser.cpp"
+ case 74:
+#line 723 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; }
+#line 3840 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 75: /* column_type: FLOAT */
-#line 724 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; }
-#line 4023 "bison_parser.cpp"
+ case 75:
+#line 724 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; }
+#line 3846 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 76: /* column_type: INT */
-#line 725 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::INT}; }
-#line 4029 "bison_parser.cpp"
+ case 76:
+#line 725 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::INT}; }
+#line 3852 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 77: /* column_type: INTEGER */
-#line 726 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::INT}; }
-#line 4035 "bison_parser.cpp"
+ case 77:
+#line 726 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::INT}; }
+#line 3858 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 78: /* column_type: LONG */
-#line 727 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::LONG}; }
-#line 4041 "bison_parser.cpp"
+ case 78:
+#line 727 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::LONG}; }
+#line 3864 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 79: /* column_type: REAL */
-#line 728 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::REAL}; }
-#line 4047 "bison_parser.cpp"
+ case 79:
+#line 728 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::REAL}; }
+#line 3870 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 80: /* column_type: SMALLINT */
-#line 729 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::SMALLINT}; }
-#line 4053 "bison_parser.cpp"
+ case 80:
+#line 729 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::SMALLINT}; }
+#line 3876 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 81: /* column_type: TEXT */
-#line 730 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::TEXT}; }
-#line 4059 "bison_parser.cpp"
+ case 81:
+#line 730 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::TEXT}; }
+#line 3882 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 82: /* column_type: TIME opt_time_precision */
-#line 731 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].ival)}; }
-#line 4065 "bison_parser.cpp"
+ case 82:
+#line 731 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::TIME, 0, (yyvsp[0].ival)}; }
+#line 3888 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 83: /* column_type: TIMESTAMP */
-#line 732 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; }
-#line 4071 "bison_parser.cpp"
+ case 83:
+#line 732 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::DATETIME}; }
+#line 3894 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 84: /* column_type: VARCHAR '(' INTVAL ')' */
-#line 733 "bison_parser.y"
- { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; }
-#line 4077 "bison_parser.cpp"
+ case 84:
+#line 733 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; }
+#line 3900 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 85: /* opt_time_precision: '(' INTVAL ')' */
-#line 735 "bison_parser.y"
- { (yyval.ival) = (yyvsp[-1].ival); }
-#line 4083 "bison_parser.cpp"
+ case 85:
+#line 735 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.ival) = (yyvsp[-1].ival); }
+#line 3906 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 86: /* opt_time_precision: %empty */
-#line 736 "bison_parser.y"
- { (yyval.ival) = 0; }
-#line 4089 "bison_parser.cpp"
+ case 86:
+#line 736 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.ival) = 0; }
+#line 3912 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 87: /* opt_decimal_specification: '(' INTVAL ',' INTVAL ')' */
-#line 738 "bison_parser.y"
- { (yyval.ival_pair) = new std::pair{(yyvsp[-3].ival), (yyvsp[-1].ival)}; }
-#line 4095 "bison_parser.cpp"
+ case 87:
+#line 738 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.ival_pair) = new std::pair{(yyvsp[-3].ival), (yyvsp[-1].ival)}; }
+#line 3918 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 88: /* opt_decimal_specification: '(' INTVAL ')' */
-#line 739 "bison_parser.y"
- { (yyval.ival_pair) = new std::pair{(yyvsp[-1].ival), 0}; }
-#line 4101 "bison_parser.cpp"
+ case 88:
+#line 739 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.ival_pair) = new std::pair{(yyvsp[-1].ival), 0}; }
+#line 3924 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 89: /* opt_decimal_specification: %empty */
-#line 740 "bison_parser.y"
- { (yyval.ival_pair) = new std::pair{0, 0}; }
-#line 4107 "bison_parser.cpp"
+ case 89:
+#line 740 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.ival_pair) = new std::pair{0, 0}; }
+#line 3930 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 90: /* opt_column_constraints: column_constraints */
-#line 742 "bison_parser.y"
- { (yyval.column_constraints_t) = (yyvsp[0].column_constraints_t); }
-#line 4113 "bison_parser.cpp"
+ case 90:
+#line 742 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraints_t) = (yyvsp[0].column_constraints_t); }
+#line 3936 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 91: /* opt_column_constraints: %empty */
-#line 743 "bison_parser.y"
- { (yyval.column_constraints_t) = new ColumnConstraints(); }
-#line 4119 "bison_parser.cpp"
+ case 91:
+#line 743 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraints_t) = new ColumnConstraints(); }
+#line 3942 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 92: /* column_constraints: column_constraint */
-#line 745 "bison_parser.y"
- {
+ case 92:
+#line 745 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.column_constraints_t) = new ColumnConstraints();
(yyval.column_constraints_t)->constraints->insert((yyvsp[0].column_constraint_t));
}
-#line 4128 "bison_parser.cpp"
+#line 3951 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 93: /* column_constraints: column_constraints column_constraint */
-#line 749 "bison_parser.y"
- {
+ case 93:
+#line 749 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-1].column_constraints_t)->constraints->insert((yyvsp[0].column_constraint_t));
(yyval.column_constraints_t) = (yyvsp[-1].column_constraints_t);
}
-#line 4137 "bison_parser.cpp"
+#line 3960 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 94: /* column_constraints: references_spec */
-#line 753 "bison_parser.y"
- {
+ case 94:
+#line 753 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.column_constraints_t) = new ColumnConstraints();
(yyval.column_constraints_t)->constraints->insert(ConstraintType::ForeignKey);
(yyval.column_constraints_t)->references->emplace_back((yyvsp[0].references_spec_t));
}
-#line 4147 "bison_parser.cpp"
+#line 3970 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 95: /* column_constraints: column_constraints references_spec */
-#line 758 "bison_parser.y"
- {
+ case 95:
+#line 758 "bison_parser.y" /* yacc.c:1646 */
+ {
// Multiple foreign keys for the same column could be possible, so we do not raise an error in that case.
// Think of foreign keys referenced on multiple levels (returned item references sold item references items).
(yyvsp[-1].column_constraints_t)->constraints->insert(ConstraintType::ForeignKey);
(yyvsp[-1].column_constraints_t)->references->emplace_back((yyvsp[0].references_spec_t));
(yyval.column_constraints_t) = (yyvsp[-1].column_constraints_t);
}
-#line 4159 "bison_parser.cpp"
+#line 3982 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 96: /* column_constraint: PRIMARY KEY */
-#line 766 "bison_parser.y"
- { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; }
-#line 4165 "bison_parser.cpp"
+ case 96:
+#line 766 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraint_t) = ConstraintType::PrimaryKey; }
+#line 3988 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 97: /* column_constraint: UNIQUE */
-#line 767 "bison_parser.y"
- { (yyval.column_constraint_t) = ConstraintType::Unique; }
-#line 4171 "bison_parser.cpp"
+ case 97:
+#line 767 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraint_t) = ConstraintType::Unique; }
+#line 3994 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 98: /* column_constraint: NULL */
-#line 768 "bison_parser.y"
- { (yyval.column_constraint_t) = ConstraintType::Null; }
-#line 4177 "bison_parser.cpp"
+ case 98:
+#line 768 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraint_t) = ConstraintType::Null; }
+#line 4000 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 99: /* column_constraint: NOT NULL */
-#line 769 "bison_parser.y"
- { (yyval.column_constraint_t) = ConstraintType::NotNull; }
-#line 4183 "bison_parser.cpp"
+ case 99:
+#line 769 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.column_constraint_t) = ConstraintType::NotNull; }
+#line 4006 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 100: /* table_constraint: PRIMARY KEY '(' ident_commalist ')' */
-#line 771 "bison_parser.y"
- { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); }
-#line 4189 "bison_parser.cpp"
+ case 100:
+#line 771 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::PrimaryKey, (yyvsp[-1].str_vec)); }
+#line 4012 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 101: /* table_constraint: UNIQUE '(' ident_commalist ')' */
-#line 772 "bison_parser.y"
- { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); }
-#line 4195 "bison_parser.cpp"
+ case 101:
+#line 772 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table_constraint_t) = new TableConstraint(ConstraintType::Unique, (yyvsp[-1].str_vec)); }
+#line 4018 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 102: /* table_constraint: FOREIGN KEY '(' ident_commalist ')' references_spec */
-#line 773 "bison_parser.y"
- { (yyval.table_constraint_t) = new ForeignKeyConstraint((yyvsp[-2].str_vec), (yyvsp[0].references_spec_t)); }
-#line 4201 "bison_parser.cpp"
+ case 102:
+#line 773 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table_constraint_t) = new ForeignKeyConstraint((yyvsp[-2].str_vec), (yyvsp[0].references_spec_t)); }
+#line 4024 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 103: /* references_spec: REFERENCES table_name opt_column_list */
-#line 775 "bison_parser.y"
- { (yyval.references_spec_t) = new ReferencesSpecification((yyvsp[-1].table_name).schema, (yyvsp[-1].table_name).name, (yyvsp[0].str_vec)); }
-#line 4207 "bison_parser.cpp"
+ case 103:
+#line 775 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.references_spec_t) = new ReferencesSpecification((yyvsp[-1].table_name).schema, (yyvsp[-1].table_name).name, (yyvsp[0].str_vec)); }
+#line 4030 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 104: /* drop_statement: DROP TABLE opt_exists table_name */
-#line 783 "bison_parser.y"
- {
+ case 104:
+#line 783 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.drop_stmt) = new DropStatement(kDropTable);
(yyval.drop_stmt)->ifExists = (yyvsp[-1].bval);
(yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.drop_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 4218 "bison_parser.cpp"
+#line 4041 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 105: /* drop_statement: DROP VIEW opt_exists table_name */
-#line 789 "bison_parser.y"
- {
+ case 105:
+#line 789 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.drop_stmt) = new DropStatement(kDropView);
(yyval.drop_stmt)->ifExists = (yyvsp[-1].bval);
(yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.drop_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 4229 "bison_parser.cpp"
+#line 4052 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 106: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */
-#line 795 "bison_parser.y"
- {
+ case 106:
+#line 795 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.drop_stmt) = new DropStatement(kDropPreparedStatement);
(yyval.drop_stmt)->ifExists = false;
(yyval.drop_stmt)->name = (yyvsp[0].sval);
}
-#line 4239 "bison_parser.cpp"
+#line 4062 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 107: /* drop_statement: DROP INDEX opt_exists IDENTIFIER */
-#line 801 "bison_parser.y"
- {
+ case 107:
+#line 801 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.drop_stmt) = new DropStatement(kDropIndex);
(yyval.drop_stmt)->ifExists = (yyvsp[-1].bval);
(yyval.drop_stmt)->indexName = (yyvsp[0].sval);
}
-#line 4249 "bison_parser.cpp"
+#line 4072 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 108: /* opt_exists: IF EXISTS */
-#line 807 "bison_parser.y"
- { (yyval.bval) = true; }
-#line 4255 "bison_parser.cpp"
+ case 108:
+#line 807 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = true; }
+#line 4078 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 109: /* opt_exists: %empty */
-#line 808 "bison_parser.y"
- { (yyval.bval) = false; }
-#line 4261 "bison_parser.cpp"
+ case 109:
+#line 808 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = false; }
+#line 4084 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 110: /* alter_statement: ALTER TABLE opt_exists table_name alter_action */
-#line 815 "bison_parser.y"
- {
+ case 110:
+#line 815 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.alter_stmt) = new AlterStatement((yyvsp[-1].table_name).name, (yyvsp[0].alter_action_t));
(yyval.alter_stmt)->ifTableExists = (yyvsp[-2].bval);
(yyval.alter_stmt)->schema = (yyvsp[-1].table_name).schema;
}
-#line 4271 "bison_parser.cpp"
+#line 4094 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 111: /* alter_action: drop_action */
-#line 821 "bison_parser.y"
- { (yyval.alter_action_t) = (yyvsp[0].drop_action_t); }
-#line 4277 "bison_parser.cpp"
+ case 111:
+#line 821 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alter_action_t) = (yyvsp[0].drop_action_t); }
+#line 4100 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 112: /* drop_action: DROP COLUMN opt_exists IDENTIFIER */
-#line 823 "bison_parser.y"
- {
+ case 112:
+#line 823 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.drop_action_t) = new DropColumnAction((yyvsp[0].sval));
(yyval.drop_action_t)->ifExists = (yyvsp[-1].bval);
}
-#line 4286 "bison_parser.cpp"
+#line 4109 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 113: /* delete_statement: DELETE FROM table_name opt_where */
-#line 833 "bison_parser.y"
- {
+ case 113:
+#line 833 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.delete_stmt) = new DeleteStatement();
(yyval.delete_stmt)->schema = (yyvsp[-1].table_name).schema;
(yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name;
(yyval.delete_stmt)->expr = (yyvsp[0].expr);
}
-#line 4297 "bison_parser.cpp"
+#line 4120 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 114: /* truncate_statement: TRUNCATE table_name */
-#line 840 "bison_parser.y"
- {
+ case 114:
+#line 840 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.delete_stmt) = new DeleteStatement();
(yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name;
}
-#line 4307 "bison_parser.cpp"
+#line 4130 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 115: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' extended_literal_list ')' */
-#line 851 "bison_parser.y"
- {
+ case 115:
+#line 851 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.insert_stmt) = new InsertStatement(kInsertValues);
(yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema;
(yyval.insert_stmt)->tableName = (yyvsp[-5].table_name).name;
(yyval.insert_stmt)->columns = (yyvsp[-4].str_vec);
(yyval.insert_stmt)->values = (yyvsp[-1].expr_vec);
}
-#line 4319 "bison_parser.cpp"
+#line 4142 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 116: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */
-#line 858 "bison_parser.y"
- {
+ case 116:
+#line 858 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.insert_stmt) = new InsertStatement(kInsertSelect);
(yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema;
(yyval.insert_stmt)->tableName = (yyvsp[-2].table_name).name;
(yyval.insert_stmt)->columns = (yyvsp[-1].str_vec);
(yyval.insert_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 4331 "bison_parser.cpp"
+#line 4154 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 117: /* opt_column_list: '(' ident_commalist ')' */
-#line 866 "bison_parser.y"
- { (yyval.str_vec) = (yyvsp[-1].str_vec); }
-#line 4337 "bison_parser.cpp"
+ case 117:
+#line 866 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.str_vec) = (yyvsp[-1].str_vec); }
+#line 4160 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 118: /* opt_column_list: %empty */
-#line 867 "bison_parser.y"
- { (yyval.str_vec) = nullptr; }
-#line 4343 "bison_parser.cpp"
+ case 118:
+#line 867 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.str_vec) = nullptr; }
+#line 4166 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 119: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */
-#line 874 "bison_parser.y"
- {
+ case 119:
+#line 874 "bison_parser.y" /* yacc.c:1646 */
+ {
(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);
}
-#line 4354 "bison_parser.cpp"
+#line 4177 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 120: /* update_clause_commalist: update_clause */
-#line 881 "bison_parser.y"
- {
+ case 120:
+#line 881 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.update_vec) = new std::vector();
(yyval.update_vec)->push_back((yyvsp[0].update_t));
}
-#line 4363 "bison_parser.cpp"
+#line 4186 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 121: /* update_clause_commalist: update_clause_commalist ',' update_clause */
-#line 885 "bison_parser.y"
- {
+ case 121:
+#line 885 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t));
(yyval.update_vec) = (yyvsp[-2].update_vec);
}
-#line 4372 "bison_parser.cpp"
+#line 4195 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 122: /* update_clause: IDENTIFIER '=' expr */
-#line 890 "bison_parser.y"
- {
+ case 122:
+#line 890 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.update_t) = new UpdateClause();
(yyval.update_t)->column = (yyvsp[-2].sval);
(yyval.update_t)->value = (yyvsp[0].expr);
}
-#line 4382 "bison_parser.cpp"
+#line 4205 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 123: /* select_statement: opt_with_clause select_with_paren */
-#line 900 "bison_parser.y"
- {
+ case 123:
+#line 900 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[0].select_stmt);
(yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec);
}
-#line 4391 "bison_parser.cpp"
+#line 4214 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 124: /* select_statement: opt_with_clause select_no_paren */
-#line 904 "bison_parser.y"
- {
+ case 124:
+#line 904 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[0].select_stmt);
(yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec);
}
-#line 4400 "bison_parser.cpp"
+#line 4223 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 125: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */
-#line 908 "bison_parser.y"
- {
+ case 125:
+#line 908 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[-4].select_stmt);
if ((yyval.select_stmt)->setOperations == nullptr) {
(yyval.select_stmt)->setOperations = new std::vector();
@@ -4412,18 +4235,18 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit);
(yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec);
}
-#line 4416 "bison_parser.cpp"
+#line 4239 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 128: /* select_within_set_operation_no_parentheses: select_clause */
-#line 922 "bison_parser.y"
- { (yyval.select_stmt) = (yyvsp[0].select_stmt); }
-#line 4422 "bison_parser.cpp"
+ case 128:
+#line 922 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.select_stmt) = (yyvsp[0].select_stmt); }
+#line 4245 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 129: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */
-#line 923 "bison_parser.y"
- {
+ case 129:
+#line 923 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[-2].select_stmt);
if ((yyval.select_stmt)->setOperations == nullptr) {
(yyval.select_stmt)->setOperations = new std::vector();
@@ -4431,24 +4254,24 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->setOperations->push_back((yyvsp[-1].set_operator_t));
(yyval.select_stmt)->setOperations->back()->nestedSelectStatement = (yyvsp[0].select_stmt);
}
-#line 4435 "bison_parser.cpp"
+#line 4258 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 130: /* select_with_paren: '(' select_no_paren ')' */
-#line 932 "bison_parser.y"
- { (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
-#line 4441 "bison_parser.cpp"
+ case 130:
+#line 932 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
+#line 4264 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 131: /* select_with_paren: '(' select_with_paren ')' */
-#line 933 "bison_parser.y"
- { (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
-#line 4447 "bison_parser.cpp"
+ case 131:
+#line 933 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
+#line 4270 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 132: /* select_no_paren: select_clause opt_order opt_limit opt_locking_clause */
-#line 935 "bison_parser.y"
- {
+ case 132:
+#line 935 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[-3].select_stmt);
(yyval.select_stmt)->order = (yyvsp[-2].order_vec);
@@ -4462,12 +4285,12 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->lockings = (yyvsp[0].locking_clause_vec);
}
}
-#line 4466 "bison_parser.cpp"
+#line 4289 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 133: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit opt_locking_clause */
-#line 949 "bison_parser.y"
- {
+ case 133:
+#line 949 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = (yyvsp[-5].select_stmt);
if ((yyval.select_stmt)->setOperations == nullptr) {
(yyval.select_stmt)->setOperations = new std::vector();
@@ -4478,60 +4301,60 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[-1].limit);
(yyval.select_stmt)->lockings = (yyvsp[0].locking_clause_vec);
}
-#line 4482 "bison_parser.cpp"
+#line 4305 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 134: /* set_operator: set_type opt_all */
-#line 961 "bison_parser.y"
- {
+ case 134:
+#line 961 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.set_operator_t) = (yyvsp[-1].set_operator_t);
(yyval.set_operator_t)->isAll = (yyvsp[0].bval);
}
-#line 4491 "bison_parser.cpp"
+#line 4314 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 135: /* set_type: UNION */
-#line 966 "bison_parser.y"
- {
+ case 135:
+#line 966 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetUnion;
}
-#line 4500 "bison_parser.cpp"
+#line 4323 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 136: /* set_type: INTERSECT */
-#line 970 "bison_parser.y"
- {
+ case 136:
+#line 970 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetIntersect;
}
-#line 4509 "bison_parser.cpp"
+#line 4332 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 137: /* set_type: EXCEPT */
-#line 974 "bison_parser.y"
- {
+ case 137:
+#line 974 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetExcept;
}
-#line 4518 "bison_parser.cpp"
+#line 4341 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 138: /* opt_all: ALL */
-#line 979 "bison_parser.y"
- { (yyval.bval) = true; }
-#line 4524 "bison_parser.cpp"
+ case 138:
+#line 979 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = true; }
+#line 4347 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 139: /* opt_all: %empty */
-#line 980 "bison_parser.y"
- { (yyval.bval) = false; }
-#line 4530 "bison_parser.cpp"
+ case 139:
+#line 980 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = false; }
+#line 4353 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 140: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */
-#line 982 "bison_parser.y"
- {
+ case 140:
+#line 982 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.select_stmt) = new SelectStatement();
(yyval.select_stmt)->limit = (yyvsp[-5].limit);
(yyval.select_stmt)->selectDistinct = (yyvsp[-4].bval);
@@ -4540,142 +4363,142 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->whereClause = (yyvsp[-1].expr);
(yyval.select_stmt)->groupBy = (yyvsp[0].group_t);
}
-#line 4544 "bison_parser.cpp"
+#line 4367 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 141: /* opt_distinct: DISTINCT */
-#line 992 "bison_parser.y"
- { (yyval.bval) = true; }
-#line 4550 "bison_parser.cpp"
+ case 141:
+#line 992 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = true; }
+#line 4373 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 142: /* opt_distinct: %empty */
-#line 993 "bison_parser.y"
- { (yyval.bval) = false; }
-#line 4556 "bison_parser.cpp"
+ case 142:
+#line 993 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.bval) = false; }
+#line 4379 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 144: /* opt_from_clause: from_clause */
-#line 997 "bison_parser.y"
- { (yyval.table) = (yyvsp[0].table); }
-#line 4562 "bison_parser.cpp"
+ case 144:
+#line 997 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table) = (yyvsp[0].table); }
+#line 4385 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 145: /* opt_from_clause: %empty */
-#line 998 "bison_parser.y"
- { (yyval.table) = nullptr; }
-#line 4568 "bison_parser.cpp"
+ case 145:
+#line 998 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table) = nullptr; }
+#line 4391 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 146: /* from_clause: FROM table_ref */
-#line 1000 "bison_parser.y"
- { (yyval.table) = (yyvsp[0].table); }
-#line 4574 "bison_parser.cpp"
+ case 146:
+#line 1000 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.table) = (yyvsp[0].table); }
+#line 4397 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 147: /* opt_where: WHERE expr */
-#line 1002 "bison_parser.y"
- { (yyval.expr) = (yyvsp[0].expr); }
-#line 4580 "bison_parser.cpp"
+ case 147:
+#line 1002 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = (yyvsp[0].expr); }
+#line 4403 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 148: /* opt_where: %empty */
-#line 1003 "bison_parser.y"
- { (yyval.expr) = nullptr; }
-#line 4586 "bison_parser.cpp"
+ case 148:
+#line 1003 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = nullptr; }
+#line 4409 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 149: /* opt_group: GROUP BY expr_list opt_having */
-#line 1005 "bison_parser.y"
- {
+ case 149:
+#line 1005 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.group_t) = new GroupByDescription();
(yyval.group_t)->columns = (yyvsp[-1].expr_vec);
(yyval.group_t)->having = (yyvsp[0].expr);
}
-#line 4596 "bison_parser.cpp"
+#line 4419 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 150: /* opt_group: %empty */
-#line 1010 "bison_parser.y"
- { (yyval.group_t) = nullptr; }
-#line 4602 "bison_parser.cpp"
+ case 150:
+#line 1010 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.group_t) = nullptr; }
+#line 4425 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 151: /* opt_having: HAVING expr */
-#line 1012 "bison_parser.y"
- { (yyval.expr) = (yyvsp[0].expr); }
-#line 4608 "bison_parser.cpp"
+ case 151:
+#line 1012 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = (yyvsp[0].expr); }
+#line 4431 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 152: /* opt_having: %empty */
-#line 1013 "bison_parser.y"
- { (yyval.expr) = nullptr; }
-#line 4614 "bison_parser.cpp"
+ case 152:
+#line 1013 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = nullptr; }
+#line 4437 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 153: /* opt_order: ORDER BY order_list */
-#line 1015 "bison_parser.y"
- { (yyval.order_vec) = (yyvsp[0].order_vec); }
-#line 4620 "bison_parser.cpp"
+ case 153:
+#line 1015 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order_vec) = (yyvsp[0].order_vec); }
+#line 4443 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 154: /* opt_order: %empty */
-#line 1016 "bison_parser.y"
- { (yyval.order_vec) = nullptr; }
-#line 4626 "bison_parser.cpp"
+ case 154:
+#line 1016 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order_vec) = nullptr; }
+#line 4449 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 155: /* order_list: order_desc */
-#line 1018 "bison_parser.y"
- {
+ case 155:
+#line 1018 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.order_vec) = new std::vector();
(yyval.order_vec)->push_back((yyvsp[0].order));
}
-#line 4635 "bison_parser.cpp"
+#line 4458 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 156: /* order_list: order_list ',' order_desc */
-#line 1022 "bison_parser.y"
- {
+ case 156:
+#line 1022 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].order_vec)->push_back((yyvsp[0].order));
(yyval.order_vec) = (yyvsp[-2].order_vec);
}
-#line 4644 "bison_parser.cpp"
+#line 4467 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 157: /* order_desc: expr opt_order_type opt_null_ordering */
-#line 1027 "bison_parser.y"
- { (yyval.order) = new OrderDescription((yyvsp[-1].order_type), (yyvsp[-2].expr), (yyvsp[0].null_ordering_t)); }
-#line 4650 "bison_parser.cpp"
+ case 157:
+#line 1027 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order) = new OrderDescription((yyvsp[-1].order_type), (yyvsp[-2].expr), (yyvsp[0].null_ordering_t)); }
+#line 4473 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 158: /* opt_order_type: ASC */
-#line 1029 "bison_parser.y"
- { (yyval.order_type) = kOrderAsc; }
-#line 4656 "bison_parser.cpp"
+ case 158:
+#line 1029 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order_type) = kOrderAsc; }
+#line 4479 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 159: /* opt_order_type: DESC */
-#line 1030 "bison_parser.y"
- { (yyval.order_type) = kOrderDesc; }
-#line 4662 "bison_parser.cpp"
+ case 159:
+#line 1030 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order_type) = kOrderDesc; }
+#line 4485 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 160: /* opt_order_type: %empty */
-#line 1031 "bison_parser.y"
- { (yyval.order_type) = kOrderAsc; }
-#line 4668 "bison_parser.cpp"
+ case 160:
+#line 1031 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.order_type) = kOrderAsc; }
+#line 4491 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 161: /* opt_null_ordering: %empty */
-#line 1033 "bison_parser.y"
- { (yyval.null_ordering_t) = NullOrdering::Undefined; }
-#line 4674 "bison_parser.cpp"
+ case 161:
+#line 1033 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.null_ordering_t) = NullOrdering::Undefined; }
+#line 4497 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 162: /* opt_null_ordering: IDENTIFIER IDENTIFIER */
-#line 1034 "bison_parser.y"
- {
+ case 162:
+#line 1034 "bison_parser.y" /* yacc.c:1646 */
+ {
auto null_ordering = NullOrdering::Undefined;
if (strcasecmp((yyvsp[-1].sval), "nulls") == 0) {
if (strcasecmp((yyvsp[0].sval), "first") == 0) {
@@ -4694,116 +4517,116 @@ YYLTYPE yylloc = yyloc_default;
(yyval.null_ordering_t) = null_ordering;
}
-#line 4698 "bison_parser.cpp"
+#line 4521 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 163: /* opt_top: TOP int_literal */
-#line 1056 "bison_parser.y"
- { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
-#line 4704 "bison_parser.cpp"
+ case 163:
+#line 1056 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
+#line 4527 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 164: /* opt_top: %empty */
-#line 1057 "bison_parser.y"
- { (yyval.limit) = nullptr; }
-#line 4710 "bison_parser.cpp"
+ case 164:
+#line 1057 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = nullptr; }
+#line 4533 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 165: /* opt_limit: LIMIT expr */
-#line 1059 "bison_parser.y"
- { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
-#line 4716 "bison_parser.cpp"
+ case 165:
+#line 1059 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
+#line 4539 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 166: /* opt_limit: OFFSET expr */
-#line 1060 "bison_parser.y"
- { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
-#line 4722 "bison_parser.cpp"
+ case 166:
+#line 1060 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
+#line 4545 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 167: /* opt_limit: LIMIT expr OFFSET expr */
-#line 1061 "bison_parser.y"
- { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); }
-#line 4728 "bison_parser.cpp"
+ case 167:
+#line 1061 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 4551 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 168: /* opt_limit: LIMIT ALL */
-#line 1062 "bison_parser.y"
- { (yyval.limit) = new LimitDescription(nullptr, nullptr); }
-#line 4734 "bison_parser.cpp"
+ case 168:
+#line 1062 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription(nullptr, nullptr); }
+#line 4557 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 169: /* opt_limit: LIMIT ALL OFFSET expr */
-#line 1063 "bison_parser.y"
- { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
-#line 4740 "bison_parser.cpp"
+ case 169:
+#line 1063 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
+#line 4563 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 170: /* opt_limit: %empty */
-#line 1064 "bison_parser.y"
- { (yyval.limit) = nullptr; }
-#line 4746 "bison_parser.cpp"
+ case 170:
+#line 1064 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.limit) = nullptr; }
+#line 4569 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 171: /* expr_list: expr_alias */
-#line 1069 "bison_parser.y"
- {
+ case 171:
+#line 1069 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr_vec) = new std::vector();
(yyval.expr_vec)->push_back((yyvsp[0].expr));
}
-#line 4755 "bison_parser.cpp"
+#line 4578 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 172: /* expr_list: expr_list ',' expr_alias */
-#line 1073 "bison_parser.y"
- {
+ case 172:
+#line 1073 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr));
(yyval.expr_vec) = (yyvsp[-2].expr_vec);
}
-#line 4764 "bison_parser.cpp"
+#line 4587 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 173: /* opt_extended_literal_list: extended_literal_list */
-#line 1079 "bison_parser.y"
- { (yyval.expr_vec) = (yyvsp[0].expr_vec); }
-#line 4770 "bison_parser.cpp"
+ case 173:
+#line 1079 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = (yyvsp[0].expr_vec); }
+#line 4593 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 174: /* opt_extended_literal_list: %empty */
-#line 1080 "bison_parser.y"
- { (yyval.expr_vec) = nullptr; }
-#line 4776 "bison_parser.cpp"
+ case 174:
+#line 1080 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = nullptr; }
+#line 4599 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 175: /* extended_literal_list: casted_extended_literal */
-#line 1082 "bison_parser.y"
- {
+ case 175:
+#line 1082 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr_vec) = new std::vector();
(yyval.expr_vec)->push_back((yyvsp[0].expr));
}
-#line 4785 "bison_parser.cpp"
+#line 4608 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 176: /* extended_literal_list: extended_literal_list ',' casted_extended_literal */
-#line 1086 "bison_parser.y"
- {
+ case 176:
+#line 1086 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr));
(yyval.expr_vec) = (yyvsp[-2].expr_vec);
}
-#line 4794 "bison_parser.cpp"
+#line 4617 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 178: /* casted_extended_literal: CAST '(' extended_literal AS column_type ')' */
-#line 1091 "bison_parser.y"
- {
+ case 178:
+#line 1091 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t));
}
-#line 4802 "bison_parser.cpp"
+#line 4625 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 179: /* extended_literal: literal */
-#line 1095 "bison_parser.y"
- {
+ case 179:
+#line 1095 "bison_parser.y" /* yacc.c:1646 */
+ {
if ((yyvsp[0].expr)->type == ExprType::kExprParameter) {
delete (yyvsp[0].expr);
yyerror(&yyloc, result, scanner, "Parameter ? is not a valid literal.");
@@ -4811,24 +4634,24 @@ YYLTYPE yylloc = yyloc_default;
}
(yyval.expr) = (yyvsp[0].expr);
}
-#line 4815 "bison_parser.cpp"
+#line 4638 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 180: /* extended_literal: '-' num_literal */
-#line 1103 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
-#line 4821 "bison_parser.cpp"
+ case 180:
+#line 1103 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
+#line 4644 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 181: /* extended_literal: '-' interval_literal */
-#line 1104 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
-#line 4827 "bison_parser.cpp"
+ case 181:
+#line 1104 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
+#line 4650 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 182: /* expr_alias: expr opt_alias */
-#line 1106 "bison_parser.y"
- {
+ case 182:
+#line 1106 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = (yyvsp[-1].expr);
if ((yyvsp[0].alias_t)) {
(yyval.expr)->alias = (yyvsp[0].alias_t)->name;
@@ -4836,508 +4659,520 @@ YYLTYPE yylloc = yyloc_default;
delete (yyvsp[0].alias_t);
}
}
-#line 4840 "bison_parser.cpp"
+#line 4663 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 188: /* operand: '(' expr ')' */
-#line 1117 "bison_parser.y"
- { (yyval.expr) = (yyvsp[-1].expr); }
-#line 4846 "bison_parser.cpp"
+ case 188:
+#line 1117 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = (yyvsp[-1].expr); }
+#line 4669 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 198: /* operand: '(' select_no_paren ')' */
-#line 1119 "bison_parser.y"
- {
+ case 198:
+#line 1119 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt));
}
-#line 4854 "bison_parser.cpp"
+#line 4677 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 201: /* unary_expr: '-' operand */
-#line 1125 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
-#line 4860 "bison_parser.cpp"
+ case 201:
+#line 1125 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
+#line 4683 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 202: /* unary_expr: NOT operand */
-#line 1126 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); }
-#line 4866 "bison_parser.cpp"
+ case 202:
+#line 1126 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); }
+#line 4689 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 203: /* unary_expr: operand ISNULL */
-#line 1127 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); }
-#line 4872 "bison_parser.cpp"
+ case 203:
+#line 1127 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); }
+#line 4695 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 204: /* unary_expr: operand IS NULL */
-#line 1128 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); }
-#line 4878 "bison_parser.cpp"
+ case 204:
+#line 1128 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); }
+#line 4701 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 205: /* unary_expr: operand IS NOT NULL */
-#line 1129 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); }
-#line 4884 "bison_parser.cpp"
+ case 205:
+#line 1129 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); }
+#line 4707 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 207: /* binary_expr: operand '-' operand */
-#line 1131 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); }
-#line 4890 "bison_parser.cpp"
+ case 207:
+#line 1131 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); }
+#line 4713 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 208: /* binary_expr: operand '+' operand */
-#line 1132 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); }
-#line 4896 "bison_parser.cpp"
+ case 208:
+#line 1132 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); }
+#line 4719 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 209: /* binary_expr: operand '/' operand */
-#line 1133 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); }
-#line 4902 "bison_parser.cpp"
+ case 209:
+#line 1133 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); }
+#line 4725 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 210: /* binary_expr: operand '*' operand */
-#line 1134 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); }
-#line 4908 "bison_parser.cpp"
+ case 210:
+#line 1134 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); }
+#line 4731 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 211: /* binary_expr: operand '%' operand */
-#line 1135 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); }
-#line 4914 "bison_parser.cpp"
+ case 211:
+#line 1135 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); }
+#line 4737 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 212: /* binary_expr: operand '^' operand */
-#line 1136 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); }
-#line 4920 "bison_parser.cpp"
+ case 212:
+#line 1136 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); }
+#line 4743 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 213: /* binary_expr: operand LIKE operand */
-#line 1137 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); }
-#line 4926 "bison_parser.cpp"
+ case 213:
+#line 1137 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); }
+#line 4749 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 214: /* binary_expr: operand NOT LIKE operand */
-#line 1138 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); }
-#line 4932 "bison_parser.cpp"
+ case 214:
+#line 1138 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); }
+#line 4755 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 215: /* binary_expr: operand ILIKE operand */
-#line 1139 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); }
-#line 4938 "bison_parser.cpp"
+ case 215:
+#line 1139 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); }
+#line 4761 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 216: /* binary_expr: operand CONCAT operand */
-#line 1140 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); }
-#line 4944 "bison_parser.cpp"
+ case 216:
+#line 1140 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); }
+#line 4767 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 217: /* logic_expr: expr AND expr */
-#line 1142 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); }
-#line 4950 "bison_parser.cpp"
+ case 217:
+#line 1142 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); }
+#line 4773 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 218: /* logic_expr: expr OR expr */
-#line 1143 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); }
-#line 4956 "bison_parser.cpp"
+ case 218:
+#line 1143 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); }
+#line 4779 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 219: /* in_expr: operand IN '(' expr_list ')' */
-#line 1145 "bison_parser.y"
- { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); }
-#line 4962 "bison_parser.cpp"
+ case 219:
+#line 1145 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); }
+#line 4785 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 220: /* in_expr: operand NOT IN '(' expr_list ')' */
-#line 1146 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); }
-#line 4968 "bison_parser.cpp"
+ case 220:
+#line 1146 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); }
+#line 4791 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 221: /* in_expr: operand IN '(' select_no_paren ')' */
-#line 1147 "bison_parser.y"
- { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); }
-#line 4974 "bison_parser.cpp"
+ case 221:
+#line 1147 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); }
+#line 4797 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 222: /* in_expr: operand NOT IN '(' select_no_paren ')' */
-#line 1148 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); }
-#line 4980 "bison_parser.cpp"
+ case 222:
+#line 1148 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); }
+#line 4803 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 223: /* case_expr: CASE expr case_list END */
-#line 1152 "bison_parser.y"
- { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); }
-#line 4986 "bison_parser.cpp"
+ case 223:
+#line 1152 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); }
+#line 4809 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 224: /* case_expr: CASE expr case_list ELSE expr END */
-#line 1153 "bison_parser.y"
- { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); }
-#line 4992 "bison_parser.cpp"
+ case 224:
+#line 1153 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); }
+#line 4815 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 225: /* case_expr: CASE case_list END */
-#line 1154 "bison_parser.y"
- { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); }
-#line 4998 "bison_parser.cpp"
+ case 225:
+#line 1154 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); }
+#line 4821 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 226: /* case_expr: CASE case_list ELSE expr END */
-#line 1155 "bison_parser.y"
- { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
-#line 5004 "bison_parser.cpp"
+ case 226:
+#line 1155 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
+#line 4827 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 227: /* case_list: WHEN expr THEN expr */
-#line 1157 "bison_parser.y"
- { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
-#line 5010 "bison_parser.cpp"
+ case 227:
+#line 1157 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
+#line 4833 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 228: /* case_list: case_list WHEN expr THEN expr */
-#line 1158 "bison_parser.y"
- { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
-#line 5016 "bison_parser.cpp"
+ case 228:
+#line 1158 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
+#line 4839 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 229: /* exists_expr: EXISTS '(' select_no_paren ')' */
-#line 1160 "bison_parser.y"
- { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); }
-#line 5022 "bison_parser.cpp"
+ case 229:
+#line 1160 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); }
+#line 4845 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 230: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */
-#line 1161 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); }
-#line 5028 "bison_parser.cpp"
+ case 230:
+#line 1161 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); }
+#line 4851 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 231: /* comp_expr: operand '=' operand */
-#line 1163 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
-#line 5034 "bison_parser.cpp"
+ case 231:
+#line 1163 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
+#line 4857 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 232: /* comp_expr: operand EQUALS operand */
-#line 1164 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
-#line 5040 "bison_parser.cpp"
+ case 232:
+#line 1164 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
+#line 4863 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 233: /* comp_expr: operand NOTEQUALS operand */
-#line 1165 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); }
-#line 5046 "bison_parser.cpp"
+ case 233:
+#line 1165 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); }
+#line 4869 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 234: /* comp_expr: operand '<' operand */
-#line 1166 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); }
-#line 5052 "bison_parser.cpp"
+ case 234:
+#line 1166 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); }
+#line 4875 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 235: /* comp_expr: operand '>' operand */
-#line 1167 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); }
-#line 5058 "bison_parser.cpp"
+ case 235:
+#line 1167 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); }
+#line 4881 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 236: /* comp_expr: operand LESSEQ operand */
-#line 1168 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); }
-#line 5064 "bison_parser.cpp"
+ case 236:
+#line 1168 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); }
+#line 4887 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 237: /* comp_expr: operand GREATEREQ operand */
-#line 1169 "bison_parser.y"
- { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); }
-#line 5070 "bison_parser.cpp"
+ case 237:
+#line 1169 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); }
+#line 4893 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 238: /* function_expr: IDENTIFIER '(' ')' opt_window */
-#line 1173 "bison_parser.y"
- { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-3].sval), new std::vector(), false, (yyvsp[0].window_description)); }
-#line 5076 "bison_parser.cpp"
+ case 238:
+#line 1173 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-3].sval), new std::vector(), false, (yyvsp[0].window_description)); }
+#line 4899 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 239: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' opt_window */
-#line 1174 "bison_parser.y"
- { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-5].sval), (yyvsp[-2].expr_vec), (yyvsp[-3].bval), (yyvsp[0].window_description)); }
-#line 5082 "bison_parser.cpp"
+ case 239:
+#line 1174 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-5].sval), (yyvsp[-2].expr_vec), (yyvsp[-3].bval), (yyvsp[0].window_description)); }
+#line 4905 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 240: /* opt_window: OVER '(' opt_partition opt_order opt_frame_clause ')' */
-#line 1178 "bison_parser.y"
- { (yyval.window_description) = new WindowDescription((yyvsp[-3].expr_vec), (yyvsp[-2].order_vec), (yyvsp[-1].frame_description)); }
-#line 5088 "bison_parser.cpp"
+ case 240:
+#line 1175 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-3].sval), (yyvsp[-5].sval), new std::vector(), false, (yyvsp[0].window_description)); }
+#line 4911 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 241: /* opt_window: %empty */
-#line 1179 "bison_parser.y"
- { (yyval.window_description) = nullptr; }
-#line 5094 "bison_parser.cpp"
+ case 241:
+#line 1176 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-5].sval), (yyvsp[-7].sval), (yyvsp[-2].expr_vec), (yyvsp[-3].bval), (yyvsp[0].window_description)); }
+#line 4917 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 242: /* opt_partition: PARTITION BY expr_list */
-#line 1181 "bison_parser.y"
- { (yyval.expr_vec) = (yyvsp[0].expr_vec); }
-#line 5100 "bison_parser.cpp"
+ case 242:
+#line 1180 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.window_description) = new WindowDescription((yyvsp[-3].expr_vec), (yyvsp[-2].order_vec), (yyvsp[-1].frame_description)); }
+#line 4923 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 243: /* opt_partition: %empty */
-#line 1182 "bison_parser.y"
- { (yyval.expr_vec) = nullptr; }
-#line 5106 "bison_parser.cpp"
+ case 243:
+#line 1181 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.window_description) = nullptr; }
+#line 4929 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 244: /* opt_frame_clause: frame_type frame_bound */
-#line 1187 "bison_parser.y"
- { (yyval.frame_description) = new FrameDescription{(yyvsp[-1].frame_type), (yyvsp[0].frame_bound), new FrameBound{0, kCurrentRow, false}}; }
-#line 5112 "bison_parser.cpp"
+ case 244:
+#line 1183 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = (yyvsp[0].expr_vec); }
+#line 4935 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 245: /* opt_frame_clause: frame_type BETWEEN frame_bound AND frame_bound */
-#line 1188 "bison_parser.y"
- { (yyval.frame_description) = new FrameDescription{(yyvsp[-4].frame_type), (yyvsp[-2].frame_bound), (yyvsp[0].frame_bound)}; }
-#line 5118 "bison_parser.cpp"
+ case 245:
+#line 1184 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr_vec) = nullptr; }
+#line 4941 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 246: /* opt_frame_clause: %empty */
-#line 1189 "bison_parser.y"
- {
+ case 246:
+#line 1189 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_description) = new FrameDescription{(yyvsp[-1].frame_type), (yyvsp[0].frame_bound), new FrameBound{0, kCurrentRow, false}}; }
+#line 4947 "bison_parser.cpp" /* yacc.c:1646 */
+ break;
+
+ case 247:
+#line 1190 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_description) = new FrameDescription{(yyvsp[-4].frame_type), (yyvsp[-2].frame_bound), (yyvsp[0].frame_bound)}; }
+#line 4953 "bison_parser.cpp" /* yacc.c:1646 */
+ break;
+
+ case 248:
+#line 1191 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.frame_description) = new FrameDescription{kRange, new FrameBound{0, kPreceding, true}, new FrameBound{0, kCurrentRow, false}};
}
-#line 5126 "bison_parser.cpp"
+#line 4961 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 247: /* frame_type: RANGE */
-#line 1193 "bison_parser.y"
- { (yyval.frame_type) = kRange; }
-#line 5132 "bison_parser.cpp"
+ case 249:
+#line 1195 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_type) = kRange; }
+#line 4967 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 248: /* frame_type: ROWS */
-#line 1194 "bison_parser.y"
- { (yyval.frame_type) = kRows; }
-#line 5138 "bison_parser.cpp"
+ case 250:
+#line 1196 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_type) = kRows; }
+#line 4973 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 249: /* frame_type: GROUPS */
-#line 1195 "bison_parser.y"
- { (yyval.frame_type) = kGroups; }
-#line 5144 "bison_parser.cpp"
+ case 251:
+#line 1197 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_type) = kGroups; }
+#line 4979 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 250: /* frame_bound: UNBOUNDED PRECEDING */
-#line 1197 "bison_parser.y"
- { (yyval.frame_bound) = new FrameBound{0, kPreceding, true}; }
-#line 5150 "bison_parser.cpp"
+ case 252:
+#line 1199 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_bound) = new FrameBound{0, kPreceding, true}; }
+#line 4985 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 251: /* frame_bound: INTVAL PRECEDING */
-#line 1198 "bison_parser.y"
- { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kPreceding, false}; }
-#line 5156 "bison_parser.cpp"
+ case 253:
+#line 1200 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kPreceding, false}; }
+#line 4991 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 252: /* frame_bound: UNBOUNDED FOLLOWING */
-#line 1199 "bison_parser.y"
- { (yyval.frame_bound) = new FrameBound{0, kFollowing, true}; }
-#line 5162 "bison_parser.cpp"
+ case 254:
+#line 1201 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_bound) = new FrameBound{0, kFollowing, true}; }
+#line 4997 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 253: /* frame_bound: INTVAL FOLLOWING */
-#line 1200 "bison_parser.y"
- { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kFollowing, false}; }
-#line 5168 "bison_parser.cpp"
+ case 255:
+#line 1202 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_bound) = new FrameBound{(yyvsp[-1].ival), kFollowing, false}; }
+#line 5003 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 254: /* frame_bound: CURRENT_ROW */
-#line 1201 "bison_parser.y"
- { (yyval.frame_bound) = new FrameBound{0, kCurrentRow, false}; }
-#line 5174 "bison_parser.cpp"
+ case 256:
+#line 1203 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.frame_bound) = new FrameBound{0, kCurrentRow, false}; }
+#line 5009 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 255: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */
-#line 1203 "bison_parser.y"
- { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); }
-#line 5180 "bison_parser.cpp"
+ case 257:
+#line 1205 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); }
+#line 5015 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 256: /* cast_expr: CAST '(' expr AS column_type ')' */
-#line 1205 "bison_parser.y"
- { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); }
-#line 5186 "bison_parser.cpp"
+ case 258:
+#line 1207 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); }
+#line 5021 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 257: /* datetime_field: SECOND */
-#line 1207 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeSecond; }
-#line 5192 "bison_parser.cpp"
+ case 259:
+#line 1209 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeSecond; }
+#line 5027 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 258: /* datetime_field: MINUTE */
-#line 1208 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeMinute; }
-#line 5198 "bison_parser.cpp"
+ case 260:
+#line 1210 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeMinute; }
+#line 5033 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 259: /* datetime_field: HOUR */
-#line 1209 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeHour; }
-#line 5204 "bison_parser.cpp"
+ case 261:
+#line 1211 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeHour; }
+#line 5039 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 260: /* datetime_field: DAY */
-#line 1210 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeDay; }
-#line 5210 "bison_parser.cpp"
+ case 262:
+#line 1212 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeDay; }
+#line 5045 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 261: /* datetime_field: MONTH */
-#line 1211 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeMonth; }
-#line 5216 "bison_parser.cpp"
+ case 263:
+#line 1213 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeMonth; }
+#line 5051 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 262: /* datetime_field: YEAR */
-#line 1212 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeYear; }
-#line 5222 "bison_parser.cpp"
+ case 264:
+#line 1214 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeYear; }
+#line 5057 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 263: /* datetime_field_plural: SECONDS */
-#line 1214 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeSecond; }
-#line 5228 "bison_parser.cpp"
+ case 265:
+#line 1216 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeSecond; }
+#line 5063 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 264: /* datetime_field_plural: MINUTES */
-#line 1215 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeMinute; }
-#line 5234 "bison_parser.cpp"
+ case 266:
+#line 1217 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeMinute; }
+#line 5069 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 265: /* datetime_field_plural: HOURS */
-#line 1216 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeHour; }
-#line 5240 "bison_parser.cpp"
+ case 267:
+#line 1218 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeHour; }
+#line 5075 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 266: /* datetime_field_plural: DAYS */
-#line 1217 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeDay; }
-#line 5246 "bison_parser.cpp"
+ case 268:
+#line 1219 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeDay; }
+#line 5081 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 267: /* datetime_field_plural: MONTHS */
-#line 1218 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeMonth; }
-#line 5252 "bison_parser.cpp"
+ case 269:
+#line 1220 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeMonth; }
+#line 5087 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 268: /* datetime_field_plural: YEARS */
-#line 1219 "bison_parser.y"
- { (yyval.datetime_field) = kDatetimeYear; }
-#line 5258 "bison_parser.cpp"
+ case 270:
+#line 1221 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.datetime_field) = kDatetimeYear; }
+#line 5093 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 271: /* array_expr: ARRAY '[' expr_list ']' */
-#line 1223 "bison_parser.y"
- { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); }
-#line 5264 "bison_parser.cpp"
+ case 273:
+#line 1225 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); }
+#line 5099 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 272: /* array_index: operand '[' int_literal ']' */
-#line 1225 "bison_parser.y"
- { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); }
-#line 5270 "bison_parser.cpp"
+ case 274:
+#line 1227 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); }
+#line 5105 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 273: /* between_expr: operand BETWEEN operand AND operand */
-#line 1227 "bison_parser.y"
- { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
-#line 5276 "bison_parser.cpp"
+ case 275:
+#line 1229 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
+#line 5111 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 274: /* column_name: IDENTIFIER */
-#line 1229 "bison_parser.y"
- { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); }
-#line 5282 "bison_parser.cpp"
+ case 276:
+#line 1231 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); }
+#line 5117 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 275: /* column_name: IDENTIFIER '.' IDENTIFIER */
-#line 1230 "bison_parser.y"
- { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); }
-#line 5288 "bison_parser.cpp"
+ case 277:
+#line 1232 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); }
+#line 5123 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 276: /* column_name: '*' */
-#line 1231 "bison_parser.y"
- { (yyval.expr) = Expr::makeStar(); }
-#line 5294 "bison_parser.cpp"
+ case 278:
+#line 1233 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeStar(); }
+#line 5129 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 277: /* column_name: IDENTIFIER '.' '*' */
-#line 1232 "bison_parser.y"
- { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); }
-#line 5300 "bison_parser.cpp"
+ case 279:
+#line 1234 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); }
+#line 5135 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 285: /* string_literal: STRING */
-#line 1236 "bison_parser.y"
- { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); }
-#line 5306 "bison_parser.cpp"
+ case 287:
+#line 1238 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); }
+#line 5141 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 286: /* bool_literal: TRUE */
-#line 1238 "bison_parser.y"
- { (yyval.expr) = Expr::makeLiteral(true); }
-#line 5312 "bison_parser.cpp"
+ case 288:
+#line 1240 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeLiteral(true); }
+#line 5147 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 287: /* bool_literal: FALSE */
-#line 1239 "bison_parser.y"
- { (yyval.expr) = Expr::makeLiteral(false); }
-#line 5318 "bison_parser.cpp"
+ case 289:
+#line 1241 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeLiteral(false); }
+#line 5153 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 288: /* num_literal: FLOATVAL */
-#line 1241 "bison_parser.y"
- { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); }
-#line 5324 "bison_parser.cpp"
+ case 290:
+#line 1243 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); }
+#line 5159 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 290: /* int_literal: INTVAL */
-#line 1244 "bison_parser.y"
- { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); }
-#line 5330 "bison_parser.cpp"
+ case 292:
+#line 1246 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); }
+#line 5165 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 291: /* null_literal: NULL */
-#line 1246 "bison_parser.y"
- { (yyval.expr) = Expr::makeNullLiteral(); }
-#line 5336 "bison_parser.cpp"
+ case 293:
+#line 1248 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeNullLiteral(); }
+#line 5171 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 292: /* date_literal: DATE STRING */
-#line 1248 "bison_parser.y"
- {
+ case 294:
+#line 1250 "bison_parser.y" /* yacc.c:1646 */
+ {
int day{0}, month{0}, year{0}, chars_parsed{0};
// If the whole string is parsed, chars_parsed points to the terminating null byte after the last character
if (sscanf((yyvsp[0].sval), "%4d-%2d-%2d%n", &day, &month, &year, &chars_parsed) != 3 || (yyvsp[0].sval)[chars_parsed] != 0) {
@@ -5347,18 +5182,18 @@ YYLTYPE yylloc = yyloc_default;
}
(yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval));
}
-#line 5351 "bison_parser.cpp"
+#line 5186 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 293: /* interval_literal: INTVAL duration_field */
-#line 1259 "bison_parser.y"
- { (yyval.expr) = Expr::makeIntervalLiteral((yyvsp[-1].ival), (yyvsp[0].datetime_field)); }
-#line 5357 "bison_parser.cpp"
+ case 295:
+#line 1261 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.expr) = Expr::makeIntervalLiteral((yyvsp[-1].ival), (yyvsp[0].datetime_field)); }
+#line 5192 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 294: /* interval_literal: INTERVAL STRING datetime_field */
-#line 1260 "bison_parser.y"
- {
+ case 296:
+#line 1262 "bison_parser.y" /* yacc.c:1646 */
+ {
int duration{0}, chars_parsed{0};
// If the whole string is parsed, chars_parsed points to the terminating null byte after the last character
if (sscanf((yyvsp[-1].sval), "%d%n", &duration, &chars_parsed) != 1 || (yyvsp[-1].sval)[chars_parsed] != 0) {
@@ -5369,12 +5204,12 @@ YYLTYPE yylloc = yyloc_default;
free((yyvsp[-1].sval));
(yyval.expr) = Expr::makeIntervalLiteral(duration, (yyvsp[0].datetime_field));
}
-#line 5373 "bison_parser.cpp"
+#line 5208 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 295: /* interval_literal: INTERVAL STRING */
-#line 1271 "bison_parser.y"
- {
+ case 297:
+#line 1273 "bison_parser.y" /* yacc.c:1646 */
+ {
int duration{0}, chars_parsed{0};
// 'seconds' and 'minutes' are the longest accepted interval qualifiers (7 chars) + null byte
char unit_string[8];
@@ -5405,290 +5240,290 @@ YYLTYPE yylloc = yyloc_default;
}
(yyval.expr) = Expr::makeIntervalLiteral(duration, unit);
}
-#line 5409 "bison_parser.cpp"
+#line 5244 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 296: /* param_expr: '?' */
-#line 1303 "bison_parser.y"
- {
+ case 298:
+#line 1305 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.expr) = Expr::makeParameter(yylloc.total_column);
(yyval.expr)->ival2 = yyloc.param_list.size();
yyloc.param_list.push_back((yyval.expr));
}
-#line 5419 "bison_parser.cpp"
+#line 5254 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 298: /* table_ref: table_ref_commalist ',' table_ref_atomic */
-#line 1312 "bison_parser.y"
- {
+ case 300:
+#line 1314 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].table_vec)->push_back((yyvsp[0].table));
auto tbl = new TableRef(kTableCrossProduct);
tbl->list = (yyvsp[-2].table_vec);
(yyval.table) = tbl;
}
-#line 5430 "bison_parser.cpp"
+#line 5265 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 302: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */
-#line 1321 "bison_parser.y"
- {
+ case 304:
+#line 1323 "bison_parser.y" /* yacc.c:1646 */
+ {
auto tbl = new TableRef(kTableSelect);
tbl->select = (yyvsp[-2].select_stmt);
tbl->alias = (yyvsp[0].alias_t);
(yyval.table) = tbl;
}
-#line 5441 "bison_parser.cpp"
+#line 5276 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 303: /* table_ref_commalist: table_ref_atomic */
-#line 1328 "bison_parser.y"
- {
+ case 305:
+#line 1330 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table_vec) = new std::vector();
(yyval.table_vec)->push_back((yyvsp[0].table));
}
-#line 5450 "bison_parser.cpp"
+#line 5285 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 304: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */
-#line 1332 "bison_parser.y"
- {
+ case 306:
+#line 1334 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].table_vec)->push_back((yyvsp[0].table));
(yyval.table_vec) = (yyvsp[-2].table_vec);
}
-#line 5459 "bison_parser.cpp"
+#line 5294 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 305: /* table_ref_name: table_name opt_table_alias */
-#line 1337 "bison_parser.y"
- {
+ case 307:
+#line 1339 "bison_parser.y" /* yacc.c:1646 */
+ {
auto tbl = new TableRef(kTableName);
tbl->schema = (yyvsp[-1].table_name).schema;
tbl->name = (yyvsp[-1].table_name).name;
tbl->alias = (yyvsp[0].alias_t);
(yyval.table) = tbl;
}
-#line 5471 "bison_parser.cpp"
+#line 5306 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 306: /* table_ref_name_no_alias: table_name */
-#line 1345 "bison_parser.y"
- {
+ case 308:
+#line 1347 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table) = new TableRef(kTableName);
(yyval.table)->schema = (yyvsp[0].table_name).schema;
(yyval.table)->name = (yyvsp[0].table_name).name;
}
-#line 5481 "bison_parser.cpp"
+#line 5316 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 307: /* table_name: IDENTIFIER */
-#line 1351 "bison_parser.y"
- {
+ case 309:
+#line 1353 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table_name).schema = nullptr;
(yyval.table_name).name = (yyvsp[0].sval);
}
-#line 5490 "bison_parser.cpp"
+#line 5325 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 308: /* table_name: IDENTIFIER '.' IDENTIFIER */
-#line 1355 "bison_parser.y"
- {
+ case 310:
+#line 1357 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table_name).schema = (yyvsp[-2].sval);
(yyval.table_name).name = (yyvsp[0].sval);
}
-#line 5499 "bison_parser.cpp"
+#line 5334 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 309: /* opt_index_name: IDENTIFIER */
-#line 1360 "bison_parser.y"
- { (yyval.sval) = (yyvsp[0].sval); }
-#line 5505 "bison_parser.cpp"
+ case 311:
+#line 1362 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.sval) = (yyvsp[0].sval); }
+#line 5340 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 310: /* opt_index_name: %empty */
-#line 1361 "bison_parser.y"
- { (yyval.sval) = nullptr; }
-#line 5511 "bison_parser.cpp"
+ case 312:
+#line 1363 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.sval) = nullptr; }
+#line 5346 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 312: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */
-#line 1363 "bison_parser.y"
- { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); }
-#line 5517 "bison_parser.cpp"
+ case 314:
+#line 1365 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); }
+#line 5352 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 314: /* opt_table_alias: %empty */
-#line 1365 "bison_parser.y"
- { (yyval.alias_t) = nullptr; }
-#line 5523 "bison_parser.cpp"
+ case 316:
+#line 1367 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alias_t) = nullptr; }
+#line 5358 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 315: /* alias: AS IDENTIFIER */
-#line 1367 "bison_parser.y"
- { (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
-#line 5529 "bison_parser.cpp"
+ case 317:
+#line 1369 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
+#line 5364 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 316: /* alias: IDENTIFIER */
-#line 1368 "bison_parser.y"
- { (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
-#line 5535 "bison_parser.cpp"
+ case 318:
+#line 1370 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
+#line 5370 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 318: /* opt_alias: %empty */
-#line 1370 "bison_parser.y"
- { (yyval.alias_t) = nullptr; }
-#line 5541 "bison_parser.cpp"
+ case 320:
+#line 1372 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.alias_t) = nullptr; }
+#line 5376 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 319: /* opt_locking_clause: opt_locking_clause_list */
-#line 1376 "bison_parser.y"
- { (yyval.locking_clause_vec) = (yyvsp[0].locking_clause_vec); }
-#line 5547 "bison_parser.cpp"
+ case 321:
+#line 1378 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.locking_clause_vec) = (yyvsp[0].locking_clause_vec); }
+#line 5382 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 320: /* opt_locking_clause: %empty */
-#line 1377 "bison_parser.y"
- { (yyval.locking_clause_vec) = nullptr; }
-#line 5553 "bison_parser.cpp"
+ case 322:
+#line 1379 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.locking_clause_vec) = nullptr; }
+#line 5388 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 321: /* opt_locking_clause_list: locking_clause */
-#line 1379 "bison_parser.y"
- {
+ case 323:
+#line 1381 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.locking_clause_vec) = new std::vector();
(yyval.locking_clause_vec)->push_back((yyvsp[0].locking_t));
}
-#line 5562 "bison_parser.cpp"
+#line 5397 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 322: /* opt_locking_clause_list: opt_locking_clause_list locking_clause */
-#line 1383 "bison_parser.y"
- {
+ case 324:
+#line 1385 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-1].locking_clause_vec)->push_back((yyvsp[0].locking_t));
(yyval.locking_clause_vec) = (yyvsp[-1].locking_clause_vec);
}
-#line 5571 "bison_parser.cpp"
+#line 5406 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 323: /* locking_clause: FOR row_lock_mode opt_row_lock_policy */
-#line 1388 "bison_parser.y"
- {
+ case 325:
+#line 1390 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.locking_t) = new LockingClause();
(yyval.locking_t)->rowLockMode = (yyvsp[-1].lock_mode_t);
(yyval.locking_t)->rowLockWaitPolicy = (yyvsp[0].lock_wait_policy_t);
(yyval.locking_t)->tables = nullptr;
}
-#line 5582 "bison_parser.cpp"
+#line 5417 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 324: /* locking_clause: FOR row_lock_mode OF ident_commalist opt_row_lock_policy */
-#line 1394 "bison_parser.y"
- {
+ case 326:
+#line 1396 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.locking_t) = new LockingClause();
(yyval.locking_t)->rowLockMode = (yyvsp[-3].lock_mode_t);
(yyval.locking_t)->tables = (yyvsp[-1].str_vec);
(yyval.locking_t)->rowLockWaitPolicy = (yyvsp[0].lock_wait_policy_t);
}
-#line 5593 "bison_parser.cpp"
+#line 5428 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 325: /* row_lock_mode: UPDATE */
-#line 1401 "bison_parser.y"
- { (yyval.lock_mode_t) = RowLockMode::ForUpdate; }
-#line 5599 "bison_parser.cpp"
+ case 327:
+#line 1403 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_mode_t) = RowLockMode::ForUpdate; }
+#line 5434 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 326: /* row_lock_mode: NO KEY UPDATE */
-#line 1402 "bison_parser.y"
- { (yyval.lock_mode_t) = RowLockMode::ForNoKeyUpdate; }
-#line 5605 "bison_parser.cpp"
+ case 328:
+#line 1404 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_mode_t) = RowLockMode::ForNoKeyUpdate; }
+#line 5440 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 327: /* row_lock_mode: SHARE */
-#line 1403 "bison_parser.y"
- { (yyval.lock_mode_t) = RowLockMode::ForShare; }
-#line 5611 "bison_parser.cpp"
+ case 329:
+#line 1405 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_mode_t) = RowLockMode::ForShare; }
+#line 5446 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 328: /* row_lock_mode: KEY SHARE */
-#line 1404 "bison_parser.y"
- { (yyval.lock_mode_t) = RowLockMode::ForKeyShare; }
-#line 5617 "bison_parser.cpp"
+ case 330:
+#line 1406 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_mode_t) = RowLockMode::ForKeyShare; }
+#line 5452 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 329: /* opt_row_lock_policy: SKIP LOCKED */
-#line 1406 "bison_parser.y"
- { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::SkipLocked; }
-#line 5623 "bison_parser.cpp"
+ case 331:
+#line 1408 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::SkipLocked; }
+#line 5458 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 330: /* opt_row_lock_policy: NOWAIT */
-#line 1407 "bison_parser.y"
- { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::NoWait; }
-#line 5629 "bison_parser.cpp"
+ case 332:
+#line 1409 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::NoWait; }
+#line 5464 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 331: /* opt_row_lock_policy: %empty */
-#line 1408 "bison_parser.y"
- { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::None; }
-#line 5635 "bison_parser.cpp"
+ case 333:
+#line 1410 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.lock_wait_policy_t) = RowLockWaitPolicy::None; }
+#line 5470 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 333: /* opt_with_clause: %empty */
-#line 1414 "bison_parser.y"
- { (yyval.with_description_vec) = nullptr; }
-#line 5641 "bison_parser.cpp"
+ case 335:
+#line 1416 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.with_description_vec) = nullptr; }
+#line 5476 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 334: /* with_clause: WITH with_description_list */
-#line 1416 "bison_parser.y"
- { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); }
-#line 5647 "bison_parser.cpp"
+ case 336:
+#line 1418 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); }
+#line 5482 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 335: /* with_description_list: with_description */
-#line 1418 "bison_parser.y"
- {
+ case 337:
+#line 1420 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.with_description_vec) = new std::vector();
(yyval.with_description_vec)->push_back((yyvsp[0].with_description_t));
}
-#line 5656 "bison_parser.cpp"
+#line 5491 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 336: /* with_description_list: with_description_list ',' with_description */
-#line 1422 "bison_parser.y"
- {
+ case 338:
+#line 1424 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t));
(yyval.with_description_vec) = (yyvsp[-2].with_description_vec);
}
-#line 5665 "bison_parser.cpp"
+#line 5500 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 337: /* with_description: IDENTIFIER AS select_with_paren */
-#line 1427 "bison_parser.y"
- {
+ case 339:
+#line 1429 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.with_description_t) = new WithDescription();
(yyval.with_description_t)->alias = (yyvsp[-2].sval);
(yyval.with_description_t)->select = (yyvsp[0].select_stmt);
}
-#line 5675 "bison_parser.cpp"
+#line 5510 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 338: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */
-#line 1437 "bison_parser.y"
- {
+ case 340:
+#line 1439 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
(yyval.table)->join->type = kJoinNatural;
(yyval.table)->join->left = (yyvsp[-3].table);
(yyval.table)->join->right = (yyvsp[0].table);
}
-#line 5687 "bison_parser.cpp"
+#line 5522 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 339: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */
-#line 1444 "bison_parser.y"
- {
+ case 341:
+#line 1446 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
(yyval.table)->join->type = (JoinType)(yyvsp[-4].join_type);
@@ -5696,12 +5531,12 @@ YYLTYPE yylloc = yyloc_default;
(yyval.table)->join->right = (yyvsp[-2].table);
(yyval.table)->join->condition = (yyvsp[0].expr);
}
-#line 5700 "bison_parser.cpp"
+#line 5535 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 340: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' ident_commalist ')' */
-#line 1452 "bison_parser.y"
- {
+ case 342:
+#line 1454 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
(yyval.table)->join->type = (yyvsp[-6].join_type);
@@ -5709,90 +5544,89 @@ YYLTYPE yylloc = yyloc_default;
(yyval.table)->join->right = (yyvsp[-4].table);
(yyval.table)->join->namedColumns = (yyvsp[-1].str_vec);
}
-#line 5713 "bison_parser.cpp"
+#line 5548 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 341: /* opt_join_type: INNER */
-#line 1461 "bison_parser.y"
- { (yyval.join_type) = kJoinInner; }
-#line 5719 "bison_parser.cpp"
+ case 343:
+#line 1463 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinInner; }
+#line 5554 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 342: /* opt_join_type: LEFT OUTER */
-#line 1462 "bison_parser.y"
- { (yyval.join_type) = kJoinLeft; }
-#line 5725 "bison_parser.cpp"
+ case 344:
+#line 1464 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinLeft; }
+#line 5560 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 343: /* opt_join_type: LEFT */
-#line 1463 "bison_parser.y"
- { (yyval.join_type) = kJoinLeft; }
-#line 5731 "bison_parser.cpp"
+ case 345:
+#line 1465 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinLeft; }
+#line 5566 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 344: /* opt_join_type: RIGHT OUTER */
-#line 1464 "bison_parser.y"
- { (yyval.join_type) = kJoinRight; }
-#line 5737 "bison_parser.cpp"
+ case 346:
+#line 1466 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinRight; }
+#line 5572 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 345: /* opt_join_type: RIGHT */
-#line 1465 "bison_parser.y"
- { (yyval.join_type) = kJoinRight; }
-#line 5743 "bison_parser.cpp"
+ case 347:
+#line 1467 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinRight; }
+#line 5578 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 346: /* opt_join_type: FULL OUTER */
-#line 1466 "bison_parser.y"
- { (yyval.join_type) = kJoinFull; }
-#line 5749 "bison_parser.cpp"
+ case 348:
+#line 1468 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinFull; }
+#line 5584 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 347: /* opt_join_type: OUTER */
-#line 1467 "bison_parser.y"
- { (yyval.join_type) = kJoinFull; }
-#line 5755 "bison_parser.cpp"
+ case 349:
+#line 1469 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinFull; }
+#line 5590 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 348: /* opt_join_type: FULL */
-#line 1468 "bison_parser.y"
- { (yyval.join_type) = kJoinFull; }
-#line 5761 "bison_parser.cpp"
+ case 350:
+#line 1470 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinFull; }
+#line 5596 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 349: /* opt_join_type: CROSS */
-#line 1469 "bison_parser.y"
- { (yyval.join_type) = kJoinCross; }
-#line 5767 "bison_parser.cpp"
+ case 351:
+#line 1471 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinCross; }
+#line 5602 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 350: /* opt_join_type: %empty */
-#line 1470 "bison_parser.y"
- { (yyval.join_type) = kJoinInner; }
-#line 5773 "bison_parser.cpp"
+ case 352:
+#line 1472 "bison_parser.y" /* yacc.c:1646 */
+ { (yyval.join_type) = kJoinInner; }
+#line 5608 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 354: /* ident_commalist: IDENTIFIER */
-#line 1481 "bison_parser.y"
- {
+ case 356:
+#line 1483 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyval.str_vec) = new std::vector();
(yyval.str_vec)->push_back((yyvsp[0].sval));
}
-#line 5782 "bison_parser.cpp"
+#line 5617 "bison_parser.cpp" /* yacc.c:1646 */
break;
- case 355: /* ident_commalist: ident_commalist ',' IDENTIFIER */
-#line 1485 "bison_parser.y"
- {
+ case 357:
+#line 1487 "bison_parser.y" /* yacc.c:1646 */
+ {
(yyvsp[-2].str_vec)->push_back((yyvsp[0].sval));
(yyval.str_vec) = (yyvsp[-2].str_vec);
}
-#line 5791 "bison_parser.cpp"
+#line 5626 "bison_parser.cpp" /* yacc.c:1646 */
break;
-#line 5795 "bison_parser.cpp"
-
+#line 5630 "bison_parser.cpp" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -5806,10 +5640,11 @@ YYLTYPE yylloc = yyloc_default;
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 ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
*++yylsp = yyloc;
@@ -5817,13 +5652,14 @@ YYLTYPE yylloc = yyloc_default;
/* 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. */
- {
- const int yylhs = yyr1[yyn] - YYNTOKENS;
- const int yyi = yypgoto[yylhs] + *yyssp;
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
- ? yytable[yyi]
- : yydefgoto[yylhs]);
- }
+
+ 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;
@@ -5834,61 +5670,66 @@ YYLTYPE yylloc = yyloc_default;
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
- yytoken = yychar == SQL_HSQL_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
+ 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)
{
- yypcontext_t yyctx
- = {yyssp, yytoken, &yylloc};
char const *yymsgp = YY_("syntax error");
int yysyntax_error_status;
- yysyntax_error_status = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
+ yysyntax_error_status = YYSYNTAX_ERROR;
if (yysyntax_error_status == 0)
yymsgp = yymsg;
- else if (yysyntax_error_status == -1)
+ else if (yysyntax_error_status == 1)
{
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- yymsg = YY_CAST (char *,
- YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
- if (yymsg)
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
{
- yysyntax_error_status
- = yysyntax_error (&yymsg_alloc, &yymsg, &yyctx);
- yymsgp = yymsg;
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
}
else
{
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = YYENOMEM;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
}
}
yyerror (&yylloc, result, scanner, yymsgp);
- if (yysyntax_error_status == YYENOMEM)
- YYNOMEM;
+ 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 <= SQL_YYEOF)
+ if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
- if (yychar == SQL_YYEOF)
+ if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, &yylloc, result, scanner);
- yychar = SQL_HSQL_EMPTY;
+ yychar = YYEMPTY;
}
}
@@ -5901,12 +5742,14 @@ YYLTYPE yylloc = yyloc_default;
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
- /* Pacify compilers when the user code never invokes YYERROR and the
- label yyerrorlab therefore never appears in user code. */
- if (0)
- YYERROR;
- ++yynerrs;
+ /* 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);
@@ -5922,14 +5765,13 @@ YYLTYPE yylloc = yyloc_default;
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
- /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
- yyn += YYSYMBOL_YYerror;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
@@ -5943,7 +5785,7 @@ YYLTYPE yylloc = yyloc_default;
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
- YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, result, scanner);
+ yystos[yystate], yyvsp, yylsp, result, scanner);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -5954,11 +5796,13 @@ YYLTYPE yylloc = yyloc_default;
YY_IGNORE_MAYBE_UNINITIALIZED_END
yyerror_range[2] = yylloc;
- ++yylsp;
- YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
+ /* 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", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -5969,31 +5813,27 @@ YYLTYPE yylloc = yyloc_default;
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
- goto yyreturnlab;
-
+ goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
- goto yyreturnlab;
-
+ goto yyreturn;
-/*-----------------------------------------------------------.
-| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
-`-----------------------------------------------------------*/
+#if !defined yyoverflow || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
yyexhaustedlab:
yyerror (&yylloc, result, scanner, YY_("memory exhausted"));
yyresult = 2;
- goto yyreturnlab;
-
+ /* Fall through. */
+#endif
-/*----------------------------------------------------------.
-| yyreturnlab -- parsing is finished, clean up and return. |
-`----------------------------------------------------------*/
-yyreturnlab:
- if (yychar != SQL_HSQL_EMPTY)
+yyreturn:
+ if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
@@ -6008,19 +5848,20 @@ YYLTYPE yylloc = yyloc_default;
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, result, scanner);
+ 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;
}
-
-#line 1491 "bison_parser.y"
+#line 1493 "bison_parser.y" /* yacc.c:1906 */
/*********************************
diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h
index 20ab7635..b0a2e97b 100644
--- a/src/parser/bison_parser.h
+++ b/src/parser/bison_parser.h
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.8.2. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,7 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see . */
+ along with this program. If not, see . */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -31,10 +30,6 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
- especially those whose name start with YY_ or yy_. They are
- private implementation details that can be changed or removed. */
-
#ifndef YY_HSQL_BISON_PARSER_H_INCLUDED
# define YY_HSQL_BISON_PARSER_H_INCLUDED
/* Debug traces. */
@@ -53,7 +48,7 @@
extern int hsql_debug;
#endif
/* "%code requires" blocks. */
-#line 39 "bison_parser.y"
+#line 39 "bison_parser.y" /* yacc.c:1909 */
// %code requires block
@@ -76,205 +71,201 @@ extern int hsql_debug;
} \
}
-#line 80 "bison_parser.h"
+#line 75 "bison_parser.h" /* yacc.c:1909 */
-/* Token kinds. */
+/* Token type. */
#ifndef HSQL_TOKENTYPE
# define HSQL_TOKENTYPE
enum hsql_tokentype
{
- SQL_HSQL_EMPTY = -2,
- SQL_YYEOF = 0, /* "end of file" */
- SQL_HSQL_error = 256, /* error */
- SQL_HSQL_UNDEF = 257, /* "invalid token" */
- SQL_IDENTIFIER = 258, /* IDENTIFIER */
- SQL_STRING = 259, /* STRING */
- SQL_FLOATVAL = 260, /* FLOATVAL */
- SQL_INTVAL = 261, /* INTVAL */
- SQL_DEALLOCATE = 262, /* DEALLOCATE */
- SQL_PARAMETERS = 263, /* PARAMETERS */
- SQL_INTERSECT = 264, /* INTERSECT */
- SQL_TEMPORARY = 265, /* TEMPORARY */
- SQL_TIMESTAMP = 266, /* TIMESTAMP */
- SQL_DISTINCT = 267, /* DISTINCT */
- SQL_NVARCHAR = 268, /* NVARCHAR */
- SQL_RESTRICT = 269, /* RESTRICT */
- SQL_TRUNCATE = 270, /* TRUNCATE */
- SQL_ANALYZE = 271, /* ANALYZE */
- SQL_BETWEEN = 272, /* BETWEEN */
- SQL_CASCADE = 273, /* CASCADE */
- SQL_COLUMNS = 274, /* COLUMNS */
- SQL_CONTROL = 275, /* CONTROL */
- SQL_DEFAULT = 276, /* DEFAULT */
- SQL_EXECUTE = 277, /* EXECUTE */
- SQL_EXPLAIN = 278, /* EXPLAIN */
- SQL_ENCODING = 279, /* ENCODING */
- SQL_INTEGER = 280, /* INTEGER */
- SQL_NATURAL = 281, /* NATURAL */
- SQL_PREPARE = 282, /* PREPARE */
- SQL_SCHEMAS = 283, /* SCHEMAS */
- SQL_CHARACTER_VARYING = 284, /* CHARACTER_VARYING */
- SQL_REAL = 285, /* REAL */
- SQL_DECIMAL = 286, /* DECIMAL */
- SQL_SMALLINT = 287, /* SMALLINT */
- SQL_BIGINT = 288, /* BIGINT */
- SQL_SPATIAL = 289, /* SPATIAL */
- SQL_VARCHAR = 290, /* VARCHAR */
- SQL_VIRTUAL = 291, /* VIRTUAL */
- SQL_DESCRIBE = 292, /* DESCRIBE */
- SQL_BEFORE = 293, /* BEFORE */
- SQL_COLUMN = 294, /* COLUMN */
- SQL_CREATE = 295, /* CREATE */
- SQL_DELETE = 296, /* DELETE */
- SQL_DIRECT = 297, /* DIRECT */
- SQL_DOUBLE = 298, /* DOUBLE */
- SQL_ESCAPE = 299, /* ESCAPE */
- SQL_EXCEPT = 300, /* EXCEPT */
- SQL_EXISTS = 301, /* EXISTS */
- SQL_EXTRACT = 302, /* EXTRACT */
- SQL_CAST = 303, /* CAST */
- SQL_FORMAT = 304, /* FORMAT */
- SQL_GLOBAL = 305, /* GLOBAL */
- SQL_HAVING = 306, /* HAVING */
- SQL_IMPORT = 307, /* IMPORT */
- SQL_INSERT = 308, /* INSERT */
- SQL_ISNULL = 309, /* ISNULL */
- SQL_OFFSET = 310, /* OFFSET */
- SQL_RENAME = 311, /* RENAME */
- SQL_SCHEMA = 312, /* SCHEMA */
- SQL_SELECT = 313, /* SELECT */
- SQL_SORTED = 314, /* SORTED */
- SQL_TABLES = 315, /* TABLES */
- SQL_UNLOAD = 316, /* UNLOAD */
- SQL_UPDATE = 317, /* UPDATE */
- SQL_VALUES = 318, /* VALUES */
- SQL_AFTER = 319, /* AFTER */
- SQL_ALTER = 320, /* ALTER */
- SQL_CROSS = 321, /* CROSS */
- SQL_DELTA = 322, /* DELTA */
- SQL_FLOAT = 323, /* FLOAT */
- SQL_GROUP = 324, /* GROUP */
- SQL_INDEX = 325, /* INDEX */
- SQL_INNER = 326, /* INNER */
- SQL_LIMIT = 327, /* LIMIT */
- SQL_LOCAL = 328, /* LOCAL */
- SQL_MERGE = 329, /* MERGE */
- SQL_MINUS = 330, /* MINUS */
- SQL_ORDER = 331, /* ORDER */
- SQL_OVER = 332, /* OVER */
- SQL_OUTER = 333, /* OUTER */
- SQL_RIGHT = 334, /* RIGHT */
- SQL_TABLE = 335, /* TABLE */
- SQL_UNION = 336, /* UNION */
- SQL_USING = 337, /* USING */
- SQL_WHERE = 338, /* WHERE */
- SQL_CALL = 339, /* CALL */
- SQL_CASE = 340, /* CASE */
- SQL_CHAR = 341, /* CHAR */
- SQL_COPY = 342, /* COPY */
- SQL_DATE = 343, /* DATE */
- SQL_DATETIME = 344, /* DATETIME */
- SQL_DESC = 345, /* DESC */
- SQL_DROP = 346, /* DROP */
- SQL_ELSE = 347, /* ELSE */
- SQL_FILE = 348, /* FILE */
- SQL_FROM = 349, /* FROM */
- SQL_FULL = 350, /* FULL */
- SQL_HASH = 351, /* HASH */
- SQL_HINT = 352, /* HINT */
- SQL_INTO = 353, /* INTO */
- SQL_JOIN = 354, /* JOIN */
- SQL_LEFT = 355, /* LEFT */
- SQL_LIKE = 356, /* LIKE */
- SQL_LOAD = 357, /* LOAD */
- SQL_LONG = 358, /* LONG */
- SQL_NULL = 359, /* NULL */
- SQL_PARTITION = 360, /* PARTITION */
- SQL_PLAN = 361, /* PLAN */
- SQL_SHOW = 362, /* SHOW */
- SQL_TEXT = 363, /* TEXT */
- SQL_THEN = 364, /* THEN */
- SQL_TIME = 365, /* TIME */
- SQL_VIEW = 366, /* VIEW */
- SQL_WHEN = 367, /* WHEN */
- SQL_WITH = 368, /* WITH */
- SQL_ADD = 369, /* ADD */
- SQL_ALL = 370, /* ALL */
- SQL_AND = 371, /* AND */
- SQL_ASC = 372, /* ASC */
- SQL_END = 373, /* END */
- SQL_FOR = 374, /* FOR */
- SQL_INT = 375, /* INT */
- SQL_NOT = 376, /* NOT */
- SQL_OFF = 377, /* OFF */
- SQL_SET = 378, /* SET */
- SQL_TOP = 379, /* TOP */
- SQL_AS = 380, /* AS */
- SQL_BY = 381, /* BY */
- SQL_IF = 382, /* IF */
- SQL_IN = 383, /* IN */
- SQL_IS = 384, /* IS */
- SQL_OF = 385, /* OF */
- SQL_ON = 386, /* ON */
- SQL_OR = 387, /* OR */
- SQL_TO = 388, /* TO */
- SQL_NO = 389, /* NO */
- SQL_ARRAY = 390, /* ARRAY */
- SQL_CONCAT = 391, /* CONCAT */
- SQL_ILIKE = 392, /* ILIKE */
- SQL_SECOND = 393, /* SECOND */
- SQL_MINUTE = 394, /* MINUTE */
- SQL_HOUR = 395, /* HOUR */
- SQL_DAY = 396, /* DAY */
- SQL_MONTH = 397, /* MONTH */
- SQL_YEAR = 398, /* YEAR */
- SQL_SECONDS = 399, /* SECONDS */
- SQL_MINUTES = 400, /* MINUTES */
- SQL_HOURS = 401, /* HOURS */
- SQL_DAYS = 402, /* DAYS */
- SQL_MONTHS = 403, /* MONTHS */
- SQL_YEARS = 404, /* YEARS */
- SQL_INTERVAL = 405, /* INTERVAL */
- SQL_TRUE = 406, /* TRUE */
- SQL_FALSE = 407, /* FALSE */
- SQL_BOOLEAN = 408, /* BOOLEAN */
- SQL_TRANSACTION = 409, /* TRANSACTION */
- SQL_BEGIN = 410, /* BEGIN */
- SQL_COMMIT = 411, /* COMMIT */
- SQL_ROLLBACK = 412, /* ROLLBACK */
- SQL_NOWAIT = 413, /* NOWAIT */
- SQL_SKIP = 414, /* SKIP */
- SQL_LOCKED = 415, /* LOCKED */
- SQL_SHARE = 416, /* SHARE */
- SQL_RANGE = 417, /* RANGE */
- SQL_ROWS = 418, /* ROWS */
- SQL_GROUPS = 419, /* GROUPS */
- SQL_UNBOUNDED = 420, /* UNBOUNDED */
- SQL_FOLLOWING = 421, /* FOLLOWING */
- SQL_PRECEDING = 422, /* PRECEDING */
- SQL_CURRENT_ROW = 423, /* CURRENT_ROW */
- SQL_UNIQUE = 424, /* UNIQUE */
- SQL_PRIMARY = 425, /* PRIMARY */
- SQL_FOREIGN = 426, /* FOREIGN */
- SQL_KEY = 427, /* KEY */
- SQL_REFERENCES = 428, /* REFERENCES */
- SQL_EQUALS = 429, /* EQUALS */
- SQL_NOTEQUALS = 430, /* NOTEQUALS */
- SQL_LESS = 431, /* LESS */
- SQL_GREATER = 432, /* GREATER */
- SQL_LESSEQ = 433, /* LESSEQ */
- SQL_GREATEREQ = 434, /* GREATEREQ */
- SQL_NOTNULL = 435, /* NOTNULL */
- SQL_UMINUS = 436 /* UMINUS */
+ SQL_IDENTIFIER = 258,
+ SQL_STRING = 259,
+ SQL_FLOATVAL = 260,
+ SQL_INTVAL = 261,
+ SQL_DEALLOCATE = 262,
+ SQL_PARAMETERS = 263,
+ SQL_INTERSECT = 264,
+ SQL_TEMPORARY = 265,
+ SQL_TIMESTAMP = 266,
+ SQL_DISTINCT = 267,
+ SQL_NVARCHAR = 268,
+ SQL_RESTRICT = 269,
+ SQL_TRUNCATE = 270,
+ SQL_ANALYZE = 271,
+ SQL_BETWEEN = 272,
+ SQL_CASCADE = 273,
+ SQL_COLUMNS = 274,
+ SQL_CONTROL = 275,
+ SQL_DEFAULT = 276,
+ SQL_EXECUTE = 277,
+ SQL_EXPLAIN = 278,
+ SQL_ENCODING = 279,
+ SQL_INTEGER = 280,
+ SQL_NATURAL = 281,
+ SQL_PREPARE = 282,
+ SQL_SCHEMAS = 283,
+ SQL_CHARACTER_VARYING = 284,
+ SQL_REAL = 285,
+ SQL_DECIMAL = 286,
+ SQL_SMALLINT = 287,
+ SQL_BIGINT = 288,
+ SQL_SPATIAL = 289,
+ SQL_VARCHAR = 290,
+ SQL_VIRTUAL = 291,
+ SQL_DESCRIBE = 292,
+ SQL_BEFORE = 293,
+ SQL_COLUMN = 294,
+ SQL_CREATE = 295,
+ SQL_DELETE = 296,
+ SQL_DIRECT = 297,
+ SQL_DOUBLE = 298,
+ SQL_ESCAPE = 299,
+ SQL_EXCEPT = 300,
+ SQL_EXISTS = 301,
+ SQL_EXTRACT = 302,
+ SQL_CAST = 303,
+ SQL_FORMAT = 304,
+ SQL_GLOBAL = 305,
+ SQL_HAVING = 306,
+ SQL_IMPORT = 307,
+ SQL_INSERT = 308,
+ SQL_ISNULL = 309,
+ SQL_OFFSET = 310,
+ SQL_RENAME = 311,
+ SQL_SCHEMA = 312,
+ SQL_SELECT = 313,
+ SQL_SORTED = 314,
+ SQL_TABLES = 315,
+ SQL_UNLOAD = 316,
+ SQL_UPDATE = 317,
+ SQL_VALUES = 318,
+ SQL_AFTER = 319,
+ SQL_ALTER = 320,
+ SQL_CROSS = 321,
+ SQL_DELTA = 322,
+ SQL_FLOAT = 323,
+ SQL_GROUP = 324,
+ SQL_INDEX = 325,
+ SQL_INNER = 326,
+ SQL_LIMIT = 327,
+ SQL_LOCAL = 328,
+ SQL_MERGE = 329,
+ SQL_MINUS = 330,
+ SQL_ORDER = 331,
+ SQL_OVER = 332,
+ SQL_OUTER = 333,
+ SQL_RIGHT = 334,
+ SQL_TABLE = 335,
+ SQL_UNION = 336,
+ SQL_USING = 337,
+ SQL_WHERE = 338,
+ SQL_CALL = 339,
+ SQL_CASE = 340,
+ SQL_CHAR = 341,
+ SQL_COPY = 342,
+ SQL_DATE = 343,
+ SQL_DATETIME = 344,
+ SQL_DESC = 345,
+ SQL_DROP = 346,
+ SQL_ELSE = 347,
+ SQL_FILE = 348,
+ SQL_FROM = 349,
+ SQL_FULL = 350,
+ SQL_HASH = 351,
+ SQL_HINT = 352,
+ SQL_INTO = 353,
+ SQL_JOIN = 354,
+ SQL_LEFT = 355,
+ SQL_LIKE = 356,
+ SQL_LOAD = 357,
+ SQL_LONG = 358,
+ SQL_NULL = 359,
+ SQL_PARTITION = 360,
+ SQL_PLAN = 361,
+ SQL_SHOW = 362,
+ SQL_TEXT = 363,
+ SQL_THEN = 364,
+ SQL_TIME = 365,
+ SQL_VIEW = 366,
+ SQL_WHEN = 367,
+ SQL_WITH = 368,
+ SQL_ADD = 369,
+ SQL_ALL = 370,
+ SQL_AND = 371,
+ SQL_ASC = 372,
+ SQL_END = 373,
+ SQL_FOR = 374,
+ SQL_INT = 375,
+ SQL_NOT = 376,
+ SQL_OFF = 377,
+ SQL_SET = 378,
+ SQL_TOP = 379,
+ SQL_AS = 380,
+ SQL_BY = 381,
+ SQL_IF = 382,
+ SQL_IN = 383,
+ SQL_IS = 384,
+ SQL_OF = 385,
+ SQL_ON = 386,
+ SQL_OR = 387,
+ SQL_TO = 388,
+ SQL_NO = 389,
+ SQL_ARRAY = 390,
+ SQL_CONCAT = 391,
+ SQL_ILIKE = 392,
+ SQL_SECOND = 393,
+ SQL_MINUTE = 394,
+ SQL_HOUR = 395,
+ SQL_DAY = 396,
+ SQL_MONTH = 397,
+ SQL_YEAR = 398,
+ SQL_SECONDS = 399,
+ SQL_MINUTES = 400,
+ SQL_HOURS = 401,
+ SQL_DAYS = 402,
+ SQL_MONTHS = 403,
+ SQL_YEARS = 404,
+ SQL_INTERVAL = 405,
+ SQL_TRUE = 406,
+ SQL_FALSE = 407,
+ SQL_BOOLEAN = 408,
+ SQL_TRANSACTION = 409,
+ SQL_BEGIN = 410,
+ SQL_COMMIT = 411,
+ SQL_ROLLBACK = 412,
+ SQL_NOWAIT = 413,
+ SQL_SKIP = 414,
+ SQL_LOCKED = 415,
+ SQL_SHARE = 416,
+ SQL_RANGE = 417,
+ SQL_ROWS = 418,
+ SQL_GROUPS = 419,
+ SQL_UNBOUNDED = 420,
+ SQL_FOLLOWING = 421,
+ SQL_PRECEDING = 422,
+ SQL_CURRENT_ROW = 423,
+ SQL_UNIQUE = 424,
+ SQL_PRIMARY = 425,
+ SQL_FOREIGN = 426,
+ SQL_KEY = 427,
+ SQL_REFERENCES = 428,
+ SQL_EQUALS = 429,
+ SQL_NOTEQUALS = 430,
+ SQL_LESS = 431,
+ SQL_GREATER = 432,
+ SQL_LESSEQ = 433,
+ SQL_GREATEREQ = 434,
+ SQL_NOTNULL = 435,
+ SQL_UMINUS = 436
};
- typedef enum hsql_tokentype hsql_token_kind_t;
#endif
/* Value type. */
#if ! defined HSQL_STYPE && ! defined HSQL_STYPE_IS_DECLARED
+
union HSQL_STYPE
{
-#line 102 "bison_parser.y"
+#line 102 "bison_parser.y" /* yacc.c:1909 */
// clang-format on
bool bval;
@@ -349,9 +340,9 @@ union HSQL_STYPE
// clang-format off
-#line 353 "bison_parser.h"
-
+#line 344 "bison_parser.h" /* yacc.c:1909 */
};
+
typedef union HSQL_STYPE HSQL_STYPE;
# define HSQL_STYPE_IS_TRIVIAL 1
# define HSQL_STYPE_IS_DECLARED 1
@@ -373,8 +364,6 @@ struct HSQL_LTYPE
-
int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner);
-
#endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */
diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y
index 73ed1fa1..053b78a7 100644
--- a/src/parser/bison_parser.y
+++ b/src/parser/bison_parser.y
@@ -1171,7 +1171,9 @@ comp_expr : operand '=' operand { $$ = Expr::makeOpBinary($1, kOpEquals, $3); }
// `function_expr is used for window functions, aggregate expressions, and functions calls because we run into shift/
// reduce conflicts when splitting them.
function_expr : IDENTIFIER '(' ')' opt_window { $$ = Expr::makeFunctionRef($1, new std::vector(), false, $4); }
-| IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($1, $4, $3, $6); };
+| IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($1, $4, $3, $6); }
+| IDENTIFIER '.' IDENTIFIER '(' ')' opt_window { $$ = Expr::makeFunctionRef($3, $1, new std::vector(), false, $6); }
+| IDENTIFIER '.' IDENTIFIER '(' opt_distinct expr_list ')' opt_window { $$ = Expr::makeFunctionRef($3, $1, $6, $5, $8); };
// Window function expressions, based on https://www.postgresql.org/docs/15/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS
// We do not support named windows, collations and exclusions (for simplicity) and filters (not part of the SQL standard).
diff --git a/src/parser/flex_lexer.cpp b/src/parser/flex_lexer.cpp
index c544b92f..5be72eec 100644
--- a/src/parser/flex_lexer.cpp
+++ b/src/parser/flex_lexer.cpp
@@ -1,6 +1,6 @@
-#line 1 "flex_lexer.cpp"
+#line 2 "flex_lexer.cpp"
-#line 3 "flex_lexer.cpp"
+#line 4 "flex_lexer.cpp"
#define YY_INT_ALIGNED short int
@@ -9,245 +9,11 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
-#ifdef yy_create_buffer
-#define hsql__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer hsql__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define hsql__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer hsql__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define hsql__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer hsql__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define hsql__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string hsql__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define hsql__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes hsql__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define hsql__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer hsql__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define hsql__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer hsql__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define hsql__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state hsql__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define hsql__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer hsql__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define hsql_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state hsql_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define hsql_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state hsql_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define hsql_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack hsql_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define hsql_lex_ALREADY_DEFINED
-#else
-#define yylex hsql_lex
-#endif
-
-#ifdef yyrestart
-#define hsql_restart_ALREADY_DEFINED
-#else
-#define yyrestart hsql_restart
-#endif
-
-#ifdef yylex_init
-#define hsql_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init hsql_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define hsql_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra hsql_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define hsql_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy hsql_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define hsql_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug hsql_get_debug
-#endif
-
-#ifdef yyset_debug
-#define hsql_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug hsql_set_debug
-#endif
-
-#ifdef yyget_extra
-#define hsql_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra hsql_get_extra
-#endif
-
-#ifdef yyset_extra
-#define hsql_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra hsql_set_extra
-#endif
-
-#ifdef yyget_in
-#define hsql_get_in_ALREADY_DEFINED
-#else
-#define yyget_in hsql_get_in
-#endif
-
-#ifdef yyset_in
-#define hsql_set_in_ALREADY_DEFINED
-#else
-#define yyset_in hsql_set_in
-#endif
-
-#ifdef yyget_out
-#define hsql_get_out_ALREADY_DEFINED
-#else
-#define yyget_out hsql_get_out
-#endif
-
-#ifdef yyset_out
-#define hsql_set_out_ALREADY_DEFINED
-#else
-#define yyset_out hsql_set_out
-#endif
-
-#ifdef yyget_leng
-#define hsql_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng hsql_get_leng
-#endif
-
-#ifdef yyget_text
-#define hsql_get_text_ALREADY_DEFINED
-#else
-#define yyget_text hsql_get_text
-#endif
-
-#ifdef yyget_lineno
-#define hsql_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno hsql_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define hsql_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno hsql_set_lineno
-#endif
-
-#ifdef yyget_column
-#define hsql_get_column_ALREADY_DEFINED
-#else
-#define yyget_column hsql_get_column
-#endif
-
-#ifdef yyset_column
-#define hsql_set_column_ALREADY_DEFINED
-#else
-#define yyset_column hsql_set_column
-#endif
-
-#ifdef yywrap
-#define hsql_wrap_ALREADY_DEFINED
-#else
-#define yywrap hsql_wrap
-#endif
-
-#ifdef yyget_lval
-#define hsql_get_lval_ALREADY_DEFINED
-#else
-#define yyget_lval hsql_get_lval
-#endif
-
-#ifdef yyset_lval
-#define hsql_set_lval_ALREADY_DEFINED
-#else
-#define yyset_lval hsql_set_lval
-#endif
-
-#ifdef yyget_lloc
-#define hsql_get_lloc_ALREADY_DEFINED
-#else
-#define yyget_lloc hsql_get_lloc
-#endif
-
-#ifdef yyset_lloc
-#define hsql_set_lloc_ALREADY_DEFINED
-#else
-#define yyset_lloc hsql_set_lloc
-#endif
-
-#ifdef yyalloc
-#define hsql_alloc_ALREADY_DEFINED
-#else
-#define yyalloc hsql_alloc
-#endif
-
-#ifdef yyrealloc
-#define hsql_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc hsql_realloc
-#endif
-
-#ifdef yyfree
-#define hsql_free_ALREADY_DEFINED
-#else
-#define yyfree hsql_free
-#endif
-
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -318,16 +84,10 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-/* begin standard C++ headers. */
-
/* TODO: this is always defined, so inline it */
#define yyconst const
@@ -340,10 +100,12 @@ typedef unsigned int flex_uint32_t;
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an
- * integer in range [0..255] for use as an array index.
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
*/
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -367,16 +129,20 @@ typedef void* yyscan_t;
* definition of BEGIN.
*/
#define BEGIN yyg->yy_start = 1 + 2 *
+
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
+
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin , yyscanner )
+#define YY_NEW_FILE hsql_restart(yyin ,yyscanner )
+
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -409,7 +175,7 @@ typedef size_t yy_size_t;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
@@ -418,7 +184,7 @@ typedef size_t yy_size_t;
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
+ yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = yyg->yy_hold_char; \
YY_RESTORE_YY_MORE_OFFSET \
@@ -426,6 +192,7 @@ typedef size_t yy_size_t;
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
+
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -468,7 +235,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -485,7 +252,7 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
+ * (via hsql_restart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -502,67 +269,73 @@ struct yy_buffer_state
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)
+
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
-void yyrestart ( FILE *input_file , yyscan_t yyscanner );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
-void yypop_buffer_state ( yyscan_t yyscanner );
+void hsql_restart (FILE *input_file ,yyscan_t yyscanner );
+void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void hsql__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void hsql__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void hsql_pop_buffer_state (yyscan_t yyscanner );
+
+static void hsql_ensure_buffer_stack (yyscan_t yyscanner );
+static void hsql__load_buffer_state (yyscan_t yyscanner );
+static void hsql__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
-static void yyensure_buffer_stack ( yyscan_t yyscanner );
-static void yy_load_buffer_state ( yyscan_t yyscanner );
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
+#define YY_FLUSH_BUFFER hsql__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-void *yyalloc ( yy_size_t , yyscan_t yyscanner );
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
-void yyfree ( void * , yyscan_t yyscanner );
+void *hsql_alloc (yy_size_t ,yyscan_t yyscanner );
+void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void hsql_free (void * ,yyscan_t yyscanner );
+
+#define yy_new_buffer hsql__create_buffer
-#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- yyensure_buffer_stack (yyscanner); \
+ hsql_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
+ hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
+
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- yyensure_buffer_stack (yyscanner); \
+ hsql_ensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
+ hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
+
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
#define hsql_wrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
-typedef flex_uint8_t YY_CHAR;
+
+typedef unsigned char YY_CHAR;
typedef int yy_state_type;
#define yytext_ptr yytext_r
-static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner);
-static int yy_get_next_buffer ( yyscan_t yyscanner );
-static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
+static int yy_get_next_buffer (yyscan_t yyscanner );
+static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
@@ -573,6 +346,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
+
#define YY_NUM_RULES 189
#define YY_END_OF_BUFFER 190
/* This struct is not used in this scanner,
@@ -582,7 +356,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static const flex_int16_t yy_accept[1368] =
+static yyconst flex_int16_t yy_accept[1368] =
{ 0,
0, 0, 186, 186, 2, 2, 190, 188, 4, 4,
188, 188, 177, 184, 177, 177, 181, 177, 177, 177,
@@ -736,7 +510,7 @@ static const flex_int16_t yy_accept[1368] =
0, 2, 0, 2, 180, 2, 0
} ;
-static const YY_CHAR yy_ec[256] =
+static yyconst YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -768,7 +542,7 @@ static const YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static const YY_CHAR yy_meta[77] =
+static yyconst YY_CHAR yy_meta[77] =
{ 0,
1, 1, 2, 1, 3, 1, 4, 1, 1, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 1,
@@ -780,7 +554,7 @@ static const YY_CHAR yy_meta[77] =
5, 5, 5, 5, 5, 1
} ;
-static const flex_int16_t yy_base[1375] =
+static yyconst flex_uint16_t yy_base[1375] =
{ 0,
0, 0, 852, 842, 76, 0, 842, 8955, 151, 153,
786, 0, 8955, 8955, 149, 148, 160, 159, 778, 775,
@@ -935,7 +709,7 @@ static const flex_int16_t yy_base[1375] =
8934, 8939, 8944, 8949
} ;
-static const flex_int16_t yy_def[1375] =
+static yyconst flex_int16_t yy_def[1375] =
{ 0,
1367, 1, 1368, 1368, 1367, 5, 1367, 1367, 1367, 1367,
1367, 1369, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367,
@@ -1090,7 +864,7 @@ static const flex_int16_t yy_def[1375] =
1367, 1367, 1367, 1367
} ;
-static const flex_int16_t yy_nxt[9032] =
+static yyconst flex_uint16_t yy_nxt[9032] =
{ 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 18,
@@ -2088,7 +1862,7 @@ static const flex_int16_t yy_nxt[9032] =
1367
} ;
-static const flex_int16_t yy_chk[9032] =
+static yyconst flex_int16_t yy_chk[9032] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -3114,7 +2888,6 @@ static const flex_int16_t yy_chk[9032] =
static thread_local std::stringstream strbuf;
-#line 3117 "flex_lexer.cpp"
/***************************
** Section 2: Rules
@@ -3128,7 +2901,7 @@ static thread_local std::stringstream strbuf;
/***************************
** Section 3: Rules
***************************/
-#line 3131 "flex_lexer.cpp"
+#line 2905 "flex_lexer.cpp"
#define INITIAL 0
#define singlequotedstring 1
@@ -3184,7 +2957,7 @@ struct yyguts_t
}; /* end struct yyguts_t */
-static int yy_init_globals ( yyscan_t yyscanner );
+static int yy_init_globals (yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
@@ -3192,50 +2965,50 @@ static int yy_init_globals ( yyscan_t yyscanner );
# define yylloc yyg->yylloc_r
-int yylex_init (yyscan_t* scanner);
+int hsql_lex_init (yyscan_t* scanner);
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
+int hsql_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy ( yyscan_t yyscanner );
+int hsql_lex_destroy (yyscan_t yyscanner );
-int yyget_debug ( yyscan_t yyscanner );
+int hsql_get_debug (yyscan_t yyscanner );
-void yyset_debug ( int debug_flag , yyscan_t yyscanner );
+void hsql_set_debug (int debug_flag ,yyscan_t yyscanner );
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
+YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner );
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
+void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-FILE *yyget_in ( yyscan_t yyscanner );
+FILE *hsql_get_in (yyscan_t yyscanner );
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
+void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner );
-FILE *yyget_out ( yyscan_t yyscanner );
+FILE *hsql_get_out (yyscan_t yyscanner );
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
+void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner );
- int yyget_leng ( yyscan_t yyscanner );
+ int hsql_get_leng (yyscan_t yyscanner );
-char *yyget_text ( yyscan_t yyscanner );
+char *hsql_get_text (yyscan_t yyscanner );
-int yyget_lineno ( yyscan_t yyscanner );
+int hsql_get_lineno (yyscan_t yyscanner );
-void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+void hsql_set_lineno (int _line_number ,yyscan_t yyscanner );
-int yyget_column ( yyscan_t yyscanner );
+int hsql_get_column (yyscan_t yyscanner );
-void yyset_column ( int _column_no , yyscan_t yyscanner );
+void hsql_set_column (int _column_no ,yyscan_t yyscanner );
-YYSTYPE * yyget_lval ( yyscan_t yyscanner );
+YYSTYPE * hsql_get_lval (yyscan_t yyscanner );
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
+void hsql_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
- YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
+ YYLTYPE *hsql_get_lloc (yyscan_t yyscanner );
- void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
+ void hsql_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -3243,9 +3016,9 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( yyscan_t yyscanner );
+extern "C" int hsql_wrap (yyscan_t yyscanner );
#else
-extern int yywrap ( yyscan_t yyscanner );
+extern int hsql_wrap (yyscan_t yyscanner );
#endif
#endif
@@ -3254,18 +3027,19 @@ extern int yywrap ( yyscan_t yyscanner );
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
+
#ifdef __cplusplus
-static int yyinput ( yyscan_t yyscanner );
+static int yyinput (yyscan_t yyscanner );
#else
-static int input ( yyscan_t yyscanner );
+static int input (yyscan_t yyscanner );
#endif
#endif
@@ -3350,10 +3124,10 @@ static int input ( yyscan_t yyscanner );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex \
- (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
+extern int hsql_lex \
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-#define YY_DECL int yylex \
+#define YY_DECL int hsql_lex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
@@ -3403,19 +3177,19 @@ YY_DECL
yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- yyensure_buffer_stack (yyscanner);
+ hsql_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
+ hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
- yy_load_buffer_state( yyscanner );
+ hsql__load_buffer_state(yyscanner );
}
{
#line 57 "flex_lexer.l"
-#line 3418 "flex_lexer.cpp"
+#line 3193 "flex_lexer.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -3443,9 +3217,9 @@ YY_DECL
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1368 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
++yy_cp;
}
while ( yy_current_state != 1367 );
@@ -4446,7 +4220,7 @@ YY_RULE_SETUP
#line 288 "flex_lexer.l"
ECHO;
YY_BREAK
-#line 4449 "flex_lexer.cpp"
+#line 4224 "flex_lexer.cpp"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMENT):
yyterminate();
@@ -4465,7 +4239,7 @@ case YY_STATE_EOF(COMMENT):
/* We're scanning a new file or input source. It's
* possible that this happened because the user
* just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
+ * hsql_lex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
@@ -4526,7 +4300,7 @@ case YY_STATE_EOF(COMMENT):
{
yyg->yy_did_buffer_switch_on_eof = 0;
- if ( yywrap( yyscanner ) )
+ if ( hsql_wrap(yyscanner ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -4580,7 +4354,7 @@ case YY_STATE_EOF(COMMENT):
} /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
-} /* end of yylex */
+} /* end of hsql_lex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -4594,7 +4368,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = yyg->yytext_ptr;
- int number_to_move, i;
+ yy_size_t number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -4623,7 +4397,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
+ number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -4659,8 +4433,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- yyrealloc( (void *) b->yy_ch_buf,
- (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
+ hsql_realloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
}
else
/* Can't grow it, we don't own it. */
@@ -4692,7 +4465,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin , yyscanner);
+ hsql_restart(yyin ,yyscanner);
}
else
@@ -4706,15 +4479,12 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hsql_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ,yyscanner );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
- /* "- 2" to take care of EOB's */
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
yyg->yy_n_chars += number_to_move;
@@ -4748,9 +4518,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1368 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
}
return yy_current_state;
@@ -4777,9 +4547,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 1368 )
- yy_c = yy_meta[yy_c];
+ yy_c = yy_meta[(unsigned int) yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
yy_is_jam = (yy_current_state == 1367);
(void)yyg;
@@ -4815,7 +4585,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -4832,13 +4602,13 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
/* Reset buffer status. */
- yyrestart( yyin , yyscanner);
+ hsql_restart(yyin ,yyscanner);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap( yyscanner ) )
+ if ( hsql_wrap(yyscanner ) )
return 0;
if ( ! yyg->yy_did_buffer_switch_on_eof )
@@ -4870,34 +4640,34 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @note This function does not reset the start condition to @c INITIAL .
*/
- void yyrestart (FILE * input_file , yyscan_t yyscanner)
+ void hsql_restart (FILE * input_file , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! YY_CURRENT_BUFFER ){
- yyensure_buffer_stack (yyscanner);
+ hsql_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
+ hsql__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
- yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
- yy_load_buffer_state( yyscanner );
+ hsql__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
+ hsql__load_buffer_state(yyscanner );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
* @param yyscanner The scanner object.
*/
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+ void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
- * yypop_buffer_state();
- * yypush_buffer_state(new_buffer);
+ * hsql_pop_buffer_state();
+ * hsql_push_buffer_state(new_buffer);
*/
- yyensure_buffer_stack (yyscanner);
+ hsql_ensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -4910,17 +4680,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- yy_load_buffer_state( yyscanner );
+ hsql__load_buffer_state(yyscanner );
/* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
+ * EOF (hsql_wrap()) processing, but the only time this flag
+ * is looked at is after hsql_wrap() is called, so it's safe
* to go ahead and always set it.
*/
yyg->yy_did_buffer_switch_on_eof = 1;
}
-static void yy_load_buffer_state (yyscan_t yyscanner)
+static void hsql__load_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
@@ -4935,35 +4705,35 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
+ YY_BUFFER_STATE hsql__create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
+ b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
+ b->yy_ch_buf = (char *) hsql_alloc((yy_size_t) (b->yy_buf_size + 2) ,yyscanner );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in hsql__create_buffer()" );
b->yy_is_our_buffer = 1;
- yy_init_buffer( b, file , yyscanner);
+ hsql__init_buffer(b,file ,yyscanner);
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with yy_create_buffer()
+ * @param b a buffer created with hsql__create_buffer()
* @param yyscanner The scanner object.
*/
- void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void hsql__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -4974,28 +4744,28 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- yyfree( (void *) b->yy_ch_buf , yyscanner );
+ hsql_free((void *) b->yy_ch_buf ,yyscanner );
- yyfree( (void *) b , yyscanner );
+ hsql_free((void *) b ,yyscanner );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a yyrestart() or at EOF.
+ * such as during a hsql_restart() or at EOF.
*/
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+ static void hsql__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
{
int oerrno = errno;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flush_buffer( b , yyscanner);
+ hsql__flush_buffer(b ,yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then yy_init_buffer was _probably_
- * called from yyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then hsql__init_buffer was _probably_
+ * called from hsql_restart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -5012,7 +4782,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
* @param yyscanner The scanner object.
*/
- void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+ void hsql__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
@@ -5033,7 +4803,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- yy_load_buffer_state( yyscanner );
+ hsql__load_buffer_state(yyscanner );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -5042,15 +4812,15 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
* @param new_buffer The new state.
* @param yyscanner The scanner object.
*/
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
- yyensure_buffer_stack(yyscanner);
+ hsql_ensure_buffer_stack(yyscanner);
- /* This block is copied from yy_switch_to_buffer. */
+ /* This block is copied from hsql__switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -5064,8 +4834,8 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
yyg->yy_buffer_stack_top++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from yy_switch_to_buffer. */
- yy_load_buffer_state( yyscanner );
+ /* copied from hsql__switch_to_buffer. */
+ hsql__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
@@ -5073,19 +4843,19 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
* The next element becomes the new top.
* @param yyscanner The scanner object.
*/
-void yypop_buffer_state (yyscan_t yyscanner)
+void hsql_pop_buffer_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
- yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
+ hsql__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
YY_CURRENT_BUFFER_LVALUE = NULL;
if (yyg->yy_buffer_stack_top > 0)
--yyg->yy_buffer_stack_top;
if (YY_CURRENT_BUFFER) {
- yy_load_buffer_state( yyscanner );
+ hsql__load_buffer_state(yyscanner );
yyg->yy_did_buffer_switch_on_eof = 1;
}
}
@@ -5093,9 +4863,9 @@ void yypop_buffer_state (yyscan_t yyscanner)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void yyensure_buffer_stack (yyscan_t yyscanner)
+static void hsql_ensure_buffer_stack (yyscan_t yyscanner)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@@ -5105,14 +4875,14 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
* immediate realloc on the next call.
*/
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_alloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" );
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -5124,12 +4894,12 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)hsql_realloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in hsql_ensure_buffer_stack()" );
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -5141,9 +4911,9 @@ static void yyensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
+YY_BUFFER_STATE hsql__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
@@ -5153,9 +4923,9 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
/* They forgot to leave room for the EOB's. */
return NULL;
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
+ b = (YY_BUFFER_STATE) hsql_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_buffer()" );
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -5167,33 +4937,33 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b , yyscanner );
+ hsql__switch_to_buffer(b ,yyscanner );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to yylex() will
+/** Setup the input buffer state to scan a string. The next call to hsql_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * yy_scan_bytes() instead.
+ * hsql__scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
+YY_BUFFER_STATE hsql__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
- return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
+ return hsql__scan_bytes(yystr,(int) strlen(yystr) ,yyscanner);
}
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to hsql_lex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
+YY_BUFFER_STATE hsql__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
char *buf;
@@ -5202,18 +4972,18 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan
/* Get memory for full buffer, including space for trailing EOB's. */
n = (yy_size_t) (_yybytes_len + 2);
- buf = (char *) yyalloc( n , yyscanner );
+ buf = (char *) hsql_alloc(n ,yyscanner );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in hsql__scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n , yyscanner);
+ b = hsql__scan_buffer(buf,n ,yyscanner);
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in hsql__scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -5227,11 +4997,11 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan
#define YY_EXIT_FAILURE 2
#endif
-static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
+static void yynoreturn yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
- fprintf( stderr, "%s\n", msg );
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -5242,7 +5012,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
do \
{ \
/* Undo effects of setting up yytext. */ \
- int yyless_macro_arg = (n); \
+ yy_size_t yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = yyg->yy_hold_char; \
yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
@@ -5257,7 +5027,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
+YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyextra;
@@ -5266,10 +5036,10 @@ YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int yyget_lineno (yyscan_t yyscanner)
+int hsql_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
@@ -5279,10 +5049,10 @@ int yyget_lineno (yyscan_t yyscanner)
/** Get the current column number.
* @param yyscanner The scanner object.
*/
-int yyget_column (yyscan_t yyscanner)
+int hsql_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
@@ -5292,7 +5062,7 @@ int yyget_column (yyscan_t yyscanner)
/** Get the input stream.
* @param yyscanner The scanner object.
*/
-FILE *yyget_in (yyscan_t yyscanner)
+FILE *hsql_get_in (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyin;
@@ -5301,7 +5071,7 @@ FILE *yyget_in (yyscan_t yyscanner)
/** Get the output stream.
* @param yyscanner The scanner object.
*/
-FILE *yyget_out (yyscan_t yyscanner)
+FILE *hsql_get_out (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyout;
@@ -5310,7 +5080,7 @@ FILE *yyget_out (yyscan_t yyscanner)
/** Get the length of the current token.
* @param yyscanner The scanner object.
*/
-int yyget_leng (yyscan_t yyscanner)
+int hsql_get_leng (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyleng;
@@ -5320,7 +5090,7 @@ int yyget_leng (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
-char *yyget_text (yyscan_t yyscanner)
+char *hsql_get_text (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yytext;
@@ -5330,7 +5100,7 @@ char *yyget_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
+void hsql_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyextra = user_defined ;
@@ -5340,13 +5110,13 @@ void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
* @param _line_number line number
* @param yyscanner The scanner object.
*/
-void yyset_lineno (int _line_number , yyscan_t yyscanner)
+void hsql_set_lineno (int _line_number , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
+ YY_FATAL_ERROR( "hsql_set_lineno called with no buffer" );
yylineno = _line_number;
}
@@ -5355,13 +5125,13 @@ void yyset_lineno (int _line_number , yyscan_t yyscanner)
* @param _column_no column number
* @param yyscanner The scanner object.
*/
-void yyset_column (int _column_no , yyscan_t yyscanner)
+void hsql_set_column (int _column_no , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- YY_FATAL_ERROR( "yyset_column called with no buffer" );
+ YY_FATAL_ERROR( "hsql_set_column called with no buffer" );
yycolumn = _column_no;
}
@@ -5370,27 +5140,27 @@ void yyset_column (int _column_no , yyscan_t yyscanner)
* input buffer.
* @param _in_str A readable stream.
* @param yyscanner The scanner object.
- * @see yy_switch_to_buffer
+ * @see hsql__switch_to_buffer
*/
-void yyset_in (FILE * _in_str , yyscan_t yyscanner)
+void hsql_set_in (FILE * _in_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyin = _in_str ;
}
-void yyset_out (FILE * _out_str , yyscan_t yyscanner)
+void hsql_set_out (FILE * _out_str , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yyout = _out_str ;
}
-int yyget_debug (yyscan_t yyscanner)
+int hsql_get_debug (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yy_flex_debug;
}
-void yyset_debug (int _bdebug , yyscan_t yyscanner)
+void hsql_set_debug (int _bdebug , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_flex_debug = _bdebug ;
@@ -5398,25 +5168,25 @@ void yyset_debug (int _bdebug , yyscan_t yyscanner)
/* Accessor methods for yylval and yylloc */
-YYSTYPE * yyget_lval (yyscan_t yyscanner)
+YYSTYPE * hsql_get_lval (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylval;
}
-void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
+void hsql_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylval = yylval_param;
}
-YYLTYPE *yyget_lloc (yyscan_t yyscanner)
+YYLTYPE *hsql_get_lloc (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
+void hsql_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
@@ -5424,18 +5194,20 @@ void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
/* User-visible API */
-/* yylex_init is special because it creates the scanner itself, so it is
+/* hsql_lex_init is special because it creates the scanner itself, so it is
* the ONLY reentrant function that doesn't take the scanner as the last argument.
* That's why we explicitly handle the declaration, instead of using our macros.
*/
-int yylex_init(yyscan_t* ptr_yy_globals)
+
+int hsql_lex_init(yyscan_t* ptr_yy_globals)
+
{
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), NULL );
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
@@ -5448,37 +5220,39 @@ int yylex_init(yyscan_t* ptr_yy_globals)
return yy_init_globals ( *ptr_yy_globals );
}
-/* yylex_init_extra has the same functionality as yylex_init, but follows the
+/* hsql_lex_init_extra has the same functionality as hsql_lex_init, but follows the
* convention of taking the scanner as the last argument. Note however, that
* this is a *pointer* to a scanner, as it will be allocated by this call (and
* is the reason, too, why this function also must handle its own declaration).
- * The user defined value in the first argument will be available to yyalloc in
+ * The user defined value in the first argument will be available to hsql_alloc in
* the yyextra field.
*/
-int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
+
+int hsql_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
+
{
struct yyguts_t dummy_yyguts;
- yyset_extra (yy_user_defined, &dummy_yyguts);
+ hsql_set_extra (yy_user_defined, &dummy_yyguts);
if (ptr_yy_globals == NULL){
errno = EINVAL;
return 1;
}
-
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+
+ *ptr_yy_globals = (yyscan_t) hsql_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
- yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+
+ hsql_set_extra (yy_user_defined, *ptr_yy_globals);
+
return yy_init_globals ( *ptr_yy_globals );
}
@@ -5486,7 +5260,7 @@ static int yy_init_globals (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from yylex_destroy(), so don't allocate here.
+ * This function is called from hsql_lex_destroy(), so don't allocate here.
*/
yyg->yy_buffer_stack = NULL;
@@ -5510,37 +5284,37 @@ static int yy_init_globals (yyscan_t yyscanner)
#endif
/* For future reference: Set errno on error, since we are called by
- * yylex_init()
+ * hsql_lex_init()
*/
return 0;
}
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-int yylex_destroy (yyscan_t yyscanner)
+/* hsql_lex_destroy is for both reentrant and non-reentrant scanners. */
+int hsql_lex_destroy (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
+ hsql__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
- yypop_buffer_state(yyscanner);
+ hsql_pop_buffer_state(yyscanner);
}
/* Destroy the stack itself. */
- yyfree(yyg->yy_buffer_stack , yyscanner);
+ hsql_free(yyg->yy_buffer_stack ,yyscanner);
yyg->yy_buffer_stack = NULL;
/* Destroy the start condition stack. */
- yyfree( yyg->yy_start_stack , yyscanner );
+ hsql_free(yyg->yy_start_stack ,yyscanner );
yyg->yy_start_stack = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * yylex() is called, initialization will occur. */
+ * hsql_lex() is called, initialization will occur. */
yy_init_globals( yyscanner);
/* Destroy the main struct (reentrant only). */
- yyfree ( yyscanner , yyscanner );
+ hsql_free ( yyscanner , yyscanner );
yyscanner = NULL;
return 0;
}
@@ -5550,7 +5324,7 @@ int yylex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
@@ -5562,7 +5336,7 @@ static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscann
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
int n;
for ( n = 0; s[n]; ++n )
@@ -5572,14 +5346,14 @@ static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
}
#endif
-void *yyalloc (yy_size_t size , yyscan_t yyscanner)
+void *hsql_alloc (yy_size_t size , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
return malloc(size);
}
-void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
+void *hsql_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
@@ -5594,17 +5368,18 @@ void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
return realloc(ptr, size);
}
-void yyfree (void * ptr , yyscan_t yyscanner)
+void hsql_free (void * ptr , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
(void)yyg;
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see hsql_realloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 288 "flex_lexer.l"
+
/***************************
** Section 3: User code
***************************/
diff --git a/src/parser/flex_lexer.h b/src/parser/flex_lexer.h
index 40aa36a4..8beb9fda 100644
--- a/src/parser/flex_lexer.h
+++ b/src/parser/flex_lexer.h
@@ -2,9 +2,9 @@
#define hsql_HEADER_H 1
#define hsql_IN_HEADER 1
-#line 5 "flex_lexer.h"
+#line 6 "flex_lexer.h"
-#line 7 "flex_lexer.h"
+#line 8 "flex_lexer.h"
#define YY_INT_ALIGNED short int
@@ -13,245 +13,11 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
-#define YY_FLEX_SUBMINOR_VERSION 4
+#define YY_FLEX_SUBMINOR_VERSION 1
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
-#ifdef yy_create_buffer
-#define hsql__create_buffer_ALREADY_DEFINED
-#else
-#define yy_create_buffer hsql__create_buffer
-#endif
-
-#ifdef yy_delete_buffer
-#define hsql__delete_buffer_ALREADY_DEFINED
-#else
-#define yy_delete_buffer hsql__delete_buffer
-#endif
-
-#ifdef yy_scan_buffer
-#define hsql__scan_buffer_ALREADY_DEFINED
-#else
-#define yy_scan_buffer hsql__scan_buffer
-#endif
-
-#ifdef yy_scan_string
-#define hsql__scan_string_ALREADY_DEFINED
-#else
-#define yy_scan_string hsql__scan_string
-#endif
-
-#ifdef yy_scan_bytes
-#define hsql__scan_bytes_ALREADY_DEFINED
-#else
-#define yy_scan_bytes hsql__scan_bytes
-#endif
-
-#ifdef yy_init_buffer
-#define hsql__init_buffer_ALREADY_DEFINED
-#else
-#define yy_init_buffer hsql__init_buffer
-#endif
-
-#ifdef yy_flush_buffer
-#define hsql__flush_buffer_ALREADY_DEFINED
-#else
-#define yy_flush_buffer hsql__flush_buffer
-#endif
-
-#ifdef yy_load_buffer_state
-#define hsql__load_buffer_state_ALREADY_DEFINED
-#else
-#define yy_load_buffer_state hsql__load_buffer_state
-#endif
-
-#ifdef yy_switch_to_buffer
-#define hsql__switch_to_buffer_ALREADY_DEFINED
-#else
-#define yy_switch_to_buffer hsql__switch_to_buffer
-#endif
-
-#ifdef yypush_buffer_state
-#define hsql_push_buffer_state_ALREADY_DEFINED
-#else
-#define yypush_buffer_state hsql_push_buffer_state
-#endif
-
-#ifdef yypop_buffer_state
-#define hsql_pop_buffer_state_ALREADY_DEFINED
-#else
-#define yypop_buffer_state hsql_pop_buffer_state
-#endif
-
-#ifdef yyensure_buffer_stack
-#define hsql_ensure_buffer_stack_ALREADY_DEFINED
-#else
-#define yyensure_buffer_stack hsql_ensure_buffer_stack
-#endif
-
-#ifdef yylex
-#define hsql_lex_ALREADY_DEFINED
-#else
-#define yylex hsql_lex
-#endif
-
-#ifdef yyrestart
-#define hsql_restart_ALREADY_DEFINED
-#else
-#define yyrestart hsql_restart
-#endif
-
-#ifdef yylex_init
-#define hsql_lex_init_ALREADY_DEFINED
-#else
-#define yylex_init hsql_lex_init
-#endif
-
-#ifdef yylex_init_extra
-#define hsql_lex_init_extra_ALREADY_DEFINED
-#else
-#define yylex_init_extra hsql_lex_init_extra
-#endif
-
-#ifdef yylex_destroy
-#define hsql_lex_destroy_ALREADY_DEFINED
-#else
-#define yylex_destroy hsql_lex_destroy
-#endif
-
-#ifdef yyget_debug
-#define hsql_get_debug_ALREADY_DEFINED
-#else
-#define yyget_debug hsql_get_debug
-#endif
-
-#ifdef yyset_debug
-#define hsql_set_debug_ALREADY_DEFINED
-#else
-#define yyset_debug hsql_set_debug
-#endif
-
-#ifdef yyget_extra
-#define hsql_get_extra_ALREADY_DEFINED
-#else
-#define yyget_extra hsql_get_extra
-#endif
-
-#ifdef yyset_extra
-#define hsql_set_extra_ALREADY_DEFINED
-#else
-#define yyset_extra hsql_set_extra
-#endif
-
-#ifdef yyget_in
-#define hsql_get_in_ALREADY_DEFINED
-#else
-#define yyget_in hsql_get_in
-#endif
-
-#ifdef yyset_in
-#define hsql_set_in_ALREADY_DEFINED
-#else
-#define yyset_in hsql_set_in
-#endif
-
-#ifdef yyget_out
-#define hsql_get_out_ALREADY_DEFINED
-#else
-#define yyget_out hsql_get_out
-#endif
-
-#ifdef yyset_out
-#define hsql_set_out_ALREADY_DEFINED
-#else
-#define yyset_out hsql_set_out
-#endif
-
-#ifdef yyget_leng
-#define hsql_get_leng_ALREADY_DEFINED
-#else
-#define yyget_leng hsql_get_leng
-#endif
-
-#ifdef yyget_text
-#define hsql_get_text_ALREADY_DEFINED
-#else
-#define yyget_text hsql_get_text
-#endif
-
-#ifdef yyget_lineno
-#define hsql_get_lineno_ALREADY_DEFINED
-#else
-#define yyget_lineno hsql_get_lineno
-#endif
-
-#ifdef yyset_lineno
-#define hsql_set_lineno_ALREADY_DEFINED
-#else
-#define yyset_lineno hsql_set_lineno
-#endif
-
-#ifdef yyget_column
-#define hsql_get_column_ALREADY_DEFINED
-#else
-#define yyget_column hsql_get_column
-#endif
-
-#ifdef yyset_column
-#define hsql_set_column_ALREADY_DEFINED
-#else
-#define yyset_column hsql_set_column
-#endif
-
-#ifdef yywrap
-#define hsql_wrap_ALREADY_DEFINED
-#else
-#define yywrap hsql_wrap
-#endif
-
-#ifdef yyget_lval
-#define hsql_get_lval_ALREADY_DEFINED
-#else
-#define yyget_lval hsql_get_lval
-#endif
-
-#ifdef yyset_lval
-#define hsql_set_lval_ALREADY_DEFINED
-#else
-#define yyset_lval hsql_set_lval
-#endif
-
-#ifdef yyget_lloc
-#define hsql_get_lloc_ALREADY_DEFINED
-#else
-#define yyget_lloc hsql_get_lloc
-#endif
-
-#ifdef yyset_lloc
-#define hsql_set_lloc_ALREADY_DEFINED
-#else
-#define yyset_lloc hsql_set_lloc
-#endif
-
-#ifdef yyalloc
-#define hsql_alloc_ALREADY_DEFINED
-#else
-#define yyalloc hsql_alloc
-#endif
-
-#ifdef yyrealloc
-#define hsql_realloc_ALREADY_DEFINED
-#else
-#define yyrealloc hsql_realloc
-#endif
-
-#ifdef yyfree
-#define hsql_free_ALREADY_DEFINED
-#else
-#define yyfree hsql_free
-#endif
-
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -322,16 +88,10 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX (~(size_t)0)
-#endif
-
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-/* begin standard C++ headers. */
-
/* TODO: this is always defined, so inline it */
#define yyconst const
@@ -421,7 +181,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -432,21 +192,21 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
-void yyrestart ( FILE *input_file , yyscan_t yyscanner );
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
-void yypop_buffer_state ( yyscan_t yyscanner );
+void hsql_restart (FILE *input_file ,yyscan_t yyscanner );
+void hsql__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
+void hsql__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void hsql__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
+void hsql_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
+void hsql_pop_buffer_state (yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+YY_BUFFER_STATE hsql__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-void *yyalloc ( yy_size_t , yyscan_t yyscanner );
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
-void yyfree ( void * , yyscan_t yyscanner );
+void *hsql_alloc (yy_size_t ,yyscan_t yyscanner );
+void *hsql_realloc (void *,yy_size_t ,yyscan_t yyscanner );
+void hsql_free (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
@@ -474,50 +234,50 @@ void yyfree ( void * , yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
-int yylex_init (yyscan_t* scanner);
+int hsql_lex_init (yyscan_t* scanner);
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
+int hsql_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int yylex_destroy ( yyscan_t yyscanner );
+int hsql_lex_destroy (yyscan_t yyscanner );
-int yyget_debug ( yyscan_t yyscanner );
+int hsql_get_debug (yyscan_t yyscanner );
-void yyset_debug ( int debug_flag , yyscan_t yyscanner );
+void hsql_set_debug (int debug_flag ,yyscan_t yyscanner );
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
+YY_EXTRA_TYPE hsql_get_extra (yyscan_t yyscanner );
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
+void hsql_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
-FILE *yyget_in ( yyscan_t yyscanner );
+FILE *hsql_get_in (yyscan_t yyscanner );
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
+void hsql_set_in (FILE * _in_str ,yyscan_t yyscanner );
-FILE *yyget_out ( yyscan_t yyscanner );
+FILE *hsql_get_out (yyscan_t yyscanner );
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
+void hsql_set_out (FILE * _out_str ,yyscan_t yyscanner );
- int yyget_leng ( yyscan_t yyscanner );
+ int hsql_get_leng (yyscan_t yyscanner );
-char *yyget_text ( yyscan_t yyscanner );
+char *hsql_get_text (yyscan_t yyscanner );
-int yyget_lineno ( yyscan_t yyscanner );
+int hsql_get_lineno (yyscan_t yyscanner );
-void yyset_lineno ( int _line_number , yyscan_t yyscanner );
+void hsql_set_lineno (int _line_number ,yyscan_t yyscanner );
-int yyget_column ( yyscan_t yyscanner );
+int hsql_get_column (yyscan_t yyscanner );
-void yyset_column ( int _column_no , yyscan_t yyscanner );
+void hsql_set_column (int _column_no ,yyscan_t yyscanner );
-YYSTYPE * yyget_lval ( yyscan_t yyscanner );
+YYSTYPE * hsql_get_lval (yyscan_t yyscanner );
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
+void hsql_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
- YYLTYPE *yyget_lloc ( yyscan_t yyscanner );
+ YYLTYPE *hsql_get_lloc (yyscan_t yyscanner );
- void yyset_lloc ( YYLTYPE * yylloc_param , yyscan_t yyscanner );
+ void hsql_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -525,18 +285,18 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap ( yyscan_t yyscanner );
+extern "C" int hsql_wrap (yyscan_t yyscanner );
#else
-extern int yywrap ( yyscan_t yyscanner );
+extern int hsql_wrap (yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
+static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
+static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@@ -564,10 +324,10 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int yylex \
- (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner);
+extern int hsql_lex \
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
-#define YY_DECL int yylex \
+#define YY_DECL int hsql_lex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
@@ -585,154 +345,9 @@ extern int yylex \
#undef YY_DECL
#endif
-#ifndef hsql__create_buffer_ALREADY_DEFINED
-#undef yy_create_buffer
-#endif
-#ifndef hsql__delete_buffer_ALREADY_DEFINED
-#undef yy_delete_buffer
-#endif
-#ifndef hsql__scan_buffer_ALREADY_DEFINED
-#undef yy_scan_buffer
-#endif
-#ifndef hsql__scan_string_ALREADY_DEFINED
-#undef yy_scan_string
-#endif
-#ifndef hsql__scan_bytes_ALREADY_DEFINED
-#undef yy_scan_bytes
-#endif
-#ifndef hsql__init_buffer_ALREADY_DEFINED
-#undef yy_init_buffer
-#endif
-#ifndef hsql__flush_buffer_ALREADY_DEFINED
-#undef yy_flush_buffer
-#endif
-#ifndef hsql__load_buffer_state_ALREADY_DEFINED
-#undef yy_load_buffer_state
-#endif
-#ifndef hsql__switch_to_buffer_ALREADY_DEFINED
-#undef yy_switch_to_buffer
-#endif
-#ifndef hsql_push_buffer_state_ALREADY_DEFINED
-#undef yypush_buffer_state
-#endif
-#ifndef hsql_pop_buffer_state_ALREADY_DEFINED
-#undef yypop_buffer_state
-#endif
-#ifndef hsql_ensure_buffer_stack_ALREADY_DEFINED
-#undef yyensure_buffer_stack
-#endif
-#ifndef hsql_lex_ALREADY_DEFINED
-#undef yylex
-#endif
-#ifndef hsql_restart_ALREADY_DEFINED
-#undef yyrestart
-#endif
-#ifndef hsql_lex_init_ALREADY_DEFINED
-#undef yylex_init
-#endif
-#ifndef hsql_lex_init_extra_ALREADY_DEFINED
-#undef yylex_init_extra
-#endif
-#ifndef hsql_lex_destroy_ALREADY_DEFINED
-#undef yylex_destroy
-#endif
-#ifndef hsql_get_debug_ALREADY_DEFINED
-#undef yyget_debug
-#endif
-#ifndef hsql_set_debug_ALREADY_DEFINED
-#undef yyset_debug
-#endif
-#ifndef hsql_get_extra_ALREADY_DEFINED
-#undef yyget_extra
-#endif
-#ifndef hsql_set_extra_ALREADY_DEFINED
-#undef yyset_extra
-#endif
-#ifndef hsql_get_in_ALREADY_DEFINED
-#undef yyget_in
-#endif
-#ifndef hsql_set_in_ALREADY_DEFINED
-#undef yyset_in
-#endif
-#ifndef hsql_get_out_ALREADY_DEFINED
-#undef yyget_out
-#endif
-#ifndef hsql_set_out_ALREADY_DEFINED
-#undef yyset_out
-#endif
-#ifndef hsql_get_leng_ALREADY_DEFINED
-#undef yyget_leng
-#endif
-#ifndef hsql_get_text_ALREADY_DEFINED
-#undef yyget_text
-#endif
-#ifndef hsql_get_lineno_ALREADY_DEFINED
-#undef yyget_lineno
-#endif
-#ifndef hsql_set_lineno_ALREADY_DEFINED
-#undef yyset_lineno
-#endif
-#ifndef hsql_get_column_ALREADY_DEFINED
-#undef yyget_column
-#endif
-#ifndef hsql_set_column_ALREADY_DEFINED
-#undef yyset_column
-#endif
-#ifndef hsql_wrap_ALREADY_DEFINED
-#undef yywrap
-#endif
-#ifndef hsql_get_lval_ALREADY_DEFINED
-#undef yyget_lval
-#endif
-#ifndef hsql_set_lval_ALREADY_DEFINED
-#undef yyset_lval
-#endif
-#ifndef hsql_get_lloc_ALREADY_DEFINED
-#undef yyget_lloc
-#endif
-#ifndef hsql_set_lloc_ALREADY_DEFINED
-#undef yyset_lloc
-#endif
-#ifndef hsql_alloc_ALREADY_DEFINED
-#undef yyalloc
-#endif
-#ifndef hsql_realloc_ALREADY_DEFINED
-#undef yyrealloc
-#endif
-#ifndef hsql_free_ALREADY_DEFINED
-#undef yyfree
-#endif
-#ifndef hsql_text_ALREADY_DEFINED
-#undef yytext
-#endif
-#ifndef hsql_leng_ALREADY_DEFINED
-#undef yyleng
-#endif
-#ifndef hsql_in_ALREADY_DEFINED
-#undef yyin
-#endif
-#ifndef hsql_out_ALREADY_DEFINED
-#undef yyout
-#endif
-#ifndef hsql__flex_debug_ALREADY_DEFINED
-#undef yy_flex_debug
-#endif
-#ifndef hsql_lineno_ALREADY_DEFINED
-#undef yylineno
-#endif
-#ifndef hsql_tables_fload_ALREADY_DEFINED
-#undef yytables_fload
-#endif
-#ifndef hsql_tables_destroy_ALREADY_DEFINED
-#undef yytables_destroy
-#endif
-#ifndef hsql_TABLES_NAME_ALREADY_DEFINED
-#undef yyTABLES_NAME
-#endif
-
#line 288 "flex_lexer.l"
-#line 736 "flex_lexer.h"
+#line 352 "flex_lexer.h"
#undef hsql_IN_HEADER
#endif /* hsql_HEADER_H */
diff --git a/src/sql/Expr.cpp b/src/sql/Expr.cpp
index 236d79f1..a553121d 100644
--- a/src/sql/Expr.cpp
+++ b/src/sql/Expr.cpp
@@ -49,6 +49,7 @@ Expr::Expr(ExprType type)
select(nullptr),
name(nullptr),
table(nullptr),
+ schema(nullptr),
alias(nullptr),
fval(0),
ival(0),
@@ -68,6 +69,7 @@ Expr::~Expr() {
free(name);
free(table);
+ free(schema);
free(alias);
if (exprList) {
@@ -219,6 +221,16 @@ Expr* Expr::makeFunctionRef(char* func_name, std::vector* exprList, bool
return e;
}
+Expr* Expr::makeFunctionRef(char* func_name, char* schema, std::vector* exprList, bool distinct, WindowDescription* window) {
+ Expr* e = new Expr(kExprFunctionRef);
+ e->name = func_name;
+ e->schema = schema;
+ e->exprList = exprList;
+ e->distinct = distinct;
+ e->windowDescription = window;
+ return e;
+}
+
Expr* Expr::makeArray(std::vector* exprList) {
Expr* e = new Expr(kExprArray);
e->exprList = exprList;
diff --git a/src/sql/Expr.h b/src/sql/Expr.h
index e44c42ca..593e2694 100644
--- a/src/sql/Expr.h
+++ b/src/sql/Expr.h
@@ -133,6 +133,7 @@ struct Expr {
SelectStatement* select;
char* name;
char* table;
+ char* schema;
char* alias;
double fval;
int64_t ival;
@@ -200,6 +201,8 @@ struct Expr {
static Expr* makeFunctionRef(char* func_name, std::vector* exprList, bool distinct, WindowDescription* window);
+ static Expr* makeFunctionRef(char* func_name, char* schema, std::vector* exprList, bool distinct, WindowDescription* window);
+
static Expr* makeArray(std::vector* exprList);
static Expr* makeArrayIndex(Expr* expr, int64_t index);
diff --git a/test/select_tests.cpp b/test/select_tests.cpp
index d57a3be2..d6521e19 100644
--- a/test/select_tests.cpp
+++ b/test/select_tests.cpp
@@ -1255,4 +1255,26 @@ TEST(WindowFunctions) {
}
}
+TEST(FunctionSchema) {
+ TEST_PARSE_SQL_QUERY(
+ "SELECT sys.uuid();"
+ "SELECT json.isarray('[1, 2, 3]');",
+ result, 2);
+
+ auto stmt = (SelectStatement*)result.getStatement(0);
+ ASSERT_TRUE(stmt->selectList);
+ ASSERT_EQ(stmt->selectList->size(), 1);
+ ASSERT_STREQ(stmt->selectList->at(0)->schema, "sys");
+ ASSERT_STREQ(stmt->selectList->at(0)->name, "uuid");
+ ASSERT_EQ(stmt->selectList->at(0)->exprList->size(), 0);
+
+ stmt = (SelectStatement*)result.getStatement(1);
+ ASSERT_TRUE(stmt->selectList);
+ ASSERT_EQ(stmt->selectList->size(), 1);
+ ASSERT_STREQ(stmt->selectList->at(0)->schema, "json");
+ ASSERT_STREQ(stmt->selectList->at(0)->name, "isarray");
+ ASSERT_EQ(stmt->selectList->at(0)->exprList->size(), 1);
+ ASSERT_STREQ(stmt->selectList->at(0)->exprList->at(0)->name, "[1, 2, 3]");
+}
+
} // namespace hsql