diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp
index 4e5f4a7e..b1d70722 100644
--- a/src/parser/bison_parser.cpp
+++ b/src/parser/bison_parser.cpp
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.7.4. */
+/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,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
@@ -46,10 +46,10 @@
USER NAME SPACE" below. */
/* Identify Bison output, and Bison version. */
-#define YYBISON 30704
+#define YYBISON 30706
/* Bison version string. */
-#define YYBISON_VERSION "3.7.4"
+#define YYBISON_VERSION "3.7.6"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -385,27 +385,28 @@ enum yysymbol_kind_t
YYSYMBOL_num_literal = 251, /* num_literal */
YYSYMBOL_int_literal = 252, /* int_literal */
YYSYMBOL_null_literal = 253, /* null_literal */
- YYSYMBOL_param_expr = 254, /* param_expr */
- YYSYMBOL_table_ref = 255, /* table_ref */
- YYSYMBOL_table_ref_atomic = 256, /* table_ref_atomic */
- YYSYMBOL_nonjoin_table_ref_atomic = 257, /* nonjoin_table_ref_atomic */
- YYSYMBOL_table_ref_commalist = 258, /* table_ref_commalist */
- YYSYMBOL_table_ref_name = 259, /* table_ref_name */
- YYSYMBOL_table_ref_name_no_alias = 260, /* table_ref_name_no_alias */
- YYSYMBOL_table_name = 261, /* table_name */
- YYSYMBOL_table_alias = 262, /* table_alias */
- YYSYMBOL_opt_table_alias = 263, /* opt_table_alias */
- YYSYMBOL_alias = 264, /* alias */
- YYSYMBOL_opt_alias = 265, /* opt_alias */
- YYSYMBOL_opt_with_clause = 266, /* opt_with_clause */
- YYSYMBOL_with_clause = 267, /* with_clause */
- YYSYMBOL_with_description_list = 268, /* with_description_list */
- YYSYMBOL_with_description = 269, /* with_description */
- YYSYMBOL_join_clause = 270, /* join_clause */
- YYSYMBOL_opt_join_type = 271, /* opt_join_type */
- YYSYMBOL_join_condition = 272, /* join_condition */
- YYSYMBOL_opt_semicolon = 273, /* opt_semicolon */
- YYSYMBOL_ident_commalist = 274 /* ident_commalist */
+ YYSYMBOL_date_literal = 254, /* date_literal */
+ YYSYMBOL_param_expr = 255, /* param_expr */
+ YYSYMBOL_table_ref = 256, /* table_ref */
+ YYSYMBOL_table_ref_atomic = 257, /* table_ref_atomic */
+ YYSYMBOL_nonjoin_table_ref_atomic = 258, /* nonjoin_table_ref_atomic */
+ YYSYMBOL_table_ref_commalist = 259, /* table_ref_commalist */
+ YYSYMBOL_table_ref_name = 260, /* table_ref_name */
+ YYSYMBOL_table_ref_name_no_alias = 261, /* table_ref_name_no_alias */
+ YYSYMBOL_table_name = 262, /* table_name */
+ YYSYMBOL_table_alias = 263, /* table_alias */
+ YYSYMBOL_opt_table_alias = 264, /* opt_table_alias */
+ YYSYMBOL_alias = 265, /* alias */
+ YYSYMBOL_opt_alias = 266, /* opt_alias */
+ YYSYMBOL_opt_with_clause = 267, /* opt_with_clause */
+ YYSYMBOL_with_clause = 268, /* with_clause */
+ YYSYMBOL_with_description_list = 269, /* with_description_list */
+ YYSYMBOL_with_description = 270, /* with_description */
+ YYSYMBOL_join_clause = 271, /* join_clause */
+ YYSYMBOL_opt_join_type = 272, /* opt_join_type */
+ YYSYMBOL_join_condition = 273, /* join_condition */
+ YYSYMBOL_opt_semicolon = 274, /* opt_semicolon */
+ YYSYMBOL_ident_commalist = 275 /* ident_commalist */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
@@ -449,6 +450,18 @@ typedef int_least16_t yytype_int16;
typedef short yytype_int16;
#endif
+/* 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
+#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 \
@@ -546,9 +559,9 @@ typedef int yy_state_fast_t;
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
+# define YY_USE(E) ((void) (E))
#else
-# define YYUSE(E) /* empty */
+# define YY_USE(E) /* empty */
#endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
@@ -718,16 +731,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 62
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 721
+#define YYLAST 734
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 169
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 106
+#define YYNNTS 107
/* YYNRULES -- Number of rules. */
-#define YYNRULES 262
+#define YYNRULES 264
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 474
+#define YYNSTATES 477
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 406
@@ -812,12 +825,12 @@ static const yytype_int16 yyrline[] =
974, 975, 979, 980, 981, 982, 983, 984, 985, 989,
990, 994, 998, 1002, 1003, 1004, 1005, 1006, 1007, 1011,
1015, 1019, 1023, 1024, 1025, 1026, 1030, 1031, 1032, 1033,
- 1034, 1038, 1042, 1043, 1047, 1048, 1052, 1056, 1060, 1072,
- 1073, 1083, 1084, 1088, 1089, 1098, 1099, 1104, 1115, 1124,
- 1125, 1130, 1131, 1136, 1137, 1142, 1143, 1148, 1149, 1158,
- 1159, 1163, 1167, 1171, 1178, 1191, 1199, 1209, 1228, 1229,
- 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1242, 1251,
- 1252, 1257, 1258
+ 1034, 1035, 1039, 1043, 1044, 1048, 1049, 1053, 1057, 1061,
+ 1074, 1086, 1087, 1097, 1098, 1102, 1103, 1112, 1113, 1118,
+ 1129, 1138, 1139, 1144, 1145, 1150, 1151, 1156, 1157, 1162,
+ 1163, 1172, 1173, 1177, 1181, 1185, 1192, 1205, 1213, 1223,
+ 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251,
+ 1256, 1265, 1266, 1271, 1272
};
#endif
@@ -877,9 +890,9 @@ static const char *const yytname[] =
"function_expr", "extract_expr", "cast_expr", "datetime_field",
"array_expr", "array_index", "between_expr", "column_name", "literal",
"string_literal", "bool_literal", "num_literal", "int_literal",
- "null_literal", "param_expr", "table_ref", "table_ref_atomic",
- "nonjoin_table_ref_atomic", "table_ref_commalist", "table_ref_name",
- "table_ref_name_no_alias", "table_name", "table_alias",
+ "null_literal", "date_literal", "param_expr", "table_ref",
+ "table_ref_atomic", "nonjoin_table_ref_atomic", "table_ref_commalist",
+ "table_ref_name", "table_ref_name_no_alias", "table_name", "table_alias",
"opt_table_alias", "alias", "opt_alias", "opt_with_clause",
"with_clause", "with_description_list", "with_description",
"join_clause", "opt_join_type", "join_condition", "opt_semicolon",
@@ -918,12 +931,12 @@ static const yytype_int16 yytoknum[] =
};
#endif
-#define YYPACT_NINF (-318)
+#define YYPACT_NINF (-405)
#define yypact_value_is_default(Yyn) \
((Yyn) == YYPACT_NINF)
-#define YYTABLE_NINF (-260)
+#define YYTABLE_NINF (-262)
#define yytable_value_is_error(Yyn) \
((Yyn) == YYTABLE_NINF)
@@ -932,54 +945,54 @@ static const yytype_int16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 511, 7, 39, 125, 147, 39, -37, 71, 95, 103,
- 39, 39, -19, 6, 225, 96, 96, 96, 237, 72,
- -318, 150, -318, 150, -318, -318, -318, -318, -318, -318,
- -318, -318, -318, -318, -318, 10, -318, 246, 135, -318,
- 98, 190, -318, 179, 179, 39, 307, 39, 195, -318,
- -63, 192, 192, 39, -318, 200, 158, -318, -318, -318,
- -318, -318, -318, 506, -318, 245, -318, -318, 219, 10,
- 20, -318, 26, -318, 338, 9, 341, 226, 39, 39,
- 268, -318, 261, 189, 350, 351, 351, 313, 39, 39,
- -318, 194, 225, -318, 196, 352, 349, 198, 199, -318,
- -318, -318, 10, 264, 254, 10, 45, -318, -318, -318,
- -318, -318, -318, -318, -318, 212, 211, -318, -318, -318,
- -318, -318, -318, -318, -318, -318, 339, -62, 189, 248,
- -318, 351, 378, 66, 240, -57, -318, 278, -318, 278,
- -318, -318, -318, -318, -318, 385, -318, -318, 248, -318,
- -318, 320, -318, -318, 20, -318, -318, 248, 320, 248,
- 79, -318, -318, 9, -318, 394, 291, 396, 281, -122,
- 242, 244, 247, 149, 280, 239, 326, -318, 227, 2,
- 353, -318, -318, -318, -318, -318, -318, -318, -318, -318,
- -318, -318, -318, -318, -318, -318, -318, 321, -318, -86,
- 250, -318, 248, 350, -318, 371, -318, -318, 257, 30,
- -318, 328, 255, -318, 36, 45, 10, 256, -318, -34,
- 45, 2, 377, -16, -318, 333, -318, 310, 58, -318,
- 291, 8, 14, 375, 161, 248, 248, 117, 133, 266,
- 326, 541, 248, 44, 269, -55, 248, 248, 326, -318,
- 326, -8, 267, -54, 326, 326, 326, 326, 326, 326,
- 326, 326, 326, 326, 326, 326, 326, 326, 326, 352,
- 39, -318, 429, 9, 2, -318, 307, 9, -318, 385,
- 13, 268, -318, 248, -318, 431, -318, -318, -318, -318,
- 248, -318, -318, -318, -318, 248, 248, 351, -318, 276,
- -318, -318, 282, -318, -318, -318, -318, -318, 90, -318,
- 396, -318, -318, 248, -318, -318, 283, -318, -318, -318,
- -318, -318, -318, 357, 172, 77, 134, 248, 248, -318,
- 375, 344, 97, -318, -318, -318, 340, 475, 560, 326,
- 288, 227, -318, 354, 295, 560, 560, 560, 560, 425,
- 425, 425, 425, 44, 44, 55, 55, 55, -94, 290,
- -318, -318, 108, -318, 142, -318, 291, -318, -3, -318,
- 293, -318, 29, -318, 392, -318, -318, -318, 2, 2,
- -318, 452, 455, -318, 363, -318, -318, 144, -318, 248,
- 310, 248, 248, -318, 114, 140, 299, -318, 326, 560,
- 227, 302, 151, -318, -318, -318, -318, 303, 374, -318,
- -318, -318, 397, 398, 399, 379, 13, 472, -318, -318,
- -318, 358, -318, 314, 316, -318, -318, 48, 322, 2,
- 146, -318, 248, -318, 541, 323, 152, -318, -318, 29,
- 13, -318, -318, -318, 13, 277, 325, 248, -318, -318,
- -318, -318, -318, 2, -318, -318, -318, -318, 364, 378,
- -22, 329, 248, 160, 248, -318, 15, 2, -318, -318,
- 2, 330, 327, -318
+ 524, 69, 58, 103, 113, 58, -33, 94, 101, 66,
+ 58, 58, -19, 15, 213, 65, 65, 65, 235, 89,
+ -405, 129, -405, 129, -405, -405, -405, -405, -405, -405,
+ -405, -405, -405, -405, -405, -18, -405, 256, 105, -405,
+ 122, 206, -405, 180, 180, 58, 300, 58, 191, -405,
+ -52, 186, 186, 58, -405, 195, 143, -405, -405, -405,
+ -405, -405, -405, 519, -405, 219, -405, -405, 197, -18,
+ 50, -405, 222, -405, 322, 13, 323, 210, 58, 58,
+ 253, -405, 250, 176, 337, 341, 341, 317, 58, 58,
+ -405, 201, 213, -405, 205, 368, 364, 215, 218, -405,
+ -405, -405, -18, 275, 266, -18, 32, -405, -405, -405,
+ -405, 384, -405, -405, -405, -405, 227, 225, -405, -405,
+ -405, -405, -405, -405, -405, -405, -405, -405, 352, -41,
+ 176, 287, -405, 341, 391, 151, 251, -58, -405, 289,
+ -405, 289, -405, -405, -405, -405, -405, 396, -405, -405,
+ 287, -405, -405, 328, -405, -405, 50, -405, -405, 287,
+ 328, 287, 144, -405, -405, -405, 13, -405, 401, 298,
+ 403, 288, 121, 244, 246, 247, 150, 318, 252, 338,
+ -405, 234, 138, 366, -405, -405, -405, -405, -405, -405,
+ -405, -405, -405, -405, -405, -405, -405, -405, -405, -405,
+ 319, -405, -126, 257, -405, 287, 337, -405, 370, -405,
+ -405, 259, -104, -405, 330, 260, -405, 68, 32, -18,
+ 262, -405, -46, 32, 138, 373, -17, -405, 336, -405,
+ 347, -50, -405, 298, 2, 18, 379, 220, 287, 287,
+ 96, -21, 270, 338, 554, 287, 190, 271, -70, 287,
+ 287, 338, -405, 338, -34, 273, 158, 338, 338, 338,
+ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
+ 338, 338, 368, 58, -405, 435, 13, 138, -405, 300,
+ 13, -405, 396, 10, 253, -405, 287, -405, 436, -405,
+ -405, -405, -405, 287, -405, -405, -405, -405, 287, 287,
+ 341, -405, 277, -405, -405, 278, -405, -405, -405, -405,
+ -405, 181, -405, 403, -405, -405, 287, -405, -405, 280,
+ -405, -405, -405, -405, -405, -405, 357, 88, 131, 70,
+ 287, 287, -405, 379, 355, 17, -405, -405, -405, 342,
+ 488, 573, 338, 285, 234, -405, 354, 297, 573, 573,
+ 573, 573, 438, 438, 438, 438, 190, 190, 35, 35,
+ 35, -94, 301, -405, -405, -6, -405, 5, -405, 298,
+ -405, 30, -405, 292, -405, 22, -405, 395, -405, -405,
+ -405, 138, 138, -405, 458, 459, -405, 367, -405, -405,
+ 168, -405, 287, 347, 287, 287, -405, 91, 141, 304,
+ -405, 338, 573, 234, 305, 198, -405, -405, -405, -405,
+ 306, 377, -405, -405, -405, 399, 402, 405, 385, 10,
+ 477, -405, -405, -405, 362, -405, 320, 321, -405, -405,
+ -59, 324, 138, 142, -405, 287, -405, 554, 327, 202,
+ -405, -405, 22, 10, -405, -405, -405, 10, 152, 329,
+ 287, -405, -405, -405, -405, -405, 138, -405, -405, -405,
+ -405, 155, 391, -23, 332, 287, 211, 287, -405, 19,
+ 138, -405, -405, 138, 333, 335, -405
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -987,86 +1000,86 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_int16 yydefact[] =
{
- 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 29, 29, 29, 0, 260,
+ 242, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 29, 29, 29, 0, 262,
3, 20, 18, 20, 17, 8, 9, 7, 11, 16,
- 13, 14, 12, 15, 10, 0, 239, 0, 229, 72,
- 32, 0, 43, 49, 49, 0, 0, 0, 0, 228,
- 0, 70, 70, 0, 41, 0, 241, 242, 28, 25,
- 27, 26, 1, 240, 2, 0, 6, 5, 120, 0,
+ 13, 14, 12, 15, 10, 0, 241, 0, 231, 72,
+ 32, 0, 43, 49, 49, 0, 0, 0, 0, 230,
+ 0, 70, 70, 0, 41, 0, 243, 244, 28, 25,
+ 27, 26, 1, 242, 2, 0, 6, 5, 120, 0,
81, 82, 112, 68, 0, 130, 0, 0, 0, 0,
106, 36, 0, 76, 0, 0, 0, 0, 0, 0,
42, 0, 0, 4, 0, 0, 100, 0, 0, 94,
- 95, 93, 0, 97, 0, 0, 126, 230, 211, 214,
- 216, 217, 212, 213, 218, 0, 129, 131, 206, 207,
- 208, 215, 209, 210, 31, 30, 0, 0, 76, 0,
- 71, 0, 0, 0, 0, 106, 78, 39, 37, 39,
- 69, 66, 67, 244, 243, 0, 119, 99, 0, 89,
- 88, 112, 85, 84, 86, 96, 92, 0, 112, 0,
- 0, 90, 33, 0, 48, 0, 240, 0, 0, 202,
- 0, 0, 0, 0, 0, 0, 0, 204, 0, 105,
- 134, 141, 142, 143, 136, 138, 144, 137, 157, 145,
- 146, 147, 148, 140, 135, 150, 151, 0, 261, 0,
- 0, 74, 0, 0, 77, 0, 35, 40, 23, 0,
- 21, 103, 101, 127, 238, 126, 0, 111, 113, 118,
- 126, 122, 124, 121, 132, 0, 46, 0, 0, 50,
- 240, 100, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 153, 0, 152, 0, 0, 0, 0, 0, 154,
+ 95, 93, 0, 97, 0, 0, 126, 232, 212, 215,
+ 217, 0, 218, 213, 214, 220, 0, 129, 131, 206,
+ 207, 208, 216, 209, 210, 211, 31, 30, 0, 0,
+ 76, 0, 71, 0, 0, 0, 0, 106, 78, 39,
+ 37, 39, 69, 66, 67, 246, 245, 0, 119, 99,
+ 0, 89, 88, 112, 85, 84, 86, 96, 92, 0,
+ 112, 0, 0, 90, 219, 33, 0, 48, 0, 242,
+ 0, 0, 202, 0, 0, 0, 0, 0, 0, 0,
+ 204, 0, 105, 134, 141, 142, 143, 136, 138, 144,
+ 137, 157, 145, 146, 147, 148, 140, 135, 150, 151,
+ 0, 263, 0, 0, 74, 0, 0, 77, 0, 35,
+ 40, 23, 0, 21, 103, 101, 127, 240, 126, 0,
+ 111, 113, 118, 126, 122, 124, 121, 132, 0, 46,
+ 0, 0, 50, 242, 100, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 153, 0, 152, 0, 0, 0,
+ 0, 0, 154, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 75, 0, 0, 80, 79, 0, 0, 19, 0,
- 0, 106, 102, 0, 236, 0, 237, 133, 83, 87,
- 0, 117, 116, 115, 91, 0, 0, 0, 54, 0,
- 57, 56, 0, 62, 61, 55, 60, 53, 65, 45,
- 0, 47, 189, 0, 203, 205, 0, 193, 194, 195,
- 196, 197, 198, 0, 0, 0, 0, 0, 0, 176,
- 0, 0, 0, 149, 139, 168, 169, 0, 164, 0,
- 0, 0, 155, 0, 167, 166, 182, 183, 184, 185,
- 186, 187, 188, 159, 158, 161, 160, 162, 163, 0,
- 34, 262, 0, 38, 0, 22, 240, 104, 219, 221,
- 0, 223, 234, 222, 108, 128, 235, 114, 125, 123,
- 44, 0, 0, 63, 0, 52, 51, 0, 180, 0,
- 0, 0, 0, 174, 0, 0, 0, 199, 0, 165,
- 0, 0, 0, 156, 200, 73, 24, 0, 0, 256,
- 248, 254, 252, 255, 250, 0, 0, 0, 233, 227,
- 231, 0, 98, 0, 0, 64, 190, 0, 0, 178,
- 0, 177, 0, 181, 201, 0, 0, 172, 170, 234,
- 0, 251, 253, 249, 0, 220, 235, 0, 58, 59,
- 191, 192, 175, 179, 173, 171, 224, 245, 257, 0,
- 110, 0, 0, 0, 0, 107, 0, 258, 246, 232,
- 109, 202, 0, 247
+ 0, 0, 0, 0, 75, 0, 0, 80, 79, 0,
+ 0, 19, 0, 0, 106, 102, 0, 238, 0, 239,
+ 133, 83, 87, 0, 117, 116, 115, 91, 0, 0,
+ 0, 54, 0, 57, 56, 0, 62, 61, 55, 60,
+ 53, 65, 45, 0, 47, 189, 0, 203, 205, 0,
+ 193, 194, 195, 196, 197, 198, 0, 0, 0, 0,
+ 0, 0, 176, 0, 0, 0, 149, 139, 168, 169,
+ 0, 164, 0, 0, 0, 155, 0, 167, 166, 182,
+ 183, 184, 185, 186, 187, 188, 159, 158, 161, 160,
+ 162, 163, 0, 34, 264, 0, 38, 0, 22, 242,
+ 104, 221, 223, 0, 225, 236, 224, 108, 128, 237,
+ 114, 125, 123, 44, 0, 0, 63, 0, 52, 51,
+ 0, 180, 0, 0, 0, 0, 174, 0, 0, 0,
+ 199, 0, 165, 0, 0, 0, 156, 200, 73, 24,
+ 0, 0, 258, 250, 256, 254, 257, 252, 0, 0,
+ 0, 235, 229, 233, 0, 98, 0, 0, 64, 190,
+ 0, 0, 178, 0, 177, 0, 181, 201, 0, 0,
+ 172, 170, 236, 0, 253, 255, 251, 0, 222, 237,
+ 0, 58, 59, 191, 192, 175, 179, 173, 171, 226,
+ 247, 259, 0, 110, 0, 0, 0, 0, 107, 0,
+ 260, 248, 234, 109, 202, 0, 249
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -318, -318, -318, 422, -318, 470, -318, 217, -318, 166,
- -318, -318, -318, -318, 241, -78, 376, -318, -318, -318,
- 458, -318, 193, 126, -318, -318, 467, -318, -318, -318,
- 395, -318, -318, 317, -156, -48, -318, 88, -64, -49,
- -318, -318, -65, 294, -318, -318, -318, -116, -318, -318,
- 35, -318, 232, -318, -318, 61, -238, -318, -173, 251,
- -129, -124, -318, -318, -318, -318, -318, -318, 292, -318,
- -318, -318, -318, -318, -318, -318, -318, -318, 64, -66,
- -84, -318, -318, -88, -318, -318, -318, -317, 87, -318,
- -318, -318, 1, -318, 92, 331, -318, -318, -318, -318,
- 443, -318, -318, -318, -318, 80
+ -405, -405, -405, 437, -405, 479, -405, 221, -405, 67,
+ -405, -405, -405, -405, 226, -79, 363, -405, -405, -405,
+ 463, -405, 196, 115, -405, -405, 464, -405, -405, -405,
+ 398, -405, -405, 309, -158, -73, -405, -11, -66, -45,
+ -405, -405, -76, 295, -405, -405, -405, -121, -405, -405,
+ 11, -405, 237, -405, -405, 78, -243, -405, -178, 249,
+ -131, -130, -405, -405, -405, -405, -405, -405, 293, -405,
+ -405, -405, -405, -405, -405, -405, -405, -405, 63, -67,
+ -80, -405, -405, -83, -405, -405, -405, -405, -404, 93,
+ -405, -405, -405, -1, -405, 98, 325, -405, -405, -405,
+ -405, 446, -405, -405, -405, -405, 81
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 18, 19, 20, 21, 66, 209, 210, 22, 59,
- 23, 125, 24, 25, 82, 137, 206, 26, 27, 28,
- 78, 228, 229, 308, 385, 29, 88, 30, 31, 32,
- 133, 33, 135, 136, 34, 151, 152, 153, 71, 102,
- 103, 156, 72, 148, 211, 281, 282, 130, 422, 465,
- 106, 217, 218, 293, 96, 161, 212, 115, 116, 213,
- 214, 180, 181, 182, 183, 184, 185, 186, 238, 187,
- 188, 189, 190, 191, 323, 192, 193, 194, 195, 196,
- 118, 119, 120, 121, 122, 123, 367, 368, 369, 370,
- 371, 48, 372, 418, 419, 420, 287, 35, 36, 56,
- 57, 373, 415, 468, 64, 199
+ 0, 18, 19, 20, 21, 66, 212, 213, 22, 59,
+ 23, 127, 24, 25, 82, 139, 209, 26, 27, 28,
+ 78, 231, 232, 311, 388, 29, 88, 30, 31, 32,
+ 135, 33, 137, 138, 34, 153, 154, 155, 71, 102,
+ 103, 158, 72, 150, 214, 284, 285, 132, 425, 468,
+ 106, 220, 221, 296, 96, 163, 215, 116, 117, 216,
+ 217, 183, 184, 185, 186, 187, 188, 189, 241, 190,
+ 191, 192, 193, 194, 326, 195, 196, 197, 198, 199,
+ 119, 120, 121, 122, 123, 124, 125, 370, 371, 372,
+ 373, 374, 48, 375, 421, 422, 423, 290, 35, 36,
+ 56, 57, 376, 418, 471, 64, 202
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1074,156 +1087,158 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 179, 138, 138, 39, 332, 98, 42, 146, 139, 117,
- 226, 49, 50, 108, 109, 110, 38, 314, 471, 204,
- 147, 129, 408, 105, 464, 53, 85, 165, 219, 99,
- 221, 223, 284, 37, 296, 99, 254, 154, 43, 284,
- 154, 231, 38, 232, 237, 342, 80, 138, 83, 245,
- 241, 291, 243, 197, 90, 246, 51, 158, 166, 409,
- 100, 54, 343, 68, 410, 86, 100, 269, 44, 201,
- 411, 412, 247, 274, 311, 387, 246, 292, 271, 127,
- 128, 272, 169, 108, 109, 110, 52, 413, 339, 141,
- 142, -257, 414, 247, 246, 159, 101, 224, 104, 445,
- 362, 167, 101, 402, 364, 216, 324, 325, 111, 334,
- 203, 247, 246, 160, 244, 340, 241, 335, 336, 68,
- 170, 171, 172, 70, 337, 200, 338, 458, 40, 247,
- 344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
- 354, 355, 356, 357, 358, 283, 246, 112, 113, 417,
- 41, 154, 169, 108, 109, 110, 285, 97, 246, 173,
- 45, 219, 436, 247, -225, 374, 378, 379, 289, 316,
- 315, 177, 312, 69, 254, 247, 366, 114, 111, 143,
- 391, 359, 60, 61, 46, 254, 215, 246, 222, 383,
- 170, 171, 172, 220, 278, 174, 47, 279, 394, 395,
- 265, 266, 267, 268, 247, 269, 384, 117, 175, 460,
- 407, 117, 450, 138, 268, 399, 269, 112, 113, 380,
- 327, 392, 309, 236, 246, 310, 431, 246, 55, 173,
- 169, 108, 109, 110, 176, 177, 58, 62, 63, 328,
- 328, 247, 178, 432, 247, 329, 393, 114, 111, 73,
- 246, 169, 108, 109, 110, 236, 246, 65, 452, 397,
- 427, 75, 429, 430, 283, 174, 396, 247, 170, 171,
- 172, 360, 405, 247, 434, 163, 288, 401, 175, 76,
- 68, 294, 246, 169, 108, 109, 110, 112, 113, 170,
- 171, 172, 390, 317, 318, 319, 320, 321, 322, 247,
- 74, 77, 408, 453, 176, 177, 406, 173, 426, 163,
- 81, 283, 178, 84, 87, 438, 455, 114, 283, 283,
- 91, 239, 171, 172, 469, 92, 111, 272, 173, 169,
- 108, 109, 110, 467, 298, 470, 435, 94, 95, 409,
- 299, 107, 126, 174, 410, 124, 129, 111, 300, 131,
- 411, 412, 132, 134, 140, 108, 175, 69, 110, 145,
- 173, 147, 149, 150, 174, 112, 113, 413, 171, 172,
- 248, -257, 414, 155, 301, 157, 162, 175, 163, 111,
- 164, 198, 176, 177, 202, 205, 112, 113, 208, 408,
- 178, 302, 104, 303, 304, 114, 240, 225, 14, 227,
- 242, 230, 249, 176, 177, 233, 173, 234, 305, 175,
- 235, 178, 306, 273, 270, 276, 114, 280, 112, 113,
- 277, 297, 283, 290, 307, 111, 409, 295, 68, 330,
- 341, 410, 361, 333, 376, 176, 177, 411, 412, 381,
- 339, 461, 240, 178, -226, 382, 389, 388, 114, 250,
- 246, 400, 404, 403, 413, 175, 269, 421, 423, 414,
- 416, 424, 425, 433, 112, 113, 437, 439, 440, 251,
- 441, 442, 443, 444, 249, 446, 252, 253, 448, 447,
- 449, 176, 177, 254, 255, 93, 451, 454, 459, 178,
- 462, 473, 466, 67, 114, 232, 365, 256, 257, 258,
- 259, 260, 79, 386, 261, 262, -259, 263, 264, 265,
- 266, 267, 268, 1, 269, 207, 428, 363, 1, 89,
- 275, 2, 377, 168, 249, 313, 2, 457, 3, 326,
- 472, 456, 4, 3, 375, 144, 0, 4, 5, 463,
- 0, 6, 7, 5, 0, 286, 6, 7, 0, 253,
- 0, 0, 0, 8, 9, 254, 0, 0, 8, 9,
- 0, 0, 0, 0, 10, 0, 0, 0, 0, 10,
- 0, 250, -260, -260, 0, 0, -260, -260, 0, 263,
- 264, 265, 266, 267, 268, 398, 269, 0, 11, 0,
- 249, 331, 12, 11, 0, 0, 0, 12, 0, 253,
- 0, 0, 0, 0, 0, 254, 255, 13, 0, 249,
- 0, 0, 13, 14, 0, 0, 0, 0, 14, 256,
- 257, 258, 259, 260, 0, 0, 261, 262, 0, 263,
- 264, 265, 266, 267, 268, 0, 269, 250, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 15, 16, 17,
- 0, 0, 15, 16, 17, 0, -260, 331, 0, 0,
- 0, 0, 0, 0, 0, 253, 0, 0, 0, 0,
- 0, 254, 255, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 253, 256, 257, 258, 259, 260,
- 254, -260, 261, 262, 0, 263, 264, 265, 266, 267,
- 268, 0, 269, 0, -260, -260, -260, 259, 260, 0,
- 0, 261, 262, 0, 263, 264, 265, 266, 267, 268,
- 0, 269
+ 182, 39, 335, 98, 42, 140, 140, 141, 118, 49,
+ 50, 229, 148, 38, 149, 448, 207, 108, 109, 110,
+ 131, 317, 474, 467, 70, 287, 156, 105, 222, 156,
+ 224, 226, 160, 299, 53, 68, 257, 85, 274, 294,
+ 249, 275, 43, 461, 80, 240, 83, 244, 168, 246,
+ 248, 249, 90, 140, 200, 411, 51, 250, 97, 99,
+ 281, 38, 342, 282, 249, 295, 330, 272, 250, 204,
+ 54, 287, 44, 390, 277, 314, 86, 129, 130, 169,
+ 145, 250, 161, 60, 61, 331, 52, 143, 144, 343,
+ 100, 332, 412, 249, 337, 37, 111, 413, 365, 227,
+ 162, 405, 367, 414, 415, 453, 40, 327, 328, 206,
+ 250, 219, 112, 244, 312, 247, 41, 313, 338, 339,
+ 416, 340, 170, 341, -259, 417, 101, 347, 348, 349,
+ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
+ 360, 361, 420, 156, 286, 69, 292, 172, 108, 109,
+ 110, 113, 114, 172, 108, 109, 110, 395, 408, 47,
+ 439, 166, 222, 377, 218, 257, 315, 381, 382, 409,
+ 319, 223, 166, 369, 318, 180, 331, 411, 249, 400,
+ 411, 115, 396, 45, 286, 173, 174, 175, 288, 362,
+ 46, 173, 174, 175, 271, 250, 272, -227, 249, 397,
+ 398, 249, 239, 434, 68, 58, 249, 463, 393, 118,
+ 203, 410, 402, 118, 412, 250, 55, 412, 250, 413,
+ 140, 383, 413, 250, 176, 414, 415, 111, 414, 415,
+ 176, 99, 464, 111, 394, 62, 65, 172, 108, 109,
+ 110, 249, 416, 112, 435, 416, -259, 417, 249, 112,
+ 417, 249, 249, 225, 455, 63, 239, 345, 250, 73,
+ 177, 430, 100, 432, 433, 250, 177, 399, 250, 250,
+ 74, 437, 363, 178, 346, 173, 174, 175, 404, 178,
+ 386, 465, 113, 114, 234, 75, 235, 68, 113, 114,
+ 172, 108, 109, 110, 104, 76, 291, 387, 101, 179,
+ 180, 297, 77, 81, 456, 179, 180, 181, 87, 84,
+ 92, 94, 115, 181, 176, 91, 95, 111, 115, -228,
+ 257, 172, 108, 109, 110, 107, 128, 126, 173, 174,
+ 175, 131, 429, 112, 470, 286, 473, 438, 133, 134,
+ 136, 172, 108, 109, 110, 108, 268, 269, 270, 271,
+ 177, 272, 320, 321, 322, 323, 324, 325, 142, 242,
+ 174, 175, 441, 178, 69, 286, 458, 176, 147, 286,
+ 111, 301, 113, 114, 110, 472, 149, 302, 275, 151,
+ 174, 175, 152, 251, 157, 303, 112, 159, 164, 179,
+ 180, 165, 166, 167, 201, 205, 208, 181, 176, 211,
+ 104, 111, 115, 177, 228, 14, 230, 236, 233, 237,
+ 238, 304, 273, 245, 279, 252, 178, 112, 176, 283,
+ 276, 111, 280, 298, 300, 113, 114, 286, 305, 293,
+ 306, 307, 68, 333, 243, 336, 344, 112, 364, 379,
+ 384, 385, 179, 180, 391, 308, 392, 178, 403, 309,
+ 181, 342, 249, 406, 243, 115, 113, 114, 272, 419,
+ 424, 310, 253, 407, 426, 427, 428, 178, 436, 440,
+ 442, 443, 444, 179, 180, 445, 113, 114, 446, 447,
+ 449, 181, 254, 450, 451, 452, 115, 252, 454, 255,
+ 256, 457, 462, 179, 180, 469, 257, 258, 235, 476,
+ 93, 181, 67, 368, 210, 366, 115, 79, 431, 389,
+ 259, 260, 261, 262, 263, 278, 89, 264, 265, -261,
+ 266, 267, 268, 269, 270, 271, 1, 272, 171, 316,
+ 380, 1, 475, 329, 2, 378, 460, 252, 146, 2,
+ 459, 3, 289, 466, 0, 4, 3, 0, 0, 0,
+ 4, 5, 0, 0, 6, 7, 5, 0, 0, 6,
+ 7, 0, 256, 0, 0, 0, 8, 9, 257, 0,
+ 0, 8, 9, 0, 0, 0, 0, 10, 0, 0,
+ 0, 0, 10, 0, 253, -262, -262, 0, 0, -262,
+ -262, 0, 266, 267, 268, 269, 270, 271, 401, 272,
+ 0, 11, 0, 252, 334, 12, 11, 0, 0, 0,
+ 12, 0, 256, 0, 0, 0, 0, 0, 257, 258,
+ 13, 0, 252, 0, 0, 13, 14, 0, 0, 0,
+ 0, 14, 259, 260, 261, 262, 263, 0, 0, 264,
+ 265, 0, 266, 267, 268, 269, 270, 271, 0, 272,
+ 253, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 15, 16, 17, 0, 0, 15, 16, 17, 0, -262,
+ 334, 0, 0, 0, 0, 0, 0, 0, 256, 0,
+ 0, 0, 0, 0, 257, 258, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 256, 259, 260,
+ 261, 262, 263, 257, -262, 264, 265, 0, 266, 267,
+ 268, 269, 270, 271, 0, 272, 0, -262, -262, -262,
+ 262, 263, 0, 0, 264, 265, 0, 266, 267, 268,
+ 269, 270, 271, 0, 272
};
static const yytype_int16 yycheck[] =
{
- 129, 85, 86, 2, 242, 69, 5, 95, 86, 75,
- 166, 10, 11, 4, 5, 6, 3, 3, 3, 135,
- 12, 78, 25, 72, 46, 19, 89, 89, 157, 9,
- 159, 160, 3, 26, 50, 9, 130, 102, 75, 3,
- 105, 163, 3, 165, 173, 99, 45, 131, 47, 178,
- 174, 85, 176, 131, 53, 110, 75, 105, 120, 62,
- 40, 55, 116, 53, 67, 128, 40, 161, 105, 133,
- 73, 74, 127, 202, 230, 313, 110, 111, 164, 78,
- 79, 167, 3, 4, 5, 6, 105, 90, 96, 88,
- 89, 94, 95, 127, 110, 50, 76, 163, 72, 416,
- 273, 163, 76, 341, 277, 154, 235, 236, 99, 164,
- 167, 127, 110, 68, 178, 123, 240, 246, 247, 53,
- 41, 42, 43, 35, 248, 59, 250, 444, 3, 127,
- 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
- 264, 265, 266, 267, 268, 167, 110, 138, 139, 120,
- 3, 216, 3, 4, 5, 6, 120, 69, 110, 80,
- 89, 290, 400, 127, 167, 281, 295, 296, 216, 233,
- 156, 156, 164, 163, 130, 127, 163, 168, 99, 91,
- 103, 269, 16, 17, 89, 130, 151, 110, 109, 99,
- 41, 42, 43, 158, 164, 116, 93, 167, 327, 328,
- 156, 157, 158, 159, 127, 161, 116, 273, 129, 447,
- 366, 277, 164, 297, 159, 339, 161, 138, 139, 297,
- 87, 87, 164, 106, 110, 167, 112, 110, 3, 80,
- 3, 4, 5, 6, 155, 156, 140, 0, 166, 106,
- 106, 127, 163, 103, 127, 112, 112, 168, 99, 3,
- 110, 3, 4, 5, 6, 106, 110, 107, 112, 162,
- 389, 163, 391, 392, 167, 116, 330, 127, 41, 42,
- 43, 270, 164, 127, 398, 167, 215, 341, 129, 89,
- 53, 220, 110, 3, 4, 5, 6, 138, 139, 41,
- 42, 43, 120, 132, 133, 134, 135, 136, 137, 127,
- 165, 122, 25, 432, 155, 156, 164, 80, 164, 167,
- 3, 167, 163, 118, 122, 164, 164, 168, 167, 167,
- 120, 41, 42, 43, 164, 167, 99, 167, 80, 3,
- 4, 5, 6, 462, 24, 464, 400, 92, 119, 62,
- 30, 3, 116, 116, 67, 4, 78, 99, 38, 88,
- 73, 74, 163, 3, 41, 4, 129, 163, 6, 163,
- 80, 12, 164, 164, 116, 138, 139, 90, 42, 43,
- 17, 94, 95, 109, 64, 121, 164, 129, 167, 99,
- 41, 3, 155, 156, 144, 107, 138, 139, 3, 25,
- 163, 81, 72, 83, 84, 168, 116, 3, 107, 3,
- 161, 120, 49, 155, 156, 163, 80, 163, 98, 129,
- 163, 163, 102, 163, 93, 44, 168, 89, 138, 139,
- 163, 88, 167, 167, 114, 99, 62, 50, 53, 163,
- 163, 67, 3, 164, 3, 155, 156, 73, 74, 163,
- 96, 77, 116, 163, 167, 163, 89, 164, 168, 96,
- 110, 163, 162, 99, 90, 129, 161, 65, 6, 95,
- 167, 6, 99, 164, 138, 139, 164, 164, 94, 116,
- 73, 73, 73, 94, 49, 3, 123, 124, 164, 121,
- 164, 155, 156, 130, 131, 63, 164, 164, 163, 163,
- 126, 164, 163, 23, 168, 165, 279, 144, 145, 146,
- 147, 148, 44, 310, 151, 152, 0, 154, 155, 156,
- 157, 158, 159, 7, 161, 139, 390, 276, 7, 52,
- 203, 15, 290, 128, 49, 231, 15, 440, 22, 237,
- 466, 439, 26, 22, 283, 92, -1, 26, 32, 459,
- -1, 35, 36, 32, -1, 214, 35, 36, -1, 124,
- -1, -1, -1, 47, 48, 130, -1, -1, 47, 48,
- -1, -1, -1, -1, 58, -1, -1, -1, -1, 58,
- -1, 96, 147, 148, -1, -1, 151, 152, -1, 154,
- 155, 156, 157, 158, 159, 110, 161, -1, 82, -1,
- 49, 116, 86, 82, -1, -1, -1, 86, -1, 124,
- -1, -1, -1, -1, -1, 130, 131, 101, -1, 49,
- -1, -1, 101, 107, -1, -1, -1, -1, 107, 144,
- 145, 146, 147, 148, -1, -1, 151, 152, -1, 154,
- 155, 156, 157, 158, 159, -1, 161, 96, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 141, 142, 143,
- -1, -1, 141, 142, 143, -1, 96, 116, -1, -1,
- -1, -1, -1, -1, -1, 124, -1, -1, -1, -1,
- -1, 130, 131, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 124, 144, 145, 146, 147, 148,
- 130, 131, 151, 152, -1, 154, 155, 156, 157, 158,
- 159, -1, 161, -1, 144, 145, 146, 147, 148, -1,
- -1, 151, 152, -1, 154, 155, 156, 157, 158, 159,
- -1, 161
+ 131, 2, 245, 69, 5, 85, 86, 86, 75, 10,
+ 11, 169, 95, 3, 12, 419, 137, 4, 5, 6,
+ 78, 3, 3, 46, 35, 3, 102, 72, 159, 105,
+ 161, 162, 105, 50, 19, 53, 130, 89, 164, 85,
+ 110, 167, 75, 447, 45, 176, 47, 177, 89, 179,
+ 181, 110, 53, 133, 133, 25, 75, 127, 69, 9,
+ 164, 3, 96, 167, 110, 111, 87, 161, 127, 135,
+ 55, 3, 105, 316, 205, 233, 128, 78, 79, 120,
+ 91, 127, 50, 16, 17, 106, 105, 88, 89, 123,
+ 40, 112, 62, 110, 164, 26, 83, 67, 276, 166,
+ 68, 344, 280, 73, 74, 164, 3, 238, 239, 167,
+ 127, 156, 99, 243, 164, 181, 3, 167, 249, 250,
+ 90, 251, 163, 253, 94, 95, 76, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
+ 270, 271, 120, 219, 167, 163, 219, 3, 4, 5,
+ 6, 138, 139, 3, 4, 5, 6, 87, 164, 93,
+ 403, 167, 293, 284, 153, 130, 164, 298, 299, 164,
+ 236, 160, 167, 163, 156, 156, 106, 25, 110, 162,
+ 25, 168, 112, 89, 167, 41, 42, 43, 120, 272,
+ 89, 41, 42, 43, 159, 127, 161, 167, 110, 330,
+ 331, 110, 106, 112, 53, 140, 110, 450, 120, 276,
+ 59, 369, 342, 280, 62, 127, 3, 62, 127, 67,
+ 300, 300, 67, 127, 80, 73, 74, 83, 73, 74,
+ 80, 9, 77, 83, 103, 0, 107, 3, 4, 5,
+ 6, 110, 90, 99, 103, 90, 94, 95, 110, 99,
+ 95, 110, 110, 109, 112, 166, 106, 99, 127, 3,
+ 116, 392, 40, 394, 395, 127, 116, 333, 127, 127,
+ 165, 401, 273, 129, 116, 41, 42, 43, 344, 129,
+ 99, 126, 138, 139, 163, 163, 165, 53, 138, 139,
+ 3, 4, 5, 6, 72, 89, 218, 116, 76, 155,
+ 156, 223, 122, 3, 435, 155, 156, 163, 122, 118,
+ 167, 92, 168, 163, 80, 120, 119, 83, 168, 167,
+ 130, 3, 4, 5, 6, 3, 116, 4, 41, 42,
+ 43, 78, 164, 99, 465, 167, 467, 403, 88, 163,
+ 3, 3, 4, 5, 6, 4, 156, 157, 158, 159,
+ 116, 161, 132, 133, 134, 135, 136, 137, 41, 41,
+ 42, 43, 164, 129, 163, 167, 164, 80, 163, 167,
+ 83, 24, 138, 139, 6, 164, 12, 30, 167, 164,
+ 42, 43, 164, 17, 109, 38, 99, 121, 4, 155,
+ 156, 164, 167, 41, 3, 144, 107, 163, 80, 3,
+ 72, 83, 168, 116, 3, 107, 3, 163, 120, 163,
+ 163, 64, 93, 161, 44, 49, 129, 99, 80, 89,
+ 163, 83, 163, 50, 88, 138, 139, 167, 81, 167,
+ 83, 84, 53, 163, 116, 164, 163, 99, 3, 3,
+ 163, 163, 155, 156, 164, 98, 89, 129, 163, 102,
+ 163, 96, 110, 99, 116, 168, 138, 139, 161, 167,
+ 65, 114, 96, 162, 6, 6, 99, 129, 164, 164,
+ 164, 94, 73, 155, 156, 73, 138, 139, 73, 94,
+ 3, 163, 116, 121, 164, 164, 168, 49, 164, 123,
+ 124, 164, 163, 155, 156, 163, 130, 131, 165, 164,
+ 63, 163, 23, 282, 141, 279, 168, 44, 393, 313,
+ 144, 145, 146, 147, 148, 206, 52, 151, 152, 0,
+ 154, 155, 156, 157, 158, 159, 7, 161, 130, 234,
+ 293, 7, 469, 240, 15, 286, 443, 49, 92, 15,
+ 442, 22, 217, 462, -1, 26, 22, -1, -1, -1,
+ 26, 32, -1, -1, 35, 36, 32, -1, -1, 35,
+ 36, -1, 124, -1, -1, -1, 47, 48, 130, -1,
+ -1, 47, 48, -1, -1, -1, -1, 58, -1, -1,
+ -1, -1, 58, -1, 96, 147, 148, -1, -1, 151,
+ 152, -1, 154, 155, 156, 157, 158, 159, 110, 161,
+ -1, 82, -1, 49, 116, 86, 82, -1, -1, -1,
+ 86, -1, 124, -1, -1, -1, -1, -1, 130, 131,
+ 101, -1, 49, -1, -1, 101, 107, -1, -1, -1,
+ -1, 107, 144, 145, 146, 147, 148, -1, -1, 151,
+ 152, -1, 154, 155, 156, 157, 158, 159, -1, 161,
+ 96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 141, 142, 143, -1, -1, 141, 142, 143, -1, 96,
+ 116, -1, -1, -1, -1, -1, -1, -1, 124, -1,
+ -1, -1, -1, -1, 130, 131, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 124, 144, 145,
+ 146, 147, 148, 130, 131, 151, 152, -1, 154, 155,
+ 156, 157, 158, 159, -1, 161, -1, 144, 145, 146,
+ 147, 148, -1, -1, 151, 152, -1, 154, 155, 156,
+ 157, 158, 159, -1, 161
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1233,51 +1248,51 @@ static const yytype_int16 yystos[] =
0, 7, 15, 22, 26, 32, 35, 36, 47, 48,
58, 82, 86, 101, 107, 141, 142, 143, 170, 171,
172, 173, 177, 179, 181, 182, 186, 187, 188, 194,
- 196, 197, 198, 200, 203, 266, 267, 26, 3, 261,
- 3, 3, 261, 75, 105, 89, 89, 93, 260, 261,
- 261, 75, 105, 19, 55, 3, 268, 269, 140, 178,
- 178, 178, 0, 166, 273, 107, 174, 174, 53, 163,
+ 196, 197, 198, 200, 203, 267, 268, 26, 3, 262,
+ 3, 3, 262, 75, 105, 89, 89, 93, 261, 262,
+ 262, 75, 105, 19, 55, 3, 269, 270, 140, 178,
+ 178, 178, 0, 166, 274, 107, 174, 174, 53, 163,
206, 207, 211, 3, 165, 163, 89, 122, 189, 189,
- 261, 3, 183, 261, 118, 89, 128, 122, 195, 195,
- 261, 120, 167, 172, 92, 119, 223, 206, 207, 9,
+ 262, 3, 183, 262, 118, 89, 128, 122, 195, 195,
+ 262, 120, 167, 172, 92, 119, 223, 206, 207, 9,
40, 76, 208, 209, 72, 208, 219, 3, 4, 5,
- 6, 99, 138, 139, 168, 226, 227, 248, 249, 250,
- 251, 252, 253, 254, 4, 180, 116, 261, 261, 78,
- 216, 88, 163, 199, 3, 201, 202, 184, 249, 184,
- 41, 261, 261, 206, 269, 163, 252, 12, 212, 164,
- 164, 204, 205, 206, 211, 109, 210, 121, 204, 50,
- 68, 224, 164, 167, 41, 89, 120, 163, 199, 3,
- 41, 42, 43, 80, 116, 129, 155, 156, 163, 229,
- 230, 231, 232, 233, 234, 235, 236, 238, 239, 240,
- 241, 242, 244, 245, 246, 247, 248, 184, 3, 274,
- 59, 207, 144, 167, 216, 107, 185, 185, 3, 175,
- 176, 213, 225, 228, 229, 219, 208, 220, 221, 229,
- 219, 229, 109, 229, 248, 3, 203, 3, 190, 191,
- 120, 163, 165, 163, 163, 163, 106, 229, 237, 41,
- 116, 230, 161, 230, 207, 229, 110, 127, 17, 49,
- 96, 116, 123, 124, 130, 131, 144, 145, 146, 147,
- 148, 151, 152, 154, 155, 156, 157, 158, 159, 161,
- 93, 164, 167, 163, 229, 202, 44, 163, 164, 167,
- 89, 214, 215, 167, 3, 120, 264, 265, 224, 204,
- 167, 85, 111, 222, 224, 50, 50, 88, 24, 30,
- 38, 64, 81, 83, 84, 98, 102, 114, 192, 164,
- 167, 203, 164, 212, 3, 156, 207, 132, 133, 134,
- 135, 136, 137, 243, 229, 229, 237, 87, 106, 112,
- 163, 116, 225, 164, 164, 229, 229, 230, 230, 96,
- 123, 163, 99, 116, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 230, 230, 230, 252,
- 261, 3, 227, 183, 227, 176, 163, 255, 256, 257,
- 258, 259, 261, 270, 216, 228, 3, 221, 229, 229,
- 184, 163, 163, 99, 116, 193, 191, 225, 164, 89,
- 120, 103, 87, 112, 229, 229, 207, 162, 110, 230,
- 163, 207, 225, 99, 162, 164, 164, 203, 25, 62,
- 67, 73, 74, 90, 95, 271, 167, 120, 262, 263,
- 264, 65, 217, 6, 6, 99, 164, 229, 192, 229,
- 229, 112, 103, 164, 230, 207, 225, 164, 164, 164,
- 94, 73, 73, 73, 94, 256, 3, 121, 164, 164,
- 164, 164, 112, 229, 164, 164, 263, 257, 256, 163,
- 225, 77, 126, 274, 46, 218, 163, 229, 272, 164,
- 229, 3, 247, 164
+ 6, 83, 99, 138, 139, 168, 226, 227, 248, 249,
+ 250, 251, 252, 253, 254, 255, 4, 180, 116, 262,
+ 262, 78, 216, 88, 163, 199, 3, 201, 202, 184,
+ 249, 184, 41, 262, 262, 206, 270, 163, 252, 12,
+ 212, 164, 164, 204, 205, 206, 211, 109, 210, 121,
+ 204, 50, 68, 224, 4, 164, 167, 41, 89, 120,
+ 163, 199, 3, 41, 42, 43, 80, 116, 129, 155,
+ 156, 163, 229, 230, 231, 232, 233, 234, 235, 236,
+ 238, 239, 240, 241, 242, 244, 245, 246, 247, 248,
+ 184, 3, 275, 59, 207, 144, 167, 216, 107, 185,
+ 185, 3, 175, 176, 213, 225, 228, 229, 219, 208,
+ 220, 221, 229, 219, 229, 109, 229, 248, 3, 203,
+ 3, 190, 191, 120, 163, 165, 163, 163, 163, 106,
+ 229, 237, 41, 116, 230, 161, 230, 207, 229, 110,
+ 127, 17, 49, 96, 116, 123, 124, 130, 131, 144,
+ 145, 146, 147, 148, 151, 152, 154, 155, 156, 157,
+ 158, 159, 161, 93, 164, 167, 163, 229, 202, 44,
+ 163, 164, 167, 89, 214, 215, 167, 3, 120, 265,
+ 266, 224, 204, 167, 85, 111, 222, 224, 50, 50,
+ 88, 24, 30, 38, 64, 81, 83, 84, 98, 102,
+ 114, 192, 164, 167, 203, 164, 212, 3, 156, 207,
+ 132, 133, 134, 135, 136, 137, 243, 229, 229, 237,
+ 87, 106, 112, 163, 116, 225, 164, 164, 229, 229,
+ 230, 230, 96, 123, 163, 99, 116, 230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
+ 230, 230, 252, 262, 3, 227, 183, 227, 176, 163,
+ 256, 257, 258, 259, 260, 262, 271, 216, 228, 3,
+ 221, 229, 229, 184, 163, 163, 99, 116, 193, 191,
+ 225, 164, 89, 120, 103, 87, 112, 229, 229, 207,
+ 162, 110, 230, 163, 207, 225, 99, 162, 164, 164,
+ 203, 25, 62, 67, 73, 74, 90, 95, 272, 167,
+ 120, 263, 264, 265, 65, 217, 6, 6, 99, 164,
+ 229, 192, 229, 229, 112, 103, 164, 230, 207, 225,
+ 164, 164, 164, 94, 73, 73, 73, 94, 257, 3,
+ 121, 164, 164, 164, 164, 112, 229, 164, 164, 264,
+ 258, 257, 163, 225, 77, 126, 275, 46, 218, 163,
+ 229, 273, 164, 229, 3, 247, 164
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
@@ -1304,12 +1319,12 @@ static const yytype_int16 yyr1[] =
238, 238, 239, 239, 239, 239, 239, 239, 239, 240,
240, 241, 242, 243, 243, 243, 243, 243, 243, 244,
245, 246, 247, 247, 247, 247, 248, 248, 248, 248,
- 248, 249, 250, 250, 251, 251, 252, 253, 254, 255,
- 255, 256, 256, 257, 257, 258, 258, 259, 260, 261,
+ 248, 248, 249, 250, 250, 251, 251, 252, 253, 254,
+ 255, 256, 256, 257, 257, 258, 258, 259, 259, 260,
261, 262, 262, 263, 263, 264, 264, 265, 265, 266,
- 266, 267, 268, 268, 269, 270, 270, 270, 271, 271,
- 271, 271, 271, 271, 271, 271, 271, 271, 272, 273,
- 273, 274, 274
+ 266, 267, 267, 268, 269, 269, 270, 271, 271, 271,
+ 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
+ 273, 274, 274, 275, 275
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1336,12 +1351,12 @@ static const yytype_int8 yyr2[] =
4, 5, 3, 3, 3, 3, 3, 3, 3, 3,
5, 6, 6, 1, 1, 1, 1, 1, 1, 4,
4, 5, 1, 3, 1, 3, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 3, 1, 1, 1, 4, 1, 3, 2, 1, 1,
- 3, 1, 5, 1, 0, 2, 1, 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, 1, 1, 1, 1, 1, 2,
+ 1, 1, 3, 1, 1, 1, 4, 1, 3, 2,
+ 1, 1, 3, 1, 5, 1, 0, 2, 1, 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
};
@@ -1485,10 +1500,10 @@ yy_symbol_value_print (FILE *yyo,
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
{
FILE *yyoutput = yyo;
- YYUSE (yyoutput);
- YYUSE (yylocationp);
- YYUSE (result);
- YYUSE (scanner);
+ YY_USE (yyoutput);
+ YY_USE (yylocationp);
+ YY_USE (result);
+ YY_USE (scanner);
if (!yyvaluep)
return;
# ifdef YYPRINT
@@ -1496,7 +1511,7 @@ yy_symbol_value_print (FILE *yyo,
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yykind);
+ YY_USE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
@@ -1881,10 +1896,10 @@ static void
yydestruct (const char *yymsg,
yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, hsql::SQLParserResult* result, yyscan_t scanner)
{
- YYUSE (yyvaluep);
- YYUSE (yylocationp);
- YYUSE (result);
- YYUSE (scanner);
+ YY_USE (yyvaluep);
+ YY_USE (yylocationp);
+ YY_USE (result);
+ YY_USE (scanner);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
@@ -1895,25 +1910,25 @@ yydestruct (const char *yymsg,
case YYSYMBOL_IDENTIFIER: /* IDENTIFIER */
#line 149 "bison_parser.y"
{ free( (((*yyvaluep).sval)) ); }
-#line 1899 "bison_parser.cpp"
+#line 1914 "bison_parser.cpp"
break;
case YYSYMBOL_STRING: /* STRING */
#line 149 "bison_parser.y"
{ free( (((*yyvaluep).sval)) ); }
-#line 1905 "bison_parser.cpp"
+#line 1920 "bison_parser.cpp"
break;
case YYSYMBOL_FLOATVAL: /* FLOATVAL */
#line 147 "bison_parser.y"
{ }
-#line 1911 "bison_parser.cpp"
+#line 1926 "bison_parser.cpp"
break;
case YYSYMBOL_INTVAL: /* INTVAL */
#line 147 "bison_parser.y"
{ }
-#line 1917 "bison_parser.cpp"
+#line 1932 "bison_parser.cpp"
break;
case YYSYMBOL_statement_list: /* statement_list */
@@ -1926,19 +1941,19 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).stmt_vec));
}
-#line 1930 "bison_parser.cpp"
+#line 1945 "bison_parser.cpp"
break;
case YYSYMBOL_statement: /* statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).statement)); }
-#line 1936 "bison_parser.cpp"
+#line 1951 "bison_parser.cpp"
break;
case YYSYMBOL_preparable_statement: /* preparable_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).statement)); }
-#line 1942 "bison_parser.cpp"
+#line 1957 "bison_parser.cpp"
break;
case YYSYMBOL_opt_hints: /* opt_hints */
@@ -1951,7 +1966,7 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 1955 "bison_parser.cpp"
+#line 1970 "bison_parser.cpp"
break;
case YYSYMBOL_hint_list: /* hint_list */
@@ -1964,85 +1979,85 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 1968 "bison_parser.cpp"
+#line 1983 "bison_parser.cpp"
break;
case YYSYMBOL_hint: /* hint */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 1974 "bison_parser.cpp"
+#line 1989 "bison_parser.cpp"
break;
case YYSYMBOL_transaction_statement: /* transaction_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).transaction_stmt)); }
-#line 1980 "bison_parser.cpp"
+#line 1995 "bison_parser.cpp"
break;
case YYSYMBOL_prepare_statement: /* prepare_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).prep_stmt)); }
-#line 1986 "bison_parser.cpp"
+#line 2001 "bison_parser.cpp"
break;
case YYSYMBOL_prepare_target_query: /* prepare_target_query */
#line 149 "bison_parser.y"
{ free( (((*yyvaluep).sval)) ); }
-#line 1992 "bison_parser.cpp"
+#line 2007 "bison_parser.cpp"
break;
case YYSYMBOL_execute_statement: /* execute_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).exec_stmt)); }
-#line 1998 "bison_parser.cpp"
+#line 2013 "bison_parser.cpp"
break;
case YYSYMBOL_import_statement: /* import_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).import_stmt)); }
-#line 2004 "bison_parser.cpp"
+#line 2019 "bison_parser.cpp"
break;
case YYSYMBOL_file_type: /* file_type */
#line 147 "bison_parser.y"
{ }
-#line 2010 "bison_parser.cpp"
+#line 2025 "bison_parser.cpp"
break;
case YYSYMBOL_file_path: /* file_path */
#line 149 "bison_parser.y"
{ free( (((*yyvaluep).sval)) ); }
-#line 2016 "bison_parser.cpp"
+#line 2031 "bison_parser.cpp"
break;
case YYSYMBOL_opt_file_type: /* opt_file_type */
#line 147 "bison_parser.y"
{ }
-#line 2022 "bison_parser.cpp"
+#line 2037 "bison_parser.cpp"
break;
case YYSYMBOL_export_statement: /* export_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).export_stmt)); }
-#line 2028 "bison_parser.cpp"
+#line 2043 "bison_parser.cpp"
break;
case YYSYMBOL_show_statement: /* show_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).show_stmt)); }
-#line 2034 "bison_parser.cpp"
+#line 2049 "bison_parser.cpp"
break;
case YYSYMBOL_create_statement: /* create_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).create_stmt)); }
-#line 2040 "bison_parser.cpp"
+#line 2055 "bison_parser.cpp"
break;
case YYSYMBOL_opt_not_exists: /* opt_not_exists */
#line 147 "bison_parser.y"
{ }
-#line 2046 "bison_parser.cpp"
+#line 2061 "bison_parser.cpp"
break;
case YYSYMBOL_column_def_commalist: /* column_def_commalist */
@@ -2055,55 +2070,55 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).column_vec));
}
-#line 2059 "bison_parser.cpp"
+#line 2074 "bison_parser.cpp"
break;
case YYSYMBOL_column_def: /* column_def */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).column_t)); }
-#line 2065 "bison_parser.cpp"
+#line 2080 "bison_parser.cpp"
break;
case YYSYMBOL_column_type: /* column_type */
#line 147 "bison_parser.y"
{ }
-#line 2071 "bison_parser.cpp"
+#line 2086 "bison_parser.cpp"
break;
case YYSYMBOL_opt_column_nullable: /* opt_column_nullable */
#line 147 "bison_parser.y"
{ }
-#line 2077 "bison_parser.cpp"
+#line 2092 "bison_parser.cpp"
break;
case YYSYMBOL_drop_statement: /* drop_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).drop_stmt)); }
-#line 2083 "bison_parser.cpp"
+#line 2098 "bison_parser.cpp"
break;
case YYSYMBOL_opt_exists: /* opt_exists */
#line 147 "bison_parser.y"
{ }
-#line 2089 "bison_parser.cpp"
+#line 2104 "bison_parser.cpp"
break;
case YYSYMBOL_delete_statement: /* delete_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).delete_stmt)); }
-#line 2095 "bison_parser.cpp"
+#line 2110 "bison_parser.cpp"
break;
case YYSYMBOL_truncate_statement: /* truncate_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).delete_stmt)); }
-#line 2101 "bison_parser.cpp"
+#line 2116 "bison_parser.cpp"
break;
case YYSYMBOL_insert_statement: /* insert_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).insert_stmt)); }
-#line 2107 "bison_parser.cpp"
+#line 2122 "bison_parser.cpp"
break;
case YYSYMBOL_opt_column_list: /* opt_column_list */
@@ -2116,13 +2131,13 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).str_vec));
}
-#line 2120 "bison_parser.cpp"
+#line 2135 "bison_parser.cpp"
break;
case YYSYMBOL_update_statement: /* update_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).update_stmt)); }
-#line 2126 "bison_parser.cpp"
+#line 2141 "bison_parser.cpp"
break;
case YYSYMBOL_update_clause_commalist: /* update_clause_commalist */
@@ -2135,73 +2150,73 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).update_vec));
}
-#line 2139 "bison_parser.cpp"
+#line 2154 "bison_parser.cpp"
break;
case YYSYMBOL_update_clause: /* update_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).update_t)); }
-#line 2145 "bison_parser.cpp"
+#line 2160 "bison_parser.cpp"
break;
case YYSYMBOL_select_statement: /* select_statement */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2151 "bison_parser.cpp"
+#line 2166 "bison_parser.cpp"
break;
case YYSYMBOL_select_within_set_operation: /* select_within_set_operation */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2157 "bison_parser.cpp"
+#line 2172 "bison_parser.cpp"
break;
case YYSYMBOL_select_within_set_operation_no_parentheses: /* select_within_set_operation_no_parentheses */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2163 "bison_parser.cpp"
+#line 2178 "bison_parser.cpp"
break;
case YYSYMBOL_select_with_paren: /* select_with_paren */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2169 "bison_parser.cpp"
+#line 2184 "bison_parser.cpp"
break;
case YYSYMBOL_select_no_paren: /* select_no_paren */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2175 "bison_parser.cpp"
+#line 2190 "bison_parser.cpp"
break;
case YYSYMBOL_set_operator: /* set_operator */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).set_operator_t)); }
-#line 2181 "bison_parser.cpp"
+#line 2196 "bison_parser.cpp"
break;
case YYSYMBOL_set_type: /* set_type */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).set_operator_t)); }
-#line 2187 "bison_parser.cpp"
+#line 2202 "bison_parser.cpp"
break;
case YYSYMBOL_opt_all: /* opt_all */
#line 147 "bison_parser.y"
{ }
-#line 2193 "bison_parser.cpp"
+#line 2208 "bison_parser.cpp"
break;
case YYSYMBOL_select_clause: /* select_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).select_stmt)); }
-#line 2199 "bison_parser.cpp"
+#line 2214 "bison_parser.cpp"
break;
case YYSYMBOL_opt_distinct: /* opt_distinct */
#line 147 "bison_parser.y"
{ }
-#line 2205 "bison_parser.cpp"
+#line 2220 "bison_parser.cpp"
break;
case YYSYMBOL_select_list: /* select_list */
@@ -2214,37 +2229,37 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2218 "bison_parser.cpp"
+#line 2233 "bison_parser.cpp"
break;
case YYSYMBOL_opt_from_clause: /* opt_from_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2224 "bison_parser.cpp"
+#line 2239 "bison_parser.cpp"
break;
case YYSYMBOL_from_clause: /* from_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2230 "bison_parser.cpp"
+#line 2245 "bison_parser.cpp"
break;
case YYSYMBOL_opt_where: /* opt_where */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2236 "bison_parser.cpp"
+#line 2251 "bison_parser.cpp"
break;
case YYSYMBOL_opt_group: /* opt_group */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).group_t)); }
-#line 2242 "bison_parser.cpp"
+#line 2257 "bison_parser.cpp"
break;
case YYSYMBOL_opt_having: /* opt_having */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2248 "bison_parser.cpp"
+#line 2263 "bison_parser.cpp"
break;
case YYSYMBOL_opt_order: /* opt_order */
@@ -2257,7 +2272,7 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).order_vec));
}
-#line 2261 "bison_parser.cpp"
+#line 2276 "bison_parser.cpp"
break;
case YYSYMBOL_order_list: /* order_list */
@@ -2270,31 +2285,31 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).order_vec));
}
-#line 2274 "bison_parser.cpp"
+#line 2289 "bison_parser.cpp"
break;
case YYSYMBOL_order_desc: /* order_desc */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).order)); }
-#line 2280 "bison_parser.cpp"
+#line 2295 "bison_parser.cpp"
break;
case YYSYMBOL_opt_order_type: /* opt_order_type */
#line 147 "bison_parser.y"
{ }
-#line 2286 "bison_parser.cpp"
+#line 2301 "bison_parser.cpp"
break;
case YYSYMBOL_opt_top: /* opt_top */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).limit)); }
-#line 2292 "bison_parser.cpp"
+#line 2307 "bison_parser.cpp"
break;
case YYSYMBOL_opt_limit: /* opt_limit */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).limit)); }
-#line 2298 "bison_parser.cpp"
+#line 2313 "bison_parser.cpp"
break;
case YYSYMBOL_expr_list: /* expr_list */
@@ -2307,7 +2322,7 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2311 "bison_parser.cpp"
+#line 2326 "bison_parser.cpp"
break;
case YYSYMBOL_opt_literal_list: /* opt_literal_list */
@@ -2320,7 +2335,7 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2324 "bison_parser.cpp"
+#line 2339 "bison_parser.cpp"
break;
case YYSYMBOL_literal_list: /* literal_list */
@@ -2333,187 +2348,193 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).expr_vec));
}
-#line 2337 "bison_parser.cpp"
+#line 2352 "bison_parser.cpp"
break;
case YYSYMBOL_expr_alias: /* expr_alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2343 "bison_parser.cpp"
+#line 2358 "bison_parser.cpp"
break;
case YYSYMBOL_expr: /* expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2349 "bison_parser.cpp"
+#line 2364 "bison_parser.cpp"
break;
case YYSYMBOL_operand: /* operand */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2355 "bison_parser.cpp"
+#line 2370 "bison_parser.cpp"
break;
case YYSYMBOL_scalar_expr: /* scalar_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2361 "bison_parser.cpp"
+#line 2376 "bison_parser.cpp"
break;
case YYSYMBOL_unary_expr: /* unary_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2367 "bison_parser.cpp"
+#line 2382 "bison_parser.cpp"
break;
case YYSYMBOL_binary_expr: /* binary_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2373 "bison_parser.cpp"
+#line 2388 "bison_parser.cpp"
break;
case YYSYMBOL_logic_expr: /* logic_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2379 "bison_parser.cpp"
+#line 2394 "bison_parser.cpp"
break;
case YYSYMBOL_in_expr: /* in_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2385 "bison_parser.cpp"
+#line 2400 "bison_parser.cpp"
break;
case YYSYMBOL_case_expr: /* case_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2391 "bison_parser.cpp"
+#line 2406 "bison_parser.cpp"
break;
case YYSYMBOL_case_list: /* case_list */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2397 "bison_parser.cpp"
+#line 2412 "bison_parser.cpp"
break;
case YYSYMBOL_exists_expr: /* exists_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2403 "bison_parser.cpp"
+#line 2418 "bison_parser.cpp"
break;
case YYSYMBOL_comp_expr: /* comp_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2409 "bison_parser.cpp"
+#line 2424 "bison_parser.cpp"
break;
case YYSYMBOL_function_expr: /* function_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2415 "bison_parser.cpp"
+#line 2430 "bison_parser.cpp"
break;
case YYSYMBOL_extract_expr: /* extract_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2421 "bison_parser.cpp"
+#line 2436 "bison_parser.cpp"
break;
case YYSYMBOL_cast_expr: /* cast_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2427 "bison_parser.cpp"
+#line 2442 "bison_parser.cpp"
break;
case YYSYMBOL_datetime_field: /* datetime_field */
#line 147 "bison_parser.y"
{ }
-#line 2433 "bison_parser.cpp"
+#line 2448 "bison_parser.cpp"
break;
case YYSYMBOL_array_expr: /* array_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2439 "bison_parser.cpp"
+#line 2454 "bison_parser.cpp"
break;
case YYSYMBOL_array_index: /* array_index */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2445 "bison_parser.cpp"
+#line 2460 "bison_parser.cpp"
break;
case YYSYMBOL_between_expr: /* between_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2451 "bison_parser.cpp"
+#line 2466 "bison_parser.cpp"
break;
case YYSYMBOL_column_name: /* column_name */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2457 "bison_parser.cpp"
+#line 2472 "bison_parser.cpp"
break;
case YYSYMBOL_literal: /* literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2463 "bison_parser.cpp"
+#line 2478 "bison_parser.cpp"
break;
case YYSYMBOL_string_literal: /* string_literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2469 "bison_parser.cpp"
+#line 2484 "bison_parser.cpp"
break;
case YYSYMBOL_bool_literal: /* bool_literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2475 "bison_parser.cpp"
+#line 2490 "bison_parser.cpp"
break;
case YYSYMBOL_num_literal: /* num_literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2481 "bison_parser.cpp"
+#line 2496 "bison_parser.cpp"
break;
case YYSYMBOL_int_literal: /* int_literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2487 "bison_parser.cpp"
+#line 2502 "bison_parser.cpp"
break;
case YYSYMBOL_null_literal: /* null_literal */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2493 "bison_parser.cpp"
+#line 2508 "bison_parser.cpp"
+ break;
+
+ case YYSYMBOL_date_literal: /* date_literal */
+#line 158 "bison_parser.y"
+ { delete (((*yyvaluep).expr)); }
+#line 2514 "bison_parser.cpp"
break;
case YYSYMBOL_param_expr: /* param_expr */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2499 "bison_parser.cpp"
+#line 2520 "bison_parser.cpp"
break;
case YYSYMBOL_table_ref: /* table_ref */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2505 "bison_parser.cpp"
+#line 2526 "bison_parser.cpp"
break;
case YYSYMBOL_table_ref_atomic: /* table_ref_atomic */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2511 "bison_parser.cpp"
+#line 2532 "bison_parser.cpp"
break;
case YYSYMBOL_nonjoin_table_ref_atomic: /* nonjoin_table_ref_atomic */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2517 "bison_parser.cpp"
+#line 2538 "bison_parser.cpp"
break;
case YYSYMBOL_table_ref_commalist: /* table_ref_commalist */
@@ -2526,91 +2547,91 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).table_vec));
}
-#line 2530 "bison_parser.cpp"
+#line 2551 "bison_parser.cpp"
break;
case YYSYMBOL_table_ref_name: /* table_ref_name */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2536 "bison_parser.cpp"
+#line 2557 "bison_parser.cpp"
break;
case YYSYMBOL_table_ref_name_no_alias: /* table_ref_name_no_alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2542 "bison_parser.cpp"
+#line 2563 "bison_parser.cpp"
break;
case YYSYMBOL_table_name: /* table_name */
#line 148 "bison_parser.y"
{ free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); }
-#line 2548 "bison_parser.cpp"
+#line 2569 "bison_parser.cpp"
break;
case YYSYMBOL_table_alias: /* table_alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).alias_t)); }
-#line 2554 "bison_parser.cpp"
+#line 2575 "bison_parser.cpp"
break;
case YYSYMBOL_opt_table_alias: /* opt_table_alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).alias_t)); }
-#line 2560 "bison_parser.cpp"
+#line 2581 "bison_parser.cpp"
break;
case YYSYMBOL_alias: /* alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).alias_t)); }
-#line 2566 "bison_parser.cpp"
+#line 2587 "bison_parser.cpp"
break;
case YYSYMBOL_opt_alias: /* opt_alias */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).alias_t)); }
-#line 2572 "bison_parser.cpp"
+#line 2593 "bison_parser.cpp"
break;
case YYSYMBOL_opt_with_clause: /* opt_with_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).with_description_vec)); }
-#line 2578 "bison_parser.cpp"
+#line 2599 "bison_parser.cpp"
break;
case YYSYMBOL_with_clause: /* with_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).with_description_vec)); }
-#line 2584 "bison_parser.cpp"
+#line 2605 "bison_parser.cpp"
break;
case YYSYMBOL_with_description_list: /* with_description_list */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).with_description_vec)); }
-#line 2590 "bison_parser.cpp"
+#line 2611 "bison_parser.cpp"
break;
case YYSYMBOL_with_description: /* with_description */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).with_description_t)); }
-#line 2596 "bison_parser.cpp"
+#line 2617 "bison_parser.cpp"
break;
case YYSYMBOL_join_clause: /* join_clause */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).table)); }
-#line 2602 "bison_parser.cpp"
+#line 2623 "bison_parser.cpp"
break;
case YYSYMBOL_opt_join_type: /* opt_join_type */
#line 147 "bison_parser.y"
{ }
-#line 2608 "bison_parser.cpp"
+#line 2629 "bison_parser.cpp"
break;
case YYSYMBOL_join_condition: /* join_condition */
#line 158 "bison_parser.y"
{ delete (((*yyvaluep).expr)); }
-#line 2614 "bison_parser.cpp"
+#line 2635 "bison_parser.cpp"
break;
case YYSYMBOL_ident_commalist: /* ident_commalist */
@@ -2623,7 +2644,7 @@ yydestruct (const char *yymsg,
}
delete (((*yyvaluep).str_vec));
}
-#line 2627 "bison_parser.cpp"
+#line 2648 "bison_parser.cpp"
break;
default:
@@ -2730,7 +2751,7 @@ YYLTYPE yylloc = yyloc_default;
yylloc.string_length = 0;
}
-#line 2734 "bison_parser.cpp"
+#line 2755 "bison_parser.cpp"
yylsp[0] = yylloc;
goto yysetstate;
@@ -2958,7 +2979,7 @@ YYLTYPE yylloc = yyloc_default;
}
delete (yyvsp[-1].stmt_vec);
}
-#line 2962 "bison_parser.cpp"
+#line 2983 "bison_parser.cpp"
break;
case 3: /* statement_list: statement */
@@ -2969,7 +2990,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.stmt_vec) = new std::vector();
(yyval.stmt_vec)->push_back((yyvsp[0].statement));
}
-#line 2973 "bison_parser.cpp"
+#line 2994 "bison_parser.cpp"
break;
case 4: /* statement_list: statement_list ';' statement */
@@ -2980,7 +3001,7 @@ YYLTYPE yylloc = yyloc_default;
(yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement));
(yyval.stmt_vec) = (yyvsp[-2].stmt_vec);
}
-#line 2984 "bison_parser.cpp"
+#line 3005 "bison_parser.cpp"
break;
case 5: /* statement: prepare_statement opt_hints */
@@ -2989,7 +3010,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.statement) = (yyvsp[-1].prep_stmt);
(yyval.statement)->hints = (yyvsp[0].expr_vec);
}
-#line 2993 "bison_parser.cpp"
+#line 3014 "bison_parser.cpp"
break;
case 6: /* statement: preparable_statement opt_hints */
@@ -2998,7 +3019,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.statement) = (yyvsp[-1].statement);
(yyval.statement)->hints = (yyvsp[0].expr_vec);
}
-#line 3002 "bison_parser.cpp"
+#line 3023 "bison_parser.cpp"
break;
case 7: /* statement: show_statement */
@@ -3006,7 +3027,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.statement) = (yyvsp[0].show_stmt);
}
-#line 3010 "bison_parser.cpp"
+#line 3031 "bison_parser.cpp"
break;
case 8: /* statement: import_statement */
@@ -3014,7 +3035,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.statement) = (yyvsp[0].import_stmt);
}
-#line 3018 "bison_parser.cpp"
+#line 3039 "bison_parser.cpp"
break;
case 9: /* statement: export_statement */
@@ -3022,85 +3043,85 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.statement) = (yyvsp[0].export_stmt);
}
-#line 3026 "bison_parser.cpp"
+#line 3047 "bison_parser.cpp"
break;
case 10: /* preparable_statement: select_statement */
#line 326 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].select_stmt); }
-#line 3032 "bison_parser.cpp"
+#line 3053 "bison_parser.cpp"
break;
case 11: /* preparable_statement: create_statement */
#line 327 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].create_stmt); }
-#line 3038 "bison_parser.cpp"
+#line 3059 "bison_parser.cpp"
break;
case 12: /* preparable_statement: insert_statement */
#line 328 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].insert_stmt); }
-#line 3044 "bison_parser.cpp"
+#line 3065 "bison_parser.cpp"
break;
case 13: /* preparable_statement: delete_statement */
#line 329 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].delete_stmt); }
-#line 3050 "bison_parser.cpp"
+#line 3071 "bison_parser.cpp"
break;
case 14: /* preparable_statement: truncate_statement */
#line 330 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].delete_stmt); }
-#line 3056 "bison_parser.cpp"
+#line 3077 "bison_parser.cpp"
break;
case 15: /* preparable_statement: update_statement */
#line 331 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].update_stmt); }
-#line 3062 "bison_parser.cpp"
+#line 3083 "bison_parser.cpp"
break;
case 16: /* preparable_statement: drop_statement */
#line 332 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].drop_stmt); }
-#line 3068 "bison_parser.cpp"
+#line 3089 "bison_parser.cpp"
break;
case 17: /* preparable_statement: execute_statement */
#line 333 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].exec_stmt); }
-#line 3074 "bison_parser.cpp"
+#line 3095 "bison_parser.cpp"
break;
case 18: /* preparable_statement: transaction_statement */
#line 334 "bison_parser.y"
{ (yyval.statement) = (yyvsp[0].transaction_stmt); }
-#line 3080 "bison_parser.cpp"
+#line 3101 "bison_parser.cpp"
break;
case 19: /* opt_hints: WITH HINT '(' hint_list ')' */
#line 343 "bison_parser.y"
{ (yyval.expr_vec) = (yyvsp[-1].expr_vec); }
-#line 3086 "bison_parser.cpp"
+#line 3107 "bison_parser.cpp"
break;
case 20: /* opt_hints: %empty */
#line 344 "bison_parser.y"
{ (yyval.expr_vec) = nullptr; }
-#line 3092 "bison_parser.cpp"
+#line 3113 "bison_parser.cpp"
break;
case 21: /* hint_list: hint */
#line 349 "bison_parser.y"
{ (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); }
-#line 3098 "bison_parser.cpp"
+#line 3119 "bison_parser.cpp"
break;
case 22: /* hint_list: hint_list ',' hint */
#line 350 "bison_parser.y"
{ (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); }
-#line 3104 "bison_parser.cpp"
+#line 3125 "bison_parser.cpp"
break;
case 23: /* hint: IDENTIFIER */
@@ -3109,7 +3130,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.expr) = Expr::make(kExprHint);
(yyval.expr)->name = (yyvsp[0].sval);
}
-#line 3113 "bison_parser.cpp"
+#line 3134 "bison_parser.cpp"
break;
case 24: /* hint: IDENTIFIER '(' literal_list ')' */
@@ -3119,7 +3140,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.expr)->name = (yyvsp[-3].sval);
(yyval.expr)->exprList = (yyvsp[-1].expr_vec);
}
-#line 3123 "bison_parser.cpp"
+#line 3144 "bison_parser.cpp"
break;
case 25: /* transaction_statement: BEGIN opt_transaction_keyword */
@@ -3127,7 +3148,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.transaction_stmt) = new TransactionStatement(kBeginTransaction);
}
-#line 3131 "bison_parser.cpp"
+#line 3152 "bison_parser.cpp"
break;
case 26: /* transaction_statement: ROLLBACK opt_transaction_keyword */
@@ -3135,7 +3156,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.transaction_stmt) = new TransactionStatement(kRollbackTransaction);
}
-#line 3139 "bison_parser.cpp"
+#line 3160 "bison_parser.cpp"
break;
case 27: /* transaction_statement: COMMIT opt_transaction_keyword */
@@ -3143,7 +3164,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.transaction_stmt) = new TransactionStatement(kCommitTransaction);
}
-#line 3147 "bison_parser.cpp"
+#line 3168 "bison_parser.cpp"
break;
case 30: /* prepare_statement: PREPARE IDENTIFIER FROM prepare_target_query */
@@ -3153,7 +3174,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.prep_stmt)->name = (yyvsp[-2].sval);
(yyval.prep_stmt)->query = (yyvsp[0].sval);
}
-#line 3157 "bison_parser.cpp"
+#line 3178 "bison_parser.cpp"
break;
case 32: /* execute_statement: EXECUTE IDENTIFIER */
@@ -3162,7 +3183,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.exec_stmt) = new ExecuteStatement();
(yyval.exec_stmt)->name = (yyvsp[0].sval);
}
-#line 3166 "bison_parser.cpp"
+#line 3187 "bison_parser.cpp"
break;
case 33: /* execute_statement: EXECUTE IDENTIFIER '(' opt_literal_list ')' */
@@ -3172,7 +3193,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.exec_stmt)->name = (yyvsp[-3].sval);
(yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec);
}
-#line 3176 "bison_parser.cpp"
+#line 3197 "bison_parser.cpp"
break;
case 34: /* import_statement: IMPORT FROM file_type FILE file_path INTO table_name */
@@ -3183,7 +3204,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.import_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.import_stmt)->tableName = (yyvsp[0].table_name).name;
}
-#line 3187 "bison_parser.cpp"
+#line 3208 "bison_parser.cpp"
break;
case 35: /* import_statement: COPY table_name FROM file_path opt_file_type */
@@ -3194,7 +3215,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.import_stmt)->schema = (yyvsp[-3].table_name).schema;
(yyval.import_stmt)->tableName = (yyvsp[-3].table_name).name;
}
-#line 3198 "bison_parser.cpp"
+#line 3219 "bison_parser.cpp"
break;
case 36: /* file_type: IDENTIFIER */
@@ -3213,13 +3234,13 @@ YYLTYPE yylloc = yyloc_default;
}
free((yyvsp[0].sval));
}
-#line 3217 "bison_parser.cpp"
+#line 3238 "bison_parser.cpp"
break;
case 37: /* file_path: string_literal */
#line 450 "bison_parser.y"
{ (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); }
-#line 3223 "bison_parser.cpp"
+#line 3244 "bison_parser.cpp"
break;
case 38: /* opt_file_type: WITH FORMAT file_type */
@@ -3227,13 +3248,13 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.import_type_t) = (yyvsp[0].import_type_t);
}
-#line 3231 "bison_parser.cpp"
+#line 3252 "bison_parser.cpp"
break;
case 39: /* opt_file_type: %empty */
#line 457 "bison_parser.y"
{ (yyval.import_type_t) = kImportAuto; }
-#line 3237 "bison_parser.cpp"
+#line 3258 "bison_parser.cpp"
break;
case 40: /* export_statement: COPY table_name TO file_path opt_file_type */
@@ -3244,7 +3265,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.export_stmt)->schema = (yyvsp[-3].table_name).schema;
(yyval.export_stmt)->tableName = (yyvsp[-3].table_name).name;
}
-#line 3248 "bison_parser.cpp"
+#line 3269 "bison_parser.cpp"
break;
case 41: /* show_statement: SHOW TABLES */
@@ -3252,7 +3273,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.show_stmt) = new ShowStatement(kShowTables);
}
-#line 3256 "bison_parser.cpp"
+#line 3277 "bison_parser.cpp"
break;
case 42: /* show_statement: SHOW COLUMNS table_name */
@@ -3262,7 +3283,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.show_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.show_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3266 "bison_parser.cpp"
+#line 3287 "bison_parser.cpp"
break;
case 43: /* show_statement: DESCRIBE table_name */
@@ -3272,7 +3293,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.show_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.show_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3276 "bison_parser.cpp"
+#line 3297 "bison_parser.cpp"
break;
case 44: /* create_statement: CREATE TABLE opt_not_exists table_name FROM IDENTIFIER FILE file_path */
@@ -3290,7 +3311,7 @@ YYLTYPE yylloc = yyloc_default;
free((yyvsp[-2].sval));
(yyval.create_stmt)->filePath = (yyvsp[0].sval);
}
-#line 3294 "bison_parser.cpp"
+#line 3315 "bison_parser.cpp"
break;
case 45: /* create_statement: CREATE TABLE opt_not_exists table_name '(' column_def_commalist ')' */
@@ -3302,7 +3323,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name;
(yyval.create_stmt)->columns = (yyvsp[-1].column_vec);
}
-#line 3306 "bison_parser.cpp"
+#line 3327 "bison_parser.cpp"
break;
case 46: /* create_statement: CREATE TABLE opt_not_exists table_name AS select_statement */
@@ -3314,7 +3335,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name;
(yyval.create_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 3318 "bison_parser.cpp"
+#line 3339 "bison_parser.cpp"
break;
case 47: /* create_statement: CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement */
@@ -3327,31 +3348,31 @@ YYLTYPE yylloc = yyloc_default;
(yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec);
(yyval.create_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 3331 "bison_parser.cpp"
+#line 3352 "bison_parser.cpp"
break;
case 48: /* opt_not_exists: IF NOT EXISTS */
#line 540 "bison_parser.y"
{ (yyval.bval) = true; }
-#line 3337 "bison_parser.cpp"
+#line 3358 "bison_parser.cpp"
break;
case 49: /* opt_not_exists: %empty */
#line 541 "bison_parser.y"
{ (yyval.bval) = false; }
-#line 3343 "bison_parser.cpp"
+#line 3364 "bison_parser.cpp"
break;
case 50: /* column_def_commalist: column_def */
#line 545 "bison_parser.y"
{ (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); }
-#line 3349 "bison_parser.cpp"
+#line 3370 "bison_parser.cpp"
break;
case 51: /* column_def_commalist: column_def_commalist ',' column_def */
#line 546 "bison_parser.y"
{ (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); }
-#line 3355 "bison_parser.cpp"
+#line 3376 "bison_parser.cpp"
break;
case 52: /* column_def: IDENTIFIER column_type opt_column_nullable */
@@ -3359,85 +3380,85 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval));
}
-#line 3363 "bison_parser.cpp"
+#line 3384 "bison_parser.cpp"
break;
case 53: /* column_type: INT */
#line 556 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::INT}; }
-#line 3369 "bison_parser.cpp"
+#line 3390 "bison_parser.cpp"
break;
case 54: /* column_type: INTEGER */
#line 557 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::INT}; }
-#line 3375 "bison_parser.cpp"
+#line 3396 "bison_parser.cpp"
break;
case 55: /* column_type: LONG */
#line 558 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::LONG}; }
-#line 3381 "bison_parser.cpp"
+#line 3402 "bison_parser.cpp"
break;
case 56: /* column_type: FLOAT */
#line 559 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::FLOAT}; }
-#line 3387 "bison_parser.cpp"
+#line 3408 "bison_parser.cpp"
break;
case 57: /* column_type: DOUBLE */
#line 560 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; }
-#line 3393 "bison_parser.cpp"
+#line 3414 "bison_parser.cpp"
break;
case 58: /* column_type: VARCHAR '(' INTVAL ')' */
#line 561 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; }
-#line 3399 "bison_parser.cpp"
+#line 3420 "bison_parser.cpp"
break;
case 59: /* column_type: CHAR '(' INTVAL ')' */
#line 562 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; }
-#line 3405 "bison_parser.cpp"
+#line 3426 "bison_parser.cpp"
break;
case 60: /* column_type: TEXT */
#line 563 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::TEXT}; }
-#line 3411 "bison_parser.cpp"
+#line 3432 "bison_parser.cpp"
break;
case 61: /* column_type: DATETIME */
#line 564 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::DATETIME}; }
-#line 3417 "bison_parser.cpp"
+#line 3438 "bison_parser.cpp"
break;
case 62: /* column_type: DATE */
#line 565 "bison_parser.y"
{ (yyval.column_type_t) = ColumnType{DataType::DATE}; }
-#line 3423 "bison_parser.cpp"
+#line 3444 "bison_parser.cpp"
break;
case 63: /* opt_column_nullable: NULL */
#line 569 "bison_parser.y"
{ (yyval.bval) = true; }
-#line 3429 "bison_parser.cpp"
+#line 3450 "bison_parser.cpp"
break;
case 64: /* opt_column_nullable: NOT NULL */
#line 570 "bison_parser.y"
{ (yyval.bval) = false; }
-#line 3435 "bison_parser.cpp"
+#line 3456 "bison_parser.cpp"
break;
case 65: /* opt_column_nullable: %empty */
#line 571 "bison_parser.y"
{ (yyval.bval) = false; }
-#line 3441 "bison_parser.cpp"
+#line 3462 "bison_parser.cpp"
break;
case 66: /* drop_statement: DROP TABLE opt_exists table_name */
@@ -3448,7 +3469,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.drop_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3452 "bison_parser.cpp"
+#line 3473 "bison_parser.cpp"
break;
case 67: /* drop_statement: DROP VIEW opt_exists table_name */
@@ -3459,7 +3480,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.drop_stmt)->name = (yyvsp[0].table_name).name;
}
-#line 3463 "bison_parser.cpp"
+#line 3484 "bison_parser.cpp"
break;
case 68: /* drop_statement: DEALLOCATE PREPARE IDENTIFIER */
@@ -3469,19 +3490,19 @@ YYLTYPE yylloc = yyloc_default;
(yyval.drop_stmt)->ifExists = false;
(yyval.drop_stmt)->name = (yyvsp[0].sval);
}
-#line 3473 "bison_parser.cpp"
+#line 3494 "bison_parser.cpp"
break;
case 69: /* opt_exists: IF EXISTS */
#line 601 "bison_parser.y"
{ (yyval.bval) = true; }
-#line 3479 "bison_parser.cpp"
+#line 3500 "bison_parser.cpp"
break;
case 70: /* opt_exists: %empty */
#line 602 "bison_parser.y"
{ (yyval.bval) = false; }
-#line 3485 "bison_parser.cpp"
+#line 3506 "bison_parser.cpp"
break;
case 71: /* delete_statement: DELETE FROM table_name opt_where */
@@ -3492,7 +3513,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name;
(yyval.delete_stmt)->expr = (yyvsp[0].expr);
}
-#line 3496 "bison_parser.cpp"
+#line 3517 "bison_parser.cpp"
break;
case 72: /* truncate_statement: TRUNCATE table_name */
@@ -3502,7 +3523,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema;
(yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name;
}
-#line 3506 "bison_parser.cpp"
+#line 3527 "bison_parser.cpp"
break;
case 73: /* insert_statement: INSERT INTO table_name opt_column_list VALUES '(' literal_list ')' */
@@ -3514,7 +3535,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.insert_stmt)->columns = (yyvsp[-4].str_vec);
(yyval.insert_stmt)->values = (yyvsp[-1].expr_vec);
}
-#line 3518 "bison_parser.cpp"
+#line 3539 "bison_parser.cpp"
break;
case 74: /* insert_statement: INSERT INTO table_name opt_column_list select_no_paren */
@@ -3526,19 +3547,19 @@ YYLTYPE yylloc = yyloc_default;
(yyval.insert_stmt)->columns = (yyvsp[-1].str_vec);
(yyval.insert_stmt)->select = (yyvsp[0].select_stmt);
}
-#line 3530 "bison_parser.cpp"
+#line 3551 "bison_parser.cpp"
break;
case 75: /* opt_column_list: '(' ident_commalist ')' */
#line 651 "bison_parser.y"
{ (yyval.str_vec) = (yyvsp[-1].str_vec); }
-#line 3536 "bison_parser.cpp"
+#line 3557 "bison_parser.cpp"
break;
case 76: /* opt_column_list: %empty */
#line 652 "bison_parser.y"
{ (yyval.str_vec) = nullptr; }
-#line 3542 "bison_parser.cpp"
+#line 3563 "bison_parser.cpp"
break;
case 77: /* update_statement: UPDATE table_ref_name_no_alias SET update_clause_commalist opt_where */
@@ -3549,19 +3570,19 @@ YYLTYPE yylloc = yyloc_default;
(yyval.update_stmt)->updates = (yyvsp[-1].update_vec);
(yyval.update_stmt)->where = (yyvsp[0].expr);
}
-#line 3553 "bison_parser.cpp"
+#line 3574 "bison_parser.cpp"
break;
case 78: /* update_clause_commalist: update_clause */
#line 671 "bison_parser.y"
{ (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); }
-#line 3559 "bison_parser.cpp"
+#line 3580 "bison_parser.cpp"
break;
case 79: /* update_clause_commalist: update_clause_commalist ',' update_clause */
#line 672 "bison_parser.y"
{ (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); }
-#line 3565 "bison_parser.cpp"
+#line 3586 "bison_parser.cpp"
break;
case 80: /* update_clause: IDENTIFIER '=' expr */
@@ -3571,7 +3592,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.update_t)->column = (yyvsp[-2].sval);
(yyval.update_t)->value = (yyvsp[0].expr);
}
-#line 3575 "bison_parser.cpp"
+#line 3596 "bison_parser.cpp"
break;
case 81: /* select_statement: opt_with_clause select_with_paren */
@@ -3580,7 +3601,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt) = (yyvsp[0].select_stmt);
(yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec);
}
-#line 3584 "bison_parser.cpp"
+#line 3605 "bison_parser.cpp"
break;
case 82: /* select_statement: opt_with_clause select_no_paren */
@@ -3589,7 +3610,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt) = (yyvsp[0].select_stmt);
(yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec);
}
-#line 3593 "bison_parser.cpp"
+#line 3614 "bison_parser.cpp"
break;
case 83: /* select_statement: opt_with_clause select_with_paren set_operator select_within_set_operation opt_order opt_limit */
@@ -3605,13 +3626,13 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit);
(yyval.select_stmt)->withDescriptions = (yyvsp[-5].with_description_vec);
}
-#line 3609 "bison_parser.cpp"
+#line 3630 "bison_parser.cpp"
break;
case 86: /* select_within_set_operation_no_parentheses: select_clause */
#line 714 "bison_parser.y"
{ (yyval.select_stmt) = (yyvsp[0].select_stmt); }
-#line 3615 "bison_parser.cpp"
+#line 3636 "bison_parser.cpp"
break;
case 87: /* select_within_set_operation_no_parentheses: select_clause set_operator select_within_set_operation */
@@ -3624,19 +3645,19 @@ 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 3628 "bison_parser.cpp"
+#line 3649 "bison_parser.cpp"
break;
case 88: /* select_with_paren: '(' select_no_paren ')' */
#line 726 "bison_parser.y"
{ (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
-#line 3634 "bison_parser.cpp"
+#line 3655 "bison_parser.cpp"
break;
case 89: /* select_with_paren: '(' select_with_paren ')' */
#line 727 "bison_parser.y"
{ (yyval.select_stmt) = (yyvsp[-1].select_stmt); }
-#line 3640 "bison_parser.cpp"
+#line 3661 "bison_parser.cpp"
break;
case 90: /* select_no_paren: select_clause opt_order opt_limit */
@@ -3651,7 +3672,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->limit = (yyvsp[0].limit);
}
}
-#line 3655 "bison_parser.cpp"
+#line 3676 "bison_parser.cpp"
break;
case 91: /* select_no_paren: select_clause set_operator select_within_set_operation opt_order opt_limit */
@@ -3666,7 +3687,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->setOperations->back()->resultOrder = (yyvsp[-1].order_vec);
(yyval.select_stmt)->setOperations->back()->resultLimit = (yyvsp[0].limit);
}
-#line 3670 "bison_parser.cpp"
+#line 3691 "bison_parser.cpp"
break;
case 92: /* set_operator: set_type opt_all */
@@ -3675,7 +3696,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.set_operator_t) = (yyvsp[-1].set_operator_t);
(yyval.set_operator_t)->isAll = (yyvsp[0].bval);
}
-#line 3679 "bison_parser.cpp"
+#line 3700 "bison_parser.cpp"
break;
case 93: /* set_type: UNION */
@@ -3684,7 +3705,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetUnion;
}
-#line 3688 "bison_parser.cpp"
+#line 3709 "bison_parser.cpp"
break;
case 94: /* set_type: INTERSECT */
@@ -3693,7 +3714,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetIntersect;
}
-#line 3697 "bison_parser.cpp"
+#line 3718 "bison_parser.cpp"
break;
case 95: /* set_type: EXCEPT */
@@ -3702,7 +3723,7 @@ YYLTYPE yylloc = yyloc_default;
(yyval.set_operator_t) = new SetOperation();
(yyval.set_operator_t)->setType = SetType::kSetExcept;
}
-#line 3706 "bison_parser.cpp"
+#line 3727 "bison_parser.cpp"
break;
case 96: /* opt_all: ALL */
@@ -3710,7 +3731,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.bval) = true;
}
-#line 3714 "bison_parser.cpp"
+#line 3735 "bison_parser.cpp"
break;
case 97: /* opt_all: %empty */
@@ -3718,7 +3739,7 @@ YYLTYPE yylloc = yyloc_default;
{
(yyval.bval) = false;
}
-#line 3722 "bison_parser.cpp"
+#line 3743 "bison_parser.cpp"
break;
case 98: /* select_clause: SELECT opt_top opt_distinct select_list opt_from_clause opt_where opt_group */
@@ -3732,49 +3753,49 @@ YYLTYPE yylloc = yyloc_default;
(yyval.select_stmt)->whereClause = (yyvsp[-1].expr);
(yyval.select_stmt)->groupBy = (yyvsp[0].group_t);
}
-#line 3736 "bison_parser.cpp"
+#line 3757 "bison_parser.cpp"
break;
case 99: /* opt_distinct: DISTINCT */
#line 797 "bison_parser.y"
{ (yyval.bval) = true; }
-#line 3742 "bison_parser.cpp"
+#line 3763 "bison_parser.cpp"
break;
case 100: /* opt_distinct: %empty */
#line 798 "bison_parser.y"
{ (yyval.bval) = false; }
-#line 3748 "bison_parser.cpp"
+#line 3769 "bison_parser.cpp"
break;
case 102: /* opt_from_clause: from_clause */
#line 806 "bison_parser.y"
{ (yyval.table) = (yyvsp[0].table); }
-#line 3754 "bison_parser.cpp"
+#line 3775 "bison_parser.cpp"
break;
case 103: /* opt_from_clause: %empty */
#line 807 "bison_parser.y"
{ (yyval.table) = nullptr; }
-#line 3760 "bison_parser.cpp"
+#line 3781 "bison_parser.cpp"
break;
case 104: /* from_clause: FROM table_ref */
#line 811 "bison_parser.y"
{ (yyval.table) = (yyvsp[0].table); }
-#line 3766 "bison_parser.cpp"
+#line 3787 "bison_parser.cpp"
break;
case 105: /* opt_where: WHERE expr */
#line 816 "bison_parser.y"
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 3772 "bison_parser.cpp"
+#line 3793 "bison_parser.cpp"
break;
case 106: /* opt_where: %empty */
#line 817 "bison_parser.y"
{ (yyval.expr) = nullptr; }
-#line 3778 "bison_parser.cpp"
+#line 3799 "bison_parser.cpp"
break;
case 107: /* opt_group: GROUP BY expr_list opt_having */
@@ -3784,157 +3805,157 @@ YYLTYPE yylloc = yyloc_default;
(yyval.group_t)->columns = (yyvsp[-1].expr_vec);
(yyval.group_t)->having = (yyvsp[0].expr);
}
-#line 3788 "bison_parser.cpp"
+#line 3809 "bison_parser.cpp"
break;
case 108: /* opt_group: %empty */
#line 826 "bison_parser.y"
{ (yyval.group_t) = nullptr; }
-#line 3794 "bison_parser.cpp"
+#line 3815 "bison_parser.cpp"
break;
case 109: /* opt_having: HAVING expr */
#line 830 "bison_parser.y"
{ (yyval.expr) = (yyvsp[0].expr); }
-#line 3800 "bison_parser.cpp"
+#line 3821 "bison_parser.cpp"
break;
case 110: /* opt_having: %empty */
#line 831 "bison_parser.y"
{ (yyval.expr) = nullptr; }
-#line 3806 "bison_parser.cpp"
+#line 3827 "bison_parser.cpp"
break;
case 111: /* opt_order: ORDER BY order_list */
#line 835 "bison_parser.y"
{ (yyval.order_vec) = (yyvsp[0].order_vec); }
-#line 3812 "bison_parser.cpp"
+#line 3833 "bison_parser.cpp"
break;
case 112: /* opt_order: %empty */
#line 836 "bison_parser.y"
{ (yyval.order_vec) = nullptr; }
-#line 3818 "bison_parser.cpp"
+#line 3839 "bison_parser.cpp"
break;
case 113: /* order_list: order_desc */
#line 840 "bison_parser.y"
{ (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); }
-#line 3824 "bison_parser.cpp"
+#line 3845 "bison_parser.cpp"
break;
case 114: /* order_list: order_list ',' order_desc */
#line 841 "bison_parser.y"
{ (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); }
-#line 3830 "bison_parser.cpp"
+#line 3851 "bison_parser.cpp"
break;
case 115: /* order_desc: expr opt_order_type */
#line 845 "bison_parser.y"
{ (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); }
-#line 3836 "bison_parser.cpp"
+#line 3857 "bison_parser.cpp"
break;
case 116: /* opt_order_type: ASC */
#line 849 "bison_parser.y"
{ (yyval.order_type) = kOrderAsc; }
-#line 3842 "bison_parser.cpp"
+#line 3863 "bison_parser.cpp"
break;
case 117: /* opt_order_type: DESC */
#line 850 "bison_parser.y"
{ (yyval.order_type) = kOrderDesc; }
-#line 3848 "bison_parser.cpp"
+#line 3869 "bison_parser.cpp"
break;
case 118: /* opt_order_type: %empty */
#line 851 "bison_parser.y"
{ (yyval.order_type) = kOrderAsc; }
-#line 3854 "bison_parser.cpp"
+#line 3875 "bison_parser.cpp"
break;
case 119: /* opt_top: TOP int_literal */
#line 857 "bison_parser.y"
{ (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
-#line 3860 "bison_parser.cpp"
+#line 3881 "bison_parser.cpp"
break;
case 120: /* opt_top: %empty */
#line 858 "bison_parser.y"
{ (yyval.limit) = nullptr; }
-#line 3866 "bison_parser.cpp"
+#line 3887 "bison_parser.cpp"
break;
case 121: /* opt_limit: LIMIT expr */
#line 862 "bison_parser.y"
{ (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); }
-#line 3872 "bison_parser.cpp"
+#line 3893 "bison_parser.cpp"
break;
case 122: /* opt_limit: OFFSET expr */
#line 863 "bison_parser.y"
{ (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
-#line 3878 "bison_parser.cpp"
+#line 3899 "bison_parser.cpp"
break;
case 123: /* opt_limit: LIMIT expr OFFSET expr */
#line 864 "bison_parser.y"
{ (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); }
-#line 3884 "bison_parser.cpp"
+#line 3905 "bison_parser.cpp"
break;
case 124: /* opt_limit: LIMIT ALL */
#line 865 "bison_parser.y"
{ (yyval.limit) = new LimitDescription(nullptr, nullptr); }
-#line 3890 "bison_parser.cpp"
+#line 3911 "bison_parser.cpp"
break;
case 125: /* opt_limit: LIMIT ALL OFFSET expr */
#line 866 "bison_parser.y"
{ (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); }
-#line 3896 "bison_parser.cpp"
+#line 3917 "bison_parser.cpp"
break;
case 126: /* opt_limit: %empty */
#line 867 "bison_parser.y"
{ (yyval.limit) = nullptr; }
-#line 3902 "bison_parser.cpp"
+#line 3923 "bison_parser.cpp"
break;
case 127: /* expr_list: expr_alias */
#line 874 "bison_parser.y"
{ (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); }
-#line 3908 "bison_parser.cpp"
+#line 3929 "bison_parser.cpp"
break;
case 128: /* expr_list: expr_list ',' expr_alias */
#line 875 "bison_parser.y"
{ (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); }
-#line 3914 "bison_parser.cpp"
+#line 3935 "bison_parser.cpp"
break;
case 129: /* opt_literal_list: literal_list */
#line 879 "bison_parser.y"
{ (yyval.expr_vec) = (yyvsp[0].expr_vec); }
-#line 3920 "bison_parser.cpp"
+#line 3941 "bison_parser.cpp"
break;
case 130: /* opt_literal_list: %empty */
#line 880 "bison_parser.y"
{ (yyval.expr_vec) = nullptr; }
-#line 3926 "bison_parser.cpp"
+#line 3947 "bison_parser.cpp"
break;
case 131: /* literal_list: literal */
#line 884 "bison_parser.y"
{ (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); }
-#line 3932 "bison_parser.cpp"
+#line 3953 "bison_parser.cpp"
break;
case 132: /* literal_list: literal_list ',' literal */
#line 885 "bison_parser.y"
{ (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); }
-#line 3938 "bison_parser.cpp"
+#line 3959 "bison_parser.cpp"
break;
case 133: /* expr_alias: expr opt_alias */
@@ -3946,421 +3967,436 @@ YYLTYPE yylloc = yyloc_default;
delete (yyvsp[0].alias_t);
}
}
-#line 3950 "bison_parser.cpp"
+#line 3971 "bison_parser.cpp"
break;
case 139: /* operand: '(' expr ')' */
#line 907 "bison_parser.y"
{ (yyval.expr) = (yyvsp[-1].expr); }
-#line 3956 "bison_parser.cpp"
+#line 3977 "bison_parser.cpp"
break;
case 149: /* operand: '(' select_no_paren ')' */
#line 917 "bison_parser.y"
{ (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); }
-#line 3962 "bison_parser.cpp"
+#line 3983 "bison_parser.cpp"
break;
case 152: /* unary_expr: '-' operand */
#line 926 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); }
-#line 3968 "bison_parser.cpp"
+#line 3989 "bison_parser.cpp"
break;
case 153: /* unary_expr: NOT operand */
#line 927 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); }
-#line 3974 "bison_parser.cpp"
+#line 3995 "bison_parser.cpp"
break;
case 154: /* unary_expr: operand ISNULL */
#line 928 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); }
-#line 3980 "bison_parser.cpp"
+#line 4001 "bison_parser.cpp"
break;
case 155: /* unary_expr: operand IS NULL */
#line 929 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); }
-#line 3986 "bison_parser.cpp"
+#line 4007 "bison_parser.cpp"
break;
case 156: /* unary_expr: operand IS NOT NULL */
#line 930 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); }
-#line 3992 "bison_parser.cpp"
+#line 4013 "bison_parser.cpp"
break;
case 158: /* binary_expr: operand '-' operand */
#line 935 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); }
-#line 3998 "bison_parser.cpp"
+#line 4019 "bison_parser.cpp"
break;
case 159: /* binary_expr: operand '+' operand */
#line 936 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); }
-#line 4004 "bison_parser.cpp"
+#line 4025 "bison_parser.cpp"
break;
case 160: /* binary_expr: operand '/' operand */
#line 937 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); }
-#line 4010 "bison_parser.cpp"
+#line 4031 "bison_parser.cpp"
break;
case 161: /* binary_expr: operand '*' operand */
#line 938 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); }
-#line 4016 "bison_parser.cpp"
+#line 4037 "bison_parser.cpp"
break;
case 162: /* binary_expr: operand '%' operand */
#line 939 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); }
-#line 4022 "bison_parser.cpp"
+#line 4043 "bison_parser.cpp"
break;
case 163: /* binary_expr: operand '^' operand */
#line 940 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); }
-#line 4028 "bison_parser.cpp"
+#line 4049 "bison_parser.cpp"
break;
case 164: /* binary_expr: operand LIKE operand */
#line 941 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); }
-#line 4034 "bison_parser.cpp"
+#line 4055 "bison_parser.cpp"
break;
case 165: /* binary_expr: operand NOT LIKE operand */
#line 942 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); }
-#line 4040 "bison_parser.cpp"
+#line 4061 "bison_parser.cpp"
break;
case 166: /* binary_expr: operand ILIKE operand */
#line 943 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); }
-#line 4046 "bison_parser.cpp"
+#line 4067 "bison_parser.cpp"
break;
case 167: /* binary_expr: operand CONCAT operand */
#line 944 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); }
-#line 4052 "bison_parser.cpp"
+#line 4073 "bison_parser.cpp"
break;
case 168: /* logic_expr: expr AND expr */
#line 948 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); }
-#line 4058 "bison_parser.cpp"
+#line 4079 "bison_parser.cpp"
break;
case 169: /* logic_expr: expr OR expr */
#line 949 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); }
-#line 4064 "bison_parser.cpp"
+#line 4085 "bison_parser.cpp"
break;
case 170: /* in_expr: operand IN '(' expr_list ')' */
#line 953 "bison_parser.y"
{ (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); }
-#line 4070 "bison_parser.cpp"
+#line 4091 "bison_parser.cpp"
break;
case 171: /* in_expr: operand NOT IN '(' expr_list ')' */
#line 954 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); }
-#line 4076 "bison_parser.cpp"
+#line 4097 "bison_parser.cpp"
break;
case 172: /* in_expr: operand IN '(' select_no_paren ')' */
#line 955 "bison_parser.y"
{ (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); }
-#line 4082 "bison_parser.cpp"
+#line 4103 "bison_parser.cpp"
break;
case 173: /* in_expr: operand NOT IN '(' select_no_paren ')' */
#line 956 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); }
-#line 4088 "bison_parser.cpp"
+#line 4109 "bison_parser.cpp"
break;
case 174: /* case_expr: CASE expr case_list END */
#line 962 "bison_parser.y"
{ (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); }
-#line 4094 "bison_parser.cpp"
+#line 4115 "bison_parser.cpp"
break;
case 175: /* case_expr: CASE expr case_list ELSE expr END */
#line 963 "bison_parser.y"
{ (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); }
-#line 4100 "bison_parser.cpp"
+#line 4121 "bison_parser.cpp"
break;
case 176: /* case_expr: CASE case_list END */
#line 964 "bison_parser.y"
{ (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); }
-#line 4106 "bison_parser.cpp"
+#line 4127 "bison_parser.cpp"
break;
case 177: /* case_expr: CASE case_list ELSE expr END */
#line 965 "bison_parser.y"
{ (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); }
-#line 4112 "bison_parser.cpp"
+#line 4133 "bison_parser.cpp"
break;
case 178: /* case_list: WHEN expr THEN expr */
#line 969 "bison_parser.y"
{ (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
-#line 4118 "bison_parser.cpp"
+#line 4139 "bison_parser.cpp"
break;
case 179: /* case_list: case_list WHEN expr THEN expr */
#line 970 "bison_parser.y"
{ (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); }
-#line 4124 "bison_parser.cpp"
+#line 4145 "bison_parser.cpp"
break;
case 180: /* exists_expr: EXISTS '(' select_no_paren ')' */
#line 974 "bison_parser.y"
{ (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); }
-#line 4130 "bison_parser.cpp"
+#line 4151 "bison_parser.cpp"
break;
case 181: /* exists_expr: NOT EXISTS '(' select_no_paren ')' */
#line 975 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); }
-#line 4136 "bison_parser.cpp"
+#line 4157 "bison_parser.cpp"
break;
case 182: /* comp_expr: operand '=' operand */
#line 979 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
-#line 4142 "bison_parser.cpp"
+#line 4163 "bison_parser.cpp"
break;
case 183: /* comp_expr: operand EQUALS operand */
#line 980 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); }
-#line 4148 "bison_parser.cpp"
+#line 4169 "bison_parser.cpp"
break;
case 184: /* comp_expr: operand NOTEQUALS operand */
#line 981 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); }
-#line 4154 "bison_parser.cpp"
+#line 4175 "bison_parser.cpp"
break;
case 185: /* comp_expr: operand '<' operand */
#line 982 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); }
-#line 4160 "bison_parser.cpp"
+#line 4181 "bison_parser.cpp"
break;
case 186: /* comp_expr: operand '>' operand */
#line 983 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); }
-#line 4166 "bison_parser.cpp"
+#line 4187 "bison_parser.cpp"
break;
case 187: /* comp_expr: operand LESSEQ operand */
#line 984 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); }
-#line 4172 "bison_parser.cpp"
+#line 4193 "bison_parser.cpp"
break;
case 188: /* comp_expr: operand GREATEREQ operand */
#line 985 "bison_parser.y"
{ (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); }
-#line 4178 "bison_parser.cpp"
+#line 4199 "bison_parser.cpp"
break;
case 189: /* function_expr: IDENTIFIER '(' ')' */
#line 989 "bison_parser.y"
{ (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); }
-#line 4184 "bison_parser.cpp"
+#line 4205 "bison_parser.cpp"
break;
case 190: /* function_expr: IDENTIFIER '(' opt_distinct expr_list ')' */
#line 990 "bison_parser.y"
{ (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); }
-#line 4190 "bison_parser.cpp"
+#line 4211 "bison_parser.cpp"
break;
case 191: /* extract_expr: EXTRACT '(' datetime_field FROM expr ')' */
#line 994 "bison_parser.y"
{ (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); }
-#line 4196 "bison_parser.cpp"
+#line 4217 "bison_parser.cpp"
break;
case 192: /* cast_expr: CAST '(' expr AS column_type ')' */
#line 998 "bison_parser.y"
{ (yyval.expr) = Expr::makeCast((yyvsp[-3].expr), (yyvsp[-1].column_type_t)); }
-#line 4202 "bison_parser.cpp"
+#line 4223 "bison_parser.cpp"
break;
case 193: /* datetime_field: SECOND */
#line 1002 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeSecond; }
-#line 4208 "bison_parser.cpp"
+#line 4229 "bison_parser.cpp"
break;
case 194: /* datetime_field: MINUTE */
#line 1003 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeMinute; }
-#line 4214 "bison_parser.cpp"
+#line 4235 "bison_parser.cpp"
break;
case 195: /* datetime_field: HOUR */
#line 1004 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeHour; }
-#line 4220 "bison_parser.cpp"
+#line 4241 "bison_parser.cpp"
break;
case 196: /* datetime_field: DAY */
#line 1005 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeDay; }
-#line 4226 "bison_parser.cpp"
+#line 4247 "bison_parser.cpp"
break;
case 197: /* datetime_field: MONTH */
#line 1006 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeMonth; }
-#line 4232 "bison_parser.cpp"
+#line 4253 "bison_parser.cpp"
break;
case 198: /* datetime_field: YEAR */
#line 1007 "bison_parser.y"
{ (yyval.datetime_field) = kDatetimeYear; }
-#line 4238 "bison_parser.cpp"
+#line 4259 "bison_parser.cpp"
break;
case 199: /* array_expr: ARRAY '[' expr_list ']' */
#line 1011 "bison_parser.y"
{ (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); }
-#line 4244 "bison_parser.cpp"
+#line 4265 "bison_parser.cpp"
break;
case 200: /* array_index: operand '[' int_literal ']' */
#line 1015 "bison_parser.y"
{ (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); }
-#line 4250 "bison_parser.cpp"
+#line 4271 "bison_parser.cpp"
break;
case 201: /* between_expr: operand BETWEEN operand AND operand */
#line 1019 "bison_parser.y"
{ (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); }
-#line 4256 "bison_parser.cpp"
+#line 4277 "bison_parser.cpp"
break;
case 202: /* column_name: IDENTIFIER */
#line 1023 "bison_parser.y"
{ (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); }
-#line 4262 "bison_parser.cpp"
+#line 4283 "bison_parser.cpp"
break;
case 203: /* column_name: IDENTIFIER '.' IDENTIFIER */
#line 1024 "bison_parser.y"
{ (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); }
-#line 4268 "bison_parser.cpp"
+#line 4289 "bison_parser.cpp"
break;
case 204: /* column_name: '*' */
#line 1025 "bison_parser.y"
{ (yyval.expr) = Expr::makeStar(); }
-#line 4274 "bison_parser.cpp"
+#line 4295 "bison_parser.cpp"
break;
case 205: /* column_name: IDENTIFIER '.' '*' */
#line 1026 "bison_parser.y"
{ (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); }
-#line 4280 "bison_parser.cpp"
+#line 4301 "bison_parser.cpp"
break;
- case 211: /* string_literal: STRING */
-#line 1038 "bison_parser.y"
+ case 212: /* string_literal: STRING */
+#line 1039 "bison_parser.y"
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); }
-#line 4286 "bison_parser.cpp"
+#line 4307 "bison_parser.cpp"
break;
- case 212: /* bool_literal: TRUE */
-#line 1042 "bison_parser.y"
+ case 213: /* bool_literal: TRUE */
+#line 1043 "bison_parser.y"
{ (yyval.expr) = Expr::makeLiteral(true); }
-#line 4292 "bison_parser.cpp"
+#line 4313 "bison_parser.cpp"
break;
- case 213: /* bool_literal: FALSE */
-#line 1043 "bison_parser.y"
+ case 214: /* bool_literal: FALSE */
+#line 1044 "bison_parser.y"
{ (yyval.expr) = Expr::makeLiteral(false); }
-#line 4298 "bison_parser.cpp"
+#line 4319 "bison_parser.cpp"
break;
- case 214: /* num_literal: FLOATVAL */
-#line 1047 "bison_parser.y"
+ case 215: /* num_literal: FLOATVAL */
+#line 1048 "bison_parser.y"
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); }
-#line 4304 "bison_parser.cpp"
+#line 4325 "bison_parser.cpp"
break;
- case 216: /* int_literal: INTVAL */
-#line 1052 "bison_parser.y"
+ case 217: /* int_literal: INTVAL */
+#line 1053 "bison_parser.y"
{ (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); }
-#line 4310 "bison_parser.cpp"
+#line 4331 "bison_parser.cpp"
break;
- case 217: /* null_literal: NULL */
-#line 1056 "bison_parser.y"
+ case 218: /* null_literal: NULL */
+#line 1057 "bison_parser.y"
{ (yyval.expr) = Expr::makeNullLiteral(); }
-#line 4316 "bison_parser.cpp"
+#line 4337 "bison_parser.cpp"
+ break;
+
+ case 219: /* date_literal: DATE STRING */
+#line 1061 "bison_parser.y"
+ {
+ 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) {
+ free((yyvsp[0].sval));
+ yyerror(&yyloc, result, scanner, "Found incorrect date format. Expected format: YYYY-MM-DD");
+ YYERROR;
+ }
+ (yyval.expr) = Expr::makeDateLiteral((yyvsp[0].sval));
+ }
+#line 4352 "bison_parser.cpp"
break;
- case 218: /* param_expr: '?' */
-#line 1060 "bison_parser.y"
+ case 220: /* param_expr: '?' */
+#line 1074 "bison_parser.y"
{
(yyval.expr) = Expr::makeParameter(yylloc.total_column);
(yyval.expr)->ival2 = yyloc.param_list.size();
yyloc.param_list.push_back((yyval.expr));
}
-#line 4326 "bison_parser.cpp"
+#line 4362 "bison_parser.cpp"
break;
- case 220: /* table_ref: table_ref_commalist ',' table_ref_atomic */
-#line 1073 "bison_parser.y"
+ case 222: /* table_ref: table_ref_commalist ',' table_ref_atomic */
+#line 1087 "bison_parser.y"
{
(yyvsp[-2].table_vec)->push_back((yyvsp[0].table));
auto tbl = new TableRef(kTableCrossProduct);
tbl->list = (yyvsp[-2].table_vec);
(yyval.table) = tbl;
}
-#line 4337 "bison_parser.cpp"
+#line 4373 "bison_parser.cpp"
break;
- case 224: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */
-#line 1089 "bison_parser.y"
+ case 226: /* nonjoin_table_ref_atomic: '(' select_statement ')' opt_table_alias */
+#line 1103 "bison_parser.y"
{
auto tbl = new TableRef(kTableSelect);
tbl->select = (yyvsp[-2].select_stmt);
tbl->alias = (yyvsp[0].alias_t);
(yyval.table) = tbl;
}
-#line 4348 "bison_parser.cpp"
+#line 4384 "bison_parser.cpp"
break;
- case 225: /* table_ref_commalist: table_ref_atomic */
-#line 1098 "bison_parser.y"
+ case 227: /* table_ref_commalist: table_ref_atomic */
+#line 1112 "bison_parser.y"
{ (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); }
-#line 4354 "bison_parser.cpp"
+#line 4390 "bison_parser.cpp"
break;
- case 226: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */
-#line 1099 "bison_parser.y"
+ case 228: /* table_ref_commalist: table_ref_commalist ',' table_ref_atomic */
+#line 1113 "bison_parser.y"
{ (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); }
-#line 4360 "bison_parser.cpp"
+#line 4396 "bison_parser.cpp"
break;
- case 227: /* table_ref_name: table_name opt_table_alias */
-#line 1104 "bison_parser.y"
+ case 229: /* table_ref_name: table_name opt_table_alias */
+#line 1118 "bison_parser.y"
{
auto tbl = new TableRef(kTableName);
tbl->schema = (yyvsp[-1].table_name).schema;
@@ -4368,103 +4404,103 @@ YYLTYPE yylloc = yyloc_default;
tbl->alias = (yyvsp[0].alias_t);
(yyval.table) = tbl;
}
-#line 4372 "bison_parser.cpp"
+#line 4408 "bison_parser.cpp"
break;
- case 228: /* table_ref_name_no_alias: table_name */
-#line 1115 "bison_parser.y"
+ case 230: /* table_ref_name_no_alias: table_name */
+#line 1129 "bison_parser.y"
{
(yyval.table) = new TableRef(kTableName);
(yyval.table)->schema = (yyvsp[0].table_name).schema;
(yyval.table)->name = (yyvsp[0].table_name).name;
}
-#line 4382 "bison_parser.cpp"
+#line 4418 "bison_parser.cpp"
break;
- case 229: /* table_name: IDENTIFIER */
-#line 1124 "bison_parser.y"
+ case 231: /* table_name: IDENTIFIER */
+#line 1138 "bison_parser.y"
{ (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);}
-#line 4388 "bison_parser.cpp"
+#line 4424 "bison_parser.cpp"
break;
- case 230: /* table_name: IDENTIFIER '.' IDENTIFIER */
-#line 1125 "bison_parser.y"
+ case 232: /* table_name: IDENTIFIER '.' IDENTIFIER */
+#line 1139 "bison_parser.y"
{ (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); }
-#line 4394 "bison_parser.cpp"
+#line 4430 "bison_parser.cpp"
break;
- case 232: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */
-#line 1131 "bison_parser.y"
+ case 234: /* table_alias: AS IDENTIFIER '(' ident_commalist ')' */
+#line 1145 "bison_parser.y"
{ (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); }
-#line 4400 "bison_parser.cpp"
+#line 4436 "bison_parser.cpp"
break;
- case 234: /* opt_table_alias: %empty */
-#line 1137 "bison_parser.y"
+ case 236: /* opt_table_alias: %empty */
+#line 1151 "bison_parser.y"
{ (yyval.alias_t) = nullptr; }
-#line 4406 "bison_parser.cpp"
+#line 4442 "bison_parser.cpp"
break;
- case 235: /* alias: AS IDENTIFIER */
-#line 1142 "bison_parser.y"
+ case 237: /* alias: AS IDENTIFIER */
+#line 1156 "bison_parser.y"
{ (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
-#line 4412 "bison_parser.cpp"
+#line 4448 "bison_parser.cpp"
break;
- case 236: /* alias: IDENTIFIER */
-#line 1143 "bison_parser.y"
+ case 238: /* alias: IDENTIFIER */
+#line 1157 "bison_parser.y"
{ (yyval.alias_t) = new Alias((yyvsp[0].sval)); }
-#line 4418 "bison_parser.cpp"
+#line 4454 "bison_parser.cpp"
break;
- case 238: /* opt_alias: %empty */
-#line 1149 "bison_parser.y"
+ case 240: /* opt_alias: %empty */
+#line 1163 "bison_parser.y"
{ (yyval.alias_t) = nullptr; }
-#line 4424 "bison_parser.cpp"
+#line 4460 "bison_parser.cpp"
break;
- case 240: /* opt_with_clause: %empty */
-#line 1159 "bison_parser.y"
+ case 242: /* opt_with_clause: %empty */
+#line 1173 "bison_parser.y"
{ (yyval.with_description_vec) = nullptr; }
-#line 4430 "bison_parser.cpp"
+#line 4466 "bison_parser.cpp"
break;
- case 241: /* with_clause: WITH with_description_list */
-#line 1163 "bison_parser.y"
+ case 243: /* with_clause: WITH with_description_list */
+#line 1177 "bison_parser.y"
{ (yyval.with_description_vec) = (yyvsp[0].with_description_vec); }
-#line 4436 "bison_parser.cpp"
+#line 4472 "bison_parser.cpp"
break;
- case 242: /* with_description_list: with_description */
-#line 1167 "bison_parser.y"
+ case 244: /* with_description_list: with_description */
+#line 1181 "bison_parser.y"
{
(yyval.with_description_vec) = new std::vector();
(yyval.with_description_vec)->push_back((yyvsp[0].with_description_t));
}
-#line 4445 "bison_parser.cpp"
+#line 4481 "bison_parser.cpp"
break;
- case 243: /* with_description_list: with_description_list ',' with_description */
-#line 1171 "bison_parser.y"
+ case 245: /* with_description_list: with_description_list ',' with_description */
+#line 1185 "bison_parser.y"
{
(yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t));
(yyval.with_description_vec) = (yyvsp[-2].with_description_vec);
}
-#line 4454 "bison_parser.cpp"
+#line 4490 "bison_parser.cpp"
break;
- case 244: /* with_description: IDENTIFIER AS select_with_paren */
-#line 1178 "bison_parser.y"
+ case 246: /* with_description: IDENTIFIER AS select_with_paren */
+#line 1192 "bison_parser.y"
{
(yyval.with_description_t) = new WithDescription();
(yyval.with_description_t)->alias = (yyvsp[-2].sval);
(yyval.with_description_t)->select = (yyvsp[0].select_stmt);
}
-#line 4464 "bison_parser.cpp"
+#line 4500 "bison_parser.cpp"
break;
- case 245: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */
-#line 1192 "bison_parser.y"
+ case 247: /* join_clause: table_ref_atomic NATURAL JOIN nonjoin_table_ref_atomic */
+#line 1206 "bison_parser.y"
{
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
@@ -4472,11 +4508,11 @@ YYLTYPE yylloc = yyloc_default;
(yyval.table)->join->left = (yyvsp[-3].table);
(yyval.table)->join->right = (yyvsp[0].table);
}
-#line 4476 "bison_parser.cpp"
+#line 4512 "bison_parser.cpp"
break;
- case 246: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */
-#line 1200 "bison_parser.y"
+ case 248: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic ON join_condition */
+#line 1214 "bison_parser.y"
{
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
@@ -4485,11 +4521,11 @@ YYLTYPE yylloc = yyloc_default;
(yyval.table)->join->right = (yyvsp[-2].table);
(yyval.table)->join->condition = (yyvsp[0].expr);
}
-#line 4489 "bison_parser.cpp"
+#line 4525 "bison_parser.cpp"
break;
- case 247: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */
-#line 1210 "bison_parser.y"
+ case 249: /* join_clause: table_ref_atomic opt_join_type JOIN table_ref_atomic USING '(' column_name ')' */
+#line 1224 "bison_parser.y"
{
(yyval.table) = new TableRef(kTableJoin);
(yyval.table)->join = new JoinDefinition();
@@ -4505,83 +4541,83 @@ YYLTYPE yylloc = yyloc_default;
(yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col);
delete (yyvsp[-1].expr);
}
-#line 4509 "bison_parser.cpp"
+#line 4545 "bison_parser.cpp"
break;
- case 248: /* opt_join_type: INNER */
-#line 1228 "bison_parser.y"
+ case 250: /* opt_join_type: INNER */
+#line 1242 "bison_parser.y"
{ (yyval.uval) = kJoinInner; }
-#line 4515 "bison_parser.cpp"
+#line 4551 "bison_parser.cpp"
break;
- case 249: /* opt_join_type: LEFT OUTER */
-#line 1229 "bison_parser.y"
+ case 251: /* opt_join_type: LEFT OUTER */
+#line 1243 "bison_parser.y"
{ (yyval.uval) = kJoinLeft; }
-#line 4521 "bison_parser.cpp"
+#line 4557 "bison_parser.cpp"
break;
- case 250: /* opt_join_type: LEFT */
-#line 1230 "bison_parser.y"
+ case 252: /* opt_join_type: LEFT */
+#line 1244 "bison_parser.y"
{ (yyval.uval) = kJoinLeft; }
-#line 4527 "bison_parser.cpp"
+#line 4563 "bison_parser.cpp"
break;
- case 251: /* opt_join_type: RIGHT OUTER */
-#line 1231 "bison_parser.y"
+ case 253: /* opt_join_type: RIGHT OUTER */
+#line 1245 "bison_parser.y"
{ (yyval.uval) = kJoinRight; }
-#line 4533 "bison_parser.cpp"
+#line 4569 "bison_parser.cpp"
break;
- case 252: /* opt_join_type: RIGHT */
-#line 1232 "bison_parser.y"
+ case 254: /* opt_join_type: RIGHT */
+#line 1246 "bison_parser.y"
{ (yyval.uval) = kJoinRight; }
-#line 4539 "bison_parser.cpp"
+#line 4575 "bison_parser.cpp"
break;
- case 253: /* opt_join_type: FULL OUTER */
-#line 1233 "bison_parser.y"
+ case 255: /* opt_join_type: FULL OUTER */
+#line 1247 "bison_parser.y"
{ (yyval.uval) = kJoinFull; }
-#line 4545 "bison_parser.cpp"
+#line 4581 "bison_parser.cpp"
break;
- case 254: /* opt_join_type: OUTER */
-#line 1234 "bison_parser.y"
+ case 256: /* opt_join_type: OUTER */
+#line 1248 "bison_parser.y"
{ (yyval.uval) = kJoinFull; }
-#line 4551 "bison_parser.cpp"
+#line 4587 "bison_parser.cpp"
break;
- case 255: /* opt_join_type: FULL */
-#line 1235 "bison_parser.y"
+ case 257: /* opt_join_type: FULL */
+#line 1249 "bison_parser.y"
{ (yyval.uval) = kJoinFull; }
-#line 4557 "bison_parser.cpp"
+#line 4593 "bison_parser.cpp"
break;
- case 256: /* opt_join_type: CROSS */
-#line 1236 "bison_parser.y"
+ case 258: /* opt_join_type: CROSS */
+#line 1250 "bison_parser.y"
{ (yyval.uval) = kJoinCross; }
-#line 4563 "bison_parser.cpp"
+#line 4599 "bison_parser.cpp"
break;
- case 257: /* opt_join_type: %empty */
-#line 1237 "bison_parser.y"
+ case 259: /* opt_join_type: %empty */
+#line 1251 "bison_parser.y"
{ (yyval.uval) = kJoinInner; }
-#line 4569 "bison_parser.cpp"
+#line 4605 "bison_parser.cpp"
break;
- case 261: /* ident_commalist: IDENTIFIER */
-#line 1257 "bison_parser.y"
+ case 263: /* ident_commalist: IDENTIFIER */
+#line 1271 "bison_parser.y"
{ (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); }
-#line 4575 "bison_parser.cpp"
+#line 4611 "bison_parser.cpp"
break;
- case 262: /* ident_commalist: ident_commalist ',' IDENTIFIER */
-#line 1258 "bison_parser.y"
+ case 264: /* ident_commalist: ident_commalist ',' IDENTIFIER */
+#line 1272 "bison_parser.y"
{ (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); }
-#line 4581 "bison_parser.cpp"
+#line 4617 "bison_parser.cpp"
break;
-#line 4585 "bison_parser.cpp"
+#line 4621 "bison_parser.cpp"
default: break;
}
@@ -4811,7 +4847,7 @@ YYLTYPE yylloc = yyloc_default;
return yyresult;
}
-#line 1261 "bison_parser.y"
+#line 1275 "bison_parser.y"
/*********************************
** Section 4: Additional C code
diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h
index aa7b6558..034caa15 100644
--- a/src/parser/bison_parser.h
+++ b/src/parser/bison_parser.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.7.4. */
+/* A Bison parser, made by GNU Bison 3.7.6. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,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
diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y
index 8d92e0df..10319651 100755
--- a/src/parser/bison_parser.y
+++ b/src/parser/bison_parser.y
@@ -209,7 +209,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha
%type join_clause table_ref_name_no_alias
%type expr operand scalar_expr unary_expr binary_expr logic_expr exists_expr extract_expr cast_expr
%type function_expr between_expr expr_alias param_expr
-%type column_name literal int_literal num_literal string_literal bool_literal
+%type column_name literal int_literal num_literal string_literal bool_literal date_literal
%type comp_expr opt_where join_condition opt_having case_expr case_list in_expr hint
%type array_expr array_index null_literal
%type opt_limit opt_top
@@ -1031,6 +1031,7 @@ literal:
| bool_literal
| num_literal
| null_literal
+ | date_literal
| param_expr
;
@@ -1056,6 +1057,19 @@ null_literal:
NULL { $$ = Expr::makeNullLiteral(); }
;
+date_literal:
+ DATE STRING {
+ 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($2, "%4d-%2d-%2d%n", &day, &month, &year, &chars_parsed) != 3 || $2[chars_parsed] != 0) {
+ free($2);
+ yyerror(&yyloc, result, scanner, "Found incorrect date format. Expected format: YYYY-MM-DD");
+ YYERROR;
+ }
+ $$ = Expr::makeDateLiteral($2);
+ }
+ ;
+
param_expr:
'?' {
$$ = Expr::makeParameter(yylloc.total_column);
diff --git a/src/sql/Expr.cpp b/src/sql/Expr.cpp
index 6804fc54..f82e69c7 100644
--- a/src/sql/Expr.cpp
+++ b/src/sql/Expr.cpp
@@ -134,6 +134,12 @@ Expr* Expr::makeNullLiteral() {
return e;
}
+Expr* Expr::makeDateLiteral(char* string) {
+ Expr* e = new Expr(kExprLiteralDate);
+ e->name = string;
+ return e;
+}
+
Expr* Expr::makeColumnRef(char* name) {
Expr* e = new Expr(kExprColumnRef);
e->name = name;
diff --git a/src/sql/Expr.h b/src/sql/Expr.h
index cb5bddb0..2639a523 100644
--- a/src/sql/Expr.h
+++ b/src/sql/Expr.h
@@ -18,6 +18,7 @@ enum ExprType {
kExprLiteralString,
kExprLiteralInt,
kExprLiteralNull,
+ kExprLiteralDate,
kExprStar,
kExprParameter,
kExprColumnRef,
@@ -150,6 +151,8 @@ struct Expr {
static Expr* makeNullLiteral();
+ static Expr* makeDateLiteral(char* val);
+
static Expr* makeColumnRef(char* name);
static Expr* makeColumnRef(char* table, char* name);
diff --git a/src/util/sqlhelper.cpp b/src/util/sqlhelper.cpp
index 68cb88ec..ba1d153c 100755
--- a/src/util/sqlhelper.cpp
+++ b/src/util/sqlhelper.cpp
@@ -121,6 +121,12 @@ namespace hsql {
case kExprLiteralString:
inprint(expr->name, numIndent);
break;
+ case kExprLiteralDate:
+ inprint(expr->name, numIndent);
+ break;
+ case kExprLiteralNull:
+ inprint("NULL", numIndent);
+ break;
case kExprFunctionRef:
inprint(expr->name, numIndent);
for (Expr* e : *expr->exprList) printExpression(e, numIndent + 1);
diff --git a/test/queries/queries-bad.sql b/test/queries/queries-bad.sql
index 07a36555..5f75a52e 100644
--- a/test/queries/queries-bad.sql
+++ b/test/queries/queries-bad.sql
@@ -21,4 +21,9 @@
!WITH a AS (SELECT ) b AS (SELECT ) SELECT 1; # Missing comma between WITH descriptions
!BEGIN TRANSACTION transName; # Transaction naming is currently not supported
!SELECT -9223372036854775809; # Out of int64_t range
-!SELECT 9223372036854775808; # Out of int64_t range
\ No newline at end of file
+!SELECT 9223372036854775808; # Out of int64_t range
+!SELECT * FROM t WHERE a = DATE 'anystring';
+!SELECT * FROM t WHERE a = DATE '1996-12-310';
+!SELECT * FROM t WHERE a = DATE '1996-120-31';
+!SELECT * FROM t WHERE a = DATE '19960-12-31';
+!SELECT * FROM t WHERE a = DATE 'asdf-gh-jkl';
diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql
index 8b0a5cfb..f209a561 100755
--- a/test/queries/queries-good.sql
+++ b/test/queries/queries-good.sql
@@ -17,6 +17,7 @@ SELECT * FROM t WHERE a BETWEEN 1 and c;
SELECT * FROM t WHERE a = ? AND b = ?;
SELECT City.name, Product.category, SUM(price) FROM fact INNER JOIN City ON fact.city_id = City.id INNER JOIN Product ON fact.product_id = Product.id GROUP BY City.name, Product.category;
SELECT SUBSTR(a, 3, 5) FROM t;
+SELECT * FROM t WHERE a = DATE '1996-12-31';
# JOIN
SELECT t1.a, t1.b, t2.c FROM "table" AS t1 JOIN (SELECT * FROM foo JOIN bar ON foo.id = bar.id) t2 ON t1.a = t2.b WHERE (t1.b OR NOT t1.a) AND t2.c = 12.5
SELECT * FROM t1 JOIN t2 ON c1 = c2;
diff --git a/test/select_tests.cpp b/test/select_tests.cpp
index ce7d2550..e1b37885 100644
--- a/test/select_tests.cpp
+++ b/test/select_tests.cpp
@@ -836,3 +836,16 @@ TEST(CastAsDate) {
ASSERT_STREQ("CAST", stmt->selectList->front()->name);
ASSERT_EQ(DataType::DATE, stmt->selectList->front()->columnType.data_type);
}
+
+TEST(DateLiteral) {
+ TEST_PARSE_SINGLE_SQL(
+ "SELECT * FROM t WHERE a = DATE '1996-12-31'",
+ kStmtSelect,
+ SelectStatement,
+ result,
+ stmt);
+ ASSERT_TRUE(result.isValid());
+ stmt = (SelectStatement*) result.getStatement(0);
+ ASSERT_EQ(stmt->whereClause->opType, kOpEquals);
+ ASSERT_STREQ(stmt->whereClause->expr2->name, "1996-12-31");
+}