From de4f81bb18d562fda36788f538c5006665050dc4 Mon Sep 17 00:00:00 2001 From: d-justen <33455240+d-justen@users.noreply.github.com> Date: Fri, 7 Jun 2019 11:42:49 +0200 Subject: [PATCH] Support Create Table As Syntax (#127) * support create table as select statement * Generate bison code * add test --- src/parser/bison_parser.cpp | 2321 +++++++++++++++++---------------- src/parser/bison_parser.h | 16 +- src/parser/bison_parser.y | 7 + test/queries/queries-good.sql | 2 + test/sql_tests.cpp | 18 + 5 files changed, 1204 insertions(+), 1160 deletions(-) diff --git a/src/parser/bison_parser.cpp b/src/parser/bison_parser.cpp index 7aae055..70b07d5 100644 --- a/src/parser/bison_parser.cpp +++ b/src/parser/bison_parser.cpp @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.3.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,11 +41,14 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.4" +#define YYBISON_VERSION "3.3.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -69,8 +73,8 @@ #define yynerrs hsql_nerrs -/* Copy the first part of user declarations. */ -#line 1 "bison_parser.y" /* yacc.c:339 */ +/* First part of user prologue. */ +#line 1 "bison_parser.y" /* yacc.c:337 */ /** * bison_parser.y @@ -99,13 +103,16 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha } -#line 103 "bison_parser.cpp" /* yacc.c:339 */ - +#line 107 "bison_parser.cpp" /* yacc.c:337 */ # ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr +# if defined __cplusplus +# if 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif # else -# define YY_NULLPTR 0 +# define YY_NULLPTR ((void*)0) # endif # endif @@ -137,7 +144,7 @@ int yyerror(YYLTYPE* llocp, SQLParserResult* result, yyscan_t scanner, const cha extern int hsql_debug; #endif /* "%code requires" blocks. */ -#line 35 "bison_parser.y" /* yacc.c:355 */ +#line 35 "bison_parser.y" /* yacc.c:352 */ // %code requires block @@ -161,7 +168,7 @@ extern int hsql_debug; } \ } -#line 165 "bison_parser.cpp" /* yacc.c:355 */ +#line 172 "bison_parser.cpp" /* yacc.c:352 */ /* Token type. */ #ifndef HSQL_TOKENTYPE @@ -319,7 +326,7 @@ extern int hsql_debug; union HSQL_STYPE { -#line 95 "bison_parser.y" /* yacc.c:355 */ +#line 95 "bison_parser.y" /* yacc.c:352 */ double fval; int64_t ival; @@ -363,7 +370,7 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; -#line 367 "bison_parser.cpp" /* yacc.c:355 */ +#line 374 "bison_parser.cpp" /* yacc.c:352 */ }; typedef union HSQL_STYPE HSQL_STYPE; @@ -391,9 +398,7 @@ int hsql_parse (hsql::SQLParserResult* result, yyscan_t scanner); #endif /* !YY_HSQL_BISON_PARSER_H_INCLUDED */ -/* Copy the second part of user declarations. */ -#line 397 "bison_parser.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -414,13 +419,13 @@ typedef signed char yytype_int8; #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else -typedef unsigned short int yytype_uint16; +typedef unsigned short yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else -typedef short int yytype_int16; +typedef short yytype_int16; #endif #ifndef YYSIZE_T @@ -432,7 +437,7 @@ typedef short int yytype_int16; # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else -# define YYSIZE_T unsigned int +# define YYSIZE_T unsigned # endif #endif @@ -468,15 +473,6 @@ typedef short int yytype_int16; # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) #endif -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -484,7 +480,7 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ @@ -637,27 +633,27 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 49 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 696 +#define YYLAST 669 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 163 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 100 /* YYNRULES -- Number of rules. */ -#define YYNRULES 243 +#define YYNRULES 244 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 438 +#define YYNSTATES 440 -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 400 +/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ + as returned by yylex. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -710,28 +706,28 @@ static const yytype_uint16 yyrline[] = 0, 258, 258, 279, 285, 294, 298, 302, 309, 310, 311, 312, 313, 314, 315, 316, 317, 326, 327, 332, 333, 337, 341, 353, 360, 363, 367, 379, 388, 392, - 402, 405, 419, 426, 433, 444, 445, 449, 450, 454, - 460, 461, 462, 463, 464, 465, 466, 467, 471, 472, - 473, 483, 489, 495, 503, 504, 513, 522, 535, 542, - 553, 554, 564, 573, 574, 578, 590, 594, 598, 616, - 617, 621, 622, 626, 636, 653, 657, 658, 659, 663, - 664, 668, 680, 681, 685, 689, 690, 693, 698, 699, - 703, 708, 712, 713, 716, 717, 721, 722, 726, 730, - 731, 732, 738, 739, 743, 744, 745, 746, 747, 748, - 755, 756, 760, 761, 765, 766, 770, 780, 781, 782, - 783, 784, 788, 789, 790, 791, 792, 793, 794, 795, - 796, 797, 801, 802, 806, 807, 808, 809, 810, 814, - 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, - 828, 829, 833, 834, 835, 836, 842, 843, 844, 845, - 849, 850, 854, 855, 859, 860, 861, 862, 863, 864, - 865, 869, 870, 874, 878, 879, 880, 881, 882, 883, - 886, 890, 894, 898, 899, 900, 901, 905, 906, 907, - 908, 909, 913, 917, 918, 922, 923, 927, 931, 935, - 947, 948, 958, 959, 963, 964, 973, 974, 979, 990, - 999, 1000, 1005, 1006, 1011, 1012, 1016, 1017, 1022, 1023, - 1031, 1032, 1036, 1040, 1044, 1051, 1064, 1072, 1082, 1101, - 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1115, - 1124, 1125, 1130, 1131 + 402, 405, 419, 426, 433, 440, 451, 452, 456, 457, + 461, 467, 468, 469, 470, 471, 472, 473, 474, 478, + 479, 480, 490, 496, 502, 510, 511, 520, 529, 542, + 549, 560, 561, 571, 580, 581, 585, 597, 601, 605, + 623, 624, 628, 629, 633, 643, 660, 664, 665, 666, + 670, 671, 675, 687, 688, 692, 696, 697, 700, 705, + 706, 710, 715, 719, 720, 723, 724, 728, 729, 733, + 737, 738, 739, 745, 746, 750, 751, 752, 753, 754, + 755, 762, 763, 767, 768, 772, 773, 777, 787, 788, + 789, 790, 791, 795, 796, 797, 798, 799, 800, 801, + 802, 803, 804, 808, 809, 813, 814, 815, 816, 817, + 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, + 831, 835, 836, 840, 841, 842, 843, 849, 850, 851, + 852, 856, 857, 861, 862, 866, 867, 868, 869, 870, + 871, 872, 876, 877, 881, 885, 886, 887, 888, 889, + 890, 893, 897, 901, 905, 906, 907, 908, 912, 913, + 914, 915, 916, 920, 924, 925, 929, 930, 934, 938, + 942, 954, 955, 965, 966, 970, 971, 980, 981, 986, + 997, 1006, 1007, 1012, 1013, 1018, 1019, 1023, 1024, 1029, + 1030, 1038, 1039, 1043, 1047, 1051, 1058, 1071, 1079, 1089, + 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, + 1122, 1131, 1132, 1137, 1138 }; #endif @@ -816,64 +812,64 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -358 +#define YYPACT_NINF -210 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-358))) + (!!((Yystate) == (-210))) -#define YYTABLE_NINF -241 +#define YYTABLE_NINF -242 #define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-241))) + (!!((Yytable_value) == (-242))) /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int16 yypact[] = { - 593, 92, 120, 132, 166, -50, 107, 109, 119, 120, - 95, 0, 213, 225, 67, -358, 126, 126, -358, -358, - -358, -358, -358, -358, -358, -358, -358, -358, -35, -358, - 251, 100, -358, 122, 205, 182, 182, 120, 195, 120, - 193, -358, 196, 196, 120, -358, 197, 156, -358, -358, - 576, -358, 233, -358, -358, 210, -35, 54, -358, 148, - -358, 319, 25, 324, 217, 120, 120, 257, -358, 252, - 180, 335, 302, 120, 120, -358, 187, 213, -358, 188, - 340, 337, 192, 194, -358, -358, -358, -35, 248, 232, - -35, -4, -358, -358, -358, -358, -358, -358, -358, -358, - 200, 201, -358, -358, -358, -358, -358, -358, -358, -358, - -358, 313, -49, 180, 198, -358, 352, 358, 75, 226, - -48, -358, -358, -358, -358, -358, -358, 360, -358, -358, - 198, -358, -358, -358, 295, -358, -358, -358, 198, 295, - 198, 29, -358, -358, 25, -358, 250, 364, 253, 26, - 211, 212, 135, 246, 219, 262, -358, 169, -8, 292, - -358, -358, -358, -358, -358, -358, -358, -358, -358, -358, - -358, -358, -358, -358, -358, 283, -358, -358, -15, 220, - -358, 198, 335, -358, 221, 56, -358, 294, 224, -358, - 19, -4, 229, -358, 64, -4, -8, 338, -9, -358, - 307, 159, 102, -358, 289, -3, -1, 342, -76, 198, - -65, 97, 237, 262, 376, 198, 81, 239, -10, 198, - 198, 262, -358, 262, -72, 243, 128, 262, 262, 262, - 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - 262, 262, 340, 120, -358, 398, 25, -8, -358, 25, - -358, 360, 7, 257, -358, 198, -358, 401, -358, -358, - -358, 198, -358, -358, -358, -358, 198, 198, 352, -358, - 258, -358, -358, 259, -358, -358, -358, 160, -358, 364, - -358, -358, 198, -358, -358, 260, -358, -358, -358, -358, - -358, -358, 325, 4, 110, 198, 198, -358, 342, 317, - -111, -358, -358, -358, 311, 333, 410, 262, 265, 169, - -358, 331, 272, 410, 410, 410, 410, 444, 444, 444, - 444, 81, 81, -107, -107, -107, -28, 273, -358, -358, - 117, 133, -358, 289, -358, 209, -358, 267, -358, 15, - -358, 372, -358, -358, -358, -8, -8, -358, 430, 442, - -358, 354, -358, -358, 140, -358, 198, 198, 198, -358, - 5, 101, 293, -358, 262, 410, 169, 296, 149, -358, - -358, -358, -358, 298, 362, -358, -358, -358, 379, 382, - 387, 369, 7, 457, -358, -358, -358, 344, -358, 306, - 308, -358, -358, -7, -8, 152, -358, 198, -358, 376, - 309, 162, -358, -358, 15, 7, -358, -358, -358, 7, - 316, 312, 198, -358, -358, -358, -358, -8, -358, -358, - -358, -358, 482, 358, -30, 323, 198, 171, 198, -358, - 10, -8, -358, -358, -8, 328, 318, -358 + 566, 22, 59, 60, 113, -40, -47, 39, 36, 59, + 40, 126, 127, 131, -14, -210, 50, 50, -210, -210, + -210, -210, -210, -210, -210, -210, -210, -210, -30, -210, + 175, 51, -210, 42, 130, 99, 99, 59, 119, 59, + 124, -210, 108, 108, 59, -210, 141, 106, -210, -210, + 549, -210, 172, -210, -210, 160, -30, 103, -210, 102, + -210, 272, 11, 280, 169, 59, 59, 216, -210, 212, + 145, 309, 281, 59, 59, -210, 156, 127, -210, 166, + 318, 325, 182, 186, -210, -210, -210, -30, 234, 227, + -30, -8, -210, -210, -210, -210, -210, -210, -210, -210, + 194, 187, -210, -210, -210, -210, -210, -210, -210, -210, + -210, 312, -62, 145, 232, -210, 346, 352, -4, 218, + -57, -210, -210, -210, -210, -210, -210, 354, -210, -210, + 232, -210, -210, -210, 288, -210, -210, -210, 232, 288, + 232, 31, -210, -210, 11, -210, 244, 260, 361, 247, + 35, 210, 214, 129, 248, 217, 25, -210, 192, 98, + 278, -210, -210, -210, -210, -210, -210, -210, -210, -210, + -210, -210, -210, -210, -210, -210, 284, -210, -210, -44, + 219, -210, 232, 309, -210, 221, 68, -210, 289, 222, + -210, 95, -8, 225, -210, -61, -8, 98, 332, -6, + -210, 303, -210, 268, 110, -210, 260, -1, 1, 337, + 483, 232, 84, 123, 233, 25, 364, 232, 181, 235, + 44, 232, 232, 25, -210, 25, -67, 238, 26, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 318, 59, -210, 389, 11, 98, + -210, 11, -210, 354, 6, 216, -210, 232, -210, 393, + -210, -210, -210, 232, -210, -210, -210, -210, 232, 232, + 346, -210, 245, -210, -210, 246, -210, -210, -210, 27, + -210, 361, -210, -210, 232, -210, -210, 250, -210, -210, + -210, -210, -210, -210, 319, 115, 139, 232, 232, -210, + 337, 317, -46, -210, -210, -210, 306, 330, 402, 25, + 256, 192, -210, 320, 259, 402, 402, 402, 402, 417, + 417, 417, 417, 181, 181, -96, -96, -96, -27, 265, + -210, -210, 136, 140, -210, 260, -210, 190, -210, 264, + -210, 19, -210, 369, -210, -210, -210, 98, 98, -210, + 428, 431, -210, 343, -210, -210, 142, -210, 232, 232, + 232, -210, -54, 158, 283, -210, 25, 402, 192, 286, + 146, -210, -210, -210, -210, 287, 349, -210, -210, -210, + 371, 377, 379, 363, 6, 448, -210, -210, -210, 335, + -210, 297, 299, -210, -210, 105, 98, 163, -210, 232, + -210, 364, 302, 150, -210, -210, 19, 6, -210, -210, + -210, 6, 375, 310, 232, -210, -210, -210, -210, 98, + -210, -210, -210, -210, 436, 352, -32, 316, 232, 159, + 232, -210, 15, 98, -210, -210, 98, 304, 326, -210 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -881,80 +877,80 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 241, 3, 18, 18, 16, 9, - 7, 10, 15, 12, 13, 11, 14, 8, 0, 220, - 0, 210, 57, 25, 0, 36, 36, 0, 0, 0, - 0, 209, 55, 55, 0, 30, 0, 222, 223, 1, - 221, 2, 0, 6, 5, 103, 0, 66, 67, 95, - 53, 0, 113, 0, 0, 0, 0, 89, 28, 0, - 61, 0, 0, 0, 0, 31, 0, 0, 4, 0, - 0, 83, 0, 0, 77, 78, 76, 0, 80, 0, - 0, 109, 211, 192, 195, 197, 198, 193, 194, 199, - 0, 112, 114, 187, 188, 189, 196, 190, 191, 24, - 23, 0, 0, 61, 0, 56, 0, 0, 0, 0, - 89, 63, 54, 51, 52, 225, 224, 0, 102, 82, - 0, 70, 69, 71, 95, 72, 79, 75, 0, 95, - 0, 0, 73, 26, 0, 35, 0, 0, 0, 183, - 0, 0, 0, 0, 0, 0, 185, 0, 88, 117, - 124, 125, 126, 119, 121, 127, 120, 139, 128, 129, - 130, 123, 118, 132, 133, 0, 29, 242, 0, 0, - 59, 0, 0, 62, 21, 0, 19, 86, 84, 110, - 219, 109, 94, 96, 101, 109, 105, 107, 104, 115, - 0, 0, 0, 37, 221, 83, 0, 0, 0, 0, - 0, 0, 0, 0, 135, 0, 134, 0, 0, 0, - 0, 0, 136, 0, 0, 0, 0, 0, 0, 0, + 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 242, 3, 18, 18, 16, 9, + 7, 10, 15, 12, 13, 11, 14, 8, 0, 221, + 0, 211, 58, 25, 0, 37, 37, 0, 0, 0, + 0, 210, 56, 56, 0, 30, 0, 223, 224, 1, + 222, 2, 0, 6, 5, 104, 0, 67, 68, 96, + 54, 0, 114, 0, 0, 0, 0, 90, 28, 0, + 62, 0, 0, 0, 0, 31, 0, 0, 4, 0, + 0, 84, 0, 0, 78, 79, 77, 0, 81, 0, + 0, 110, 212, 193, 196, 198, 199, 194, 195, 200, + 0, 113, 115, 188, 189, 190, 197, 191, 192, 24, + 23, 0, 0, 62, 0, 57, 0, 0, 0, 0, + 90, 64, 55, 52, 53, 226, 225, 0, 103, 83, + 0, 71, 70, 72, 96, 73, 80, 76, 0, 96, + 0, 0, 74, 26, 0, 36, 0, 222, 0, 0, + 184, 0, 0, 0, 0, 0, 0, 186, 0, 89, + 118, 125, 126, 127, 120, 122, 128, 121, 140, 129, + 130, 131, 124, 119, 133, 134, 0, 29, 243, 0, + 0, 60, 0, 0, 63, 21, 0, 19, 87, 85, + 111, 220, 110, 95, 97, 102, 110, 106, 108, 105, + 116, 0, 34, 0, 0, 38, 222, 84, 0, 0, + 0, 0, 0, 0, 0, 0, 136, 0, 135, 0, + 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 60, 0, 0, 65, 64, 0, - 17, 0, 0, 89, 85, 0, 217, 0, 218, 116, - 68, 0, 100, 99, 98, 74, 0, 0, 0, 41, - 0, 44, 43, 0, 42, 47, 40, 50, 33, 0, - 34, 171, 0, 184, 186, 0, 174, 175, 176, 177, - 178, 179, 0, 0, 0, 0, 0, 158, 0, 0, - 0, 131, 122, 150, 151, 0, 146, 0, 0, 0, - 137, 0, 149, 148, 164, 165, 166, 167, 168, 169, - 170, 141, 140, 143, 142, 144, 145, 0, 27, 243, - 0, 0, 20, 221, 87, 200, 202, 0, 204, 215, - 203, 91, 111, 216, 97, 108, 106, 32, 0, 0, - 48, 0, 39, 38, 0, 162, 0, 0, 0, 156, - 0, 0, 0, 180, 0, 147, 0, 0, 0, 138, - 181, 58, 22, 0, 0, 237, 229, 235, 233, 236, - 231, 0, 0, 0, 214, 208, 212, 0, 81, 0, - 0, 49, 172, 0, 160, 0, 159, 0, 163, 182, - 0, 0, 154, 152, 215, 0, 232, 234, 230, 0, - 201, 216, 0, 45, 46, 173, 157, 161, 155, 153, - 205, 226, 238, 0, 93, 0, 0, 0, 0, 90, - 0, 239, 227, 213, 92, 183, 0, 228 + 0, 0, 0, 0, 0, 0, 61, 0, 0, 66, + 65, 0, 17, 0, 0, 90, 86, 0, 218, 0, + 219, 117, 69, 0, 101, 100, 99, 75, 0, 0, + 0, 42, 0, 45, 44, 0, 43, 48, 41, 51, + 33, 0, 35, 172, 0, 185, 187, 0, 175, 176, + 177, 178, 179, 180, 0, 0, 0, 0, 0, 159, + 0, 0, 0, 132, 123, 151, 152, 0, 147, 0, + 0, 0, 138, 0, 150, 149, 165, 166, 167, 168, + 169, 170, 171, 142, 141, 144, 143, 145, 146, 0, + 27, 244, 0, 0, 20, 222, 88, 201, 203, 0, + 205, 216, 204, 92, 112, 217, 98, 109, 107, 32, + 0, 0, 49, 0, 40, 39, 0, 163, 0, 0, + 0, 157, 0, 0, 0, 181, 0, 148, 0, 0, + 0, 139, 182, 59, 22, 0, 0, 238, 230, 236, + 234, 237, 232, 0, 0, 0, 215, 209, 213, 0, + 82, 0, 0, 50, 173, 0, 161, 0, 160, 0, + 164, 183, 0, 0, 155, 153, 216, 0, 233, 235, + 231, 0, 202, 217, 0, 46, 47, 174, 158, 162, + 156, 154, 206, 227, 239, 0, 94, 0, 0, 0, + 0, 91, 0, 240, 228, 214, 93, 184, 0, 229 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -358, -358, -358, 415, -358, 453, -358, 241, -358, -358, - -358, -358, -358, 222, -358, -358, 458, -358, 214, -358, - -358, -358, 452, -358, -358, -358, 383, -358, -358, 315, - -197, 45, 409, -53, 441, -358, -358, 22, 301, -358, - -358, -358, -103, -358, -358, -73, -358, 240, -358, -358, - 33, -207, -358, 40, 254, -114, -149, -358, -358, -358, - -358, -358, -358, 297, -358, -358, -358, -358, -358, -358, - -358, -358, 73, -51, -101, -358, -358, -79, -358, -358, - -358, -357, 105, -358, -358, -358, 3, -358, 108, 321, - -358, -358, -358, -358, 436, -358, -358, -358, -358, 96 + -210, -210, -210, 424, -210, 470, -210, 236, -210, -210, + -210, -210, -210, 220, -210, -210, 452, -210, 237, -210, + -210, -210, 454, -210, -210, -210, 378, -210, -210, 315, + -146, 23, 405, -53, 440, -210, -210, 231, 293, -210, + -210, -210, -70, -210, -210, -16, -210, 257, -210, -210, + 16, -209, -210, 87, 266, -114, -149, -210, -210, -210, + -210, -210, -210, 313, -210, -210, -210, -210, -210, -210, + -210, -210, 89, -48, -106, -210, -210, -78, -210, -210, + -210, -193, 121, -210, -210, -210, 4, -210, 120, 338, + -210, -210, -210, -210, 455, -210, -210, -210, -210, 109 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 13, 14, 15, 16, 53, 185, 186, 17, 110, - 18, 19, 69, 175, 20, 21, 65, 202, 203, 277, - 352, 22, 73, 23, 24, 25, 118, 26, 120, 121, - 27, 133, 134, 58, 87, 88, 137, 59, 130, 187, - 253, 254, 115, 388, 429, 91, 192, 193, 264, 81, - 142, 188, 100, 101, 189, 190, 159, 160, 161, 162, - 163, 164, 165, 211, 166, 167, 168, 169, 292, 170, - 171, 172, 173, 174, 103, 104, 105, 106, 107, 108, - 334, 335, 336, 337, 338, 40, 339, 384, 385, 386, - 259, 28, 29, 47, 48, 340, 381, 432, 51, 178 + -1, 13, 14, 15, 16, 53, 186, 187, 17, 110, + 18, 19, 69, 176, 20, 21, 65, 204, 205, 279, + 354, 22, 73, 23, 24, 25, 118, 26, 120, 121, + 27, 133, 134, 58, 87, 88, 137, 59, 130, 188, + 255, 256, 115, 390, 431, 91, 193, 194, 266, 81, + 142, 189, 100, 101, 190, 191, 160, 161, 162, 163, + 164, 165, 166, 213, 167, 168, 169, 170, 294, 171, + 172, 173, 174, 175, 103, 104, 105, 106, 107, 108, + 336, 337, 338, 339, 340, 40, 341, 386, 387, 388, + 261, 28, 29, 47, 48, 342, 383, 434, 51, 179 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -962,150 +958,144 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 158, 128, 283, 83, 214, 32, 216, 280, 300, 129, - 31, 102, 41, 435, 428, 176, 55, 183, 256, 44, - 307, 227, 256, 35, 194, 410, 196, 198, 114, 93, - 94, 95, 149, 93, 94, 95, 146, 209, 210, 267, - 67, 219, 70, 218, 140, 363, 241, 75, 242, 308, - 255, 36, 422, 45, 286, 287, 288, 289, 290, 291, - 220, 191, 141, 84, 214, 180, 195, 247, 112, 113, - 150, 151, 305, 57, 306, 354, 123, 124, 312, 313, + 159, 202, 128, 83, 285, 216, 32, 218, 302, 31, + 177, 129, 430, 41, 102, 93, 94, 95, 437, 114, + 264, 55, 258, 146, 195, 309, 197, 199, 150, 93, + 94, 95, 229, 35, 150, 93, 94, 95, 37, 212, + 140, 67, 269, 70, 220, 221, 265, 55, 75, 30, + 184, 57, 221, 180, 310, 398, 147, 243, 141, 244, + 282, 36, 31, 33, 222, 181, 216, 152, 249, 112, + 113, 222, 151, 152, 307, 356, 308, 123, 124, 82, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, 199, 85, 293, 219, 219, 219, 219, - 227, 82, 368, 357, 217, 303, 304, 152, 147, 135, - 219, 219, 135, 182, 396, 220, 220, 220, 220, 30, - 96, 125, 56, 31, 96, 219, 55, 242, 86, 220, - 220, 255, 179, 383, 197, 33, 373, 257, 149, 93, - 94, 95, 153, 244, 220, 262, 245, 194, 302, 284, - 341, 415, 345, 346, 285, 281, 154, 84, 365, 401, - 156, 97, 98, 327, 333, 97, 98, 176, 42, 34, - 219, 263, 149, 93, 94, 95, 150, 151, 155, 156, - 295, 360, 361, 205, 269, 206, 157, 99, 85, 220, - 270, 99, 37, 358, 38, 102, 43, 271, 102, 296, - 397, 149, 93, 94, 95, 424, 297, 219, 39, 227, - 150, 151, 296, 152, 250, 399, 46, 251, 89, 359, - 55, 272, 86, 310, 260, 49, 220, 50, 265, 52, - 96, 238, 239, 240, 241, 374, 242, 209, 273, 150, - 151, 311, 393, 394, 395, 362, 328, 152, 153, 149, - 93, 94, 95, 274, 60, 350, 367, 275, 219, 61, - 278, 416, 154, 279, 96, 149, 93, 94, 95, 375, - 276, 97, 98, 351, 376, 371, 152, 220, 144, 62, - 377, 378, 153, 417, 155, 156, 330, 212, 151, 331, - 63, 372, 157, 96, 144, 379, 154, 99, 392, -238, - 380, 255, 64, 68, 151, 97, 98, 403, 71, 221, - 255, 153, 431, 400, 434, 76, 72, 77, 155, 156, - 419, 79, 92, 255, 152, 154, 157, 80, 109, 433, - 111, 99, 245, 114, 97, 98, 116, 117, 119, 222, - 152, 96, 374, 122, 56, 127, 95, 155, 156, 129, - 131, 138, 132, 136, 145, 157, 93, 96, 143, 213, - 99, 177, 144, 184, 181, 89, 200, 201, 207, 208, - -206, 204, 243, 154, 215, 213, 375, 246, 249, 252, - 222, 376, 97, 98, 223, 255, 266, 377, 378, 154, - 261, 268, 12, 55, 298, 155, 156, 301, 97, 98, - 309, 329, 379, 157, 343, 224, -238, 380, 99, 307, - 356, 155, 156, 225, 226, 348, 349, 219, 355, 157, - 227, 228, 366, 222, 99, 223, 369, 242, 382, 370, - 229, 230, 231, 232, 233, 387, 389, 234, 235, 364, - 236, 237, 238, 239, 240, 241, 299, 242, 390, 391, - 406, 398, 405, 407, 402, 226, 404, 222, 408, 409, - 411, 227, 228, 412, 413, 78, 414, 418, 223, 423, - 54, 229, 230, 231, 232, 233, 437, -207, 234, 235, - 430, 236, 237, 238, 239, 240, 241, 206, 242, 299, - 347, 222, 332, 353, 66, 74, 148, 248, 226, 139, - 90, 344, -241, 436, 227, 228, 282, 294, 374, 342, - 421, 258, 420, 126, 229, 230, 231, 232, 233, 427, - 0, 234, 235, 0, 236, 237, 238, 239, 240, 241, - 0, 242, 226, 0, 0, 0, 0, 0, 227, -241, - 0, 0, 375, 0, 0, 0, 0, 376, -241, -241, - -241, 232, 233, 377, 378, 234, 235, 425, 236, 237, - 238, 239, 240, 241, 0, 242, 226, 0, 379, 0, - 0, 0, 227, 380, 0, 0, -240, 0, 0, 0, - 0, 0, 0, 1, 0, -241, -241, 0, 0, -241, - -241, 2, 236, 237, 238, 239, 240, 241, 3, 242, - 1, 0, 0, 4, 0, 0, 426, 0, 2, 0, - 0, 5, 6, 0, 0, 3, 0, 0, 0, 0, - 4, 7, 8, 0, 0, 0, 0, 0, 5, 6, - 0, 0, 9, 0, 0, 0, 0, 0, 7, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 11, 0, 10, 0, 0, 0, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 0, 0, 12 + 324, 325, 326, 327, 328, 148, 200, 295, 258, 125, + 221, 229, 370, 153, 183, 219, 96, 305, 306, 153, + 365, 84, 84, 42, 246, 257, 34, 247, 192, 222, + 96, 312, 352, 196, 38, 39, 96, 56, 244, 257, + 46, 49, 150, 93, 94, 95, 198, 385, 215, 313, + 353, 43, 85, 85, 154, 44, 50, 97, 98, 195, + 221, 286, 155, 52, 347, 348, 287, 283, 155, 403, + 367, 97, 98, 335, 177, 157, 329, 97, 98, 222, + 151, 152, 89, 99, 156, 157, 86, 86, 60, 45, + 156, 157, 158, 362, 363, 343, 211, 99, 158, 375, + 221, 412, 207, 99, 208, 150, 93, 94, 95, 62, + 102, 221, 304, 102, 221, 426, 297, 153, 262, 222, + 61, 221, 267, 259, 359, 63, 376, 401, 424, 64, + 222, 221, 360, 222, 96, 298, 252, 68, 72, 253, + 222, 211, 299, 151, 152, 150, 93, 94, 95, 71, + 222, 298, 154, 55, 395, 396, 397, 364, 361, 330, + 377, 150, 93, 94, 95, 378, 155, 399, 369, 76, + 79, 379, 380, 417, 221, 97, 98, 77, 280, 221, + 153, 281, 418, 151, 152, 92, 381, 80, 156, 157, + -239, 382, 111, 222, 109, 419, 158, 96, 222, 214, + 152, 99, 114, 271, 373, 223, 116, 144, 374, 272, + 394, 144, 117, 257, 405, 154, 273, 257, 421, 229, + 153, 257, 119, 56, 433, 402, 436, 435, 135, 155, + 247, 135, 122, 127, 95, 224, 153, 96, 97, 98, + 274, 240, 241, 242, 243, 332, 244, 129, 333, 136, + 131, 156, 157, 96, 132, 154, 138, 275, 144, 158, + 93, -207, 143, 145, 99, 178, 182, 185, 89, 155, + 201, 215, 276, 12, 203, 206, 277, 209, 97, 98, + 225, 210, 217, 245, 254, 155, 248, 224, 251, 278, + 268, 156, 157, 257, 97, 98, 263, 270, 55, 158, + 300, 226, 331, 303, 99, 311, 345, 156, 157, 227, + 228, 376, 350, 351, 358, 158, 229, 230, 357, 309, + 99, 224, 221, 368, 244, 371, 231, 232, 233, 234, + 235, 372, 225, 236, 237, 384, 238, 239, 240, 241, + 242, 243, 389, 244, 391, 377, 366, 392, 393, 407, + 378, 400, 408, 301, 404, 406, 379, 380, 409, 224, + 410, 413, 228, 411, 414, 415, 225, 416, 229, 230, + 420, 381, 376, 208, 224, -239, 382, 425, 231, 232, + 233, 234, 235, 432, 78, 236, 237, 301, 238, 239, + 240, 241, 242, 243, 439, 244, 228, 54, 66, 334, + 349, 149, 229, 230, -242, 139, 377, 74, 250, 90, + 284, 378, 231, 232, 233, 234, 235, 379, 380, 236, + 237, 427, 238, 239, 240, 241, 242, 243, 355, 244, + 346, 438, 381, 344, 228, 296, 422, 382, 423, 260, + 229, -242, 126, 0, 429, 0, -208, 0, 0, 228, + -242, -242, -242, 234, 235, 229, 0, 236, 237, -241, + 238, 239, 240, 241, 242, 243, 1, 244, -242, -242, + 428, 0, -242, -242, 2, 238, 239, 240, 241, 242, + 243, 3, 244, 1, 0, 0, 4, 0, 0, 0, + 0, 2, 0, 0, 5, 6, 0, 0, 3, 0, + 0, 0, 0, 4, 7, 8, 0, 0, 0, 0, + 0, 5, 6, 0, 0, 9, 0, 0, 0, 0, + 0, 7, 8, 288, 289, 290, 291, 292, 293, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 10, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 11, 0, 0, 0, 0, 0, 12 }; static const yytype_int16 yycheck[] = { - 114, 80, 3, 56, 153, 2, 155, 204, 215, 12, - 3, 62, 9, 3, 44, 116, 51, 120, 3, 19, - 92, 128, 3, 73, 138, 382, 140, 141, 76, 4, - 5, 6, 3, 4, 5, 6, 85, 102, 152, 48, - 37, 106, 39, 157, 48, 156, 153, 44, 155, 121, - 161, 101, 409, 53, 130, 131, 132, 133, 134, 135, - 125, 134, 66, 9, 213, 118, 139, 181, 65, 66, - 41, 42, 221, 28, 223, 282, 73, 74, 227, 228, + 114, 147, 80, 56, 3, 154, 2, 156, 217, 3, + 116, 12, 44, 9, 62, 4, 5, 6, 3, 76, + 81, 51, 3, 85, 138, 92, 140, 141, 3, 4, + 5, 6, 128, 73, 3, 4, 5, 6, 85, 153, + 48, 37, 48, 39, 158, 106, 107, 51, 44, 27, + 120, 28, 106, 57, 121, 109, 118, 153, 66, 155, + 206, 101, 3, 3, 125, 118, 215, 42, 182, 65, + 66, 125, 41, 42, 223, 284, 225, 73, 74, 56, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 144, 40, 209, 106, 106, 106, 106, - 128, 56, 309, 99, 157, 219, 220, 78, 157, 87, - 106, 106, 90, 161, 109, 125, 125, 125, 125, 27, - 95, 76, 157, 3, 95, 106, 51, 155, 74, 125, - 125, 161, 57, 118, 105, 3, 333, 118, 3, 4, - 5, 6, 113, 158, 125, 81, 161, 261, 158, 150, - 253, 158, 266, 267, 207, 158, 127, 9, 307, 366, - 150, 136, 137, 242, 157, 136, 137, 268, 73, 3, - 106, 107, 3, 4, 5, 6, 41, 42, 149, 150, - 83, 295, 296, 157, 25, 159, 157, 162, 40, 125, - 31, 162, 85, 83, 85, 246, 101, 38, 249, 102, - 99, 3, 4, 5, 6, 412, 109, 106, 89, 128, - 41, 42, 102, 78, 158, 364, 3, 161, 70, 109, - 51, 62, 74, 95, 191, 0, 125, 160, 195, 103, - 95, 150, 151, 152, 153, 26, 155, 102, 79, 41, - 42, 113, 356, 357, 358, 298, 243, 78, 113, 3, - 4, 5, 6, 94, 3, 95, 309, 98, 106, 159, - 158, 109, 127, 161, 95, 3, 4, 5, 6, 60, - 111, 136, 137, 113, 65, 158, 78, 125, 161, 157, - 71, 72, 113, 397, 149, 150, 246, 41, 42, 249, - 85, 158, 157, 95, 161, 86, 127, 162, 158, 90, - 91, 161, 120, 108, 42, 136, 137, 158, 115, 17, - 161, 113, 426, 366, 428, 118, 120, 161, 149, 150, - 158, 88, 3, 161, 78, 127, 157, 117, 4, 158, - 113, 162, 161, 76, 136, 137, 84, 157, 3, 47, - 78, 95, 26, 41, 157, 157, 6, 149, 150, 12, - 158, 119, 158, 105, 41, 157, 4, 95, 158, 113, - 162, 3, 161, 3, 138, 70, 116, 3, 157, 157, - 161, 118, 89, 127, 155, 113, 60, 157, 157, 85, - 47, 65, 136, 137, 92, 161, 48, 71, 72, 127, - 161, 84, 103, 51, 157, 149, 150, 158, 136, 137, - 157, 3, 86, 157, 3, 113, 90, 91, 162, 92, - 85, 149, 150, 121, 122, 157, 157, 106, 158, 157, - 128, 129, 157, 47, 162, 92, 95, 155, 161, 156, - 138, 139, 140, 141, 142, 63, 6, 145, 146, 106, - 148, 149, 150, 151, 152, 153, 113, 155, 6, 95, - 71, 158, 90, 71, 158, 122, 158, 47, 71, 90, - 3, 128, 129, 119, 158, 50, 158, 158, 92, 157, - 17, 138, 139, 140, 141, 142, 158, 161, 145, 146, - 157, 148, 149, 150, 151, 152, 153, 159, 155, 113, - 268, 47, 251, 279, 36, 43, 113, 182, 122, 90, - 59, 261, 92, 430, 128, 129, 205, 210, 26, 255, - 405, 190, 404, 77, 138, 139, 140, 141, 142, 423, - -1, 145, 146, -1, 148, 149, 150, 151, 152, 153, - -1, 155, 122, -1, -1, -1, -1, -1, 128, 129, - -1, -1, 60, -1, -1, -1, -1, 65, 138, 139, - 140, 141, 142, 71, 72, 145, 146, 75, 148, 149, - 150, 151, 152, 153, -1, 155, 122, -1, 86, -1, - -1, -1, 128, 91, -1, -1, 0, -1, -1, -1, - -1, -1, -1, 7, -1, 141, 142, -1, -1, 145, - 146, 15, 148, 149, 150, 151, 152, 153, 22, 155, - 7, -1, -1, 27, -1, -1, 124, -1, 15, -1, - -1, 35, 36, -1, -1, 22, -1, -1, -1, -1, - 27, 45, 46, -1, -1, -1, -1, -1, 35, 36, - -1, -1, 56, -1, -1, -1, -1, -1, 45, 46, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 56, - -1, -1, -1, -1, -1, -1, -1, -1, 82, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 97, -1, 82, -1, -1, -1, 103, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 97, -1, -1, -1, -1, -1, 103 + 239, 240, 241, 242, 243, 157, 144, 211, 3, 76, + 106, 128, 311, 78, 161, 158, 95, 221, 222, 78, + 156, 9, 9, 73, 158, 161, 3, 161, 134, 125, + 95, 95, 95, 139, 85, 89, 95, 157, 155, 161, + 3, 0, 3, 4, 5, 6, 105, 118, 113, 113, + 113, 101, 40, 40, 113, 19, 160, 136, 137, 263, + 106, 150, 127, 103, 268, 269, 209, 158, 127, 368, + 309, 136, 137, 157, 270, 150, 244, 136, 137, 125, + 41, 42, 70, 162, 149, 150, 74, 74, 3, 53, + 149, 150, 157, 297, 298, 255, 102, 162, 157, 335, + 106, 384, 157, 162, 159, 3, 4, 5, 6, 157, + 248, 106, 158, 251, 106, 414, 83, 78, 192, 125, + 159, 106, 196, 118, 99, 85, 26, 366, 411, 120, + 125, 106, 83, 125, 95, 102, 158, 108, 120, 161, + 125, 102, 109, 41, 42, 3, 4, 5, 6, 115, + 125, 102, 113, 51, 358, 359, 360, 300, 109, 245, + 60, 3, 4, 5, 6, 65, 127, 99, 311, 118, + 88, 71, 72, 158, 106, 136, 137, 161, 158, 106, + 78, 161, 109, 41, 42, 3, 86, 117, 149, 150, + 90, 91, 113, 125, 4, 399, 157, 95, 125, 41, + 42, 162, 76, 25, 158, 17, 84, 161, 158, 31, + 158, 161, 157, 161, 158, 113, 38, 161, 158, 128, + 78, 161, 3, 157, 428, 368, 430, 158, 87, 127, + 161, 90, 41, 157, 6, 47, 78, 95, 136, 137, + 62, 150, 151, 152, 153, 248, 155, 12, 251, 105, + 158, 149, 150, 95, 158, 113, 119, 79, 161, 157, + 4, 161, 158, 41, 162, 3, 138, 3, 70, 127, + 116, 113, 94, 103, 3, 118, 98, 157, 136, 137, + 92, 157, 155, 89, 85, 127, 157, 47, 157, 111, + 48, 149, 150, 161, 136, 137, 161, 84, 51, 157, + 157, 113, 3, 158, 162, 157, 3, 149, 150, 121, + 122, 26, 157, 157, 85, 157, 128, 129, 158, 92, + 162, 47, 106, 157, 155, 95, 138, 139, 140, 141, + 142, 156, 92, 145, 146, 161, 148, 149, 150, 151, + 152, 153, 63, 155, 6, 60, 106, 6, 95, 90, + 65, 158, 71, 113, 158, 158, 71, 72, 71, 47, + 71, 3, 122, 90, 119, 158, 92, 158, 128, 129, + 158, 86, 26, 159, 47, 90, 91, 157, 138, 139, + 140, 141, 142, 157, 50, 145, 146, 113, 148, 149, + 150, 151, 152, 153, 158, 155, 122, 17, 36, 253, + 270, 113, 128, 129, 92, 90, 60, 43, 183, 59, + 207, 65, 138, 139, 140, 141, 142, 71, 72, 145, + 146, 75, 148, 149, 150, 151, 152, 153, 281, 155, + 263, 432, 86, 257, 122, 212, 406, 91, 407, 191, + 128, 129, 77, -1, 425, -1, 161, -1, -1, 122, + 138, 139, 140, 141, 142, 128, -1, 145, 146, 0, + 148, 149, 150, 151, 152, 153, 7, 155, 141, 142, + 124, -1, 145, 146, 15, 148, 149, 150, 151, 152, + 153, 22, 155, 7, -1, -1, 27, -1, -1, -1, + -1, 15, -1, -1, 35, 36, -1, -1, 22, -1, + -1, -1, -1, 27, 45, 46, -1, -1, -1, -1, + -1, 35, 36, -1, -1, 56, -1, -1, -1, -1, + -1, 45, 46, 130, 131, 132, 133, 134, 135, -1, + -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, + -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 97, -1, 82, -1, + -1, -1, 103, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 97, -1, -1, -1, -1, -1, 103 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1126,36 +1116,36 @@ static const yytype_uint16 yystos[] = 172, 113, 249, 249, 76, 205, 84, 157, 189, 3, 191, 192, 41, 249, 249, 194, 257, 157, 240, 12, 201, 158, 158, 194, 195, 200, 105, 199, 119, 195, - 48, 66, 213, 158, 161, 41, 85, 157, 189, 3, - 41, 42, 78, 113, 127, 149, 150, 157, 218, 219, - 220, 221, 222, 223, 224, 225, 227, 228, 229, 230, - 232, 233, 234, 235, 236, 176, 237, 3, 262, 57, - 196, 138, 161, 205, 3, 169, 170, 202, 214, 217, - 218, 208, 209, 210, 218, 208, 218, 105, 218, 236, - 116, 3, 180, 181, 118, 157, 159, 157, 157, 102, - 218, 226, 41, 113, 219, 155, 219, 196, 218, 106, - 125, 17, 47, 92, 113, 121, 122, 128, 129, 138, - 139, 140, 141, 142, 145, 146, 148, 149, 150, 151, - 152, 153, 155, 89, 158, 161, 157, 218, 192, 157, - 158, 161, 85, 203, 204, 161, 3, 118, 252, 253, - 213, 161, 81, 107, 211, 213, 48, 48, 84, 25, - 31, 38, 62, 79, 94, 98, 111, 182, 158, 161, - 193, 158, 201, 3, 150, 196, 130, 131, 132, 133, - 134, 135, 231, 218, 226, 83, 102, 109, 157, 113, - 214, 158, 158, 218, 218, 219, 219, 92, 121, 157, - 95, 113, 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 219, 219, 219, 219, 219, 240, 249, 3, - 216, 216, 170, 157, 243, 244, 245, 246, 247, 249, - 258, 205, 217, 3, 210, 218, 218, 176, 157, 157, - 95, 113, 183, 181, 214, 158, 85, 99, 83, 109, - 218, 218, 196, 156, 106, 219, 157, 196, 214, 95, - 156, 158, 158, 193, 26, 60, 65, 71, 72, 86, - 91, 259, 161, 118, 250, 251, 252, 63, 206, 6, - 6, 95, 158, 218, 218, 218, 109, 99, 158, 219, - 196, 214, 158, 158, 158, 90, 71, 71, 71, 90, - 244, 3, 119, 158, 158, 158, 109, 218, 158, 158, - 251, 245, 244, 157, 214, 75, 124, 262, 44, 207, - 157, 218, 260, 158, 218, 3, 235, 158 + 48, 66, 213, 158, 161, 41, 85, 118, 157, 189, + 3, 41, 42, 78, 113, 127, 149, 150, 157, 218, + 219, 220, 221, 222, 223, 224, 225, 227, 228, 229, + 230, 232, 233, 234, 235, 236, 176, 237, 3, 262, + 57, 196, 138, 161, 205, 3, 169, 170, 202, 214, + 217, 218, 208, 209, 210, 218, 208, 218, 105, 218, + 236, 116, 193, 3, 180, 181, 118, 157, 159, 157, + 157, 102, 218, 226, 41, 113, 219, 155, 219, 196, + 218, 106, 125, 17, 47, 92, 113, 121, 122, 128, + 129, 138, 139, 140, 141, 142, 145, 146, 148, 149, + 150, 151, 152, 153, 155, 89, 158, 161, 157, 218, + 192, 157, 158, 161, 85, 203, 204, 161, 3, 118, + 252, 253, 213, 161, 81, 107, 211, 213, 48, 48, + 84, 25, 31, 38, 62, 79, 94, 98, 111, 182, + 158, 161, 193, 158, 201, 3, 150, 196, 130, 131, + 132, 133, 134, 135, 231, 218, 226, 83, 102, 109, + 157, 113, 214, 158, 158, 218, 218, 219, 219, 92, + 121, 157, 95, 113, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 240, + 249, 3, 216, 216, 170, 157, 243, 244, 245, 246, + 247, 249, 258, 205, 217, 3, 210, 218, 218, 176, + 157, 157, 95, 113, 183, 181, 214, 158, 85, 99, + 83, 109, 218, 218, 196, 156, 106, 219, 157, 196, + 214, 95, 156, 158, 158, 193, 26, 60, 65, 71, + 72, 86, 91, 259, 161, 118, 250, 251, 252, 63, + 206, 6, 6, 95, 158, 218, 218, 218, 109, 99, + 158, 219, 196, 214, 158, 158, 158, 90, 71, 71, + 71, 90, 244, 3, 119, 158, 158, 158, 109, 218, + 158, 158, 251, 245, 244, 157, 214, 75, 124, 262, + 44, 207, 157, 218, 260, 158, 218, 3, 235, 158 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1164,28 +1154,28 @@ static const yytype_uint16 yyr1[] = 0, 163, 164, 165, 165, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 167, 167, 168, 168, 169, 169, 170, 170, 171, 172, 173, 173, 174, 175, 176, - 177, 177, 178, 178, 178, 179, 179, 180, 180, 181, - 182, 182, 182, 182, 182, 182, 182, 182, 183, 183, - 183, 184, 184, 184, 185, 185, 186, 187, 188, 188, - 189, 189, 190, 191, 191, 192, 193, 193, 193, 194, - 194, 195, 195, 196, 196, 197, 198, 198, 198, 199, - 199, 200, 201, 201, 202, 203, 203, 204, 205, 205, - 206, 206, 207, 207, 208, 208, 209, 209, 210, 211, - 211, 211, 212, 212, 213, 213, 213, 213, 213, 213, - 214, 214, 215, 215, 216, 216, 217, 218, 218, 218, - 218, 218, 219, 219, 219, 219, 219, 219, 219, 219, - 219, 219, 220, 220, 221, 221, 221, 221, 221, 222, + 177, 177, 178, 178, 178, 178, 179, 179, 180, 180, + 181, 182, 182, 182, 182, 182, 182, 182, 182, 183, + 183, 183, 184, 184, 184, 185, 185, 186, 187, 188, + 188, 189, 189, 190, 191, 191, 192, 193, 193, 193, + 194, 194, 195, 195, 196, 196, 197, 198, 198, 198, + 199, 199, 200, 201, 201, 202, 203, 203, 204, 205, + 205, 206, 206, 207, 207, 208, 208, 209, 209, 210, + 211, 211, 211, 212, 212, 213, 213, 213, 213, 213, + 213, 214, 214, 215, 215, 216, 216, 217, 218, 218, + 218, 218, 218, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 220, 220, 221, 221, 221, 221, 221, 222, 222, 222, 222, 222, 222, 222, 222, 222, 222, - 223, 223, 224, 224, 224, 224, 225, 225, 225, 225, - 226, 226, 227, 227, 228, 228, 228, 228, 228, 228, - 228, 229, 229, 230, 231, 231, 231, 231, 231, 231, - 232, 233, 234, 235, 235, 235, 235, 236, 236, 236, - 236, 236, 237, 238, 238, 239, 239, 240, 241, 242, - 243, 243, 244, 244, 245, 245, 246, 246, 247, 248, - 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, - 254, 254, 255, 256, 256, 257, 258, 258, 258, 259, - 259, 259, 259, 259, 259, 259, 259, 259, 259, 260, - 261, 261, 262, 262 + 222, 223, 223, 224, 224, 224, 224, 225, 225, 225, + 225, 226, 226, 227, 227, 228, 228, 228, 228, 228, + 228, 228, 229, 229, 230, 231, 231, 231, 231, 231, + 231, 232, 233, 234, 235, 235, 235, 235, 236, 236, + 236, 236, 236, 237, 238, 238, 239, 239, 240, 241, + 242, 243, 243, 244, 244, 245, 245, 246, 246, 247, + 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, + 253, 254, 254, 255, 256, 256, 257, 258, 258, 258, + 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, + 260, 261, 261, 262, 262 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1194,28 +1184,28 @@ static const yytype_uint8 yyr2[] = 0, 2, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, 1, 3, 1, 4, 4, 1, 2, 5, 7, 1, 1, - 2, 3, 8, 7, 7, 3, 0, 1, 3, 3, - 1, 1, 1, 1, 1, 4, 4, 1, 1, 2, - 0, 4, 4, 3, 2, 0, 4, 2, 8, 5, - 3, 0, 5, 1, 3, 3, 2, 2, 6, 3, - 3, 1, 1, 3, 5, 2, 1, 1, 1, 1, - 0, 7, 1, 0, 1, 1, 0, 2, 2, 0, - 4, 0, 2, 0, 3, 0, 1, 3, 2, 1, - 1, 0, 2, 0, 2, 2, 4, 2, 4, 0, - 1, 3, 1, 0, 1, 3, 2, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 2, 2, 2, 3, 4, 1, - 3, 3, 3, 3, 3, 3, 3, 4, 3, 3, - 3, 3, 5, 6, 5, 6, 4, 6, 3, 5, - 4, 5, 4, 5, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 6, 1, 1, 1, 1, 1, 1, - 4, 4, 5, 1, 3, 1, 3, 1, 1, 1, + 2, 3, 8, 7, 6, 7, 3, 0, 1, 3, + 3, 1, 1, 1, 1, 1, 4, 4, 1, 1, + 2, 0, 4, 4, 3, 2, 0, 4, 2, 8, + 5, 3, 0, 5, 1, 3, 3, 2, 2, 6, + 3, 3, 1, 1, 3, 5, 2, 1, 1, 1, + 1, 0, 7, 1, 0, 1, 1, 0, 2, 2, + 0, 4, 0, 2, 0, 3, 0, 1, 3, 2, + 1, 1, 0, 2, 0, 2, 2, 4, 2, 4, + 0, 1, 3, 1, 0, 1, 3, 2, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 2, 2, 2, 3, 4, + 1, 3, 3, 3, 3, 3, 3, 3, 4, 3, + 3, 3, 3, 5, 6, 5, 6, 4, 6, 3, + 5, 4, 5, 4, 5, 3, 3, 3, 3, 3, + 3, 3, 3, 5, 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, 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, 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 }; @@ -1231,22 +1221,22 @@ static const yytype_uint8 yyr2[] = #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) +#define YYBACKUP(Token, Value) \ + do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (&yylloc, result, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ + while (0) /* Error token number */ #define YYTERROR 1 @@ -1305,10 +1295,10 @@ do { \ /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ YY_ATTRIBUTE_UNUSED -static unsigned +static int yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) { - unsigned res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { @@ -1351,15 +1341,15 @@ do { \ } while (0) -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ +/*-----------------------------------. +| Print this symbol's value on YYO. | +`-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { - FILE *yyo = yyoutput; - YYUSE (yyo); + FILE *yyoutput = yyo; + YYUSE (yyoutput); YYUSE (yylocationp); YYUSE (result); YYUSE (scanner); @@ -1367,26 +1357,26 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue return; # ifdef YYPRINT if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); + YYPRINT (yyo, yytoknum[yytype], *yyvaluep); # endif YYUSE (yytype); } -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +/*---------------------------. +| Print this symbol on YYO. | +`---------------------------*/ static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) +yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, hsql::SQLParserResult* result, yyscan_t scanner) { - YYFPRINTF (yyoutput, "%s %s (", + YYFPRINTF (yyo, "%s %s (", yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, result, scanner); - YYFPRINTF (yyoutput, ")"); + YY_LOCATION_PRINT (yyo, *yylocationp); + YYFPRINTF (yyo, ": "); + yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, result, scanner); + YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. @@ -1420,7 +1410,7 @@ do { \ static void yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, hsql::SQLParserResult* result, yyscan_t scanner) { - unsigned long int yylno = yyrline[yyrule]; + unsigned long yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", @@ -1431,7 +1421,7 @@ yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) + &yyvsp[(yyi + 1) - (yynrhs)] , &(yylsp[(yyi + 1) - (yynrhs)]) , result, scanner); YYFPRINTF (stderr, "\n"); } @@ -1535,7 +1525,10 @@ yytnamerr (char *yyres, const char *yystr) case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; - /* Fall through. */ + else + goto append; + + append: default: if (yyres) yyres[yyn] = *yyp; @@ -1553,7 +1546,7 @@ yytnamerr (char *yyres, const char *yystr) if (! yyres) return yystrlen (yystr); - return yystpcpy (yyres, yystr) - yyres; + return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); } # endif @@ -1631,10 +1624,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } } } @@ -1646,6 +1639,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, case N: \ yyformat = S; \ break + default: /* Avoid compiler warnings. */ YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); @@ -1657,9 +1651,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) + yysize = yysize1; + else return 2; - yysize = yysize1; } if (*yymsg_alloc < yysize) @@ -1711,28 +1706,28 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 3: /* IDENTIFIER */ + case 3: /* IDENTIFIER */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1718 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1713 "bison_parser.cpp" /* yacc.c:1257 */ break; case 4: /* STRING */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1724 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1719 "bison_parser.cpp" /* yacc.c:1257 */ break; case 5: /* FLOATVAL */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1730 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1725 "bison_parser.cpp" /* yacc.c:1257 */ break; case 6: /* INTVAL */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1736 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1731 "bison_parser.cpp" /* yacc.c:1257 */ break; case 165: /* statement_list */ @@ -1745,19 +1740,19 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).stmt_vec)); } -#line 1749 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1744 "bison_parser.cpp" /* yacc.c:1257 */ break; case 166: /* statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1755 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1750 "bison_parser.cpp" /* yacc.c:1257 */ break; case 167: /* preparable_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).statement)); } -#line 1761 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1756 "bison_parser.cpp" /* yacc.c:1257 */ break; case 168: /* opt_hints */ @@ -1770,7 +1765,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1774 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1769 "bison_parser.cpp" /* yacc.c:1257 */ break; case 169: /* hint_list */ @@ -1783,67 +1778,67 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1787 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1782 "bison_parser.cpp" /* yacc.c:1257 */ break; case 170: /* hint */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 1793 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1788 "bison_parser.cpp" /* yacc.c:1257 */ break; case 171: /* prepare_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).prep_stmt)); } -#line 1799 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1794 "bison_parser.cpp" /* yacc.c:1257 */ break; case 172: /* prepare_target_query */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1805 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1800 "bison_parser.cpp" /* yacc.c:1257 */ break; case 173: /* execute_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).exec_stmt)); } -#line 1811 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1806 "bison_parser.cpp" /* yacc.c:1257 */ break; case 174: /* import_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).import_stmt)); } -#line 1817 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1812 "bison_parser.cpp" /* yacc.c:1257 */ break; case 175: /* import_file_type */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1823 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1818 "bison_parser.cpp" /* yacc.c:1257 */ break; case 176: /* file_path */ #line 145 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).sval)) ); } -#line 1829 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1824 "bison_parser.cpp" /* yacc.c:1257 */ break; case 177: /* show_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).show_stmt)); } -#line 1835 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1830 "bison_parser.cpp" /* yacc.c:1257 */ break; case 178: /* create_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).create_stmt)); } -#line 1841 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1836 "bison_parser.cpp" /* yacc.c:1257 */ break; case 179: /* opt_not_exists */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1847 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1842 "bison_parser.cpp" /* yacc.c:1257 */ break; case 180: /* column_def_commalist */ @@ -1856,55 +1851,55 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).column_vec)); } -#line 1860 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1855 "bison_parser.cpp" /* yacc.c:1257 */ break; case 181: /* column_def */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).column_t)); } -#line 1866 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1861 "bison_parser.cpp" /* yacc.c:1257 */ break; case 182: /* column_type */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1872 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1867 "bison_parser.cpp" /* yacc.c:1257 */ break; case 183: /* opt_column_nullable */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1878 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1873 "bison_parser.cpp" /* yacc.c:1257 */ break; case 184: /* drop_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).drop_stmt)); } -#line 1884 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1879 "bison_parser.cpp" /* yacc.c:1257 */ break; case 185: /* opt_exists */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1890 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1885 "bison_parser.cpp" /* yacc.c:1257 */ break; case 186: /* delete_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1896 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1891 "bison_parser.cpp" /* yacc.c:1257 */ break; case 187: /* truncate_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).delete_stmt)); } -#line 1902 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1897 "bison_parser.cpp" /* yacc.c:1257 */ break; case 188: /* insert_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).insert_stmt)); } -#line 1908 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1903 "bison_parser.cpp" /* yacc.c:1257 */ break; case 189: /* opt_column_list */ @@ -1917,13 +1912,13 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 1921 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1916 "bison_parser.cpp" /* yacc.c:1257 */ break; case 190: /* update_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_stmt)); } -#line 1927 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1922 "bison_parser.cpp" /* yacc.c:1257 */ break; case 191: /* update_clause_commalist */ @@ -1936,49 +1931,49 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).update_vec)); } -#line 1940 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1935 "bison_parser.cpp" /* yacc.c:1257 */ break; case 192: /* update_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).update_t)); } -#line 1946 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1941 "bison_parser.cpp" /* yacc.c:1257 */ break; case 193: /* select_statement */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1952 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1947 "bison_parser.cpp" /* yacc.c:1257 */ break; case 194: /* select_with_paren */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1958 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1953 "bison_parser.cpp" /* yacc.c:1257 */ break; case 195: /* select_paren_or_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1964 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1959 "bison_parser.cpp" /* yacc.c:1257 */ break; case 196: /* select_no_paren */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1970 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1965 "bison_parser.cpp" /* yacc.c:1257 */ break; case 200: /* select_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).select_stmt)); } -#line 1976 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1971 "bison_parser.cpp" /* yacc.c:1257 */ break; case 201: /* opt_distinct */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 1982 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1977 "bison_parser.cpp" /* yacc.c:1257 */ break; case 202: /* select_list */ @@ -1991,37 +1986,37 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 1995 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1990 "bison_parser.cpp" /* yacc.c:1257 */ break; case 203: /* opt_from_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2001 "bison_parser.cpp" /* yacc.c:1257 */ +#line 1996 "bison_parser.cpp" /* yacc.c:1257 */ break; case 204: /* from_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2007 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2002 "bison_parser.cpp" /* yacc.c:1257 */ break; case 205: /* opt_where */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2013 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2008 "bison_parser.cpp" /* yacc.c:1257 */ break; case 206: /* opt_group */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).group_t)); } -#line 2019 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2014 "bison_parser.cpp" /* yacc.c:1257 */ break; case 207: /* opt_having */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2025 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2020 "bison_parser.cpp" /* yacc.c:1257 */ break; case 208: /* opt_order */ @@ -2034,7 +2029,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 2038 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2033 "bison_parser.cpp" /* yacc.c:1257 */ break; case 209: /* order_list */ @@ -2047,31 +2042,31 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).order_vec)); } -#line 2051 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2046 "bison_parser.cpp" /* yacc.c:1257 */ break; case 210: /* order_desc */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).order)); } -#line 2057 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2052 "bison_parser.cpp" /* yacc.c:1257 */ break; case 211: /* opt_order_type */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2063 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2058 "bison_parser.cpp" /* yacc.c:1257 */ break; case 212: /* opt_top */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 2069 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2064 "bison_parser.cpp" /* yacc.c:1257 */ break; case 213: /* opt_limit */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).limit)); } -#line 2075 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2070 "bison_parser.cpp" /* yacc.c:1257 */ break; case 214: /* expr_list */ @@ -2084,7 +2079,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2088 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2083 "bison_parser.cpp" /* yacc.c:1257 */ break; case 215: /* opt_literal_list */ @@ -2097,7 +2092,7 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2101 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2096 "bison_parser.cpp" /* yacc.c:1257 */ break; case 216: /* literal_list */ @@ -2110,181 +2105,181 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).expr_vec)); } -#line 2114 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2109 "bison_parser.cpp" /* yacc.c:1257 */ break; case 217: /* expr_alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2120 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2115 "bison_parser.cpp" /* yacc.c:1257 */ break; case 218: /* expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2126 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2121 "bison_parser.cpp" /* yacc.c:1257 */ break; case 219: /* operand */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2132 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2127 "bison_parser.cpp" /* yacc.c:1257 */ break; case 220: /* scalar_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2138 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2133 "bison_parser.cpp" /* yacc.c:1257 */ break; case 221: /* unary_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2144 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2139 "bison_parser.cpp" /* yacc.c:1257 */ break; case 222: /* binary_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2150 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2145 "bison_parser.cpp" /* yacc.c:1257 */ break; case 223: /* logic_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2156 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2151 "bison_parser.cpp" /* yacc.c:1257 */ break; case 224: /* in_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2162 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2157 "bison_parser.cpp" /* yacc.c:1257 */ break; case 225: /* case_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2168 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2163 "bison_parser.cpp" /* yacc.c:1257 */ break; case 226: /* case_list */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2174 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2169 "bison_parser.cpp" /* yacc.c:1257 */ break; case 227: /* exists_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2180 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2175 "bison_parser.cpp" /* yacc.c:1257 */ break; case 228: /* comp_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2186 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2181 "bison_parser.cpp" /* yacc.c:1257 */ break; case 229: /* function_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2192 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2187 "bison_parser.cpp" /* yacc.c:1257 */ break; case 230: /* extract_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2198 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2193 "bison_parser.cpp" /* yacc.c:1257 */ break; case 231: /* datetime_field */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2204 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2199 "bison_parser.cpp" /* yacc.c:1257 */ break; case 232: /* array_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2210 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2205 "bison_parser.cpp" /* yacc.c:1257 */ break; case 233: /* array_index */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2216 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2211 "bison_parser.cpp" /* yacc.c:1257 */ break; case 234: /* between_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2222 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2217 "bison_parser.cpp" /* yacc.c:1257 */ break; case 235: /* column_name */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2228 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2223 "bison_parser.cpp" /* yacc.c:1257 */ break; case 236: /* literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2234 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2229 "bison_parser.cpp" /* yacc.c:1257 */ break; case 237: /* string_literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2240 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2235 "bison_parser.cpp" /* yacc.c:1257 */ break; case 238: /* bool_literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2246 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2241 "bison_parser.cpp" /* yacc.c:1257 */ break; case 239: /* num_literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2252 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2247 "bison_parser.cpp" /* yacc.c:1257 */ break; case 240: /* int_literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2258 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2253 "bison_parser.cpp" /* yacc.c:1257 */ break; case 241: /* null_literal */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2264 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2259 "bison_parser.cpp" /* yacc.c:1257 */ break; case 242: /* param_expr */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2270 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2265 "bison_parser.cpp" /* yacc.c:1257 */ break; case 243: /* table_ref */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2276 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2271 "bison_parser.cpp" /* yacc.c:1257 */ break; case 244: /* table_ref_atomic */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2282 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2277 "bison_parser.cpp" /* yacc.c:1257 */ break; case 245: /* nonjoin_table_ref_atomic */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2288 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2283 "bison_parser.cpp" /* yacc.c:1257 */ break; case 246: /* table_ref_commalist */ @@ -2297,91 +2292,91 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).table_vec)); } -#line 2301 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2296 "bison_parser.cpp" /* yacc.c:1257 */ break; case 247: /* table_ref_name */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2307 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2302 "bison_parser.cpp" /* yacc.c:1257 */ break; case 248: /* table_ref_name_no_alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2313 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2308 "bison_parser.cpp" /* yacc.c:1257 */ break; case 249: /* table_name */ #line 144 "bison_parser.y" /* yacc.c:1257 */ { free( (((*yyvaluep).table_name).name) ); free( (((*yyvaluep).table_name).schema) ); } -#line 2319 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2314 "bison_parser.cpp" /* yacc.c:1257 */ break; case 250: /* table_alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).alias_t)); } -#line 2325 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2320 "bison_parser.cpp" /* yacc.c:1257 */ break; case 251: /* opt_table_alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).alias_t)); } -#line 2331 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2326 "bison_parser.cpp" /* yacc.c:1257 */ break; case 252: /* alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).alias_t)); } -#line 2337 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2332 "bison_parser.cpp" /* yacc.c:1257 */ break; case 253: /* opt_alias */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).alias_t)); } -#line 2343 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2338 "bison_parser.cpp" /* yacc.c:1257 */ break; case 254: /* opt_with_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).with_description_vec)); } -#line 2349 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2344 "bison_parser.cpp" /* yacc.c:1257 */ break; case 255: /* with_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).with_description_vec)); } -#line 2355 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2350 "bison_parser.cpp" /* yacc.c:1257 */ break; case 256: /* with_description_list */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).with_description_vec)); } -#line 2361 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2356 "bison_parser.cpp" /* yacc.c:1257 */ break; case 257: /* with_description */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).with_description_t)); } -#line 2367 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2362 "bison_parser.cpp" /* yacc.c:1257 */ break; case 258: /* join_clause */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).table)); } -#line 2373 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2368 "bison_parser.cpp" /* yacc.c:1257 */ break; case 259: /* opt_join_type */ #line 143 "bison_parser.y" /* yacc.c:1257 */ { } -#line 2379 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2374 "bison_parser.cpp" /* yacc.c:1257 */ break; case 260: /* join_condition */ #line 154 "bison_parser.y" /* yacc.c:1257 */ { delete (((*yyvaluep).expr)); } -#line 2385 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2380 "bison_parser.cpp" /* yacc.c:1257 */ break; case 262: /* ident_commalist */ @@ -2394,10 +2389,9 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio } delete (((*yyvaluep).str_vec)); } -#line 2398 "bison_parser.cpp" /* yacc.c:1257 */ +#line 2393 "bison_parser.cpp" /* yacc.c:1257 */ break; - default: break; } @@ -2502,7 +2496,7 @@ YYLTYPE yylloc = yyloc_default; yychar = YYEMPTY; /* Cause a token to be read. */ /* User initialization code. */ -#line 73 "bison_parser.y" /* yacc.c:1429 */ +#line 73 "bison_parser.y" /* yacc.c:1431 */ { // Initialize yylloc.first_column = 0; @@ -2513,27 +2507,35 @@ YYLTYPE yylloc = yyloc_default; yylloc.string_length = 0; } -#line 2517 "bison_parser.cpp" /* yacc.c:1429 */ +#line 2511 "bison_parser.cpp" /* yacc.c:1431 */ yylsp[0] = yylloc; goto yysetstate; + /*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | +| yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ - yynewstate: +yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; - yysetstate: - *yyssp = yystate; + +/*--------------------------------------------------------------------. +| yynewstate -- set current state (the top of the stack) to yystate. | +`--------------------------------------------------------------------*/ +yysetstate: + *yyssp = (yytype_int16) yystate; if (yyss + yystacksize - 1 <= yyssp) +#if !defined yyoverflow && !defined YYSTACK_RELOCATE + goto yyexhaustedlab; +#else { /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); -#ifdef yyoverflow +# if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into @@ -2551,15 +2553,11 @@ YYLTYPE yylloc = yyloc_default; &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); - - yyls = yyls1; yyss = yyss1; yyvs = yyvs1; + yyls = yyls1; } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else +# else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; @@ -2576,23 +2574,23 @@ YYLTYPE yylloc = yyloc_default; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif -#endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } +#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -2601,11 +2599,11 @@ YYLTYPE yylloc = yyloc_default; goto yybackup; + /*-----------. | yybackup. | `-----------*/ yybackup: - /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ @@ -2678,7 +2676,7 @@ yydefault: /*-----------------------------. -| yyreduce -- Do a reduction. | +| yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ @@ -2694,13 +2692,14 @@ yyreduce: GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; - /* Default location. */ + /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + yyerror_range[1] = yyloc; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: -#line 258 "bison_parser.y" /* yacc.c:1646 */ +#line 258 "bison_parser.y" /* yacc.c:1652 */ { for (SQLStatement* stmt : *(yyvsp[-1].stmt_vec)) { // Transfers ownership of the statement. @@ -2718,226 +2717,226 @@ yyreduce: } delete (yyvsp[-1].stmt_vec); } -#line 2722 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2721 "bison_parser.cpp" /* yacc.c:1652 */ break; case 3: -#line 279 "bison_parser.y" /* yacc.c:1646 */ +#line 279 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[0].statement)->stringLength = yylloc.string_length; yylloc.string_length = 0; (yyval.stmt_vec) = new std::vector(); (yyval.stmt_vec)->push_back((yyvsp[0].statement)); } -#line 2733 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2732 "bison_parser.cpp" /* yacc.c:1652 */ break; case 4: -#line 285 "bison_parser.y" /* yacc.c:1646 */ +#line 285 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[0].statement)->stringLength = yylloc.string_length; yylloc.string_length = 0; (yyvsp[-2].stmt_vec)->push_back((yyvsp[0].statement)); (yyval.stmt_vec) = (yyvsp[-2].stmt_vec); } -#line 2744 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2743 "bison_parser.cpp" /* yacc.c:1652 */ break; case 5: -#line 294 "bison_parser.y" /* yacc.c:1646 */ +#line 294 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[-1].prep_stmt); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2753 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2752 "bison_parser.cpp" /* yacc.c:1652 */ break; case 6: -#line 298 "bison_parser.y" /* yacc.c:1646 */ +#line 298 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[-1].statement); (yyval.statement)->hints = (yyvsp[0].expr_vec); } -#line 2762 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2761 "bison_parser.cpp" /* yacc.c:1652 */ break; case 7: -#line 302 "bison_parser.y" /* yacc.c:1646 */ +#line 302 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].show_stmt); } -#line 2770 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2769 "bison_parser.cpp" /* yacc.c:1652 */ break; case 8: -#line 309 "bison_parser.y" /* yacc.c:1646 */ +#line 309 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].select_stmt); } -#line 2776 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2775 "bison_parser.cpp" /* yacc.c:1652 */ break; case 9: -#line 310 "bison_parser.y" /* yacc.c:1646 */ +#line 310 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].import_stmt); } -#line 2782 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2781 "bison_parser.cpp" /* yacc.c:1652 */ break; case 10: -#line 311 "bison_parser.y" /* yacc.c:1646 */ +#line 311 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].create_stmt); } -#line 2788 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2787 "bison_parser.cpp" /* yacc.c:1652 */ break; case 11: -#line 312 "bison_parser.y" /* yacc.c:1646 */ +#line 312 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].insert_stmt); } -#line 2794 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2793 "bison_parser.cpp" /* yacc.c:1652 */ break; case 12: -#line 313 "bison_parser.y" /* yacc.c:1646 */ +#line 313 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2800 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2799 "bison_parser.cpp" /* yacc.c:1652 */ break; case 13: -#line 314 "bison_parser.y" /* yacc.c:1646 */ +#line 314 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].delete_stmt); } -#line 2806 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2805 "bison_parser.cpp" /* yacc.c:1652 */ break; case 14: -#line 315 "bison_parser.y" /* yacc.c:1646 */ +#line 315 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].update_stmt); } -#line 2812 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2811 "bison_parser.cpp" /* yacc.c:1652 */ break; case 15: -#line 316 "bison_parser.y" /* yacc.c:1646 */ +#line 316 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].drop_stmt); } -#line 2818 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2817 "bison_parser.cpp" /* yacc.c:1652 */ break; case 16: -#line 317 "bison_parser.y" /* yacc.c:1646 */ +#line 317 "bison_parser.y" /* yacc.c:1652 */ { (yyval.statement) = (yyvsp[0].exec_stmt); } -#line 2824 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2823 "bison_parser.cpp" /* yacc.c:1652 */ break; case 17: -#line 326 "bison_parser.y" /* yacc.c:1646 */ +#line 326 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr_vec) = (yyvsp[-1].expr_vec); } -#line 2830 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2829 "bison_parser.cpp" /* yacc.c:1652 */ break; case 18: -#line 327 "bison_parser.y" /* yacc.c:1646 */ +#line 327 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr_vec) = nullptr; } -#line 2836 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2835 "bison_parser.cpp" /* yacc.c:1652 */ break; case 19: -#line 332 "bison_parser.y" /* yacc.c:1646 */ +#line 332 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 2842 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2841 "bison_parser.cpp" /* yacc.c:1652 */ break; case 20: -#line 333 "bison_parser.y" /* yacc.c:1646 */ +#line 333 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 2848 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2847 "bison_parser.cpp" /* yacc.c:1652 */ break; case 21: -#line 337 "bison_parser.y" /* yacc.c:1646 */ +#line 337 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[0].sval); } -#line 2857 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2856 "bison_parser.cpp" /* yacc.c:1652 */ break; case 22: -#line 341 "bison_parser.y" /* yacc.c:1646 */ +#line 341 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = Expr::make(kExprHint); (yyval.expr)->name = (yyvsp[-3].sval); (yyval.expr)->exprList = (yyvsp[-1].expr_vec); } -#line 2867 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2866 "bison_parser.cpp" /* yacc.c:1652 */ break; case 23: -#line 353 "bison_parser.y" /* yacc.c:1646 */ +#line 353 "bison_parser.y" /* yacc.c:1652 */ { (yyval.prep_stmt) = new PrepareStatement(); (yyval.prep_stmt)->name = (yyvsp[-2].sval); (yyval.prep_stmt)->query = (yyvsp[0].sval); } -#line 2877 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2876 "bison_parser.cpp" /* yacc.c:1652 */ break; case 25: -#line 363 "bison_parser.y" /* yacc.c:1646 */ +#line 363 "bison_parser.y" /* yacc.c:1652 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[0].sval); } -#line 2886 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2885 "bison_parser.cpp" /* yacc.c:1652 */ break; case 26: -#line 367 "bison_parser.y" /* yacc.c:1646 */ +#line 367 "bison_parser.y" /* yacc.c:1652 */ { (yyval.exec_stmt) = new ExecuteStatement(); (yyval.exec_stmt)->name = (yyvsp[-3].sval); (yyval.exec_stmt)->parameters = (yyvsp[-1].expr_vec); } -#line 2896 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2895 "bison_parser.cpp" /* yacc.c:1652 */ break; case 27: -#line 379 "bison_parser.y" /* yacc.c:1646 */ +#line 379 "bison_parser.y" /* yacc.c:1652 */ { (yyval.import_stmt) = new ImportStatement((ImportType) (yyvsp[-4].uval)); (yyval.import_stmt)->filePath = (yyvsp[-2].sval); (yyval.import_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.import_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 2907 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2906 "bison_parser.cpp" /* yacc.c:1652 */ break; case 28: -#line 388 "bison_parser.y" /* yacc.c:1646 */ +#line 388 "bison_parser.y" /* yacc.c:1652 */ { (yyval.uval) = kImportCSV; } -#line 2913 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2912 "bison_parser.cpp" /* yacc.c:1652 */ break; case 29: -#line 392 "bison_parser.y" /* yacc.c:1646 */ +#line 392 "bison_parser.y" /* yacc.c:1652 */ { (yyval.sval) = strdup((yyvsp[0].expr)->name); delete (yyvsp[0].expr); } -#line 2919 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2918 "bison_parser.cpp" /* yacc.c:1652 */ break; case 30: -#line 402 "bison_parser.y" /* yacc.c:1646 */ +#line 402 "bison_parser.y" /* yacc.c:1652 */ { (yyval.show_stmt) = new ShowStatement(kShowTables); } -#line 2927 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2926 "bison_parser.cpp" /* yacc.c:1652 */ break; case 31: -#line 405 "bison_parser.y" /* yacc.c:1646 */ +#line 405 "bison_parser.y" /* yacc.c:1652 */ { (yyval.show_stmt) = new ShowStatement(kShowColumns); (yyval.show_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.show_stmt)->name = (yyvsp[0].table_name).name; } -#line 2937 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2936 "bison_parser.cpp" /* yacc.c:1652 */ break; case 32: -#line 419 "bison_parser.y" /* yacc.c:1646 */ +#line 419 "bison_parser.y" /* yacc.c:1652 */ { (yyval.create_stmt) = new CreateStatement(kCreateTableFromTbl); (yyval.create_stmt)->ifNotExists = (yyvsp[-5].bval); @@ -2945,11 +2944,11 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-4].table_name).name; (yyval.create_stmt)->filePath = (yyvsp[0].sval); } -#line 2949 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2948 "bison_parser.cpp" /* yacc.c:1652 */ break; case 33: -#line 426 "bison_parser.y" /* yacc.c:1646 */ +#line 426 "bison_parser.y" /* yacc.c:1652 */ { (yyval.create_stmt) = new CreateStatement(kCreateTable); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -2957,11 +2956,23 @@ yyreduce: (yyval.create_stmt)->tableName = (yyvsp[-3].table_name).name; (yyval.create_stmt)->columns = (yyvsp[-1].column_vec); } -#line 2961 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2960 "bison_parser.cpp" /* yacc.c:1652 */ break; case 34: -#line 433 "bison_parser.y" /* yacc.c:1646 */ +#line 433 "bison_parser.y" /* yacc.c:1652 */ + { + (yyval.create_stmt) = new CreateStatement(kCreateTable); + (yyval.create_stmt)->ifNotExists = (yyvsp[-3].bval); + (yyval.create_stmt)->schema = (yyvsp[-2].table_name).schema; + (yyval.create_stmt)->tableName = (yyvsp[-2].table_name).name; + (yyval.create_stmt)->select = (yyvsp[0].select_stmt); + } +#line 2972 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 35: +#line 440 "bison_parser.y" /* yacc.c:1652 */ { (yyval.create_stmt) = new CreateStatement(kCreateView); (yyval.create_stmt)->ifNotExists = (yyvsp[-4].bval); @@ -2970,174 +2981,174 @@ yyreduce: (yyval.create_stmt)->viewColumns = (yyvsp[-2].str_vec); (yyval.create_stmt)->select = (yyvsp[0].select_stmt); } -#line 2974 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 35: -#line 444 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 2980 "bison_parser.cpp" /* yacc.c:1646 */ +#line 2985 "bison_parser.cpp" /* yacc.c:1652 */ break; case 36: -#line 445 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 2986 "bison_parser.cpp" /* yacc.c:1646 */ +#line 451 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = true; } +#line 2991 "bison_parser.cpp" /* yacc.c:1652 */ break; case 37: -#line 449 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } -#line 2992 "bison_parser.cpp" /* yacc.c:1646 */ +#line 452 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = false; } +#line 2997 "bison_parser.cpp" /* yacc.c:1652 */ break; case 38: -#line 450 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } -#line 2998 "bison_parser.cpp" /* yacc.c:1646 */ +#line 456 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_vec) = new std::vector(); (yyval.column_vec)->push_back((yyvsp[0].column_t)); } +#line 3003 "bison_parser.cpp" /* yacc.c:1652 */ break; case 39: -#line 454 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); - } -#line 3006 "bison_parser.cpp" /* yacc.c:1646 */ +#line 457 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].column_vec)->push_back((yyvsp[0].column_t)); (yyval.column_vec) = (yyvsp[-2].column_vec); } +#line 3009 "bison_parser.cpp" /* yacc.c:1652 */ break; case 40: -#line 460 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3012 "bison_parser.cpp" /* yacc.c:1646 */ +#line 461 "bison_parser.y" /* yacc.c:1652 */ + { + (yyval.column_t) = new ColumnDefinition((yyvsp[-2].sval), (yyvsp[-1].column_type_t), (yyvsp[0].bval)); + } +#line 3017 "bison_parser.cpp" /* yacc.c:1652 */ break; case 41: -#line 461 "bison_parser.y" /* yacc.c:1646 */ +#line 467 "bison_parser.y" /* yacc.c:1652 */ { (yyval.column_type_t) = ColumnType{DataType::INT}; } -#line 3018 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3023 "bison_parser.cpp" /* yacc.c:1652 */ break; case 42: -#line 462 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::LONG}; } -#line 3024 "bison_parser.cpp" /* yacc.c:1646 */ +#line 468 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::INT}; } +#line 3029 "bison_parser.cpp" /* yacc.c:1652 */ break; case 43: -#line 463 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } -#line 3030 "bison_parser.cpp" /* yacc.c:1646 */ +#line 469 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::LONG}; } +#line 3035 "bison_parser.cpp" /* yacc.c:1652 */ break; case 44: -#line 464 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } -#line 3036 "bison_parser.cpp" /* yacc.c:1646 */ +#line 470 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::FLOAT}; } +#line 3041 "bison_parser.cpp" /* yacc.c:1652 */ break; case 45: -#line 465 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } -#line 3042 "bison_parser.cpp" /* yacc.c:1646 */ +#line 471 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::DOUBLE}; } +#line 3047 "bison_parser.cpp" /* yacc.c:1652 */ break; case 46: -#line 466 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } -#line 3048 "bison_parser.cpp" /* yacc.c:1646 */ +#line 472 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::VARCHAR, (yyvsp[-1].ival)}; } +#line 3053 "bison_parser.cpp" /* yacc.c:1652 */ break; case 47: -#line 467 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } -#line 3054 "bison_parser.cpp" /* yacc.c:1646 */ +#line 473 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::CHAR, (yyvsp[-1].ival)}; } +#line 3059 "bison_parser.cpp" /* yacc.c:1652 */ break; case 48: -#line 471 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 3060 "bison_parser.cpp" /* yacc.c:1646 */ +#line 474 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.column_type_t) = ColumnType{DataType::TEXT}; } +#line 3065 "bison_parser.cpp" /* yacc.c:1652 */ break; case 49: -#line 472 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3066 "bison_parser.cpp" /* yacc.c:1646 */ +#line 478 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = true; } +#line 3071 "bison_parser.cpp" /* yacc.c:1652 */ break; case 50: -#line 473 "bison_parser.y" /* yacc.c:1646 */ +#line 479 "bison_parser.y" /* yacc.c:1652 */ { (yyval.bval) = false; } -#line 3072 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3077 "bison_parser.cpp" /* yacc.c:1652 */ break; case 51: -#line 483 "bison_parser.y" /* yacc.c:1646 */ +#line 480 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = false; } +#line 3083 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 52: +#line 490 "bison_parser.y" /* yacc.c:1652 */ { (yyval.drop_stmt) = new DropStatement(kDropTable); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3083 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3094 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 52: -#line 489 "bison_parser.y" /* yacc.c:1646 */ + case 53: +#line 496 "bison_parser.y" /* yacc.c:1652 */ { (yyval.drop_stmt) = new DropStatement(kDropView); (yyval.drop_stmt)->ifExists = (yyvsp[-1].bval); (yyval.drop_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.drop_stmt)->name = (yyvsp[0].table_name).name; } -#line 3094 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3105 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 53: -#line 495 "bison_parser.y" /* yacc.c:1646 */ + case 54: +#line 502 "bison_parser.y" /* yacc.c:1652 */ { (yyval.drop_stmt) = new DropStatement(kDropPreparedStatement); (yyval.drop_stmt)->ifExists = false; (yyval.drop_stmt)->name = (yyvsp[0].sval); } -#line 3104 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 503 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 3110 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3115 "bison_parser.cpp" /* yacc.c:1652 */ break; case 55: -#line 504 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3116 "bison_parser.cpp" /* yacc.c:1646 */ +#line 510 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = true; } +#line 3121 "bison_parser.cpp" /* yacc.c:1652 */ break; case 56: -#line 513 "bison_parser.y" /* yacc.c:1646 */ +#line 511 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = false; } +#line 3127 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 57: +#line 520 "bison_parser.y" /* yacc.c:1652 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[-1].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[-1].table_name).name; (yyval.delete_stmt)->expr = (yyvsp[0].expr); } -#line 3127 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3138 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 57: -#line 522 "bison_parser.y" /* yacc.c:1646 */ + case 58: +#line 529 "bison_parser.y" /* yacc.c:1652 */ { (yyval.delete_stmt) = new DeleteStatement(); (yyval.delete_stmt)->schema = (yyvsp[0].table_name).schema; (yyval.delete_stmt)->tableName = (yyvsp[0].table_name).name; } -#line 3137 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3148 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 58: -#line 535 "bison_parser.y" /* yacc.c:1646 */ + case 59: +#line 542 "bison_parser.y" /* yacc.c:1652 */ { (yyval.insert_stmt) = new InsertStatement(kInsertValues); (yyval.insert_stmt)->schema = (yyvsp[-5].table_name).schema; @@ -3145,11 +3156,11 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-4].str_vec); (yyval.insert_stmt)->values = (yyvsp[-1].expr_vec); } -#line 3149 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3160 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 59: -#line 542 "bison_parser.y" /* yacc.c:1646 */ + case 60: +#line 549 "bison_parser.y" /* yacc.c:1652 */ { (yyval.insert_stmt) = new InsertStatement(kInsertSelect); (yyval.insert_stmt)->schema = (yyvsp[-2].table_name).schema; @@ -3157,74 +3168,74 @@ yyreduce: (yyval.insert_stmt)->columns = (yyvsp[-1].str_vec); (yyval.insert_stmt)->select = (yyvsp[0].select_stmt); } -#line 3161 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 60: -#line 553 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = (yyvsp[-1].str_vec); } -#line 3167 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3172 "bison_parser.cpp" /* yacc.c:1652 */ break; case 61: -#line 554 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = nullptr; } -#line 3173 "bison_parser.cpp" /* yacc.c:1646 */ +#line 560 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.str_vec) = (yyvsp[-1].str_vec); } +#line 3178 "bison_parser.cpp" /* yacc.c:1652 */ break; case 62: -#line 564 "bison_parser.y" /* yacc.c:1646 */ +#line 561 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.str_vec) = nullptr; } +#line 3184 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 63: +#line 571 "bison_parser.y" /* yacc.c:1652 */ { (yyval.update_stmt) = new UpdateStatement(); (yyval.update_stmt)->table = (yyvsp[-3].table); (yyval.update_stmt)->updates = (yyvsp[-1].update_vec); (yyval.update_stmt)->where = (yyvsp[0].expr); } -#line 3184 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 63: -#line 573 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } -#line 3190 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3195 "bison_parser.cpp" /* yacc.c:1652 */ break; case 64: -#line 574 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } -#line 3196 "bison_parser.cpp" /* yacc.c:1646 */ +#line 580 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.update_vec) = new std::vector(); (yyval.update_vec)->push_back((yyvsp[0].update_t)); } +#line 3201 "bison_parser.cpp" /* yacc.c:1652 */ break; case 65: -#line 578 "bison_parser.y" /* yacc.c:1646 */ +#line 581 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].update_vec)->push_back((yyvsp[0].update_t)); (yyval.update_vec) = (yyvsp[-2].update_vec); } +#line 3207 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 66: +#line 585 "bison_parser.y" /* yacc.c:1652 */ { (yyval.update_t) = new UpdateClause(); (yyval.update_t)->column = (yyvsp[-2].sval); (yyval.update_t)->value = (yyvsp[0].expr); } -#line 3206 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 66: -#line 590 "bison_parser.y" /* yacc.c:1646 */ - { - (yyval.select_stmt) = (yyvsp[0].select_stmt); - (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); - } -#line 3215 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3217 "bison_parser.cpp" /* yacc.c:1652 */ break; case 67: -#line 594 "bison_parser.y" /* yacc.c:1646 */ +#line 597 "bison_parser.y" /* yacc.c:1652 */ { (yyval.select_stmt) = (yyvsp[0].select_stmt); (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); } -#line 3224 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3226 "bison_parser.cpp" /* yacc.c:1652 */ break; case 68: -#line 598 "bison_parser.y" /* yacc.c:1646 */ +#line 601 "bison_parser.y" /* yacc.c:1652 */ + { + (yyval.select_stmt) = (yyvsp[0].select_stmt); + (yyval.select_stmt)->withDescriptions = (yyvsp[-1].with_description_vec); + } +#line 3235 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 69: +#line 605 "bison_parser.y" /* yacc.c:1652 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3240,23 +3251,23 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3244 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 69: -#line 616 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3250 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3255 "bison_parser.cpp" /* yacc.c:1652 */ break; case 70: -#line 617 "bison_parser.y" /* yacc.c:1646 */ +#line 623 "bison_parser.y" /* yacc.c:1652 */ { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } -#line 3256 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3261 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 73: -#line 626 "bison_parser.y" /* yacc.c:1646 */ + case 71: +#line 624 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.select_stmt) = (yyvsp[-1].select_stmt); } +#line 3267 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 74: +#line 633 "bison_parser.y" /* yacc.c:1652 */ { (yyval.select_stmt) = (yyvsp[-2].select_stmt); (yyval.select_stmt)->order = (yyvsp[-1].order_vec); @@ -3267,11 +3278,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3271 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3282 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 74: -#line 636 "bison_parser.y" /* yacc.c:1646 */ + case 75: +#line 643 "bison_parser.y" /* yacc.c:1652 */ { // TODO: allow multiple unions (through linked list) // TODO: capture type of set_operator @@ -3286,11 +3297,11 @@ yyreduce: (yyval.select_stmt)->limit = (yyvsp[0].limit); } } -#line 3290 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3301 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 81: -#line 668 "bison_parser.y" /* yacc.c:1646 */ + case 82: +#line 675 "bison_parser.y" /* yacc.c:1652 */ { (yyval.select_stmt) = new SelectStatement(); (yyval.select_stmt)->limit = (yyvsp[-5].limit); @@ -3300,213 +3311,213 @@ yyreduce: (yyval.select_stmt)->whereClause = (yyvsp[-1].expr); (yyval.select_stmt)->groupBy = (yyvsp[0].group_t); } -#line 3304 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 82: -#line 680 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = true; } -#line 3310 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3315 "bison_parser.cpp" /* yacc.c:1652 */ break; case 83: -#line 681 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.bval) = false; } -#line 3316 "bison_parser.cpp" /* yacc.c:1646 */ +#line 687 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = true; } +#line 3321 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 85: -#line 689 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3322 "bison_parser.cpp" /* yacc.c:1646 */ + case 84: +#line 688 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.bval) = false; } +#line 3327 "bison_parser.cpp" /* yacc.c:1652 */ break; case 86: -#line 690 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = nullptr; } -#line 3328 "bison_parser.cpp" /* yacc.c:1646 */ +#line 696 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3333 "bison_parser.cpp" /* yacc.c:1652 */ break; case 87: -#line 693 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table) = (yyvsp[0].table); } -#line 3334 "bison_parser.cpp" /* yacc.c:1646 */ +#line 697 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.table) = nullptr; } +#line 3339 "bison_parser.cpp" /* yacc.c:1652 */ break; case 88: -#line 698 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3340 "bison_parser.cpp" /* yacc.c:1646 */ +#line 700 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.table) = (yyvsp[0].table); } +#line 3345 "bison_parser.cpp" /* yacc.c:1652 */ break; case 89: -#line 699 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3346 "bison_parser.cpp" /* yacc.c:1646 */ +#line 705 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3351 "bison_parser.cpp" /* yacc.c:1652 */ break; case 90: -#line 703 "bison_parser.y" /* yacc.c:1646 */ +#line 706 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = nullptr; } +#line 3357 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 91: +#line 710 "bison_parser.y" /* yacc.c:1652 */ { (yyval.group_t) = new GroupByDescription(); (yyval.group_t)->columns = (yyvsp[-1].expr_vec); (yyval.group_t)->having = (yyvsp[0].expr); } -#line 3356 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 91: -#line 708 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.group_t) = nullptr; } -#line 3362 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3367 "bison_parser.cpp" /* yacc.c:1652 */ break; case 92: -#line 712 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = (yyvsp[0].expr); } -#line 3368 "bison_parser.cpp" /* yacc.c:1646 */ +#line 715 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.group_t) = nullptr; } +#line 3373 "bison_parser.cpp" /* yacc.c:1652 */ break; case 93: -#line 713 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = nullptr; } -#line 3374 "bison_parser.cpp" /* yacc.c:1646 */ +#line 719 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = (yyvsp[0].expr); } +#line 3379 "bison_parser.cpp" /* yacc.c:1652 */ break; case 94: -#line 716 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = (yyvsp[0].order_vec); } -#line 3380 "bison_parser.cpp" /* yacc.c:1646 */ +#line 720 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = nullptr; } +#line 3385 "bison_parser.cpp" /* yacc.c:1652 */ break; case 95: -#line 717 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = nullptr; } -#line 3386 "bison_parser.cpp" /* yacc.c:1646 */ +#line 723 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_vec) = (yyvsp[0].order_vec); } +#line 3391 "bison_parser.cpp" /* yacc.c:1652 */ break; case 96: -#line 721 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } -#line 3392 "bison_parser.cpp" /* yacc.c:1646 */ +#line 724 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_vec) = nullptr; } +#line 3397 "bison_parser.cpp" /* yacc.c:1652 */ break; case 97: -#line 722 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } -#line 3398 "bison_parser.cpp" /* yacc.c:1646 */ +#line 728 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_vec) = new std::vector(); (yyval.order_vec)->push_back((yyvsp[0].order)); } +#line 3403 "bison_parser.cpp" /* yacc.c:1652 */ break; case 98: -#line 726 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } -#line 3404 "bison_parser.cpp" /* yacc.c:1646 */ +#line 729 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].order_vec)->push_back((yyvsp[0].order)); (yyval.order_vec) = (yyvsp[-2].order_vec); } +#line 3409 "bison_parser.cpp" /* yacc.c:1652 */ break; case 99: -#line 730 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3410 "bison_parser.cpp" /* yacc.c:1646 */ +#line 733 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order) = new OrderDescription((yyvsp[0].order_type), (yyvsp[-1].expr)); } +#line 3415 "bison_parser.cpp" /* yacc.c:1652 */ break; case 100: -#line 731 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderDesc; } -#line 3416 "bison_parser.cpp" /* yacc.c:1646 */ +#line 737 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_type) = kOrderAsc; } +#line 3421 "bison_parser.cpp" /* yacc.c:1652 */ break; case 101: -#line 732 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.order_type) = kOrderAsc; } -#line 3422 "bison_parser.cpp" /* yacc.c:1646 */ +#line 738 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_type) = kOrderDesc; } +#line 3427 "bison_parser.cpp" /* yacc.c:1652 */ break; case 102: -#line 738 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3428 "bison_parser.cpp" /* yacc.c:1646 */ +#line 739 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.order_type) = kOrderAsc; } +#line 3433 "bison_parser.cpp" /* yacc.c:1652 */ break; case 103: -#line 739 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3434 "bison_parser.cpp" /* yacc.c:1646 */ +#line 745 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3439 "bison_parser.cpp" /* yacc.c:1652 */ break; case 104: -#line 743 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } -#line 3440 "bison_parser.cpp" /* yacc.c:1646 */ +#line 746 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = nullptr; } +#line 3445 "bison_parser.cpp" /* yacc.c:1652 */ break; case 105: -#line 744 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3446 "bison_parser.cpp" /* yacc.c:1646 */ +#line 750 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription((yyvsp[0].expr), nullptr); } +#line 3451 "bison_parser.cpp" /* yacc.c:1652 */ break; case 106: -#line 745 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3452 "bison_parser.cpp" /* yacc.c:1646 */ +#line 751 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3457 "bison_parser.cpp" /* yacc.c:1652 */ break; case 107: -#line 746 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription(nullptr, nullptr); } -#line 3458 "bison_parser.cpp" /* yacc.c:1646 */ +#line 752 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription((yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3463 "bison_parser.cpp" /* yacc.c:1652 */ break; case 108: -#line 747 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } -#line 3464 "bison_parser.cpp" /* yacc.c:1646 */ +#line 753 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription(nullptr, nullptr); } +#line 3469 "bison_parser.cpp" /* yacc.c:1652 */ break; case 109: -#line 748 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.limit) = nullptr; } -#line 3470 "bison_parser.cpp" /* yacc.c:1646 */ +#line 754 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = new LimitDescription(nullptr, (yyvsp[0].expr)); } +#line 3475 "bison_parser.cpp" /* yacc.c:1652 */ break; case 110: -#line 755 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3476 "bison_parser.cpp" /* yacc.c:1646 */ +#line 755 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.limit) = nullptr; } +#line 3481 "bison_parser.cpp" /* yacc.c:1652 */ break; case 111: -#line 756 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3482 "bison_parser.cpp" /* yacc.c:1646 */ +#line 762 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3487 "bison_parser.cpp" /* yacc.c:1652 */ break; case 112: -#line 760 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = (yyvsp[0].expr_vec); } -#line 3488 "bison_parser.cpp" /* yacc.c:1646 */ +#line 763 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3493 "bison_parser.cpp" /* yacc.c:1652 */ break; case 113: -#line 761 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = nullptr; } -#line 3494 "bison_parser.cpp" /* yacc.c:1646 */ +#line 767 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr_vec) = (yyvsp[0].expr_vec); } +#line 3499 "bison_parser.cpp" /* yacc.c:1652 */ break; case 114: -#line 765 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } -#line 3500 "bison_parser.cpp" /* yacc.c:1646 */ +#line 768 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr_vec) = nullptr; } +#line 3505 "bison_parser.cpp" /* yacc.c:1652 */ break; case 115: -#line 766 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } -#line 3506 "bison_parser.cpp" /* yacc.c:1646 */ +#line 772 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr_vec) = new std::vector(); (yyval.expr_vec)->push_back((yyvsp[0].expr)); } +#line 3511 "bison_parser.cpp" /* yacc.c:1652 */ break; case 116: -#line 770 "bison_parser.y" /* yacc.c:1646 */ +#line 773 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].expr_vec)->push_back((yyvsp[0].expr)); (yyval.expr_vec) = (yyvsp[-2].expr_vec); } +#line 3517 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 117: +#line 777 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = (yyvsp[-1].expr); if ((yyvsp[0].alias_t)) { @@ -3514,415 +3525,415 @@ yyreduce: delete (yyvsp[0].alias_t); } } -#line 3518 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3529 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 122: -#line 788 "bison_parser.y" /* yacc.c:1646 */ + case 123: +#line 795 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = (yyvsp[-1].expr); } -#line 3524 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3535 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 131: -#line 797 "bison_parser.y" /* yacc.c:1646 */ + case 132: +#line 804 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = Expr::makeSelect((yyvsp[-1].select_stmt)); } -#line 3530 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 134: -#line 806 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } -#line 3536 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3541 "bison_parser.cpp" /* yacc.c:1652 */ break; case 135: -#line 807 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } -#line 3542 "bison_parser.cpp" /* yacc.c:1646 */ +#line 813 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpUnaryMinus, (yyvsp[0].expr)); } +#line 3547 "bison_parser.cpp" /* yacc.c:1652 */ break; case 136: -#line 808 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } -#line 3548 "bison_parser.cpp" /* yacc.c:1646 */ +#line 814 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, (yyvsp[0].expr)); } +#line 3553 "bison_parser.cpp" /* yacc.c:1652 */ break; case 137: -#line 809 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } -#line 3554 "bison_parser.cpp" /* yacc.c:1646 */ +#line 815 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-1].expr)); } +#line 3559 "bison_parser.cpp" /* yacc.c:1652 */ break; case 138: -#line 810 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } -#line 3560 "bison_parser.cpp" /* yacc.c:1646 */ +#line 816 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpIsNull, (yyvsp[-2].expr)); } +#line 3565 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 140: -#line 815 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } -#line 3566 "bison_parser.cpp" /* yacc.c:1646 */ + case 139: +#line 817 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeOpUnary(kOpIsNull, (yyvsp[-3].expr))); } +#line 3571 "bison_parser.cpp" /* yacc.c:1652 */ break; case 141: -#line 816 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } -#line 3572 "bison_parser.cpp" /* yacc.c:1646 */ +#line 822 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpMinus, (yyvsp[0].expr)); } +#line 3577 "bison_parser.cpp" /* yacc.c:1652 */ break; case 142: -#line 817 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } -#line 3578 "bison_parser.cpp" /* yacc.c:1646 */ +#line 823 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPlus, (yyvsp[0].expr)); } +#line 3583 "bison_parser.cpp" /* yacc.c:1652 */ break; case 143: -#line 818 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } -#line 3584 "bison_parser.cpp" /* yacc.c:1646 */ +#line 824 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpSlash, (yyvsp[0].expr)); } +#line 3589 "bison_parser.cpp" /* yacc.c:1652 */ break; case 144: -#line 819 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } -#line 3590 "bison_parser.cpp" /* yacc.c:1646 */ +#line 825 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAsterisk, (yyvsp[0].expr)); } +#line 3595 "bison_parser.cpp" /* yacc.c:1652 */ break; case 145: -#line 820 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } -#line 3596 "bison_parser.cpp" /* yacc.c:1646 */ +#line 826 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpPercentage, (yyvsp[0].expr)); } +#line 3601 "bison_parser.cpp" /* yacc.c:1652 */ break; case 146: -#line 821 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } -#line 3602 "bison_parser.cpp" /* yacc.c:1646 */ +#line 827 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpCaret, (yyvsp[0].expr)); } +#line 3607 "bison_parser.cpp" /* yacc.c:1652 */ break; case 147: -#line 822 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } -#line 3608 "bison_parser.cpp" /* yacc.c:1646 */ +#line 828 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLike, (yyvsp[0].expr)); } +#line 3613 "bison_parser.cpp" /* yacc.c:1652 */ break; case 148: -#line 823 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } -#line 3614 "bison_parser.cpp" /* yacc.c:1646 */ +#line 829 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-3].expr), kOpNotLike, (yyvsp[0].expr)); } +#line 3619 "bison_parser.cpp" /* yacc.c:1652 */ break; case 149: -#line 824 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } -#line 3620 "bison_parser.cpp" /* yacc.c:1646 */ +#line 830 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpILike, (yyvsp[0].expr)); } +#line 3625 "bison_parser.cpp" /* yacc.c:1652 */ break; case 150: -#line 828 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } -#line 3626 "bison_parser.cpp" /* yacc.c:1646 */ +#line 831 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpConcat, (yyvsp[0].expr)); } +#line 3631 "bison_parser.cpp" /* yacc.c:1652 */ break; case 151: -#line 829 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } -#line 3632 "bison_parser.cpp" /* yacc.c:1646 */ +#line 835 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpAnd, (yyvsp[0].expr)); } +#line 3637 "bison_parser.cpp" /* yacc.c:1652 */ break; case 152: -#line 833 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } -#line 3638 "bison_parser.cpp" /* yacc.c:1646 */ +#line 836 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpOr, (yyvsp[0].expr)); } +#line 3643 "bison_parser.cpp" /* yacc.c:1652 */ break; case 153: -#line 834 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } -#line 3644 "bison_parser.cpp" /* yacc.c:1646 */ +#line 840 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].expr_vec)); } +#line 3649 "bison_parser.cpp" /* yacc.c:1652 */ break; case 154: -#line 835 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } -#line 3650 "bison_parser.cpp" /* yacc.c:1646 */ +#line 841 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].expr_vec))); } +#line 3655 "bison_parser.cpp" /* yacc.c:1652 */ break; case 155: -#line 836 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } -#line 3656 "bison_parser.cpp" /* yacc.c:1646 */ +#line 842 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeInOperator((yyvsp[-4].expr), (yyvsp[-1].select_stmt)); } +#line 3661 "bison_parser.cpp" /* yacc.c:1652 */ break; case 156: -#line 842 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } -#line 3662 "bison_parser.cpp" /* yacc.c:1646 */ +#line 843 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeInOperator((yyvsp[-5].expr), (yyvsp[-1].select_stmt))); } +#line 3667 "bison_parser.cpp" /* yacc.c:1652 */ break; case 157: -#line 843 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3668 "bison_parser.cpp" /* yacc.c:1646 */ +#line 849 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-2].expr), (yyvsp[-1].expr), nullptr); } +#line 3673 "bison_parser.cpp" /* yacc.c:1652 */ break; case 158: -#line 844 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } -#line 3674 "bison_parser.cpp" /* yacc.c:1646 */ +#line 850 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeCase((yyvsp[-4].expr), (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3679 "bison_parser.cpp" /* yacc.c:1652 */ break; case 159: -#line 845 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } -#line 3680 "bison_parser.cpp" /* yacc.c:1646 */ +#line 851 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-1].expr), nullptr); } +#line 3685 "bison_parser.cpp" /* yacc.c:1652 */ break; case 160: -#line 849 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 3686 "bison_parser.cpp" /* yacc.c:1646 */ +#line 852 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeCase(nullptr, (yyvsp[-3].expr), (yyvsp[-1].expr)); } +#line 3691 "bison_parser.cpp" /* yacc.c:1652 */ break; case 161: -#line 850 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } -#line 3692 "bison_parser.cpp" /* yacc.c:1646 */ +#line 856 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeCaseList(Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 3697 "bison_parser.cpp" /* yacc.c:1652 */ break; case 162: -#line 854 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } -#line 3698 "bison_parser.cpp" /* yacc.c:1646 */ +#line 857 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::caseListAppend((yyvsp[-4].expr), Expr::makeCaseListElement((yyvsp[-2].expr), (yyvsp[0].expr))); } +#line 3703 "bison_parser.cpp" /* yacc.c:1652 */ break; case 163: -#line 855 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } -#line 3704 "bison_parser.cpp" /* yacc.c:1646 */ +#line 861 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeExists((yyvsp[-1].select_stmt)); } +#line 3709 "bison_parser.cpp" /* yacc.c:1652 */ break; case 164: -#line 859 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3710 "bison_parser.cpp" /* yacc.c:1646 */ +#line 862 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpUnary(kOpNot, Expr::makeExists((yyvsp[-1].select_stmt))); } +#line 3715 "bison_parser.cpp" /* yacc.c:1652 */ break; case 165: -#line 860 "bison_parser.y" /* yacc.c:1646 */ +#line 866 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } -#line 3716 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3721 "bison_parser.cpp" /* yacc.c:1652 */ break; case 166: -#line 861 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } -#line 3722 "bison_parser.cpp" /* yacc.c:1646 */ +#line 867 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpEquals, (yyvsp[0].expr)); } +#line 3727 "bison_parser.cpp" /* yacc.c:1652 */ break; case 167: -#line 862 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } -#line 3728 "bison_parser.cpp" /* yacc.c:1646 */ +#line 868 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpNotEquals, (yyvsp[0].expr)); } +#line 3733 "bison_parser.cpp" /* yacc.c:1652 */ break; case 168: -#line 863 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } -#line 3734 "bison_parser.cpp" /* yacc.c:1646 */ +#line 869 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLess, (yyvsp[0].expr)); } +#line 3739 "bison_parser.cpp" /* yacc.c:1652 */ break; case 169: -#line 864 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } -#line 3740 "bison_parser.cpp" /* yacc.c:1646 */ +#line 870 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreater, (yyvsp[0].expr)); } +#line 3745 "bison_parser.cpp" /* yacc.c:1652 */ break; case 170: -#line 865 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } -#line 3746 "bison_parser.cpp" /* yacc.c:1646 */ +#line 871 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpLessEq, (yyvsp[0].expr)); } +#line 3751 "bison_parser.cpp" /* yacc.c:1652 */ break; case 171: -#line 869 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } -#line 3752 "bison_parser.cpp" /* yacc.c:1646 */ +#line 872 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeOpBinary((yyvsp[-2].expr), kOpGreaterEq, (yyvsp[0].expr)); } +#line 3757 "bison_parser.cpp" /* yacc.c:1652 */ break; case 172: -#line 870 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } -#line 3758 "bison_parser.cpp" /* yacc.c:1646 */ +#line 876 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-2].sval), new std::vector(), false); } +#line 3763 "bison_parser.cpp" /* yacc.c:1652 */ break; case 173: -#line 874 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } -#line 3764 "bison_parser.cpp" /* yacc.c:1646 */ +#line 877 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeFunctionRef((yyvsp[-4].sval), (yyvsp[-1].expr_vec), (yyvsp[-2].bval)); } +#line 3769 "bison_parser.cpp" /* yacc.c:1652 */ break; case 174: -#line 878 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeSecond; } -#line 3770 "bison_parser.cpp" /* yacc.c:1646 */ +#line 881 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeExtract((yyvsp[-3].datetime_field), (yyvsp[-1].expr)); } +#line 3775 "bison_parser.cpp" /* yacc.c:1652 */ break; case 175: -#line 879 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeMinute; } -#line 3776 "bison_parser.cpp" /* yacc.c:1646 */ +#line 885 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeSecond; } +#line 3781 "bison_parser.cpp" /* yacc.c:1652 */ break; case 176: -#line 880 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeHour; } -#line 3782 "bison_parser.cpp" /* yacc.c:1646 */ +#line 886 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeMinute; } +#line 3787 "bison_parser.cpp" /* yacc.c:1652 */ break; case 177: -#line 881 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeDay; } -#line 3788 "bison_parser.cpp" /* yacc.c:1646 */ +#line 887 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeHour; } +#line 3793 "bison_parser.cpp" /* yacc.c:1652 */ break; case 178: -#line 882 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeMonth; } -#line 3794 "bison_parser.cpp" /* yacc.c:1646 */ +#line 888 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeDay; } +#line 3799 "bison_parser.cpp" /* yacc.c:1652 */ break; case 179: -#line 883 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.datetime_field) = kDatetimeYear; } -#line 3800 "bison_parser.cpp" /* yacc.c:1646 */ +#line 889 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeMonth; } +#line 3805 "bison_parser.cpp" /* yacc.c:1652 */ break; case 180: -#line 886 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } -#line 3806 "bison_parser.cpp" /* yacc.c:1646 */ +#line 890 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.datetime_field) = kDatetimeYear; } +#line 3811 "bison_parser.cpp" /* yacc.c:1652 */ break; case 181: -#line 890 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } -#line 3812 "bison_parser.cpp" /* yacc.c:1646 */ +#line 893 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeArray((yyvsp[-1].expr_vec)); } +#line 3817 "bison_parser.cpp" /* yacc.c:1652 */ break; case 182: -#line 894 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } -#line 3818 "bison_parser.cpp" /* yacc.c:1646 */ +#line 897 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeArrayIndex((yyvsp[-3].expr), (yyvsp[-1].expr)->ival); } +#line 3823 "bison_parser.cpp" /* yacc.c:1652 */ break; case 183: -#line 898 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } -#line 3824 "bison_parser.cpp" /* yacc.c:1646 */ +#line 901 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeBetween((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } +#line 3829 "bison_parser.cpp" /* yacc.c:1652 */ break; case 184: -#line 899 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } -#line 3830 "bison_parser.cpp" /* yacc.c:1646 */ +#line 905 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[0].sval)); } +#line 3835 "bison_parser.cpp" /* yacc.c:1652 */ break; case 185: -#line 900 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar(); } -#line 3836 "bison_parser.cpp" /* yacc.c:1646 */ +#line 906 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeColumnRef((yyvsp[-2].sval), (yyvsp[0].sval)); } +#line 3841 "bison_parser.cpp" /* yacc.c:1652 */ break; case 186: -#line 901 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } -#line 3842 "bison_parser.cpp" /* yacc.c:1646 */ +#line 907 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeStar(); } +#line 3847 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 192: -#line 913 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } -#line 3848 "bison_parser.cpp" /* yacc.c:1646 */ + case 187: +#line 908 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeStar((yyvsp[-2].sval)); } +#line 3853 "bison_parser.cpp" /* yacc.c:1652 */ break; case 193: -#line 917 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral(true); } -#line 3854 "bison_parser.cpp" /* yacc.c:1646 */ +#line 920 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].sval)); } +#line 3859 "bison_parser.cpp" /* yacc.c:1652 */ break; case 194: -#line 918 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral(false); } -#line 3860 "bison_parser.cpp" /* yacc.c:1646 */ +#line 924 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeLiteral(true); } +#line 3865 "bison_parser.cpp" /* yacc.c:1652 */ break; case 195: -#line 922 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } -#line 3866 "bison_parser.cpp" /* yacc.c:1646 */ +#line 925 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeLiteral(false); } +#line 3871 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 197: -#line 927 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } -#line 3872 "bison_parser.cpp" /* yacc.c:1646 */ + case 196: +#line 929 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].fval)); } +#line 3877 "bison_parser.cpp" /* yacc.c:1652 */ break; case 198: -#line 931 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.expr) = Expr::makeNullLiteral(); } -#line 3878 "bison_parser.cpp" /* yacc.c:1646 */ +#line 934 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeLiteral((yyvsp[0].ival)); } +#line 3883 "bison_parser.cpp" /* yacc.c:1652 */ break; case 199: -#line 935 "bison_parser.y" /* yacc.c:1646 */ +#line 938 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.expr) = Expr::makeNullLiteral(); } +#line 3889 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 200: +#line 942 "bison_parser.y" /* yacc.c:1652 */ { (yyval.expr) = Expr::makeParameter(yylloc.total_column); (yyval.expr)->ival2 = yyloc.param_list.size(); yyloc.param_list.push_back((yyval.expr)); } -#line 3888 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3899 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 201: -#line 948 "bison_parser.y" /* yacc.c:1646 */ + case 202: +#line 955 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); auto tbl = new TableRef(kTableCrossProduct); tbl->list = (yyvsp[-2].table_vec); (yyval.table) = tbl; } -#line 3899 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3910 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 205: -#line 964 "bison_parser.y" /* yacc.c:1646 */ + case 206: +#line 971 "bison_parser.y" /* yacc.c:1652 */ { auto tbl = new TableRef(kTableSelect); tbl->select = (yyvsp[-2].select_stmt); tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 3910 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 206: -#line 973 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } -#line 3916 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3921 "bison_parser.cpp" /* yacc.c:1652 */ break; case 207: -#line 974 "bison_parser.y" /* yacc.c:1646 */ - { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } -#line 3922 "bison_parser.cpp" /* yacc.c:1646 */ +#line 980 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.table_vec) = new std::vector(); (yyval.table_vec)->push_back((yyvsp[0].table)); } +#line 3927 "bison_parser.cpp" /* yacc.c:1652 */ break; case 208: -#line 979 "bison_parser.y" /* yacc.c:1646 */ +#line 981 "bison_parser.y" /* yacc.c:1652 */ + { (yyvsp[-2].table_vec)->push_back((yyvsp[0].table)); (yyval.table_vec) = (yyvsp[-2].table_vec); } +#line 3933 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 209: +#line 986 "bison_parser.y" /* yacc.c:1652 */ { auto tbl = new TableRef(kTableName); tbl->schema = (yyvsp[-1].table_name).schema; @@ -3930,103 +3941,103 @@ yyreduce: tbl->alias = (yyvsp[0].alias_t); (yyval.table) = tbl; } -#line 3934 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3945 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 209: -#line 990 "bison_parser.y" /* yacc.c:1646 */ + case 210: +#line 997 "bison_parser.y" /* yacc.c:1652 */ { (yyval.table) = new TableRef(kTableName); (yyval.table)->schema = (yyvsp[0].table_name).schema; (yyval.table)->name = (yyvsp[0].table_name).name; } -#line 3944 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 210: -#line 999 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} -#line 3950 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3955 "bison_parser.cpp" /* yacc.c:1652 */ break; case 211: -#line 1000 "bison_parser.y" /* yacc.c:1646 */ +#line 1006 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.table_name).schema = nullptr; (yyval.table_name).name = (yyvsp[0].sval);} +#line 3961 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 212: +#line 1007 "bison_parser.y" /* yacc.c:1652 */ { (yyval.table_name).schema = (yyvsp[-2].sval); (yyval.table_name).name = (yyvsp[0].sval); } -#line 3956 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3967 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 213: -#line 1006 "bison_parser.y" /* yacc.c:1646 */ + case 214: +#line 1013 "bison_parser.y" /* yacc.c:1652 */ { (yyval.alias_t) = new Alias((yyvsp[-3].sval), (yyvsp[-1].str_vec)); } -#line 3962 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 215: -#line 1012 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.alias_t) = nullptr; } -#line 3968 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3973 "bison_parser.cpp" /* yacc.c:1652 */ break; case 216: -#line 1016 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 3974 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1019 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.alias_t) = nullptr; } +#line 3979 "bison_parser.cpp" /* yacc.c:1652 */ break; case 217: -#line 1017 "bison_parser.y" /* yacc.c:1646 */ +#line 1023 "bison_parser.y" /* yacc.c:1652 */ { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } -#line 3980 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3985 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 219: -#line 1023 "bison_parser.y" /* yacc.c:1646 */ + case 218: +#line 1024 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.alias_t) = new Alias((yyvsp[0].sval)); } +#line 3991 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 220: +#line 1030 "bison_parser.y" /* yacc.c:1652 */ { (yyval.alias_t) = nullptr; } -#line 3986 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 221: -#line 1032 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.with_description_vec) = nullptr; } -#line 3992 "bison_parser.cpp" /* yacc.c:1646 */ +#line 3997 "bison_parser.cpp" /* yacc.c:1652 */ break; case 222: -#line 1036 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } -#line 3998 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1039 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.with_description_vec) = nullptr; } +#line 4003 "bison_parser.cpp" /* yacc.c:1652 */ break; case 223: -#line 1040 "bison_parser.y" /* yacc.c:1646 */ +#line 1043 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.with_description_vec) = (yyvsp[0].with_description_vec); } +#line 4009 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 224: +#line 1047 "bison_parser.y" /* yacc.c:1652 */ { (yyval.with_description_vec) = new std::vector(); (yyval.with_description_vec)->push_back((yyvsp[0].with_description_t)); } -#line 4007 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4018 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 224: -#line 1044 "bison_parser.y" /* yacc.c:1646 */ + case 225: +#line 1051 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[-2].with_description_vec)->push_back((yyvsp[0].with_description_t)); (yyval.with_description_vec) = (yyvsp[-2].with_description_vec); } -#line 4016 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4027 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 225: -#line 1051 "bison_parser.y" /* yacc.c:1646 */ + case 226: +#line 1058 "bison_parser.y" /* yacc.c:1652 */ { (yyval.with_description_t) = new WithDescription(); (yyval.with_description_t)->alias = (yyvsp[-2].sval); (yyval.with_description_t)->select = (yyvsp[0].select_stmt); } -#line 4026 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4037 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 226: -#line 1065 "bison_parser.y" /* yacc.c:1646 */ + case 227: +#line 1072 "bison_parser.y" /* yacc.c:1652 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4034,11 +4045,11 @@ yyreduce: (yyval.table)->join->left = (yyvsp[-3].table); (yyval.table)->join->right = (yyvsp[0].table); } -#line 4038 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4049 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 227: -#line 1073 "bison_parser.y" /* yacc.c:1646 */ + case 228: +#line 1080 "bison_parser.y" /* yacc.c:1652 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4047,11 +4058,11 @@ yyreduce: (yyval.table)->join->right = (yyvsp[-2].table); (yyval.table)->join->condition = (yyvsp[0].expr); } -#line 4051 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4062 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 228: -#line 1083 "bison_parser.y" /* yacc.c:1646 */ + case 229: +#line 1090 "bison_parser.y" /* yacc.c:1652 */ { (yyval.table) = new TableRef(kTableJoin); (yyval.table)->join = new JoinDefinition(); @@ -4067,83 +4078,83 @@ yyreduce: (yyval.table)->join->condition = Expr::makeOpBinary(left_col, kOpEquals, right_col); delete (yyvsp[-1].expr); } -#line 4071 "bison_parser.cpp" /* yacc.c:1646 */ - break; - - case 229: -#line 1101 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 4077 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4082 "bison_parser.cpp" /* yacc.c:1652 */ break; case 230: -#line 1102 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinLeft; } -#line 4083 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1108 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinInner; } +#line 4088 "bison_parser.cpp" /* yacc.c:1652 */ break; case 231: -#line 1103 "bison_parser.y" /* yacc.c:1646 */ +#line 1109 "bison_parser.y" /* yacc.c:1652 */ { (yyval.uval) = kJoinLeft; } -#line 4089 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4094 "bison_parser.cpp" /* yacc.c:1652 */ break; case 232: -#line 1104 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinRight; } -#line 4095 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1110 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinLeft; } +#line 4100 "bison_parser.cpp" /* yacc.c:1652 */ break; case 233: -#line 1105 "bison_parser.y" /* yacc.c:1646 */ +#line 1111 "bison_parser.y" /* yacc.c:1652 */ { (yyval.uval) = kJoinRight; } -#line 4101 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4106 "bison_parser.cpp" /* yacc.c:1652 */ break; case 234: -#line 1106 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinFull; } -#line 4107 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1112 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinRight; } +#line 4112 "bison_parser.cpp" /* yacc.c:1652 */ break; case 235: -#line 1107 "bison_parser.y" /* yacc.c:1646 */ +#line 1113 "bison_parser.y" /* yacc.c:1652 */ { (yyval.uval) = kJoinFull; } -#line 4113 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4118 "bison_parser.cpp" /* yacc.c:1652 */ break; case 236: -#line 1108 "bison_parser.y" /* yacc.c:1646 */ +#line 1114 "bison_parser.y" /* yacc.c:1652 */ { (yyval.uval) = kJoinFull; } -#line 4119 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4124 "bison_parser.cpp" /* yacc.c:1652 */ break; case 237: -#line 1109 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinCross; } -#line 4125 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1115 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinFull; } +#line 4130 "bison_parser.cpp" /* yacc.c:1652 */ break; case 238: -#line 1110 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.uval) = kJoinInner; } -#line 4131 "bison_parser.cpp" /* yacc.c:1646 */ +#line 1116 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinCross; } +#line 4136 "bison_parser.cpp" /* yacc.c:1652 */ break; - case 242: -#line 1130 "bison_parser.y" /* yacc.c:1646 */ - { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } -#line 4137 "bison_parser.cpp" /* yacc.c:1646 */ + case 239: +#line 1117 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.uval) = kJoinInner; } +#line 4142 "bison_parser.cpp" /* yacc.c:1652 */ break; case 243: -#line 1131 "bison_parser.y" /* yacc.c:1646 */ +#line 1137 "bison_parser.y" /* yacc.c:1652 */ + { (yyval.str_vec) = new std::vector(); (yyval.str_vec)->push_back((yyvsp[0].sval)); } +#line 4148 "bison_parser.cpp" /* yacc.c:1652 */ + break; + + case 244: +#line 1138 "bison_parser.y" /* yacc.c:1652 */ { (yyvsp[-2].str_vec)->push_back((yyvsp[0].sval)); (yyval.str_vec) = (yyvsp[-2].str_vec); } -#line 4143 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4154 "bison_parser.cpp" /* yacc.c:1652 */ break; -#line 4147 "bison_parser.cpp" /* yacc.c:1646 */ +#line 4158 "bison_parser.cpp" /* yacc.c:1652 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4169,14 +4180,13 @@ yyreduce: /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; + { + const int yylhs = yyr1[yyn] - YYNTOKENS; + const int yyi = yypgoto[yylhs] + *yyssp; + yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp + ? yytable[yyi] + : yydefgoto[yylhs]); + } goto yynewstate; @@ -4259,14 +4269,11 @@ yyerrlab: | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: + /* Pacify compilers when the user code never invokes YYERROR and the + label yyerrorlab therefore never appears in user code. */ + if (0) + YYERROR; - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -4332,6 +4339,7 @@ yyacceptlab: yyresult = 0; goto yyreturn; + /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ @@ -4339,6 +4347,7 @@ yyabortlab: yyresult = 1; goto yyreturn; + #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | @@ -4349,6 +4358,10 @@ yyexhaustedlab: /* Fall through. */ #endif + +/*-----------------------------------------------------. +| yyreturn -- parsing is finished, return the result. | +`-----------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -4378,7 +4391,7 @@ yyreturn: #endif return yyresult; } -#line 1134 "bison_parser.y" /* yacc.c:1906 */ +#line 1141 "bison_parser.y" /* yacc.c:1918 */ /********************************* ** Section 4: Additional C code diff --git a/src/parser/bison_parser.h b/src/parser/bison_parser.h index 0bc0246..1eb6a29 100644 --- a/src/parser/bison_parser.h +++ b/src/parser/bison_parser.h @@ -1,8 +1,9 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ +/* A Bison parser, made by GNU Bison 3.3.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, + Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,6 +31,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ +/* Undocumented macros, especially those whose name start with YY_, + are private implementation details. Do not rely on them. */ + #ifndef YY_HSQL_BISON_PARSER_H_INCLUDED # define YY_HSQL_BISON_PARSER_H_INCLUDED /* Debug traces. */ @@ -48,7 +52,7 @@ extern int hsql_debug; #endif /* "%code requires" blocks. */ -#line 35 "bison_parser.y" /* yacc.c:1909 */ +#line 35 "bison_parser.y" /* yacc.c:1921 */ // %code requires block @@ -72,7 +76,7 @@ extern int hsql_debug; } \ } -#line 76 "bison_parser.h" /* yacc.c:1909 */ +#line 80 "bison_parser.h" /* yacc.c:1921 */ /* Token type. */ #ifndef HSQL_TOKENTYPE @@ -230,7 +234,7 @@ extern int hsql_debug; union HSQL_STYPE { -#line 95 "bison_parser.y" /* yacc.c:1909 */ +#line 95 "bison_parser.y" /* yacc.c:1921 */ double fval; int64_t ival; @@ -274,7 +278,7 @@ union HSQL_STYPE std::vector* order_vec; std::vector* with_description_vec; -#line 278 "bison_parser.h" /* yacc.c:1909 */ +#line 282 "bison_parser.h" /* yacc.c:1921 */ }; typedef union HSQL_STYPE HSQL_STYPE; diff --git a/src/parser/bison_parser.y b/src/parser/bison_parser.y index afc1c4a..aa5d048 100755 --- a/src/parser/bison_parser.y +++ b/src/parser/bison_parser.y @@ -430,6 +430,13 @@ create_statement: $$->tableName = $4.name; $$->columns = $6; } + | CREATE TABLE opt_not_exists table_name AS select_statement { + $$ = new CreateStatement(kCreateTable); + $$->ifNotExists = $3; + $$->schema = $4.schema; + $$->tableName = $4.name; + $$->select = $6; + } | CREATE VIEW opt_not_exists table_name opt_column_list AS select_statement { $$ = new CreateStatement(kCreateView); $$->ifNotExists = $3; diff --git a/test/queries/queries-good.sql b/test/queries/queries-good.sql index 5958a01..94a4a37 100755 --- a/test/queries/queries-good.sql +++ b/test/queries/queries-good.sql @@ -26,6 +26,8 @@ CREATE TABLE "table" FROM TBL FILE 'students.tbl' CREATE TABLE IF NOT EXISTS "table" FROM TBL FILE 'students.tbl' CREATE TABLE students (name TEXT, student_number INTEGER, city TEXT, grade DOUBLE) CREATE TABLE teachers (name VARCHAR(30), student_number LONG, city CHAR(10), grade FLOAT) +CREATE TABLE students_2 AS SELECT * FROM students +CREATE TABLE students_3 AS SELECT city, grade FROM students WHERE grade > 3.0 # Multiple statements CREATE TABLE "table" FROM TBL FILE 'students.tbl'; SELECT * FROM "table"; # INSERT diff --git a/test/sql_tests.cpp b/test/sql_tests.cpp index 73c59aa..80310ab 100644 --- a/test/sql_tests.cpp +++ b/test/sql_tests.cpp @@ -58,6 +58,24 @@ TEST(CreateStatementTest) { ASSERT_EQ(stmt->columns->at(3)->nullable, false); } +TEST(CreateAsSelectStatementTest) { + SQLParserResult result; + SQLParser::parse("CREATE TABLE students_2 AS SELECT student_number, grade FROM students", &result); + + ASSERT(result.isValid()); + ASSERT_EQ(result.size(), 1); + ASSERT_EQ(result.getStatement(0)->type(), kStmtCreate); + + const CreateStatement* stmt = (const CreateStatement*) result.getStatement(0); + ASSERT_EQ(stmt->type, kCreateTable); + ASSERT_STREQ(stmt->tableName, "students_2"); + ASSERT_NULL(stmt->columns); + ASSERT_NOTNULL(stmt->select); + ASSERT(stmt->select->selectList->at(0)->isType(kExprColumnRef)); + ASSERT_STREQ(stmt->select->selectList->at(0)->getName(), "student_number"); + ASSERT(stmt->select->selectList->at(1)->isType(kExprColumnRef)); + ASSERT_STREQ(stmt->select->selectList->at(1)->getName(), "grade"); +} TEST(UpdateStatementTest) { SQLParserResult result;